History log of /llvm-project/llvm/lib/CodeGen/PrologEpilogInserter.cpp (Results 1 – 25 of 502)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init
# 817e7772 27-Jan-2025 Kazu Hirata <kazu@google.com>

[CodeGen] Avoid repeated hash lookups (NFC) (#124506)


# b7eee2c3 19-Jan-2025 Craig Topper <craig.topper@sifive.com>

[CodeGen] Remove some implict conversions of MCRegister to unsigned by using(). NFC

Many of these are indexing BitVectors or something where we can't
using MCRegister and need the register number.


Revision tags: llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4
# 735ab61a 13-Nov-2024 Kazu Hirata <kazu@google.com>

[CodeGen] Remove unused includes (NFC) (#115996)

Identified with misc-include-cleaner.


Revision tags: llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4
# 768598bc 21-Aug-2024 Hans Wennborg <hans@chromium.org>

Revert "[LLVM] [X86] Fix integer overflows in frame layout for huge frames (#101840)"

This casuses assertion failures targeting 32-bit x86:

lib/Target/X86/X86RegisterInfo.cpp:989:
virtual bool

Revert "[LLVM] [X86] Fix integer overflows in frame layout for huge frames (#101840)"

This casuses assertion failures targeting 32-bit x86:

lib/Target/X86/X86RegisterInfo.cpp:989:
virtual bool llvm::X86RegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator, int, unsigned int, RegScavenger *) const:
Assertion `(Is64Bit || FitsIn32Bits) && "Requesting 64-bit offset in 32-bit immediate!"' failed.

See comment on the PR.

> Fix 32-bit integer overflows in the X86 target frame layout when dealing
> with frames larger than 4gb. When this occurs, we'll scavenge a scratch
> register to be able to hold the correct stack offset for frame locals.
>
> This completes reapplying #84114.
>
> Fixes #48911
> Fixes #75944
> Fixes #87154

This reverts commit 0abb7791614947bc24931dd851ade31d02496977.

show more ...


Revision tags: llvmorg-19.1.0-rc3
# 0abb7791 19-Aug-2024 Wesley Wiser <wwiser@gmail.com>

[LLVM] [X86] Fix integer overflows in frame layout for huge frames (#101840)

Fix 32-bit integer overflows in the X86 target frame layout when dealing
with frames larger than 4gb. When this occurs,

[LLVM] [X86] Fix integer overflows in frame layout for huge frames (#101840)

Fix 32-bit integer overflows in the X86 target frame layout when dealing
with frames larger than 4gb. When this occurs, we'll scavenge a scratch
register to be able to hold the correct stack offset for frame locals.

This completes reapplying #84114.

Fixes #48911
Fixes #75944
Fixes #87154

show more ...


# 0d471b3f 06-Aug-2024 weiguozhi <57237827+weiguozhi@users.noreply.github.com>

Spill/restore FP/BP around instructions in which they are clobbered (#81048)

This patch fixes https://github.com/llvm/llvm-project/issues/17204.

If a base pointer is used in a function, and it is

Spill/restore FP/BP around instructions in which they are clobbered (#81048)

This patch fixes https://github.com/llvm/llvm-project/issues/17204.

If a base pointer is used in a function, and it is clobbered by an
instruction (typically an inline asm), current register allocator can't
handle this situation, so BP becomes garbage after those instructions.
It can also occur to FP in theory.

We can spill and reload FP/BP registers around those instructions. But
normal spill/reload instructions also use FP/BP, so we can't spill them
into normal spill slots, instead we spill them into the top of stack by
using SP register.

show more ...


# a98a0dcf 06-Aug-2024 Hari Limaye <hari.limaye@arm.com>

[AArch64] Add streaming-mode stack hazard optimization remarks (#101695)

Emit an optimization remark when objects in the stack frame may cause
hazards in a streaming mode function. The analysis req

[AArch64] Add streaming-mode stack hazard optimization remarks (#101695)

Emit an optimization remark when objects in the stack frame may cause
hazards in a streaming mode function. The analysis requires either the
`aarch64-stack-hazard-size` or `aarch64-stack-hazard-remark-size` flag
to be set by the user, with the former flag taking precedence.

show more ...


Revision tags: llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1
# ca076f7a 23-Jul-2024 Wesley Wiser <wwiser@gmail.com>

[LLVM] [MC] Update frame layout & CFI generation to handle frames larger than 2gb (#99263)

Rebase of #84114. I've only included the core changes to frame layout
calculation & CFI generation which s

[LLVM] [MC] Update frame layout & CFI generation to handle frames larger than 2gb (#99263)

Rebase of #84114. I've only included the core changes to frame layout
calculation & CFI generation which sidesteps the regressions found after
merging #84114. Since these changes are a necessary precursor to the
overall fix and are themselves slightly beneficial as CFI is now
generated correctly, I think it is reasonable to merge this first step.

---

For very large stack frames, the offset from the stack pointer to a
local can be more than 2^31 which overflows various `int` offsets in the
frame lowering code.

This patch updates the frame lowering code to calculate the offsets as
64-bit values and fixes CFI to use the corrected sizes.

After this patch, additional work is needed to fix offset truncations in
each target's codegen.

show more ...


Revision tags: llvmorg-20-init
# 79d0de2a 09-Jul-2024 paperchalice <liujunchang97@outlook.com>

[CodeGen][NewPM] Port `machine-loops` to new pass manager (#97793)

- Add `MachineLoopAnalysis`.
- Add `MachineLoopPrinterPass`.
- Convert to `MachineLoopInfoWrapperPass` in legacy pass manager.


Revision tags: llvmorg-18.1.8
# 837dc542 11-Jun-2024 paperchalice <liujunchang97@outlook.com>

[CodeGen][NewPM] Split `MachineDominatorTree` into a concrete analysis result (#94571)

Prepare for new pass manager version of `MachineDominatorTreeAnalysis`.
We may need a machine dominator tree v

[CodeGen][NewPM] Split `MachineDominatorTree` into a concrete analysis result (#94571)

Prepare for new pass manager version of `MachineDominatorTreeAnalysis`.
We may need a machine dominator tree version of `DomTreeUpdater` to
handle `SplitCriticalEdge` in some CodeGen passes.

show more ...


Revision tags: llvmorg-18.1.7, llvmorg-18.1.6
# 1650f1b3 15-May-2024 Jay Foad <jay.foad@amd.com>

Fix typo "indicies" (#92232)


Revision tags: llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3
# 78f0871b 27-Mar-2024 Simon Pilgrim <llvm-dev@redking.me.uk>

Revert rG58de1e2c5eee548a9b365e3b1554d87317072ad9 "Fix stack layout for frames larger than 2gb (#84114)"

This is failing on some EXPENSIVE_CHECKS buildbots


# 58de1e2c 27-Mar-2024 Wesley Wiser <wwiser@gmail.com>

Fix stack layout for frames larger than 2gb (#84114)

For very large stack frames, the offset from the stack pointer to a local can be more than 2^31 which overflows various `int` offsets in the fram

Fix stack layout for frames larger than 2gb (#84114)

For very large stack frames, the offset from the stack pointer to a local can be more than 2^31 which overflows various `int` offsets in the frame lowering code.

This patch updates the frame lowering code to calculate the offsets as 64-bit values and resolves the overflows, resulting in the correct codegen for very large frames.

Fixes #48911

show more ...


# 9ebd329a 20-Mar-2024 Jonas Paulsson <paulson1@linux.ibm.com>

Revert "Move assertion for AdjustsStack from PEI to MachineVerifier. (#85698)"

This reverts commit 05bde30585710a51592eee0a6cf6df8184d09c92.

Reverting due to verifier complaints with expensive chec

Revert "Move assertion for AdjustsStack from PEI to MachineVerifier. (#85698)"

This reverts commit 05bde30585710a51592eee0a6cf6df8184d09c92.

Reverting due to verifier complaints with expensive checks on build-bot.

show more ...


# 05bde305 20-Mar-2024 Jonas Paulsson <paulson1@linux.ibm.com>

Move assertion for AdjustsStack from PEI to MachineVerifier. (#85698)

Have the verifier report a missing AdjustsStack flag rather than waiting until
PEI asserts.


Revision tags: llvmorg-18.1.2
# 73381a8d 18-Mar-2024 Jie Fu <jiefu@tencent.com>

[CodeGen] Fix -Wunused-variable in PrologEpilogInserter.cpp (NFC)

llvm-project/llvm/lib/CodeGen/PrologEpilogInserter.cpp:369:12:
error: unused variable 'MaxCFSIn' [-Werror,-Wunused-variable]
uint3

[CodeGen] Fix -Wunused-variable in PrologEpilogInserter.cpp (NFC)

llvm-project/llvm/lib/CodeGen/PrologEpilogInserter.cpp:369:12:
error: unused variable 'MaxCFSIn' [-Werror,-Wunused-variable]
uint32_t MaxCFSIn =
^
1 error generated.

show more ...


# 09bc6abb 18-Mar-2024 Jonas Paulsson <paulson1@linux.ibm.com>

[MachineFrameInfo] Refactoring around computeMaxcallFrameSize() (NFC) (#78001)

- Use computeMaxCallFrameSize() in PEI::calculateCallFrameInfo() instead of duplicating the code.

- Set AdjustsStack

[MachineFrameInfo] Refactoring around computeMaxcallFrameSize() (NFC) (#78001)

- Use computeMaxCallFrameSize() in PEI::calculateCallFrameInfo() instead of duplicating the code.

- Set AdjustsStack in FinalizeISel instead of in computeMaxCallFrameSize().

show more ...


Revision tags: llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5
# d5f3b3b3 08-Nov-2023 Jay Foad <jay.foad@amd.com>

[RegScavenger] Simplify state tracking for backwards scavenging (#71202)

Track the live register state immediately before, instead of after,
MBBI. This makes it simple to track the state at the sta

[RegScavenger] Simplify state tracking for backwards scavenging (#71202)

Track the live register state immediately before, instead of after,
MBBI. This makes it simple to track the state at the start or end of a
basic block without a separate (and poorly named) Tracking flag.

This changes the API of the backward(MachineBasicBlock::iterator I)
method, which now recedes to the state just before, instead of just
after, *I. Some clients are simplified by this change.

There is one small functional change shown in the lit tests where
multiple spilled registers all need to be reloaded before the same
instruction. The reloads will now be inserted in the opposite order.
This should not affect correctness.

show more ...


Revision tags: llvmorg-17.0.4
# 461918e2 22-Oct-2023 Jon Roelofs <jonathan_roelofs@apple.com>

[CodeGen][Remarks] Add the function name to the stack size remark (#69346)

It is already present in the yaml, but missing from the printed
diagnostics.


Revision tags: llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0
# 0a1aa6cd 14-Sep-2023 Arthur Eubanks <aeubanks@google.com>

[NFC][CodeGen] Change CodeGenOpt::Level/CodeGenFileType into enum classes (#66295)

This will make it easy for callers to see issues with and fix up calls
to createTargetMachine after a future chang

[NFC][CodeGen] Change CodeGenOpt::Level/CodeGenFileType into enum classes (#66295)

This will make it easy for callers to see issues with and fix up calls
to createTargetMachine after a future change to the params of
TargetMachine.

This matches other nearby enums.

For downstream users, this should be a fairly straightforward
replacement,
e.g. s/CodeGenOpt::Aggressive/CodeGenOptLevel::Aggressive
or s/CGFT_/CodeGenFileType::

show more ...


# d9efcb54 08-Sep-2023 bzEq <lkail@cn.ibm.com>

[PEI][PowerPC] Fix false alarm of stack size limit (#65559)

PPC64 allows stack size up to ((2^63)-1) bytes. Currently llc reports
```
warning: stack frame size (4294967568) exceeds limit (42949672

[PEI][PowerPC] Fix false alarm of stack size limit (#65559)

PPC64 allows stack size up to ((2^63)-1) bytes. Currently llc reports
```
warning: stack frame size (4294967568) exceeds limit (4294967295) in function 'main'
```
if the stack allocated is larger than 4G.

show more ...


Revision tags: llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2
# 25ec2673 03-Aug-2023 Jay Foad <jay.foad@amd.com>

[PEI] Remove support for register scavenging during forwards frame index elimination

All targets that require register scavenging now use backwards frame
index elimination.

Differential Revision: h

[PEI] Remove support for register scavenging during forwards frame index elimination

All targets that require register scavenging now use backwards frame
index elimination.

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

show more ...


# 186b2b48 03-Aug-2023 Jay Foad <jay.foad@amd.com>

[PEI] Switch to backwards frame index elimination by default

Also rename the flag from supportsBackwardScavenger to
eliminateFrameIndicesBackwards to reflect what it actually does.

X86 is the only

[PEI] Switch to backwards frame index elimination by default

Also rename the flag from supportsBackwardScavenger to
eliminateFrameIndicesBackwards to reflect what it actually does.

X86 is the only target still using forwards frame index elimination.
This will not block removing support for forwards register scavenging,
because X86 does not use the register scavenger.

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

show more ...


Revision tags: llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6
# eaca8c2e 08-Jun-2023 Jay Foad <jay.foad@amd.com>

[PEI][PowerPC] Switch to backwards frame index elimination

This adds support for reprocessing new instructions that were generated
by the target's eliminateFrameIndex.

Backwards frame index elimina

[PEI][PowerPC] Switch to backwards frame index elimination

This adds support for reprocessing new instructions that were generated
by the target's eliminateFrameIndex.

Backwards frame index elimination uses backwards register scavenging,
which is preferred because it does not rely on accurate kill flags.

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

show more ...


# f800c1f3 27-Jul-2023 Arthur Eubanks <aeubanks@google.com>

[PEI] Don't zero out noreg operands

A tail call may have $noreg operands.

Fixes a crash.

Reviewed By: xgupta

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


12345678910>>...21