- Jun 17, 2013
-
-
Benjamin Kramer authored
The main advantages here are way better heuristics, taking into account not just loop depth but also __builtin_expect and other static heuristics and will eventually learn how to use profile info. Most of the work in this patch is pushing the MachineBlockFrequencyInfo analysis into the right places. This is good for a 5% speedup on zlib's deflate (x86_64), there were some very unfortunate spilling decisions in its hottest loop in longest_match(). Other benchmarks I tried were mostly neutral. This changes register allocation in subtle ways, update the tests for it. 2012-02-20-MachineCPBug.ll was deleted as it's very fragile and the instruction it looked for was gone already (but the FileCheck pattern picked up unrelated stuff). llvm-svn: 184105
-
- Apr 12, 2013
-
-
Andy Gibbs authored
llvm-svn: 179373
-
- Mar 05, 2013
-
-
Bill Wendling authored
llvm-svn: 176467
-
- Dec 03, 2012
-
-
Chandler Carruth authored
Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
-
- Nov 28, 2012
-
-
Jakob Stoklund Olesen authored
No functional change, just moved header files. Targets can inject custom passes between register allocation and rewriting. This makes it possible to tweak the register allocation before rewriting, using the full global interference checking available from LiveRegMatrix. llvm-svn: 168806
-
- Aug 22, 2012
-
-
David Blaikie authored
Based on CR feedback from r162301 and Craig Topper's refactoring in r162347 here are a few other places that could use the same API (& in one instance drop a Function.h dependency). llvm-svn: 162367
-
- Jun 21, 2012
-
-
Jakob Stoklund Olesen authored
I don't think anyone has been using this functionality for a while, and it is getting in the way of refactoring now. llvm-svn: 158876
-
Jakob Stoklund Olesen authored
They are living in LiveRegMatrix now. llvm-svn: 158868
-
Jakob Stoklund Olesen authored
Stop using the LiveIntervalUnions provided by RegAllocBase, they will be removed soon. llvm-svn: 158866
-
- Jun 16, 2012
-
-
Benjamin Kramer authored
llvm-svn: 158608
-
Jakob Stoklund Olesen authored
We now have a proper machine code verifier pass between register allocation and rewriting. llvm-svn: 158577
-
- Jun 09, 2012
-
-
Jakob Stoklund Olesen authored
This deduplicates some code from the optimizing register allocators, and it means that it is now possible to change the register allocators' solutions simply by editing the VirtRegMap between the register allocator pass and the rewriter. llvm-svn: 158249
-
Jakob Stoklund Olesen authored
OK, not really. We don't want to reintroduce the old rewriter hacks. This patch extracts virtual register rewriting as a separate pass that runs after the register allocator. This is possible now that CodeGen/Passes.cpp can configure the full optimizing register allocator pipeline. The rewriter pass uses register assignments in VirtRegMap to rewrite virtual registers to physical registers, and it inserts kill flags based on live intervals. These finalization steps are the same for the optimizing register allocators: RABasic, RAGreedy, and PBQP. llvm-svn: 158244
-
- Jun 06, 2012
-
-
Benjamin Kramer authored
There are some that I didn't remove this round because they looked like obvious stubs. There are dead variables in gtest too, they should be fixed upstream. llvm-svn: 158090
-
- Jun 02, 2012
-
-
Jakob Stoklund Olesen authored
No functional change intended. Sorry for the churn. The iterator classes are supposed to help avoid giant commits like this one in the future. The TableGen-produced register lists are getting quite large, and it may be necessary to change the table representation. This makes it possible to do so without changing all clients (again). llvm-svn: 157854
-
- May 19, 2012
-
-
Jakob Stoklund Olesen authored
The dead code elimination with callbacks is still useful. llvm-svn: 157100
-
- Apr 03, 2012
-
-
Pete Cooper authored
llvm-svn: 153906
-
Pete Cooper authored
Refactored the LiveRangeEdit interface so that MachineFunction, TargetInstrInfo, MachineRegisterInfo, LiveIntervals, and VirtRegMap are all passed into the constructor and stored as members instead of passed in to each method. llvm-svn: 153903
-
- Mar 04, 2012
-
-
Craig Topper authored
llvm-svn: 152001
-
- Feb 28, 2012
-
-
Lang Hames authored
methods are no longer needed now that LinearScan has gone away. (Contains tweaks trivialSpillEverywhere to enable the removal of getNewVRegs). llvm-svn: 151658
-
- Feb 21, 2012
-
-
Andrew Trick authored
Passes after RegAlloc should be able to rely on MRI->getNumVirtRegs() == 0. This makes sharing code for pre/postRA passes more robust. Now, to check if a pass is running before the RA pipeline begins, use MRI->isSSA(). To check if a pass is running after the RA pipeline ends, use !MRI->getNumVirtRegs(). PEI resets virtual regs when it's done scavenging. PTX will either have to provide its own PEI pass or assign physregs. llvm-svn: 151032
-
- Feb 10, 2012
-
-
Andrew Trick authored
Creates a configurable regalloc pipeline. Ensure specific llc options do what they say and nothing more: -reglloc=... has no effect other than selecting the allocator pass itself. This patch introduces a new umbrella flag, "-optimize-regalloc", to enable/disable the optimizing regalloc "superpass". This allows for example testing coalscing and scheduling under -O0 or vice-versa. When a CodeGen pass requires the MachineFunction to have a particular property, we need to explicitly define that property so it can be directly queried rather than naming a specific Pass. For example, to check for SSA, use MRI->isSSA, not addRequired<PHIElimination>. CodeGen transformation passes are never "required" as an analysis ProcessImplicitDefs does not require LiveVariables. We have a plan to massively simplify some of the early passes within the regalloc superpass. llvm-svn: 150226
-
- Feb 08, 2012
-
-
Jakob Stoklund Olesen authored
When a virtual register is live across a call, limit the search space to call-preserved registers. llvm-svn: 150081
-
- Jan 17, 2012
-
-
Andrew Trick authored
Responding to code review. llvm-svn: 148290
-
Andrew Trick authored
More short term hackery until we have a way to configure passes that work on LiveIntervals. llvm-svn: 148289
-
- Jan 13, 2012
-
-
Andrew Trick authored
llvm-svn: 148105
-
- Jan 12, 2012
-
-
Jakob Stoklund Olesen authored
llvm-svn: 147979
-
- Jan 11, 2012
-
-
Jakob Stoklund Olesen authored
This helper method is too simplistic for RAGreedy. llvm-svn: 147976
-
Jakob Stoklund Olesen authored
No functional change. llvm-svn: 147972
-
- Jan 05, 2012
-
-
Jakob Stoklund Olesen authored
The register allocators don't currently support adding reserved registers while they are running. Extend the MRI API to keep track of the set of reserved registers when register allocation started. Target hooks like hasFP() and needsStackRealignment() can look at this set to avoid reserving more registers during register allocation. llvm-svn: 147577
-
- Aug 11, 2011
-
-
Jakob Stoklund Olesen authored
No clients are iterating over interference overlaps. llvm-svn: 137350
-
- Aug 09, 2011
-
-
Jakob Stoklund Olesen authored
A public interface is no longer needed since RegisterCoalescer is not an analysis any more. llvm-svn: 137082
-
- Jul 27, 2011
-
-
Jakob Stoklund Olesen authored
llvm-svn: 136178
-
- Jul 02, 2011
-
-
Jakob Stoklund Olesen authored
asm.c:2:7: error: ran out of registers during register allocation asm(""::"r"(0), "r"(1), "r"(2), "r"(3), "r"(4), "r"(5), "r"(6), "r"(7), "r"(8), "r"(9)); ^ llvm-svn: 134310
-
- Jun 27, 2011
-
-
Rafael Espindola authored
remove the analysis group. llvm-svn: 133899
-
- Jun 26, 2011
-
-
Rafael Espindola authored
llvm-svn: 133895
-
- Jun 03, 2011
-
-
Jakob Stoklund Olesen authored
of reserved registers. Use RegisterClassInfo in RABasic as well. This slightly changes som allocation orders because RegisterClassInfo puts CSR aliases last. llvm-svn: 132581
-
- May 10, 2011
-
-
Jakob Stoklund Olesen authored
The previous invalidation missed the alias interference caches. Also add a stats counter for the number of repaired ranges. llvm-svn: 131133
-
- May 06, 2011
-
-
Jakob Stoklund Olesen authored
This can't be just an assertion, users can always write impossible inline assembly. Such an assembly statement should be included in the error message. llvm-svn: 131024
-
- Apr 20, 2011
-
-
Jakob Stoklund Olesen authored
On the x86-64 and thumb2 targets, some registers are more expensive to encode than others in the same register class. Add a CostPerUse field to the TableGen register description, and make it available from TRI->getCostPerUse. This represents the cost of a REX prefix or a 32-bit instruction encoding required by choosing a high register. Teach the greedy register allocator to prefer cheap registers for busy live ranges (as indicated by spill weight). llvm-svn: 129864
-