History log of /llvm-project/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp (Results 51 – 75 of 230)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# dfb717da 30-Sep-2020 Sean Fertile <sd.fertile@gmail.com>

[PowerPC] Remove support for VRSAVE save/restore/update.

After removal of Darwin as a PowerPC subtarget, the VRSAVE
save/restore/spill/update code is no longer needed by any supported
subtarget, so

[PowerPC] Remove support for VRSAVE save/restore/update.

After removal of Darwin as a PowerPC subtarget, the VRSAVE
save/restore/spill/update code is no longer needed by any supported
subtarget, so remove it while keeping support for vrsave and related instruction
aliases for inline asm. I've pre-commited tests to document the existing vrsave
handling in relation to @llvm.eh.unwind.init and inline asm usage, as
well as a test which shows a beahviour change on AIX related to
returning vector type as we were wrongly emiting VRSAVE_UPDATE on AIX.

show more ...


Revision tags: llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3
# fecc27db 01-Sep-2020 Sean Fertile <sd.fertile@gmail.com>

[PowerPC][AIX] Update save/restore offset for frame and base pointers.

General purpose registers 30 and 31 are handled differently when they are
reserved as the base-pointer and frame-pointer respec

[PowerPC][AIX] Update save/restore offset for frame and base pointers.

General purpose registers 30 and 31 are handled differently when they are
reserved as the base-pointer and frame-pointer respectively. This fixes the
offset of their fixed-stack objects when there are fpr calle-saved registers.

Differential Revision: https://reviews.llvm.org/D85850

show more ...


Revision tags: llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1
# 89122522 22-Jul-2020 Kai Luo <lkail@cn.ibm.com>

[PowerPC] Fix wrong codegen when stack pointer has to realign in prologue

Current powerpc backend generates wrong code sequence if stack pointer
has to realign if -fstack-clash-protection enabled. W

[PowerPC] Fix wrong codegen when stack pointer has to realign in prologue

Current powerpc backend generates wrong code sequence if stack pointer
has to realign if -fstack-clash-protection enabled. When probing in
prologue, backend should generate a subtraction instruction rather
than a `stux` instruction to realign the stack pointer.

This patch is part of fix of
https://bugs.llvm.org/show_bug.cgi?id=46759.

Differential Revision: https://reviews.llvm.org/D84218

show more ...


Revision tags: llvmorg-12-init
# d4e7d126 13-Jul-2020 Kai Luo <lkail@cn.ibm.com>

[PowerPC] Generate CFI directives when probing in prologue

Add missing CFI directives when probing in prologue if
`stack-clash-protection` is enabled.

Differential Revision: https://reviews.llvm.or

[PowerPC] Generate CFI directives when probing in prologue

Add missing CFI directives when probing in prologue if
`stack-clash-protection` is enabled.

Differential Revision: https://reviews.llvm.org/D83276

show more ...


Revision tags: llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3
# c352e088 03-Jul-2020 Kai Luo <lkail@cn.ibm.com>

[PowerPC] Implement probing for prologue

This patch is part of supporting `-fstack-clash-protection`. Implemented
probing when emitting prologue.

Differential Revision: https://reviews.llvm.org/D81

[PowerPC] Implement probing for prologue

This patch is part of supporting `-fstack-clash-protection`. Implemented
probing when emitting prologue.

Differential Revision: https://reviews.llvm.org/D81460

show more ...


# 484a36b9 03-Jul-2020 Sean Fertile <sd.fertile@gmail.com>

Enable basepointer for AIX.

Differential Revision: https://reviews.llvm.org/D82030


# a976ea32 30-Jun-2020 Guillaume Chatelet <gchatelet@google.com>

[Alignment][NFC] Migrate PPC, X86 and XCore backends to Align

This patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/201

[Alignment][NFC] Migrate PPC, X86 and XCore backends to Align

This patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Differential Revision: https://reviews.llvm.org/D82779

show more ...


Revision tags: llvmorg-10.0.1-rc2
# 3e62289f 26-May-2020 Sean Fertile <sd.fertile@gmail.com>

[PowerPC][NFC] Add colon to TODO's and fix indentation.


# d6c87362 26-May-2020 Sean Fertile <sd.fertile@gmail.com>

[PowerPC][AIX] Spill CSRs to the ABI specified stack offsets.

Extend the CSR save/restore insertion code to support both 32-bit and
64-bit AIX.

Differential Revision: https://reviews.llvm.org/D79252


# 0840d725 22-May-2020 Fangrui Song <maskray@google.com>

[MC] Change MCCFIInstruction::createDefCfaOffset to cfiDefCfaOffset which does not negate Offset

The negative Offset has caused a bunch of problems and confused quite a
few call sites. Delete the un

[MC] Change MCCFIInstruction::createDefCfaOffset to cfiDefCfaOffset which does not negate Offset

The negative Offset has caused a bunch of problems and confused quite a
few call sites. Delete the unneeded negation and fix all call sites.

show more ...


Revision tags: llvmorg-10.0.1-rc1
# 4dad4914 19-May-2020 Matt Arsenault <Matthew.Arsenault@amd.com>

CodeGen: Use Register


# 1ea8d58f 11-May-2020 Sean Fertile <sd.fertile@gmail.com>

[PowerPC][NFC] Convert an if/else to a conditional.

Change an if else to use a conditional which is shorter. Also name the
conditonal value to make the code clearer.


# 1354a03e 24-Apr-2020 Stefan Pintilie <stefanp@ca.ibm.com>

[PowerPC][Future] Implement PC Relative Tail Calls

Tail Calls were initially disabled for PC Relative code because it was not safe
to make certain assumptions about the tail calls (namely that all c

[PowerPC][Future] Implement PC Relative Tail Calls

Tail Calls were initially disabled for PC Relative code because it was not safe
to make certain assumptions about the tail calls (namely that all compiled
functions no longer used the TOC pointer in R2). However, once all of the
TOC pointer references have been removed it is safe to tail call everything
that was tail called prior to the PC relative additions as well as a number of
new cases.
For example, it is now possible to tail call indirect functions as there is no
need to save and restore the TOC pointer for indirect functions if the caller
is marked as may clobber R2 (st_other=1). For the same reason it is now also
possible to tail call functions that are external.

Differential Revision: https://reviews.llvm.org/D77788

show more ...


Revision tags: llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5
# d000655a 18-Mar-2020 Guillaume Chatelet <gchatelet@google.com>

[Alignment][NFC] Deprecate getMaxAlignment

Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/

[Alignment][NFC] Deprecate getMaxAlignment

Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet

Subscribers: jholewinski, arsenm, dschuff, jyknight, sdardis, nemanjai, jvesely, nhaehnle, sbc100, jgravelle-google, hiraditya, aheejin, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, Jim, lenary, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, kerbowa, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D76348

show more ...


Revision tags: llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3
# 186dd631 29-Feb-2020 Benjamin Kramer <benny.kra@googlemail.com>

ArrayRef'ize restoreCalleeSavedRegisters. NFCI.

restoreCalleeSavedRegisters can mutate the contents of the
CalleeSavedInfos, so use a MutableArrayRef.


# 8efc2f57 24-Feb-2020 Sean Fertile <sd.fertile@gmail.com>

[PowerPC][AIX] Spill/restore the callee-saved condition register bits.

Extends the existing support for spilling and restoring the condition
register to the linkage area for 32-bit targets, and enab

[PowerPC][AIX] Spill/restore the callee-saved condition register bits.

Extends the existing support for spilling and restoring the condition
register to the linkage area for 32-bit targets, and enables for AIX.

Differential Revision: https://reviews.llvm.org/D74349

show more ...


# 4fdaac0e 20-Feb-2020 Sean Fertile <sd.fertile@gmail.com>

[PowerPC][NFC] Remove Darwin specific logic in frame finalization.

Remove some cumbersome Darwin specific logic for updating the frame
offsets of the condition-register spill slots. The containing f

[PowerPC][NFC] Remove Darwin specific logic in frame finalization.

Remove some cumbersome Darwin specific logic for updating the frame
offsets of the condition-register spill slots. The containing function has an
early return if the subtarget is not ELF based which makes the Darwin logic
dead.

show more ...


# 3126b556 18-Feb-2020 Sean Fertile <sd.fertile@gmail.com>

[PowerPC][NFC] Add defines to help creating the SpillSlot arrays.

Create preprocessor defines for callee saved floating-point register spill
slots, vector register spill slots, and both 32-bit and 6

[PowerPC][NFC] Add defines to help creating the SpillSlot arrays.

Create preprocessor defines for callee saved floating-point register spill
slots, vector register spill slots, and both 32-bit and 64-bit general
purpose register spill slots. This is an NFC refactor to prepare for
adding ABI compliant callee saves and restores for AIX.

show more ...


# b2d1e002 13-Feb-2020 Sean Fertile <sd.fertile@gmail.com>

[PowerPC][NFC] Small cleanup to restore CR field code in PPCFrameLowering.

Skip the loop over the CalleSavedInfos in 'restoreCalleeSavedRegisters' when
the register is a CR field and we are not targ

[PowerPC][NFC] Small cleanup to restore CR field code in PPCFrameLowering.

Skip the loop over the CalleSavedInfos in 'restoreCalleeSavedRegisters' when
the register is a CR field and we are not targeting 32-bit ELF. This is safe
because:
1) The helper function 'restoreCRs' returns if the target is not 32-bit ELF,
making all the code in the loop related to CR fields dead for every other
subtarget. This code is only called on ELF right now, but the patch
to extend it for AIX also needs to skip 'restoreCRs'.
2) The loop will not otherwise modify the iterator, so the iterator
manipulations at the bottom of the loop end up setting 'I' to its
current value.

This simplifciation allows us to remove one argument from 'restoreCRs'.

Also add a helper function to determine if a register is one of the
callee saved condition register fields.

show more ...


Revision tags: llvmorg-10.0.0-rc2
# 660b0d7f 10-Feb-2020 Xiangling Liao <Xiangling.Liao@ibm.com>

[AIX] Enable frame pointer for AIX and add related test suite

This patch:
- enable frame pointer for AIX;
- update some of red zone comments;
- add/update testcases;

Differential Revision:

[AIX] Enable frame pointer for AIX and add related test suite

This patch:
- enable frame pointer for AIX;
- update some of red zone comments;
- add/update testcases;

Differential Revision: https://reviews.llvm.org/D72454

show more ...


# e4230a9f 08-Feb-2020 Benjamin Kramer <benny.kra@googlemail.com>

ArrayRef'ize spillCalleeSavedRegisters. NFCI.


# 26bf877e 07-Feb-2020 Nemanja Ivanovic <nemanja.i.ibm@gmail.com>

[PowerPC] Fix spilling of vector registers in PEI of EH aware functions

On little endian targets prior to Power9, we spill vector registers using a
swapping store (i.e. stdxvd2x saves the vector wit

[PowerPC] Fix spilling of vector registers in PEI of EH aware functions

On little endian targets prior to Power9, we spill vector registers using a
swapping store (i.e. stdxvd2x saves the vector with the two doublewords in
big endian order regardless of endianness). This is generally not a problem
since we restore them using the corresponding swapping load (lxvd2x). However
if the restore is done by the unwinder, the vector register contains data in
the incorrect order.

This patch fixes that by using Altivec loads/stores for vector saves and
restores in PEI (which keep the order correct) under those specific conditions:
- EH aware function
- Subtarget requires swaps for VSX memops (Little Endian prior to Power9)

Differential revision: https://reviews.llvm.org/D73692

show more ...


Revision tags: llvmorg-10.0.0-rc1
# 88073d40 27-Jan-2020 Sean Fertile <sd.fertile@gmail.com>

[PowerPC] Create a FixedStack object for CR save in linkage area.

hasReservedSpillSlot returns a dummy frame index of '0' on PPC64 for the
non-volatile condition registers, which leads to the CalleS

[PowerPC] Create a FixedStack object for CR save in linkage area.

hasReservedSpillSlot returns a dummy frame index of '0' on PPC64 for the
non-volatile condition registers, which leads to the CalleSavedInfo
either referencing an unrelated stack object, or an invalid object if
there are no stack objects. The latter case causes the mir-printer to
crash due to assertions that checks if the frame index referenced by a
CalleeSavedInfo is valid.

To fix the problem create an immutable FixedStack object at the correct offset
in the linkage area of the previous stack frame (ie SP + positive offset).

Differential Revision: https://reviews.llvm.org/D73709

show more ...


Revision tags: llvmorg-11-init
# 8e1f0974 02-Jan-2020 Fangrui Song <maskray@google.com>

[PowerPC] Delete PPCSubtarget::isDarwin and isDarwinABI

http://lists.llvm.org/pipermail/llvm-dev/2018-August/125614.html developers have agreed to remove Darwin support from POWER backends.

Reviewe

[PowerPC] Delete PPCSubtarget::isDarwin and isDarwinABI

http://lists.llvm.org/pipermail/llvm-dev/2018-August/125614.html developers have agreed to remove Darwin support from POWER backends.

Reviewed By: sfertile

Differential Revision: https://reviews.llvm.org/D72067

show more ...


# 93faa237 13-Dec-2019 Sean Fertile <sd.fertile@gmail.com>

[PowerPC] Add Support for indirect calls on AIX.

Extends the desciptor-based indirect call support for 32-bit codegen,
and enables indirect calls for AIX.

In-depth Description:
In a function descri

[PowerPC] Add Support for indirect calls on AIX.

Extends the desciptor-based indirect call support for 32-bit codegen,
and enables indirect calls for AIX.

In-depth Description:
In a function descriptor based ABI, a function pointer points at a
descriptor structure as opposed to the function's entry point. The
descriptor takes the form of 3 pointers: 1 for the function's entry
point, 1 for the TOC anchor of the module containing the function
definition, and 1 for the environment pointer:

struct FunctionDescriptor {
void *EntryPoint;
void *TOCAnchor;
void *EnvironmentPointer;
};

An indirect call has several steps of loading the the information from
the descriptor into the proper registers for setting up the call. Namely
it has to:

1) Save the caller's TOC pointer into the TOC save slot in the linkage
area, and then load the callee's TOC pointer into the TOC register
(GPR 2 on AIX).

2) Load the function descriptor's entry point into the count register.

3) Load the environment pointer into the environment pointer register
(GPR 11 on AIX).

4) Perform the call by branching on count register.

5) Restore the caller's TOC pointer after returning from the indirect call.

A couple important caveats to the above:

- There is no way to directly load a value from memory into the count register.
Instead we populate the count register by loading the entry point address into
a gpr and then moving the gpr to the count register.

- The TOC restore has to come immediately after the branch on count register
instruction (i.e., the 1st instruction executed after we return from the
call). This is an implementation limitation. We could, in theory, schedule
the restore elsewhere as long as no uses of the TOC pointer fall in between
the call and the restore; however, to keep it simple, we insert a pseudo
instruction that represents both the indirect branch instruction and the
load instruction that restores the caller's TOC from the linkage area. As
they flow through the compiler as a single pseudo instruction, nothing can be
inserted between them and the caller's TOC is then valid at any use.

Differtential Revision: https://reviews.llvm.org/D70724

show more ...


12345678910