History log of /llvm-project/llvm/lib/CodeGen/RegAllocGreedy.cpp (Results 1 – 25 of 491)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init
# 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
# 4f96fb5f 13-Jan-2025 Akshat Oke <Akshat.Oke@amd.com>

Reapply "Spiller: Detach legacy pass and supply analyses instead (#119181)" (#122665)

Makes Inline Spiller amenable to the new PM.

This reapplies commit a531800344dc54e9c197a13b22e013f919f3f5e1 r

Reapply "Spiller: Detach legacy pass and supply analyses instead (#119181)" (#122665)

Makes Inline Spiller amenable to the new PM.

This reapplies commit a531800344dc54e9c197a13b22e013f919f3f5e1 reverted
because of two unused private members reported on sanitizer bots.

show more ...


# 08955509 10-Jan-2025 Akshat Oke <Akshat.Oke@amd.com>

Revert "Spiller: Detach legacy pass and supply analyses instead (#119… (#122426)

…181)"

This reverts commit a531800344dc54e9c197a13b22e013f919f3f5e1.


# a5318003 10-Jan-2025 Akshat Oke <Akshat.Oke@amd.com>

Spiller: Detach legacy pass and supply analyses instead (#119181)

Makes Inline Spiller amenable to the new PM.


# 67efbd0b 08-Jan-2025 Ryan Mansfield <ryan_mansfield@apple.com>

[LLVM] Fix various cl::desc typos and whitespace issues (NFC) (#121955)


# 93220e7e 06-Jan-2025 Matt Arsenault <Matthew.Arsenault@amd.com>

RegAllocGreedy: Fix use after free during last chance recoloring (#120697)

Last chance recoloring can delete the current fixed interval
during recursive assignment of interfering live intervals. Che

RegAllocGreedy: Fix use after free during last chance recoloring (#120697)

Last chance recoloring can delete the current fixed interval
during recursive assignment of interfering live intervals. Check
if the virtual register value was assigned before attempting the
unassignment, as is done in other scenarios. This relies on the fact
that we do not recycle virtual register numbers.

I have only seen this occur in error situations where the allocation
will fail, but I think this can theoretically happen in working
allocations.

This feels very brute force, but I've spent over a week debugging
this and this is what works without any lit regressions. The surprising
piece to me was that unspillable live ranges may be spilled, and
a number of tests rely on optimizations occurring on them. My other
attempts to fixed this mostly revolved around not identifying unspillable
live ranges as snippet copies. I've also discovered we're making some
unproductive live range splits with subranges. If we avoid such splits,
some of the unspillable copies disappear but mandating that be precise
to fix a use after free doesn't sound right.

show more ...


# 11e482c4 02-Jan-2025 Matt Arsenault <Matthew.Arsenault@amd.com>

RegAllocGreedy: Add dummy priority advisor for writing MIR tests (#121207)

I regularly struggle reproducing failures in greedy due to changes
in priority when resuming the allocation from MIR vs. a

RegAllocGreedy: Add dummy priority advisor for writing MIR tests (#121207)

I regularly struggle reproducing failures in greedy due to changes
in priority when resuming the allocation from MIR vs. a complete
compilation starting at IR. That is, the fix in
e0919b189bf2df4f97f22ba40260ab5153988b14 did not really fix the
problem of the instruction distance mattering.

Add a way to bypass all of the priority heuristics for MIR tests,
by prioritizing only by virtual register number. Could also
give this a more specific name, like PrioritizeLowVirtRegNumber

show more ...


Revision tags: llvmorg-19.1.6
# e2cabd71 17-Dec-2024 Matt Arsenault <Matthew.Arsenault@amd.com>

RegAllocGreedy: Fix comment typo


# 818bffcb 16-Dec-2024 Matt Arsenault <Matthew.Arsenault@amd.com>

RegAlloc: Fix failure on undef use when all registers are reserved (#119647)

Greedy and fast would hit different assertions on undef uses if all
registers in a class were reserved.


# 2c7ece2e 06-Dec-2024 Akshat Oke <Akshat.Oke@amd.com>

[CodeGen][NewPM] Port LiveStacks analysis to NPM (#118778)


# d9b4bdbf 04-Dec-2024 Akshat Oke <Akshat.Oke@amd.com>

[CodeGen][NewPM] Port LiveDebugVariables to NPM (#115468)

The existing analysis was already a pimpl wrapper.

I have extracted legacy pass logic to a LDVImpl wrapper named
`LiveDebugVariables` wh

[CodeGen][NewPM] Port LiveDebugVariables to NPM (#115468)

The existing analysis was already a pimpl wrapper.

I have extracted legacy pass logic to a LDVImpl wrapper named
`LiveDebugVariables` which is the analysis::Result now. This controls
whether to activate the LDV (depending on `-live-debug-variables` and
DIsubprogram) itself.

The legacy and new analysis only construct the LiveDebugVariables.

VirtRegRewriter will test this.

show more ...


Revision tags: llvmorg-19.1.5
# b68340c8 29-Nov-2024 Akshat Oke <Akshat.Oke@amd.com>

[CodeGen][NewPM] Port SpillPlacement analysis to NPM (#116618)


# cac13606 22-Nov-2024 Akshat Oke <Akshat.Oke@amd.com>

[CodeGen][NewPM] Port EdgeBundles analysis to NPM (#116616)


Revision tags: 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
# 4e32d723 22-Oct-2024 Akshat Oke <Akshat.Oke@amd.com>

[NewPM][CodeGen] Port LiveRegMatrix to NPM (#109938)


# 93802815 22-Oct-2024 Akshat Oke <Akshat.Oke@amd.com>

[NewPM][CodeGen] Port VirtRegMap to NPM (#109936)


Revision tags: llvmorg-19.1.2
# 1a65d95d 02-Oct-2024 Bevin Hansson <59652494+bevin-hansson@users.noreply.github.com>

[CodeGen][RAGreedy] Inform LiveDebugVariables about snippets spilled by InlineSpiller. (#109962)

RAGreedy invokes InlineSpiller to spill a particular virtreg inline.
When the spiller does this, it

[CodeGen][RAGreedy] Inform LiveDebugVariables about snippets spilled by InlineSpiller. (#109962)

RAGreedy invokes InlineSpiller to spill a particular virtreg inline.
When the spiller does this, it also identifies small, adjacent liveranges called
snippets. These are also spilled or rematerialized in the process.

However, the spiller does not inform RA that it has spilled these regs.
This means that debug variable locations referencing these regs/ranges
are lost.

Mark any spilled regs which do not have a stack slot assigned to them as
allocated to the slot being spilled to to tell LDV that those regs are
located in that slot, even though the regs might no longer exist in the
program after regalloc is finished. Also, inform RA about all of the
regs which were replaced (spilled or rematted), not just the one that was
requested so that it can properly manage the ranges of the debug vars.

show more ...


Revision tags: llvmorg-19.1.1
# 71ca9fcb 24-Sep-2024 Matt Arsenault <Matthew.Arsenault@amd.com>

llvm-reduce: Don't print verifier failed machine functions (#109673)

This produces far too much terminal output, particularly for the
instruction reduction. Since it doesn't consider the liveness o

llvm-reduce: Don't print verifier failed machine functions (#109673)

This produces far too much terminal output, particularly for the
instruction reduction. Since it doesn't consider the liveness of of
the instructions it's deleting, it produces quite a lot of verifier
errors.

show more ...


Revision tags: llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init
# 15b41d20 22-Jul-2024 Christudasan Devadasan <christudasan.devadasan@amd.com>

[CodeGen] change prototype of regalloc filter function (#93525)

[CodeGen] Change the prototype of regalloc filter function

Change the prototype of the filter function so that we can
filter not j

[CodeGen] change prototype of regalloc filter function (#93525)

[CodeGen] Change the prototype of regalloc filter function

Change the prototype of the filter function so that we can
filter not just by RegClass. We need to implement more
complicated filter based upon some other info associated
with each register.

Patch provided by: Gang Chen (gangc@amd.com)

show more ...


# 66cd2e0f 13-Jul-2024 Kazu Hirata <kazu@google.com>

[CodeGen] Use range-based for loops (NFC) (#98706)


# 09989996 12-Jul-2024 paperchalice <liujunchang97@outlook.com>

[CodeGen][NewPM] Port `machine-block-freq` to new pass manager (#98317)

- Add `MachineBlockFrequencyAnalysis`.
- Add `MachineBlockFrequencyPrinterPass`.
- Use `MachineBlockFrequencyInfoWrapperPass

[CodeGen][NewPM] Port `machine-block-freq` to new pass manager (#98317)

- Add `MachineBlockFrequencyAnalysis`.
- Add `MachineBlockFrequencyPrinterPass`.
- Use `MachineBlockFrequencyInfoWrapperPass` in legacy pass manager.
- `LazyMachineBlockFrequencyInfo::print` is empty, drop it due to new
pass manager migration.

show more ...


# abde52aa 10-Jul-2024 paperchalice <liujunchang97@outlook.com>

[CodeGen][NewPM] Port `LiveIntervals` to new pass manager (#98118)

- Add `LiveIntervalsAnalysis`.
- Add `LiveIntervalsPrinterPass`.
- Use `LiveIntervalsWrapperPass` in legacy pass manager.
- Use

[CodeGen][NewPM] Port `LiveIntervals` to new pass manager (#98118)

- Add `LiveIntervalsAnalysis`.
- Add `LiveIntervalsPrinterPass`.
- Use `LiveIntervalsWrapperPass` in legacy pass manager.
- Use `std::unique_ptr` instead of raw pointer for `LICalc`, so
destructor and default move constructor can handle it correctly.

This would be the last analysis required by `PHIElimination`.

show more ...


# 4010f894 09-Jul-2024 paperchalice <liujunchang97@outlook.com>

[CodeGen][NewPM] Port `SlotIndexes` to new pass manager (#97941)

- Add `SlotIndexesAnalysis`.
- Add `SlotIndexesPrinterPass`.
- Use `SlotIndexesWrapperPass` in legacy pass.


# 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.


# 739a9605 21-Jun-2024 Alexis Engelke <engelke@in.tum.de>

[RegAlloc] Don't call always-true ShouldAllocClass (#96296)

Previously, there was at least one virtual function call for every
allocated register. The only users of this feature are AMDGPU and RISC

[RegAlloc] Don't call always-true ShouldAllocClass (#96296)

Previously, there was at least one virtual function call for every
allocated register. The only users of this feature are AMDGPU and RISC-V
(RVV), other targets don't use this. To easily identify these cases,
change the default functor to nullptr and don't call it for every
allocated register.

show more ...


12345678910>>...20