dce4a407a24b04eebc6a376f8e62b41aaa7b071f |
|
29-May-2014 |
Stephen Hines <srhines@google.com> |
Update LLVM for 3.5 rebase (r209712). Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
36b56886974eae4f9c5ebc96befd3e7bfe5de338 |
|
24-Apr-2014 |
Stephen Hines <srhines@google.com> |
Update to LLVM 3.5a. Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
73f615b0bd822db3a2a8aab2fd4ed58f093c9769 |
|
08-Oct-2013 |
Reid Kleckner <reid@kleckner.net> |
Explicitly request unsigned enum types when desired This fixes repeated -Wmicrosoft warnings when self-hosting clang on Windows, and gets us real unsigned enum types with MSVC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192227 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
87855d3013d9a87a3aeb51508312b76e200baac7 |
|
05-Oct-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Emit a better error when running out of registers on inline asm. The most likely case where this error happens is when the user specifies too many register operands. Don't make it look like an internal LLVM bug when we can see that the error is coming from an inline asm instruction. For other instructions we keep the "ran out of registers" error. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192041 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
818833f27929d650b4323774cd3660860588f687 |
|
17-Sep-2013 |
Adrian Prantl <aprantl@apple.com> |
Debug info: Fix PR16736 and rdar://problem/14990587. A DBG_VALUE is register-indirect iff the first operand is a register _and_ the second operand is an immediate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190821 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
a0ec3f9b7b826b9b40b80199923b664bad808cce |
|
14-Jul-2013 |
Craig Topper <craig.topper@gmail.com> |
Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186274 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
43ae5e85f829df883dd364c0b9612bbe90f3ad97 |
|
10-Jul-2013 |
Adrian Prantl <aprantl@apple.com> |
Use the appropriate unsigned int type for the offset. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186015 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
3517640443f0b5224e2a6414c246ac60016ee9d4 |
|
09-Jul-2013 |
Adrian Prantl <aprantl@apple.com> |
Reapply an improved version of r180816/180817. Change the informal convention of DBG_VALUE machine instructions so that we can express a register-indirect address with an offset of 0. The old convention was that a DBG_VALUE is a register-indirect value if the offset (operand 1) is nonzero. The new convention is that a DBG_VALUE is register-indirect if the first operand is a register and the second operand is an immediate. For plain register values the combination reg, reg is used. MachineInstrBuilder::BuildMI knows how to build the new DBG_VALUES. rdar://problem/13658587 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185966 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
6d9dbd5526e3161db884fc4fe99c278bb59ccc19 |
|
16-Jun-2013 |
David Blaikie <dblaikie@gmail.com> |
Debug Info: Simplify Frame Index handling in DBG_VALUE Machine Instructions Rather than using the full power of target-specific addressing modes in DBG_VALUEs with Frame Indicies, simply use Frame Index + Offset. This reduces the complexity of debug info handling down to two representations of values (reg+offset and frame index+offset) rather than three or four. Ideally we could ensure that frame indicies had been eliminated by the time we reached an assembly or dwarf generation, but I haven't spent the time to figure out where the FIs are leaking through into that & whether there's a good place to convert them. Some FI+offset=>reg+offset conversion is done (see PrologEpilogInserter, for example) which is necessary for some SelectionDAG assumptions about registers, I believe, but it might be possible to make this a more thorough conversion & ensure there are no remaining FIs no matter how instruction selection is performed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184066 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
601158a18e325879b224bd1979d824407ed98bc7 |
|
21-Feb-2013 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Make RAFast::UsedInInstr indexed by register units. This fixes some problems with too conservative checking where we were marking all aliases of a register as used, and then also checking all aliases when allocating a register. <rdar://problem/13249625> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175782 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
b45e4deb102d47602f5b941da7f412ecc9a867e9 |
|
05-Feb-2013 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Remove special-casing of return blocks for liveness. Now that return value registers are return instruction uses, there is no need for special treatment of return blocks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174416 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
0b8c9a80f20772c3793201ab5b251d3520b9cea3 |
|
02-Jan-2013 |
Chandler Carruth <chandlerc@gmail.com> |
Move all of the header files which are involved in modelling the LLVM IR into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
7b79b9862c9e6fc31ec072acb09171fd6ec7b0e0 |
|
20-Dec-2012 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Use MachineInstrBuilder in a few CodeGen passes. This automatically passes a context pointer to MI->addOperand(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170711 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
d04a8d4b33ff316ca4cf961e06c9e312eff8e64f |
|
03-Dec-2012 |
Chandler Carruth <chandlerc@gmail.com> |
Use the new script to sort the includes of every file under lib. 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. =] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169131 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
39b5c0c049a19c7a7feffc9506da07923cc136e4 |
|
29-Nov-2012 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Use MCPhysReg for RegisterClassInfo allocation orders. This saves a bit of memory. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
18bb0545ff79b85ef424e95e2170e3a06f11b735 |
|
28-Nov-2012 |
Chad Rosier <mcrosier@apple.com> |
Revert r168630, r168631, and r168633 as these are causing nightly test failures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168751 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
728aede2e9b436c7c3748379f01aa7ca42cd917e |
|
27-Nov-2012 |
Chad Rosier <mcrosier@apple.com> |
Now that the X86 Maximal Stack Alignment Check pass has been removed (i.e., r168627), we no longer need to call the freezeReservedRegs() function a second time. Previously, this pass was conservatively adding the FP to the set of reserved registers, requiring the second update to the reserved registers. rdar://12719844 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168631 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
7979b24e5cd4a99db6af3fcd66d9f514f02d11db |
|
06-Nov-2012 |
Chad Rosier <mcrosier@apple.com> |
[regallocfast] Make sure the MachineRegisterInfo is aware of clobbers from a register masks. This is an obvious and necessary fix for a soon to be committed patch. No test case possible at this time. Reviewed by Jakob. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167498 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
bab24216cc77477d475e9d2ae18e275c5b2054a3 |
|
31-Oct-2012 |
Akira Hatanaka <ahatanaka@mips.com> |
Change signature of function RAFast::spillAll to avoid conversion between type MachineInstr* and MachineBasicBlock::iterator. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167088 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
d7ea7d5cd7518788dea698d38023959480c8263a |
|
17-Oct-2012 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Use a SparseSet instead of a BitVector for UsedInInstr in RAFast. This is just as fast, and it makes it possible to avoid leaking the UsedPhysRegs BitVector implementation through MachineRegisterInfo::addPhysRegsUsed(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166083 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
14d1dd95c7c969e07defebb6fe65df2fae1b30cf |
|
16-Oct-2012 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Remove RegisterClassInfo::isReserved() and isAllocatable(). Clients can use the equivalent functions in MRI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165990 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
986d76d7b3844b9a2f3d01a48975952749267a93 |
|
22-Aug-2012 |
David Blaikie <dblaikie@gmail.com> |
Tidy up a few more uses of MF.getFunction()->getName(). 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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
4e6966266a6dbbd560e11f68e6a5ff3fd35c130d |
|
09-Aug-2012 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Don't use getNextOperandForReg() in RAFast. That particular optimization was probably premature anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161541 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
1525260b3e50cc578939ef41b60609689eecfdd2 |
|
06-Jun-2012 |
Andrew Trick <atrick@apple.com> |
Move RegisterClassInfo.h. Allow targets to access this API. It's required for RegisterPressure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158102 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
396618b43a85e12d290a90b181c6af5d7c0c5f11 |
|
02-Jun-2012 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Switch all register list clients to the new MC*Iterator interface. 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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157854 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
8c70ea47fae6d61441d150cbe9431cf5e06222e5 |
|
02-Jun-2012 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Simplify some more getAliasSet callers. MCRegAliasIterator can include Reg itself in the list. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157848 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
6565a709702995fa8a5e659269d6cda134383be7 |
|
14-May-2012 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Don't access MO reference after invalidating operand list. This should unbreak llvm-x86_64-linux. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156778 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
4d10829e1296b7aea0455e000fc318b147182c1c |
|
14-May-2012 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Fix PR12821. RAFast must add an <imp-def> operand when it is rewriting a sub-register def that isn't a read-modify-write. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156777 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
c0ccb8bb17028fe0dda139c0972c0125d10e6053 |
|
20-Apr-2012 |
Andrew Trick <atrick@apple.com> |
SparseSet: Add support for key-derived indexes and arbitrary key types. This nicely handles the most common case of virtual register sets, but also handles anticipated cases where we will map pointers to IDs. The goal is not to develop a completely generic SparseSet template. Instead we want to handle the expected uses within llvm without any template antics in the client code. I'm adding a bit of template nastiness here, and some assumption about expected usage in order to make the client code very clean. The expected common uses cases I'm designing for: - integer keys that need to be reindexed, and may map to additional data - densely numbered objects where we want pointer keys because no number->object map exists. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155227 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
fac259814923d091942b230e7bd002a8d1130bc3 |
|
08-Mar-2012 |
Craig Topper <craig.topper@gmail.com> |
Use uint16_t to store instruction implicit uses and defs. Reduces static data. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152301 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
e4fd907e72a599eddfa7a81eac4366b5b82523e3 |
|
04-Mar-2012 |
Craig Topper <craig.topper@gmail.com> |
Use uint16_t to store register overlaps to reduce static data. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152001 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
91ba63d230bfc3e035d2851d039e08f34f0b9bbd |
|
22-Feb-2012 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
80 col. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151167 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
a240743ad954c657015b3ee3631e30fd6a2e86b2 |
|
22-Feb-2012 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Use SparseSet for the RAFast live virtual register map. This makes RAFast 4% faster, and it gets rid of the dodgy DenseMap iteration. This also revealed that RAFast would sometimes dereference DenseMap iterators after erasing other elements from the map. That does seem to work in the current DenseMap implementation, but SparseSet doesn't allow it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151111 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
19273aec441411b4d571fdb87c6daa0fbe7a33a0 |
|
21-Feb-2012 |
Andrew Trick <atrick@apple.com> |
Clear virtual registers after they are no longer referenced. 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151032 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
d9f0ff56a1878347fe5a0f162ef8c2ef2b63aeb5 |
|
17-Feb-2012 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Transfer regmasks to MRI. MRI keeps track of which physregs have been used. Make sure it gets updated with all the regmask-clobbered registers. Delete the closePhysRegsUsed() function which isn't necessary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150830 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
8dd26253f54247e77e5accfdd70e7b4bf27b39c2 |
|
10-Feb-2012 |
Andrew Trick <atrick@apple.com> |
RegAlloc superpass: includes phi elimination, coalescing, and scheduling. 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150226 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
ab78e20ce085763b4fc9948eaa715fb7e49341c8 |
|
31-Jan-2012 |
Andrew Trick <atrick@apple.com> |
Obvious unnecessary loop removal. Follow through from previous checkin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149398 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
b3d58474c83499621ae1e2d76dc87587910abe55 |
|
31-Jan-2012 |
Andrew Trick <atrick@apple.com> |
RAFast: Generalize the logic for return operands. This removes implicit assumption about the form of MI coming into regalloc. In particular, it should be independent of ProcessImplicitDefs which will eventually become a standard part of coming out of SSA--unless we simply can eliminate IMPLICIT_DEF completely. Current unit tests expose this once I remove incidental pass ordering restrictions. This is not a final fix. Just a temporary workaround until I figure out the right way. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149360 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
d9e5c764bfea339fc5082bf17e558db959fd6d28 |
|
05-Jan-2012 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Freeze reserved registers before starting register allocation. 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
5a96b3dad2f634c9081c8b2b6c2575441dc5a2bd |
|
07-Dec-2011 |
Evan Cheng <evan.cheng@apple.com> |
Add bundle aware API for querying instruction properties and switch the code generator to it. For non-bundle instructions, these behave exactly the same as the MC layer API. For properties like mayLoad / mayStore, look into the bundle and if any of the bundled instructions has the property it would return true. For properties like isPredicable, only return true if *all* of the bundled instructions have the property. For properties like canFoldAsLoad, isCompare, conservatively return false for bundles. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146026 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
254a13282c97469973b4fa8cc0e110ed6160642c |
|
22-Nov-2011 |
Rafael Espindola <rafael.espindola@gmail.com> |
If a register is both an early clobber and part of a tied use, handle the use before the clobber so that we copy the value if needed. Fixes pr11415. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145056 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
d2df64f56970aa07d2d8733543e4baf6c7009e91 |
|
15-Nov-2011 |
Devang Patel <dpatel@apple.com> |
Insert modified DBG_VALUE into LiveDbgValueMap. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144696 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
9d812a2805161665d56a78734da98b58f39ce0fc |
|
02-Jul-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Better diagnostics when inline asm fails to allocate. 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)); ^ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134310 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
e837dead3c8dc3445ef6a0e2322179c57e264a13 |
|
28-Jun-2011 |
Evan Cheng <evan.cheng@apple.com> |
- Rename TargetInstrDesc, TargetOperandInfo to MCInstrDesc and MCOperandInfo and sink them into MC layer. - Added MCInstrInfo, which captures the tablegen generated static data. Chang TargetInstrInfo so it's based off MCInstrInfo. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134021 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
27ce3b96e51887995f94d8c78a6c7e79bf7cdcdd |
|
28-Jun-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Print registers by name instead of by number. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134013 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
6f373a87cba3b0c88bc76bf1d03ee5f81143764f |
|
22-Jun-2011 |
Devang Patel <dpatel@apple.com> |
After register is spilled there should not be any DBG_VALUE referring the same register. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133569 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
72d9b0e4fce90a635af5c80cb6992ac639279d59 |
|
22-Jun-2011 |
Devang Patel <dpatel@apple.com> |
There could be more than one DBG_VALUE instructions for variables where all of them have offset based on one register. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133560 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
5e5ed4457749995b46d46e9769e657fcc0818e2c |
|
13-Jun-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Be less aggressive about hinting in RAFast. In particular, don't spill dirty registers only to satisfy a hint. It is not worth it. The attached test case provides an example where the fast allocator would spill a register when other registers are available. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132900 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
448ab3ab395ffc9e7fc04d2d6afb41fcac74070d |
|
03-Jun-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Avoid calling TRI->getAllocatableSet in RAFast. When compiling a program with lots of small functions like 483.xalancbmk, this makes RAFast 11% faster. Add some comments to clarify the difference between unallocatable and reserved registers. It's quite subtle. The fast register allocator depends on EFLAGS' not being allocatable on x86. That way it can completely avoid tracking liveness, and it won't mind when there are multiple uses of a single def. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132514 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
5d20c3152bd7fe91eda1b58a5eb6da7067874c61 |
|
02-Jun-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Use RegisterClassInfo::getOrder in RAFast. This saves two virtual function calls and an Allocatable BitVector test, making RAFast run 2% faster. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132471 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
d8a16241229a6d3f761e2e9fd19cbe08e614f113 |
|
22-Apr-2011 |
Evan Cheng <evan.cheng@apple.com> |
Typo git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129970 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
d574bb5a6ee6cbe4d2387e4fa7f7f5ab099ea05f |
|
18-Apr-2011 |
Eric Christopher <echristo@apple.com> |
Fix a bug where we were counting the alias sets as completely used registers for fast allocation a different way. This has us updating used registers only when we're using that exact register. Fixes rdar://9207598 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129711 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
d31df87f41891c9ea459282c666c6e1cab9bd4c7 |
|
13-Apr-2011 |
Eric Christopher <echristo@apple.com> |
Temporarily revert r129408 to see if it brings the bots back. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129417 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
8e98de9979fa08dac650bc6ae884e809da2cfdaa |
|
13-Apr-2011 |
Eric Christopher <echristo@apple.com> |
Fix a bug where we were counting the alias sets as completely used registers for fast allocation. Fixes rdar://9207598 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129408 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
0b756349a718e046abba84c316877a682eb0ff2f |
|
13-Apr-2011 |
Eric Christopher <echristo@apple.com> |
Add more comments... err debug statements to the fast allocator. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129400 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
bbfc3b30986ff89487350cade99ea7c90e2c8165 |
|
12-Apr-2011 |
Eric Christopher <echristo@apple.com> |
Fix typo. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129334 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
c57ef561423f1ac7f2db5b1840d5681f18a4c0c8 |
|
04-Feb-2011 |
Nick Lewycky <nicholas@mxc.ca> |
Mark that the return is using EAX so that we don't use it for some other purpose. Fixes PR9080! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124903 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
c9df025e33ac435adb3b3318d237c36ca7cec659 |
|
10-Jan-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Simplify a bunch of isVirtualRegister() and isPhysicalRegister() logic. These functions not longer assert when passed 0, but simply return false instead. No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123155 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
42e9c963921776cb498c33b6c6c03f29971316f3 |
|
09-Jan-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Remove MachineRegisterInfo::getLastVirtReg(), it was giving wrong results when no virtual registers have been allocated. It was only used to resize IndexedMaps, so provide an IndexedMap::resize() method such that Map.grow(MRI.getLastVirtReg()); can be replaced with the simpler Map.resize(MRI.getNumVirtRegs()); This works correctly when no virtuals are allocated, and it bypasses the to/from index conversions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123130 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
4314268128be6d54c9a7f0709680e5a5b40f3ab3 |
|
09-Jan-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Replace TargetRegisterInfo::printReg with a PrintReg class that also works without a TRI instance. Print virtual registers numbered from 0 instead of the arbitrary FirstVirtualRegister. The first virtual register is printed as %vreg0. TRI::NoRegister is printed as %noreg. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123107 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
f299da8ec3fee88a1b275560a7f94be4cf10d089 |
|
08-Dec-2010 |
Eric Christopher <echristo@apple.com> |
Fix comment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121285 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
081c34b725980f995be9080eaec24cd3dfaaf065 |
|
19-Oct-2010 |
Owen Anderson <resistor@mac.com> |
Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize the pass's dependencies. Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h before parsing commandline arguments. I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass registration/creation, please send the testcase to me directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116820 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
4bafda9618f9dfa9edc8da08bb3001ef2d1a9b68 |
|
10-Sep-2010 |
Devang Patel <dpatel@apple.com> |
Add DEBUG message. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113614 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
ee72651df4b783c973bb682bef7eab2ff9a703e2 |
|
03-Sep-2010 |
Jim Grosbach <grosbach@apple.com> |
previous patch was a little too tricky for its own good. Don't try to overload UserInInstr. Explicitly check Allocatable. The early exit in the condition will mean the performance impact of the extra test should be minimal. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113016 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
1f758831cbbdbfcb0cf164959b08b8219deac018 |
|
01-Sep-2010 |
Jim Grosbach <grosbach@apple.com> |
The register allocator shouldn't consider allocating reserved registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112728 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
07cb689d6260b78861d829bb05b188e1558c528e |
|
01-Sep-2010 |
Jim Grosbach <grosbach@apple.com> |
tidy up a few 80-column and trailing whitespace bits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112726 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
9d4b51b696e27b9c061955d4c76f9dbff529b143 |
|
31-Aug-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Ignore unallocatable registers in RegAllocFast. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
24a1182184336c088f70e86191ebda47df629beb |
|
21-Aug-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Delete dead comment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111744 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
90c579de5a383cee278acc3f7e7b9d0a656e6a35 |
|
06-Aug-2010 |
Owen Anderson <resistor@mac.com> |
Reapply r110396, with fixes to appease the Linux buildbot gods. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
31defcf2349916ac759be33baaa4060703fd78df |
|
06-Aug-2010 |
Devang Patel <dpatel@apple.com> |
While emitting DBG_VALUE for registers spilled at the end of a block do not use location of MBB->end(). If a block does not have terminator then incoming iterator points to end(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110411 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
1f74590e9d1b9cf0f1f81a156efea73f76546e05 |
|
06-Aug-2010 |
Owen Anderson <resistor@mac.com> |
Revert r110396 to fix buildbots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110410 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
9ccaf53ada99c63737547c0235baeb8454b04e80 |
|
06-Aug-2010 |
Owen Anderson <resistor@mac.com> |
Don't use PassInfo* as a type identifier for passes. Instead, use the address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110396 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
459a36bd34809ffc5d74de79b3e46f6e02e5184f |
|
04-Aug-2010 |
Devang Patel <dpatel@apple.com> |
While spilling live registers at the end of block check whether they are used by DBG_VALUE machine instructions or not. If a spilled register is used by DBG_VALUE machine instruction then insert a new DBG_VALUE machine instruction to encode variable's new location on stack. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110235 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
4bd94f7bbe2ed6e0d83d03b06c0d20bb346abeca |
|
29-Jul-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Fix a bug in the -regalloc=fast handling of exotic two-address instruction with multiple defs, like t2LDRSB_POST. The first def could accidentally steal the physreg that the second, tied def was required to be allocated to. Now, the tied use-def is treated more like an early clobber, and the physreg is reserved before allocating the other defs. This would never be a problem when the tied def was the only def which is the usual case. This fixes MallocBench/gs for thumb2 -O0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109715 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
58b8176ed39038240984c0966fef847fe37c86c1 |
|
20-Jul-2010 |
Devang Patel <dpatel@apple.com> |
Fix memory leak reported by valgrind. Do not visit operands of old instruction. Visit all operands of new instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108767 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
04c528a0c86ddf3d6a70681f72e1b2ec07b0b53a |
|
16-Jul-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Remove many calls to TII::isMoveInstr. Targets should be producing COPY anyway. TII::isMoveInstr is going tobe completely removed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108507 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
7a029b6d7e58cb0f1010f14d99d7661e387cfb54 |
|
09-Jul-2010 |
Devang Patel <dpatel@apple.com> |
Update DBG_VALUE to refer appropriate stack slot in case of a spill. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108023 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
273f7e42994a5bce0614d04d96dbfdf05fd652e5 |
|
03-Jul-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Detect and handle COPY in many places. This code is transitional, it will soon be possible to eliminate isExtractSubreg, isInsertSubreg, and isMoveInstr in most places. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107547 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
d1303d2a66241c70e0e35dac371636c883235df8 |
|
29-Jun-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Fix the handling of partial redefines in the fast register allocator. A partial redefine needs to be treated like a tied operand, and the register must be reloaded while processing use operands. This fixes a bug where partially redefined registers were processed as normal defs with a reload added. The reload could clobber another use operand if it was a kill that allowed register reuse. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107193 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
d843b3925fdc275b262ddc2ff8fabc8c98f9a5a0 |
|
28-Jun-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Add more special treatment for inline asm in RegAllocFast. When an instruction has tied operands and physreg defines, we must take extra care that the tied operands conflict with neither physreg defs nor uses. The special treatment is given to inline asm and instructions with tied operands / early clobbers and physreg defines. This fixes PR7509. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107043 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
75ac4d9c2dfb22f84da25dec03df7a07f3dad1fa |
|
15-Jun-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Avoid processing early clobbers twice in RegAllocFast. Early clobbers defining a virtual register were first alocated to a physreg and then processed as a physreg EC, spilling the virtreg. This fixes PR7382. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105998 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
6de07178e1e6445080bf4f7704e274c5f219ff70 |
|
04-Jun-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Keep track of the call instructions whose clobber lists were skipped during fast register allocation. Process all of the clobber lists at the end of the function, marking the registers as used in MachineRegisterInfo. This is necessary in case the calls clobber callee-saved registers (sic). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105473 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
d32e735ae6e3fbebcae9a23d7cda091770bb3a14 |
|
19-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Add support for partial redefs to the fast register allocator. A partial redef now triggers a reload if required. Also don't add <imp-def,dead> operands for physical superregisters. Kill flags are still treated as full register kills, and <imp-use,kill> operands are added for physical superregisters as before. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104167 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
0eeb05c969c6c314ca7991a10627451762787e2d |
|
18-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Properly handle multiple definitions of a virtual register in the same instruction. This can happen on ARM: >> %reg1035:5<def>, %reg1035:6<def> = VLD1q16 %reg1028, 0, pred:14, pred:%reg0 Regs: Q0=%reg1032* R0=%reg1028* R1=%reg1029* R2 R3=%reg1031* Killing last use: %reg1028 Allocating %reg1035 from QPR Assigning %reg1035 to Q1 << %D2<def>, %D3<def> = VLD1q16 %R0<kill>, 0, pred:14, pred:%reg0, %Q1<imp-def> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104056 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
b8acb7be804c8c537f2475f3a24303a0b37ab107 |
|
17-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Pull the UsedInInstr.test() calls into calcSpillCost() and remember aliases. This fixes the miscompilations of MultiSource/Applications/JM/l{en,de}cod. Clang now successfully self hosts in a debug build with the fast register allocator. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103975 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
2997985b4cafc2a1e562819a2f3e0c6abe5fb223 |
|
17-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Remove debug option. Add comment on spill order determinism. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103961 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
aa4b0159dacf12e48a60d66229dfd2b19406da87 |
|
17-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Avoid allocating the same physreg to multiple virtregs in one instruction. While that approach works wonders for register pressure, it tends to break everything. This should unbreak the arm-linux builder and fix a number of miscompilations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103946 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
f3ea06b108d45c53dade87d6f1f48ac0a0e20562 |
|
17-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Minor optimizations. DenseMap::begin() is surprisingly slow on an empty map. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103940 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
548643c573d53950e28e9e810cd0454ba9a21af0 |
|
17-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Extract spill cost calculation to a new method, and use definePhysReg() to clear out aliases when allocating. Clean up allocVirtReg(). Use calcSpillCost() to allow more aggressive hinting. Now the hint is always taken unless blocked by a reserved register. This leads to more coalescing, lower register pressure, and less spilling. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103939 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
0c9e4f5f3ff139733d74462a0ad5b94014e764a8 |
|
17-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Only use clairvoyance when defining a register, and then only if it has one use. This makes allocation independent on the ordering of use-def chains. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103935 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
646dd7c899ea213301e193a25536a4bceebf7937 |
|
17-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Eliminate a hash table probe when killing virtual registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103934 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
ac3e529831877cea609ed668f95b1dc06e34698c |
|
17-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Execute virtreg kills immediately instead of after processing all uses. This is safe to do because the physreg has been marked UsedInInstr and the kill flag will be set on the last operand using the virtreg if there are more then one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103933 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
41e1401de5cb8752fb9d06e65e62bfe97cc1304e |
|
17-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Sprinkle superregister <imp-def> and <imp-kill> operands when dealing with subregister indices. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103931 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
4b6bbe885d851b1cfba2be9b5efc6365a2b7828a |
|
17-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Now that we don't keep live registers across calls, there is not reason to go through the very long list of call-clobbered registers. We just assume all registers are clobbered. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103930 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
844db9cc6f1a9458b60b8debeef3132f555dcd8f |
|
17-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Boldly attempt consistent capitalization. Functional changes unintended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103929 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
e6aba837974f7d2539efad9a09fe06b4d1566e5d |
|
17-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Spill and kill all virtual registers across a call. Debug code doesn't use callee saved registers anyway, and the code is simpler this way. Now spillVirtReg always kills, and the isKill parameter is not needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103927 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
01dcbf850732790fe7d5b5ed23426d535b07f316 |
|
17-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Reduce hashtable probes by using DenseMap::insert() for lookup. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103926 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
6fb69d85e9576445e98c4114ee7064deb4476712 |
|
17-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Make MBB a class member instead of passing it around everywhere. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103925 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
2c13ab2bb840295ffba5f28bb1df7aa0b8d9736e |
|
15-May-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix an GCC warning that seems to have actually caught a bug (!!!) in a condition's grouping. Every other use of Allocatable.test(Hint) groups it the same way as it is indented, so move the parentheses to agree with that grouping. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103869 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
1e03ff42433afe3a9ffad2765b537f10db3aa921 |
|
15-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Calculate liveness on the fly for local registers. When working top-down in a basic block, substituting physregs for virtregs, the use-def chains are kept up to date. That means we can recognize a virtreg kill by the use-def chain becoming empty. This makes the fast allocator independent of incoming kill flags. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103866 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
6a6328ba3d007b2e5a71131793179ef96d4bee7d |
|
15-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Don't bother spilling before a return git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103831 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
efa155fd6e3820495205a09f8b9f20390d126153 |
|
15-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Track allocatable instead of reserved regs, and never take an unallocatable hint. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103828 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
e97dda4fc58ee401ebb4aa9153d10f8ce8ba9a70 |
|
14-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Avoid scanning the long tail of physreg operands on calls git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103823 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
8a65c510a4fa1245d101da6318618d025702028c |
|
14-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Count coalesced copies git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103821 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
a0e618de5d9b40e5b5189c299086487e5ad767f2 |
|
14-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Allow virtreg redefines when verifying for RegAllocFast git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103820 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
1b2c761a9cc9a57b417c676f4bd97d11b6ba1869 |
|
14-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
When verifying two-address instructions, check the following: - Kill is implicit when use and def registers are identical. - Only virtual registers can differ. Add a -verify-fast-regalloc to run the verifier before the fast allocator. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103797 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
4ed10826833701b14064f55b6514289e0a7ff5ef |
|
14-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Simplify the handling of physreg defs and uses in RegAllocFast. This adds extra security against using clobbered physregs, and it adds kill markers to physreg uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103784 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
7ff82e1501c416552125f77a62edebe576e469b0 |
|
14-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Enable opportunistic coalescing git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103764 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
57b6076d343e03237ea8b56ab291f488cc97300f |
|
14-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Trust kill flags from isel and later passes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103748 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
7d4f25904de543b039a28eddbea3034a5d80e7f8 |
|
14-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Fix an embarrassing runtime regression for RegAllocFast. This loop is quadratic in the capacity for a DenseMap: while(!map.empty()) map.erase(map.begin()); Instead we now do a normal begin() - end() iteration followed by map.clear(). That also has the nice sideeffect of shrinking the map capacity on demand. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103747 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
c9c4dacd03a4b80d61ed6b9c6ffeb1b1f76b8d1c |
|
13-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Clean up RegAllocFast debug output git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103739 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
4bf4bafcced902ee6d58a90486768f08a3795d02 |
|
13-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Take allocation hints from copy instructions to/from physregs. This causes way more identity copies to be generated, ripe for coalescing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103686 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
63e34f690c511a146b936435f84ee76fda154f7c |
|
13-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
More asserts around physreg uses git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103685 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
804291e31658d46fb1db5ecaf42b31950c02a6f2 |
|
12-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Make sure to add kill flags to the last use of a virtreg when it is redefined. The X86 floating point stack pass and others depend on good kill flags. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103635 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
1a1ad578a3f925dfda58874156fd154fa1d941ea |
|
12-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Avoid scoping issues, fix buildbots git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103530 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
0efd768aeac9576e9a8ebb8a693f4a00bc6ecbbc |
|
12-May-2010 |
Daniel Dunbar <daniel@zuster.org> |
Make Clang happy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103528 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
210e2afcc74e8ce5102d13939b23040fafa71c09 |
|
12-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Store the Dirty bit in the LiveReg structure instead of a bit vector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103522 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
76b4d5a0210f161c08543f00f355955c94d3f2ec |
|
12-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Keep track of the last place a live virtreg was used. This allows us to add accurate kill markers, something the scavenger likes. Add some more tests from ARM that needed this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103521 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
82b07dc4995d48065bd95affff4d8513a5cad4f2 |
|
11-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Simplify the tracking of used physregs to a bulk bitor followed by a transitive closure after allocating all blocks. Add a few more test cases for -regalloc=fast. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103500 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
bbf33b38aaaa6cdbdd2c6a595aa081734308ce83 |
|
11-May-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Mostly rewrite RegAllocFast. Sorry for the big change. The path leading up to this patch had some TableGen changes that I didn't want to commit before I knew they were useful. They weren't, and this version does not need them. The fast register allocator now does no liveness calculations. Instead it relies on kill flags provided by isel. (Currently those kill flags are also ignored due to isel bugs). The allocation algorithm is supposed to work with any subset of valid kill flags. More kill flags simply means fewer spills inserted. Registers are allocated from a working set that contains no aliases. That means most allocations can be done directly without expensive alias checks. When the working set runs out of registers we do the full alias check to find new free registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103488 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
31b9c44cc13bb686010cf6bfbeef8745c39939b9 |
|
11-May-2010 |
Evan Cheng <evan.cheng@apple.com> |
It's not safe eliminate copies where src and dst have different sub-register indices. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103450 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
746ad69e088176819981b4b2c5ac8dcd49f5e60e |
|
06-May-2010 |
Evan Cheng <evan.cheng@apple.com> |
Add argument TargetRegisterInfo to loadRegFromStackSlot and storeRegToStackSlot. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103193 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
a063e19593800142afaef5389f35605da901b805 |
|
22-Apr-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Run LiveVariables instead of computing liveness locally in -regalloc=fast. This actually makes everything slower, but the plan is to have isel add <kill> flags the way it is already adding <dead> flags. Then LiveVariables can be removed again. When ignoring the time spent in LiveVariables, -regalloc=fast is now twice as fast as -regalloc=local. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102034 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|
00207237ddfffe93b275914d086a0c7da1bbf63b |
|
21-Apr-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Add fast register allocator, enabled with -regalloc=fast. So far this is just a clone of -regalloc=local that has been lobotomized to run 25% faster. It drops the least-recently-used calculations, and is just plain stupid when it runs out of registers. The plan is to make this go even faster for -O0 by taking advantage of the short live intervals in unoptimized code. It should not be necessary to calculate liveness when most virtual registers are killed 2-3 instructions after they are born. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102006 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocFast.cpp
|