dce4a407a24b04eebc6a376f8e62b41aaa7b071f |
|
29-May-2014 |
Stephen Hines <srhines@google.com> |
Update LLVM for 3.5 rebase (r209712). Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
36b56886974eae4f9c5ebc96befd3e7bfe5de338 |
|
24-Apr-2014 |
Stephen Hines <srhines@google.com> |
Update to LLVM 3.5a. Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
f0c6ab6f00861fd97ad593cfc6d841082e4b4bd1 |
|
08-Nov-2013 |
Quentin Colombet <qcolombet@apple.com> |
[VirtRegMap] Fix for PR17825. Do not ignore noreturn definitions when setting isPhysRegUsed if the unwind information is required. Indeed, the runtime may need a correct stack to be able to unwind the call. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194271 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
ce734f1f43b3c5f614b95b53e3ed86f65daca8dd |
|
25-Sep-2013 |
Quentin Colombet <qcolombet@apple.com> |
[PR16882] Ignore noreturn definitions when setting isPhysRegUsed. PEI inserts a save/restore sequence for the link register, according to the information it gets from the MachineRegisterInfo. MachineRegisterInfo is populated by the VirtRegMap pass. This pass was not aware of noreturn calls and was registering the definitions of these calls the same way as regular operations. Modify VirtRegPass so that it does not set the isPhysRegUsed information for registers only defined by noreturn calls. The rational is that a noreturn call is the "last instruction" of the program (if it returns the behavior is undefined), so everything that is defined by it cannot be used and will not interfere with anything else. Therefore, it is pointless to account for then. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191349 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
46f6fe7a45964a4aa1c6a0f52b9991af8c30cb0b |
|
04-Dec-2012 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Remove VirtRegMap::getRegAllocPref(). Now that there can be multiple hint registers from targets, it doesn't make sense to have a function that returns 'the' preferred register. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169190 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
980bddfb1c26e2e9374d1645f9ae26c44742606f |
|
04-Dec-2012 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Use MRI::getSimpleHint() instead of getRegAllocPref() in remaining cases. Targets can provide multiple hints now, so getRegAllocPref() doesn't make sense any longer because it only returns one preferred register. Replace it with getSimpleHint() in the remaining heuristics. This function only git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169188 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
fc6374439edf2f74da4026f4cea8e341d092be5c |
|
04-Dec-2012 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Add VirtRegMap::hasKnownPreference(). Virtual registers with a known preferred register are prioritized by RAGreedy. This function makes the condition explicit without depending on getRegAllocPref(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169179 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.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/VirtRegMap.cpp
|
1ead68d769f27f6d68d4aaeffe4199fa2cacbc95 |
|
28-Nov-2012 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Make the LiveRegMatrix analysis available to targets. 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168806 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
fb9ebbf236974beac31705eaeb9f50ab585af6ab |
|
15-Oct-2012 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Switch most getReservedRegs() clients to the MRI equivalent. Using the cached bit vector in MRI avoids comstantly allocating and recomputing the reserved register bit vector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165983 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
bb36a438722d4d56febc07c6472c8446bb6faafe |
|
21-Sep-2012 |
Evan Cheng <evan.cheng@apple.com> |
Fix a significant recent(?) regression. StackSlotColoring no longer did anything because LiveStackAnalysis was not preserved by VirtRegWriter. This caused big stack usage regression in some cases. rdar://12340383 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164408 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
b720be6a50f4e1b3280d2b029ee38dda14577525 |
|
12-Sep-2012 |
Manman Ren <mren@apple.com> |
Release build: guard dump functions with "#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)" No functional change. Update r163339. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163653 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
77e300e8f0b8db8eec448cae9c87d7c5bfad9757 |
|
06-Sep-2012 |
Manman Ren <mren@apple.com> |
Release build: guard dump functions with "ifndef NDEBUG" No functional change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163339 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
e617ccb80da76821379bbff4a2fdcd09e8401e8b |
|
06-Sep-2012 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Handle overlapping regunit intervals in LiveIntervals::addKillFlags(). We will soon allow virtual register live ranges to overlap regunit live ranges when the physreg is defined as a copy of the virtreg: %EAX = COPY %vreg5 FOO %vreg5 BAR %EAX<kill> There is no real interference since %vreg5 and %EAX have the same value where they overlap. This patch prevents addKillFlags from adding virtreg kill flags to FOO where the assigned physreg is overlapping the virtual register live range. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163335 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
96601ca332ab388754ca4673be8973396fea2ddd |
|
22-Aug-2012 |
Craig Topper <craig.topper@gmail.com> |
Add a getName function to MachineFunction. Use it in places that previously did getFunction()->getName(). Remove includes of Function.h that are no longer needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162347 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
fe17bdbb50efe2f7f68d0b99e55ae52bd9477978 |
|
09-Jun-2012 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Also compute MBB live-in lists in the new rewriter pass. 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158249 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
05ec712e7f75635abbdd84dced69f4a45fe0f541 |
|
09-Jun-2012 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Reintroduce VirtRegRewriter. 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158244 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.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/VirtRegMap.cpp
|
3f9c251e40dac7503f7ae455fab89bdc359c7b85 |
|
19-Jan-2012 |
Evan Cheng <evan.cheng@apple.com> |
Rewriter should definitly rewrite instructions inside bundles. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148464 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
4281e20aab7f1fe1b35b31c9237ad89c20937e02 |
|
07-Jan-2012 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Use the 'regalloc' debug tag for most register allocator tracing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147725 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
2d44e02533cdc2ae011121ef651dda93769ced2b |
|
03-Jan-2012 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Assert when reserved registers have been assigned. This can only happen if the set of reserved registers changes during register allocation. <rdar://problem/10625436> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147486 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
0cb80d9f0f71ff3faaf890bb9f023e53f4e8e3dc |
|
13-Nov-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
More dead code elimination in VirtRegMap. This thing is looking a lot like a virtual register map now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144486 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
cb39064e7aee2273da1d00e6b800db84ddc34b6b |
|
13-Nov-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Stop tracking spill slot uses in VirtRegMap. Nobody cared, StackSlotColoring scans the instructions to find used stack slots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144485 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
3cb0b0edd9ec537a9415eaff97edd042a07fd16e |
|
13-Nov-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Remove dead code and data from VirtRegMap. Most of this stuff was supporting the old deferred spill code insertion mechanism. Modern spillers just edit machine code in place. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144484 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
929e4da68ba95f0616172d326b8547f888f5eb37 |
|
13-Nov-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Stop tracking unused registers in VirtRegMap. The information was only used by the register allocator in StackSlotColoring. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144482 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
200a8cef256f6aade13692752a8fa8f6120cf04f |
|
05-Oct-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Also add <imp-use,kill> flags for redefined super-registers. For example: %vreg10:dsub_0<def,undef> = COPY %vreg1 %vreg10:dsub_1<def> = COPY %vreg2 is rewritten as: %D2<def> = COPY %D0, %Q1<imp-def> %D3<def> = COPY %D1, %Q1<imp-use,kill>, %Q1<imp-def> The first COPY doesn't care about the previous value of %Q1, so it doesn't read that register. The second COPY is a partial redefinition of %Q1, so it implicitly kills and redefines that register. This makes it possible to recognize instructions that can harmlessly clobber the full super-register. The write and don't read the super-register. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
01afdb3a45f63af540b43b414c6094220a8f91e7 |
|
15-Sep-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
VirtRegMap is counting spill slots, not register spills. Fix the stats counters to reflect that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139819 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
cf5e5f3cc08a3c7ede5b423ee4b18586cb1079e9 |
|
06-May-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Also count identity copies. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130996 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
93e110ba344ddc901dfb2af61d9c21002d8d3080 |
|
27-Apr-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Also add <imp-def> operands for defined and dead super-registers when rewriting. We cannot rely on the <imp-def> operands added by LiveIntervals in all cases as demonstrated by the test case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130313 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
280ea1a7466751c6d27ff343072c65e59a950053 |
|
31-Mar-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Don't completely eliminate identity copies that also modify super register liveness. Turn them into noop KILL instructions instead. This lets the scavenger know when super-registers are killed and defined. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128645 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
bf824efcb92aa54d4a7ecc4afff9282c860a3f38 |
|
23-Mar-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Dump the register map before rewriting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128143 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
ba05c01dabc40373760a20c874103fc58d4377f0 |
|
18-Feb-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Add VirtRegMap::rewrite() and use it in the new register allocators. The rewriter works almost identically to -rewriter=trivial, except it also eliminates any identity copies. This makes the new register allocators independent of VirtRegRewriter.cpp which will be going away at the same time as RegAllocLinearScan. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125967 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.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/VirtRegMap.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/VirtRegMap.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/VirtRegMap.cpp
|
c7d67f90d36375f1ff512a3857c887b7e4246adb |
|
09-Jan-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Fix VirtRegMap to use TRI::index2VirtReg and TRI::virtReg2Index instead of depending on TRI::FirstVirtualRegister. Also use TRI::printReg instead of printing virtual registers directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123101 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
b55e91e08738b804f17109a49881e51b69e91299 |
|
16-Nov-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Remember to resize SpillSlotToUsesMap when allocating an emergency spill slot. Use amazing new function call technology instead of writing identical code in multiple places. This fixes PR8604. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119306 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
ce665bd2e2b581ab0858d1afe359192bac96b868 |
|
08-Oct-2010 |
Owen Anderson <resistor@mac.com> |
Now with fewer extraneous semicolons! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115996 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
d13db2c59cc94162d6cf0a04187d408bfef6d4a7 |
|
22-Jul-2010 |
Owen Anderson <resistor@mac.com> |
Fix batch of converting RegisterPass<> to INTIALIZE_PASS(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109045 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
243296690ec78fc918762bd73896b09e26537f47 |
|
26-Feb-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Use the right floating point load/store instructions in PPCInstrInfo::foldMemoryOperandImpl(). The PowerPC floating point registers can represent both f32 and f64 via the two register classes F4RC and F8RC. F8RC is considered a subclass of F4RC to allow cross-class coalescing. This coalescing only affects whether registers are spilled as f32 or f64. Spill slots must be accessed with load/store instructions corresponding to the class of the spilled register. PPCInstrInfo::foldMemoryOperandImpl was looking at the instruction opcode which is wrong. X86 has similar floating point register classes, but doesn't try to fold memory operands, so there is no problem there. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97262 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
f451cb870efcf9e0302d25ed05f4cac6bb494e42 |
|
10-Feb-2010 |
Dan Gohman <gohman@apple.com> |
Fix "the the" and similar typos. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95781 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
0080b1accc8de37247835476dba40b72dcb69229 |
|
05-Jan-2010 |
David Greene <greened@obbligato.org> |
Change errs() to dbgs(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92587 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
3f2bf85d14759cc4b28a86805f566ac805a54d00 |
|
12-Nov-2009 |
David Greene <greened@obbligato.org> |
Add a bool flag to StackObjects telling whether they reference spill slots. The AsmPrinter will use this information to determine whether to print a spill/reload comment. Remove default argument values. It's too easy to pass a wrong argument value when multiple arguments have default values. Make everything explicit to trap bugs early. Update all targets to adhere to the new interfaces.. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87022 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
233a60ec40b41027ff429e2f2c27fa2be762f2e9 |
|
04-Nov-2009 |
Lang Hames <lhames@gmail.com> |
The Indexes Patch. This introduces a new pass, SlotIndexes, which is responsible for numbering instructions for register allocation (and other clients). SlotIndexes numbering is designed to match the existing scheme, so this patch should not cause any changes in the generated code. For consistency, and to avoid naming confusion, LiveIndex has been renamed SlotIndex. The processImplicitDefs method of the LiveIntervals analysis has been moved into its own pass so that it can be run prior to SlotIndexes. This was necessary to match the existing numbering scheme. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85979 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
491f54f1fd700204db0a19efde0cc2627641d711 |
|
17-Oct-2009 |
Evan Cheng <evan.cheng@apple.com> |
Distinquish stack slots from other stack objects. They (and fixed objects) get FixedStack PseudoSourceValues. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84326 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
d9ea85ab01fb0f2929ed50223d3758dceea8bcbd |
|
23-Aug-2009 |
Chris Lattner <sabre@nondot.org> |
remove some uses of llvm/Support/Streams.h git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79842 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
1cd1d98232c3c3a0bd3810c3bf6c2572ea02f208 |
|
24-Jul-2009 |
Daniel Dunbar <daniel@zuster.org> |
Move more to raw_ostream, provide support for writing MachineBasicBlock, LiveInterval, etc to raw_ostream. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76965 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
358dec51804ee52e47ea3a47c9248086e458ad7c |
|
15-Jun-2009 |
Evan Cheng <evan.cheng@apple.com> |
Part 1. - Change register allocation hint to a pair of unsigned integers. The hint type is zero (which means prefer the register specified as second part of the pair) or entirely target dependent. - Allow targets to specify alternative register allocation orders based on allocation hint. Part 2. - Use the register allocation hint system to implement more aggressive load / store multiple formation. - Aggressively form LDRD / STRD. These are formed *before* register allocation. It has to be done this way to shorten live interval of base and offset registers. e.g. v1025 = LDR v1024, 0 v1026 = LDR v1024, 0 => v1025,v1026 = LDRD v1024, 0 If this transformation isn't done before allocation, v1024 will overlap v1025 which means it more difficult to allocate a register pair. - Even with the register allocation hint, it may not be possible to get the desired allocation. In that case, the post-allocation load / store multiple pass must fix the ldrd / strd instructions. They can either become ldm / stm instructions or back to a pair of ldr / str instructions. This is work in progress, not yet enabled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73381 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
90f95f88c6ce09c6744777dc9d140c3c77203b92 |
|
14-Jun-2009 |
Evan Cheng <evan.cheng@apple.com> |
Move register allocation preference (or hint) from LiveInterval to MachineRegisterInfo. This allows more passes to set them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
fe095f39e7009c51d1c86769792ccbcad8cdd2ec |
|
04-May-2009 |
Mike Stump <mrs@apple.com> |
Restore minor deletion. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70892 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
c781a243a3d17e7e763515794168d8fa6043f565 |
|
03-May-2009 |
Evan Cheng <evan.cheng@apple.com> |
In some rare cases, the register allocator can spill registers but end up not utilizing registers at all. The fundamental problem is linearscan's backtracking can end up freeing more than one allocated registers. However, reloads and restores might be folded into uses / defs and freed registers might not be used at all. VirtRegMap keeps track of allocations so it knows what's not used. As a horrible hack, the stack coloring can color spill slots with *free* registers. That is, it replace reload and spills with copies from and to the free register. It unfold instructions that load and store the spill slot and replace them with register using variants. Not yet enabled. This is part 1. More coming. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70787 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
e67f5e42734199a1f4771773417699262491eb86 |
|
31-Mar-2009 |
Bill Wendling <isanbard@gmail.com> |
Oy! When reverting r68073, I added in experimental code. Sorry... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68099 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
8fe00540fc6e1531d909d0688cc75a77b7dfa330 |
|
31-Mar-2009 |
Bill Wendling <isanbard@gmail.com> |
Revert r68073. It's causing a failure in the Apple-style builds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68092 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
cfbf05ef03806e6b11520b95eb33adda27241c47 |
|
14-Mar-2009 |
Daniel Dunbar <daniel@zuster.org> |
Add newlines at end of file (this can annoy gcov) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67000 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
49c8aa0d8b2824c70d178c5d55cda64d6613c0d8 |
|
13-Mar-2009 |
Owen Anderson <resistor@mac.com> |
Convert VirtRegMap to a MachineFunctionPass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66870 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
1ed5b714f1c98b370145fdebb6c21bbc7caa52d5 |
|
11-Mar-2009 |
Owen Anderson <resistor@mac.com> |
Reorganization: Move the Spiller out of VirtRegMap.cpp into its own files. No (intended) functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66720 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
0d8fc52ed37af612dae62868727b840b8936efb2 |
|
09-Mar-2009 |
Evan Cheng <evan.cheng@apple.com> |
Yet another case where the spiller marked two uses of the same register on the same instruction as kill. This fixes PR3706. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66428 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
821b8560e735613dfcf7670866f9142e4845037e |
|
08-Mar-2009 |
Evan Cheng <evan.cheng@apple.com> |
If a MI uses the same register more than once, only mark one of them as 'kill'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66363 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
c8bb37a50a7f5e5627523d2eab3e4860d1796dcc |
|
28-Feb-2009 |
Evan Cheng <evan.cheng@apple.com> |
Last commit accidentially deleted this code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65679 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
04cf3e39f3895434c75dd9fbe9070cd33fe6cbc0 |
|
26-Feb-2009 |
Evan Cheng <evan.cheng@apple.com> |
The last commit was overly conservative. It's ok to reuse value that's already marked livein. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65498 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
f792352c25880ee0c61b2da2d03927b9356b77e8 |
|
26-Feb-2009 |
Evan Cheng <evan.cheng@apple.com> |
If an available register falls through to a succ block, unset the last kill. Sorry, it's impossible to reduce a sensible test case. It basically requires the moon and stars to align in order to cause a failure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65497 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
bf18939180afcd8d0c8c422f86b170e036544be6 |
|
17-Feb-2009 |
Evan Cheng <evan.cheng@apple.com> |
A couple of places where reused use operands should be marked kill. This is exposed by recent availability fallthrough changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64745 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
92c1e126473dfa93eeb4c9a124af4fedb40f0d5b |
|
13-Feb-2009 |
Bill Wendling <isanbard@gmail.com> |
Revert this. It was breaking stuff. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64428 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
54fc7d67146b2b95ae2d1c93ed59008d4338d8c8 |
|
13-Feb-2009 |
Bill Wendling <isanbard@gmail.com> |
Turn off the old way of handling debug information in the code generator. Use the new way, where all of the information is passed on SDNodes and machine instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64427 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
4ed76e76bb3d9a7504b22ae3952b541ff68925d3 |
|
12-Feb-2009 |
Dan Gohman <gohman@apple.com> |
Adjust the sizes for a few SmallVectors to reflect their usage. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64381 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
8679119f4b686d141462bf6d18f4ae0eb0bd0841 |
|
12-Feb-2009 |
Evan Cheng <evan.cheng@apple.com> |
It's (currently) not safe to keep certain physical registers live across basic blocks, e.g. x86 fp stack registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64374 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
6d209c413e3be5640f14af136e8b112e85c79cab |
|
12-Feb-2009 |
Evan Cheng <evan.cheng@apple.com> |
If availability info is kept when fallthrough into a bb, add the available registers to live-in set. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64372 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
ce7f5a1e50fa312ce27e41030dd1b2e02ba8d604 |
|
12-Feb-2009 |
Evan Cheng <evan.cheng@apple.com> |
Remove a bogus assertion. It's possible a live-in available value is used by a previous instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64339 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
752272a5e553313f7b0397a06a23b4fe8ac013c4 |
|
11-Feb-2009 |
Evan Cheng <evan.cheng@apple.com> |
Implement PR3495: local spiller optimization. The local spiller can now keep availability information over BB boundaries. It visits BB's in depth first order. After visiting a BB if it find a successor which has a single predecessor it visits the successor next without clearing the availability information. This allows the successor to omit reloads or change them into copies. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
d62e06c53b8b7e555617dc9b24b98c007d63de5d |
|
03-Feb-2009 |
Bill Wendling <isanbard@gmail.com> |
Explicitly pass in debug location information to BuildMI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63599 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
04ee5a1d9267e5e6fab8f088095fcb83c3c5cbd1 |
|
20-Jan-2009 |
Evan Cheng <evan.cheng@apple.com> |
Change TargetInstrInfo::isMoveInstr to return source and destination sub-register indices as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62600 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
bbe4105cd7c94e90ecc7de2be57c04b3d80bb267 |
|
02-Dec-2008 |
Evan Cheng <evan.cheng@apple.com> |
Fix PR3124: overly strict assert. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60392 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
af42fe36acaf21958bd283f7327a068bbd1016ba |
|
17-Oct-2008 |
Evan Cheng <evan.cheng@apple.com> |
Fix PR2898. Spiller delete a store for reuse before it knows for sure the reuse happened. Patch by Lang Hames! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57720 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
6784598895c184889b82a9d213c307c70b1ea444 |
|
17-Oct-2008 |
Evan Cheng <evan.cheng@apple.com> |
Fix a very subtle spiller bug: UpdateKills should not forget to track defs of aliases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57673 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
b8cab9227a0f6ffbdaae33e3c64268e265008a6a |
|
14-Oct-2008 |
Dan Gohman <gohman@apple.com> |
Fix command-line option printing to print two spaces where needed, instead of requiring all "short description" strings to begin with two spaces. This makes these strings less mysterious, and it fixes some cases where short description strings mistakenly did not begin with two spaces. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57521 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
4daa9071ed1afde7fb03c7e0198101f4806b7d11 |
|
06-Oct-2008 |
Dan Gohman <gohman@apple.com> |
Don't dereference the end() iterator. Thanks to ENABLE_EXPENSIVE_CHECKS for finding this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57181 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
d735b8019b0f297d7c14b55adcd887af24d8e602 |
|
03-Oct-2008 |
Dan Gohman <gohman@apple.com> |
Switch the MachineOperand accessors back to the short names like isReg, etc., from isRegister, etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57006 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
d9c553f2622f751f9c474aa348e2f8b595d7d9ca |
|
11-Sep-2008 |
Evan Cheng <evan.cheng@apple.com> |
Propagate subreg index when promoting a load to a copy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56085 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
014264b70f2af002a41f8e36a9430fcf20e77bc7 |
|
10-Sep-2008 |
Evan Cheng <evan.cheng@apple.com> |
Fix PR2664 - spiller GetRegForReload wasn't respecting sub-register indices on machine operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56065 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
90960280ee79987f53b4952793a867143145a36a |
|
04-Sep-2008 |
Evan Cheng <evan.cheng@apple.com> |
Fix an overly strict assertion. Source register of a copy may not be killed, it may be killed by an implicit super-register use. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55762 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
724651ab6e5efc6b4a321c6c9f58a3a716072d50 |
|
19-Aug-2008 |
Owen Anderson <resistor@mac.com> |
Make SimpleSpiller respect subregister indices. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54968 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
e3b8a48d3285cdaf3593af9d4b658e15df037b9f |
|
05-Aug-2008 |
Evan Cheng <evan.cheng@apple.com> |
Fix PR2596: out of bound reference. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54375 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
fa82857e413578c35b39f5dc1e7ea8525e02e6bf |
|
18-Jul-2008 |
Dan Gohman <gohman@apple.com> |
Fix a LocalSpiller leak. This fixes tramp3d-v4. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53766 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
8e5f2c6f65841542e2a7092553fe42a00048e4c7 |
|
08-Jul-2008 |
Dan Gohman <gohman@apple.com> |
Pool-allocation for MachineInstrs, MachineBasicBlocks, and MachineMemOperands. The pools are owned by MachineFunctions. This drastically reduces the number of calls to malloc/free made during the "Emit" phase of scheduling, as well as later phases in CodeGen. Combined with other changes, this speeds up the "instruction selection" phase of CodeGen by 10% in some cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53212 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
625986afea1b040bcf087156e4a0389ffafdbe1e |
|
18-Jun-2008 |
Evan Cheng <evan.cheng@apple.com> |
Cosmetic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52450 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
7a15391c8dad7d4ff265b6b8f5aa6bcc50107c7a |
|
16-Jun-2008 |
Evan Cheng <evan.cheng@apple.com> |
Fix read after free found by valgrind. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52309 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
87bb991aa83c269295504443fe3ad1cae16f0f76 |
|
14-Jun-2008 |
Evan Cheng <evan.cheng@apple.com> |
Teach the spiller to commute instructions in order to fold a reload. This hits 410 times on 444.namd and 122 times on 252.eon. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52266 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
cb74266cdbcd79efb46f8c1c66ca044cb0ac5f96 |
|
04-Jun-2008 |
Evan Cheng <evan.cheng@apple.com> |
Move #include to right place. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51932 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
f3061f8210b4be5fc7c92db81258a7e185f187fe |
|
23-May-2008 |
Bill Wendling <isanbard@gmail.com> |
Remove warnings about comparison between signed and unsigned expressions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51465 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
cff860801e8cac730c3b171e1dc8b66b7900dec6 |
|
22-May-2008 |
David Greene <greened@obbligato.org> |
Don't attempt to update SpillSlotToUsesMap for stack slots that aren't generated by the spiller. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51439 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
7a0f1851ec0ac25d94cebc06f8f611a48e5f4326 |
|
20-May-2008 |
Evan Cheng <evan.cheng@apple.com> |
More local spiller complexity! If local spiller optimization turns some instruction into an identity copy, it will be removed. If the output register happens to be dead (and source is obviously killed), transfer the kill / dead information to last use / def in the same MBB. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51306 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
844731a7f1909f55935e3514c9e713a62d67662e |
|
13-May-2008 |
Dan Gohman <gohman@apple.com> |
Clean up the use of static and anonymous namespaces. This turned up several things that were neither in an anonymous namespace nor static but not intended to be global. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51017 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
7ebc06bfd8df4cd7c477af1e5fec196c32efcfea |
|
07-May-2008 |
Evan Cheng <evan.cheng@apple.com> |
Yet another nasty spiller bug. %ecx = op store %cl<kill>, (addr) (addr) = op %al It's not safe to unfold the last operand and eliminate store even though %cl is marked kill. It's a sub-register use which means one of its super-register(s) may be used below. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50794 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
4cce6b4c7882ef0cc993d931b90bf33985c96110 |
|
11-Apr-2008 |
Evan Cheng <evan.cheng@apple.com> |
Use of implicit_def is not part of live interval. Create empty intervals for the uses when the live interval is being spilled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49542 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
ca1267c02b025cc719190b05f9e1a5d174a9caf7 |
|
31-Mar-2008 |
Evan Cheng <evan.cheng@apple.com> |
Move reMaterialize() from TargetRegisterInfo to TargetInstrInfo. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48995 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
ed70cbb3f367bc0f77d34d22163abbe4879526bc |
|
26-Mar-2008 |
Evan Cheng <evan.cheng@apple.com> |
Avoid commuting a def MI in order to coalesce a copy instruction away if any use of the same val# is a copy instruction that has already been coalesced. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48833 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
70366b96a5d70b232c3d42e76b83e6b54190bdb7 |
|
21-Mar-2008 |
Evan Cheng <evan.cheng@apple.com> |
A couple of kill marker maintainence bug. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48653 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
c17ba8a28d2f83dd320745c0c9994464845ac990 |
|
14-Mar-2008 |
Evan Cheng <evan.cheng@apple.com> |
Fix PR2138. Apparently any modification to a std::multimap (including remove entries for a different key) can invalidate multimap iterators. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48371 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
b576931ca23ccd71bc702f3cdee1b365314bbf4f |
|
12-Mar-2008 |
Dan Gohman <gohman@apple.com> |
Change VirtRegMap's dump to dump to cerr, not DOUT, so that it can be called from within a debuger without having -debug specified on the command-line. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
17d5f5496c96236764fdf3e278cecca334c6d25e |
|
12-Mar-2008 |
Evan Cheng <evan.cheng@apple.com> |
Set NextMII after issuing a physical register spill. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48263 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
4191b96f41b83d32ee7aa761c0d466622dac9c01 |
|
12-Mar-2008 |
Evan Cheng <evan.cheng@apple.com> |
Minor debug output bug. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48261 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
c1f53c742620dd4f2460685477303002bba8a8d8 |
|
11-Mar-2008 |
Evan Cheng <evan.cheng@apple.com> |
Transfer physical register spill info when load / store folding happens. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48246 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
676dd7c80b6f91178452535ac45ca58feb23cc42 |
|
11-Mar-2008 |
Evan Cheng <evan.cheng@apple.com> |
When the register allocator runs out of registers, spill a physical register around the def's and use's of the interval being allocated to make it possible for the interval to target a register and spill it right away and restore a register for uses. This likely generates terrible code but is before than aborting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48218 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
6130f66eaae89f8878590796977678afa8448926 |
|
05-Mar-2008 |
Evan Cheng <evan.cheng@apple.com> |
Refactor code. Remove duplicated functions that basically do the same thing as findRegisterUseOperandIdx, findRegisterDefOperandIndx. Fix some naming inconsistencies. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47927 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
21b3f31f8f7d77b9c3a35012139df92ba40e7c92 |
|
27-Feb-2008 |
Evan Cheng <evan.cheng@apple.com> |
Fix a bug in dead spill slot elimination. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47687 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
6ef781f3ce0d0311004adba9d1e7dbd7950918dd |
|
27-Feb-2008 |
Bill Wendling <isanbard@gmail.com> |
Final de-tabification. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47663 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
d36531249a9a9500e516148e7e72d4c0a7a4d0ee |
|
27-Feb-2008 |
Evan Cheng <evan.cheng@apple.com> |
Spiller now remove unused spill slots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47657 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
e6d088acc90e422451e098555d383d4d65b6ce6b |
|
26-Feb-2008 |
Bill Wendling <isanbard@gmail.com> |
Rename PrintableName to Name. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47629 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
74ab84c31ef64538a1b56e1f282e49303412ad17 |
|
26-Feb-2008 |
Bill Wendling <isanbard@gmail.com> |
Change "Name" to "AsmName" in the target register info. Gee, a refactoring tool would have been a Godsend here! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47625 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
f059deb8dd420b611c8b1a6d70720baf3ea19d51 |
|
26-Feb-2008 |
Bill Wendling <isanbard@gmail.com> |
De-tabify. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47598 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
b2fd65f936292f4dcd5ef5ee62175552779c1c82 |
|
22-Feb-2008 |
Evan Cheng <evan.cheng@apple.com> |
Make sure reload of implicit uses are issued before remat's. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47492 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
d70dbb5d627a0408eccf88033143efa62ee0e6c0 |
|
22-Feb-2008 |
Evan Cheng <evan.cheng@apple.com> |
Enable re-materialization of instructions which have virtual register operands if the definition of the operand also reaches its uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
4c71dfe356716e6bc1993ef5efdced08b68fe612 |
|
20-Feb-2008 |
Anton Korobeynikov <asl@math.spbu.ru> |
Update gcc 4.3 warnings fix patch with recent head changes git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47368 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
6f0d024a534af18d9e60b3ea757376cd8a3a980e |
|
10-Feb-2008 |
Dan Gohman <gohman@apple.com> |
Rename MRegisterInfo to TargetRegisterInfo. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46930 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
f2f8c2ae07b7d9bdbf1b89781c573c7af2bd5e1b |
|
08-Feb-2008 |
Evan Cheng <evan.cheng@apple.com> |
Forgot these files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46896 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
749c6f6b5ed301c84aac562e414486549d7b98eb |
|
07-Jan-2008 |
Chris Lattner <sabre@nondot.org> |
rename TargetInstrDescriptor -> TargetInstrDesc. Make MachineInstr::getDesc return a reference instead of a pointer, since it can never be null. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45695 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
349c4952009525b27383e2120a6b3c998f39bd09 |
|
07-Jan-2008 |
Chris Lattner <sabre@nondot.org> |
Move a bunch more accessors from TargetInstrInfo to TargetInstrDescriptor git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45680 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
69244300b8a0112efb44b6273ecea4ca6264b8cf |
|
07-Jan-2008 |
Chris Lattner <sabre@nondot.org> |
Rename MachineInstr::getInstrDescriptor -> getDesc(), which reflects that it is cheap and efficient to get. Move a variety of predicates from TargetInstrInfo into TargetInstrDescriptor, which makes it much easier to query a predicate when you don't have TII around. Now you can use MI->getDesc()->isBranch() instead of going through TII, and this is much more efficient anyway. Not all of the predicates have been moved over yet. Update old code that used MI->getInstrDescriptor()->Flags to use the new predicates in many places. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45674 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
6425f8be7263e625c2d7484eb2fb8f6643824f49 |
|
07-Jan-2008 |
Owen Anderson <resistor@mac.com> |
Update CodeGen for MRegisterInfo --> TargetInstrInfo changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45673 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
f6372aa1cc568df19da7c5023e83c75aa9404a07 |
|
01-Jan-2008 |
Owen Anderson <resistor@mac.com> |
Move some more instruction creation methods from RegisterInfo into InstrInfo. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45484 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
d10fd9791c20fd8368fa0ce94b626b769c6c8ba0 |
|
31-Dec-2007 |
Owen Anderson <resistor@mac.com> |
Move copyRegToReg from MRegisterInfo to TargetInstrInfo. This is part of the Machine-level API cleanup instigated by Chris. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45470 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
84bc5427d6883f73cfeae3da640acd011d35c006 |
|
31-Dec-2007 |
Chris Lattner <sabre@nondot.org> |
Rename SSARegMap -> MachineRegisterInfo in keeping with the idea that "machine" classes are used to represent the current state of the code being compiled. Given this expanded name, we can start moving other stuff into it. For now, move the UsedPhysRegs and LiveIn/LoveOuts vectors from MachineFunction into it. Update all the clients to match. This also reduces some needless #includes, such as MachineModuleInfo from MachineFunction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45467 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
f73823000e2d5d6e1cf65bdf5a107297e18d35fb |
|
30-Dec-2007 |
Chris Lattner <sabre@nondot.org> |
More cleanups for MachineOperand: - Eliminate the static "print" method for operands, moving it into MachineOperand::print. - Change various set* methods for register flags to take a bool for the value to set it to. Remove unset* methods. - Group methods more logically by operand flavor in MachineOperand.h git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45461 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
4ee451de366474b9c228b4e5fa573795a715216d |
|
29-Dec-2007 |
Chris Lattner <sabre@nondot.org> |
Remove attribution from file headers, per discussion on llvmdev. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45418 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
39c883cfc52776fa9a553f7e7ff06816ed476adb |
|
12-Dec-2007 |
Evan Cheng <evan.cheng@apple.com> |
If deleting a reload instruction due to reuse (value is available in register R and reload is targeting R), make sure to invalidate the kill information of the last kill. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44894 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
d120ffd26f2715c600b028d4eac9a3c41a9f4653 |
|
05-Dec-2007 |
Evan Cheng <evan.cheng@apple.com> |
MachineInstr can change. Store indexes instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44612 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
adf85906906ebf85c57c333e8209f37ef11a6c99 |
|
05-Dec-2007 |
Evan Cheng <evan.cheng@apple.com> |
If a split live interval is spilled again, remove the kill marker on its last use. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44611 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
b50bb8cf197709b3f49044740044c06d8f314564 |
|
05-Dec-2007 |
Evan Cheng <evan.cheng@apple.com> |
Fix kill info for split intervals. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44609 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
018f9b020bb12b731b0a7081578e5f82fb35092d |
|
05-Dec-2007 |
Evan Cheng <evan.cheng@apple.com> |
- Mark last use of a split interval as kill instead of letting spiller track it. This allows an important optimization to be re-enabled. - If all uses / defs of a split interval can be folded, give the interval a low spill weight so it would not be picked in case spilling is needed (avoid pushing other intervals in the same BB to be spilled). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44601 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
d64b5c82b97ad1b74eb9fd2f23257a7899b0c307 |
|
05-Dec-2007 |
Evan Cheng <evan.cheng@apple.com> |
Add a argument to storeRegToStackSlot and storeRegToAddr to specify whether the stored register is killed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44600 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
dd86ce3d570a77f90d6d2ccb6dde8d1fef35e094 |
|
05-Dec-2007 |
Evan Cheng <evan.cheng@apple.com> |
Remove a unsafe optimization. This fixes 401.bzip2. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44587 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
35a3e4abb96a6947ec66254b72e788bacc3aadd6 |
|
04-Dec-2007 |
Evan Cheng <evan.cheng@apple.com> |
Spiller unfold optimization bug: do not clobber a reusable stack slot value unless it can be modified. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44575 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
e4b39007c9d3056334264eba9e2e6025e241d2c5 |
|
03-Dec-2007 |
Evan Cheng <evan.cheng@apple.com> |
Bug fixes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44549 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
70306f8348f27c61cfed5a60e2fceac0f29746a2 |
|
03-Dec-2007 |
Evan Cheng <evan.cheng@apple.com> |
Update kill info for uses of split intervals. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44531 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
aee4af68ae2016afc5b4ec0c430e539c5810a766 |
|
02-Dec-2007 |
Evan Cheng <evan.cheng@apple.com> |
Remove redundant foldMemoryOperand variants and other code clean up. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44517 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
0cbb1164b3227f25f5e5d3681800a8e50e6b9865 |
|
29-Nov-2007 |
Evan Cheng <evan.cheng@apple.com> |
Fixed various live interval splitting bugs / compile time issues. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44428 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
cada245d06959831b90f8c29f92e77beda4b71cb |
|
28-Nov-2007 |
Evan Cheng <evan.cheng@apple.com> |
Recover compile time regression. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44386 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
81a038218171860ee4c382849c647d3dc841fe8b |
|
17-Nov-2007 |
Evan Cheng <evan.cheng@apple.com> |
Live interval splitting: When a live interval is being spilled, rather than creating short, non-spillable intervals for every def / use, split the interval at BB boundaries. That is, for every BB where the live interval is defined or used, create a new interval that covers all the defs and uses in the BB. This is designed to eliminate one common problem: multiple reloads of the same value in a single basic block. Note, it does *not* decrease the number of spills since no copies are inserted so the split intervals are *connected* through spill and reloads (or rematerialization). The newly created intervals can be spilled again, in that case, since it does not span multiple basic blocks, it's spilled in the usual manner. However, it can reuse the same stack slot as the previously split interval. This is currently controlled by -split-intervals-at-bb. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44198 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
c498b0281fa81bc213ad1a1228664d480936c0e6 |
|
14-Nov-2007 |
Evan Cheng <evan.cheng@apple.com> |
Clean up sub-register implementation by moving subReg information back to MachineOperand auxInfo. Previous clunky implementation uses an external map to track sub-register uses. That works because register allocator uses a new virtual register for each spilled use. With interval splitting (coming soon), we may have multiple uses of the same register some of which are of using different sub-registers from others. It's too fragile to constantly update the information. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44104 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
7277a7d031d2ccd66e2c3da0c797af0bf9f089ca |
|
02-Nov-2007 |
Evan Cheng <evan.cheng@apple.com> |
One more extract_subreg coalescing bug. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43644 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
cbfb9b27efd2b4fc1fbc02addf4d41a7d8d8d8eb |
|
22-Oct-2007 |
Evan Cheng <evan.cheng@apple.com> |
- Only perform the unfolding optimization when the folding in question is modref. - Remove a bogus assertion. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43211 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
66f716354527c5ab4687a89a1605915e5128a106 |
|
19-Oct-2007 |
Evan Cheng <evan.cheng@apple.com> |
Local spiller optimization: Turn a store folding instruction into a load folding instruction. e.g. xorl %edi, %eax movl %eax, -32(%ebp) movl -36(%ebp), %eax orl %eax, -32(%ebp) => xorl %edi, %eax orl -36(%ebp), %eax mov %eax, -32(%ebp) This enables the unfolding optimization for a subsequent instruction which will also eliminate the newly introduced store instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43192 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
7f56625447b94178118f2fec732b10f9e4aa7fbf |
|
13-Oct-2007 |
Evan Cheng <evan.cheng@apple.com> |
Local spiller optimization: Turn this: movswl %ax, %eax movl %eax, -36(%ebp) xorl %edi, -36(%ebp) into movswl %ax, %eax xorl %edi, %eax movl %eax, -36(%ebp) by unfolding the load / store xorl into an xorl and a store when we know the value in the spill slot is available in a register. This doesn't change the number of instructions but reduce the number of times memory is accessed. Also unfold some load folding instructions and reuse the value when similar situation presents itself. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42947 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
32dfbeada7292167bb488f36a71a5a6a519ddaff |
|
12-Oct-2007 |
Evan Cheng <evan.cheng@apple.com> |
EXTRACT_SUBREG coalescing support. The coalescer now treats EXTRACT_SUBREG like (almost) a register copy. However, it always coalesced to the register of the RHS (the super-register). All uses of the result of a EXTRACT_SUBREG are sub- register uses which adds subtle complications to load folding, spiller rewrite, etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42899 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
9efce638d307b2c71bd7f0258d47501661434c27 |
|
26-Sep-2007 |
Evan Cheng <evan.cheng@apple.com> |
Allow copyRegToReg to emit cross register classes copies. Tested with "make check"! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
92dfe2001e96f6e2b6d327e8816f38033f88b295 |
|
14-Sep-2007 |
Dan Gohman <gohman@apple.com> |
Remove isReg, isImm, and isMBB, and change all their users to use isRegister, isImmediate, and isMachineBasicBlock, which are equivalent, and more popular. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
04fa32f9aa19bae12e7fd5b5564cebc345de3c58 |
|
06-Sep-2007 |
David Greene <greened@obbligato.org> |
Add instruction dump output. This helps find bugs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41744 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
90a43c3ae385d98d19f9c858b51920552fb9ceaa |
|
15-Aug-2007 |
Evan Cheng <evan.cheng@apple.com> |
If the source of a move is in spill slot, the reload may be folded to essentially a load from stack slot. It's ok to mark the stack slot value as available for reuse. But it should not be clobbered since the destination of the move is live. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41109 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
b6ca4b370e1313b5d6bda19e86be370a3e00a38f |
|
15-Aug-2007 |
Evan Cheng <evan.cheng@apple.com> |
- If a def is dead, do not spill it. - If the defs of a spilled rematerializable MI are dead after the spill store is deleted, delete the def MI as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41086 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
c91f0b80687f0a6fafa5a5e6cd87498e2de6fc3e |
|
14-Aug-2007 |
Evan Cheng <evan.cheng@apple.com> |
If a MI's def is remat as well as spilled, and the store is later deemed dead, mark the def operand as isDead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41083 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
fff3e191b959bfc00e266b47f5c142464bb50ebf |
|
14-Aug-2007 |
Evan Cheng <evan.cheng@apple.com> |
If a spilled value is being reused and the use is a kill, that means there are no more uses within the MBB and the spilled value isn't live out of the MBB. Then it's safe to delete the spill store. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41069 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
dc6be1985944716a0fb4a2706dcea9e1296e3d6a |
|
14-Aug-2007 |
Evan Cheng <evan.cheng@apple.com> |
If a rematerializable def is not deleted, i.e. it is also spilled, check if the spilled value is available for reuse. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41067 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
549f27d3070195d6647b796841a5291b4549e8e0 |
|
14-Aug-2007 |
Evan Cheng <evan.cheng@apple.com> |
Re-implement trivial rematerialization. This allows def MIs whose live intervals that are coalesced to be rematerialized. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41060 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
28bb462d4cfb8c849a0d9a1b1f3c643b77b8efc6 |
|
11-Jul-2007 |
Evan Cheng <evan.cheng@apple.com> |
Missed a couple of places where new instructions are added due to spill / restore. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39748 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
b9591c667d956d0607f7388665649fb0852a988c |
|
11-Jul-2007 |
Evan Cheng <evan.cheng@apple.com> |
No longer need to track last def / use. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38534 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
0c40d72b014e8c0f54552d38288a29182effba58 |
|
11-Jul-2007 |
Evan Cheng <evan.cheng@apple.com> |
Fix for PR1545: Revamp code that update kill information due to register reuse. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38525 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
82a87a01723c095176c6940bcc63d3a7c8007b4b |
|
19-Jun-2007 |
Dan Gohman <gohman@apple.com> |
Replace M_REMATERIALIZIBLE and the newly-added isOtherReMaterializableLoad with a general target hook to identify rematerializable instructions. Some instructions are only rematerializable with specific operands, such as loads from constant pools, while others are always rematerializable. This hook allows both to be identified as being rematerializable with the same mechanism. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37644 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
c101e95cb6aae1fd6a0727ba4b518a7894ae3089 |
|
14-Jun-2007 |
Dan Gohman <gohman@apple.com> |
Add a target hook to allow loads from constant pools to be rematerialized, and an implementation for x86. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37576 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
faa510726f4b40aa4495e60e4d341c6467e3fb01 |
|
26-Apr-2007 |
Evan Cheng <evan.cheng@apple.com> |
Rename findRegisterUseOperand to findRegisterUseOperandIdx to avoid confusion. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36483 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
6c087e5585b227f3c1d8278304c7cfbc7cd4f6e8 |
|
26-Apr-2007 |
Evan Cheng <evan.cheng@apple.com> |
Match MachineFunction::UsedPhysRegs changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36452 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
9193514e2e3e599e241220b72bc9add25a80a8fd |
|
04-Apr-2007 |
Evan Cheng <evan.cheng@apple.com> |
Re-materialize all loads from fixed stack slots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35660 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
7cb33c86522d05a5b10757e7b1593488e28a2431 |
|
30-Mar-2007 |
Evan Cheng <evan.cheng@apple.com> |
Don't add the same MI to register reuse "last def/use" twice if it reads the register more than once. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35513 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
018d6e153768b382ac663164d91e2ea539e7cb0e |
|
27-Mar-2007 |
Evan Cheng <evan.cheng@apple.com> |
Don't call getOperandConstraint() if operand index is greater than TID->numOperands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35375 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
ad7ccf34b5de14bd2b9ddc8072d14582a2ce29d9 |
|
27-Mar-2007 |
Evan Cheng <evan.cheng@apple.com> |
Fix for PR1266. Don't mark a two address operand IsKill. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35365 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
2638e1a6b9e3c0e22b398987e1db99bee81db4fb |
|
20-Mar-2007 |
Evan Cheng <evan.cheng@apple.com> |
First cut trivial re-materialization support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35208 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
a7288df62db835ba4958d6e7c7fca237682840db |
|
03-Mar-2007 |
Evan Cheng <evan.cheng@apple.com> |
Only propagate IsKill if the last use is a kill. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
6b448092bff8d149769becaa14415bc1a3857e33 |
|
02-Mar-2007 |
Evan Cheng <evan.cheng@apple.com> |
- Keep track all def and uses of stack slot available in register. - Available value use may be deleted (e.g. noop move). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34841 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
c3dd314b78c22007243c98f3f3521c7fdaa67c1b |
|
02-Mar-2007 |
Evan Cheng <evan.cheng@apple.com> |
Invalidate last use of a reused register if the use is a deleted noop copy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34839 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
c0ba1bc49b2b544159425e3c4769a8bbf1635a3e |
|
01-Mar-2007 |
Evan Cheng <evan.cheng@apple.com> |
A restore is promoted to copy (or deleted entirely), remove the kill from the last use of the targetted register. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34773 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
de4e942faa12a52242915e3334c25f19687f36e2 |
|
25-Feb-2007 |
Evan Cheng <evan.cheng@apple.com> |
A couple of more places where a register liveness has been extended and its last kill should be updated accordingly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34597 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
50d25d7ff7326adef7c76ba79be3dd1d7240a81f |
|
23-Feb-2007 |
Evan Cheng <evan.cheng@apple.com> |
Reuse extends the liveness of a register. Transfer the kill to the operand that reuse it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
91e2390818080ae2b059e3ff850a9455858e4f7b |
|
23-Feb-2007 |
Evan Cheng <evan.cheng@apple.com> |
A spill kills the register being stored. But it is later being reused by spiller, its live range has to be extended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34517 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
957840b3e14938fc86c306fda99ac039d1777a4c |
|
21-Feb-2007 |
Evan Cheng <evan.cheng@apple.com> |
Use BitVector instead. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
667089de045cf8aee785ea57e49b8ebb0942b442 |
|
20-Feb-2007 |
Evan Cheng <evan.cheng@apple.com> |
Dead code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34435 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
f50d09ad21dbb16e35460d63d23d331a2cac7a91 |
|
08-Feb-2007 |
Evan Cheng <evan.cheng@apple.com> |
Fixed a long standing spiller bug that's exposed by Thumb: The code sequence before the spiller is something like: = tMOVrr %reg1117 = tMOVrr %reg1078 = tLSLri %reg1117, 2 The it starts spilling: %r0 = tRestore <fi#5>, 0 %r1 = tRestore <fi#7>, 0 %r1 = tMOVrr %r1<kill> tSpill %r1, <fi#5>, 0 %reg1078 = tLSLri %reg1117, 2 It restores the value while processing the first tMOVrr. At this point, the spiller remembers fi#5 is available in %r0. Next it processes the second move. It restores the source before the move and spills the result afterwards. The move becomes a noop and is deleted. However, a spill has been inserted and that should invalidate reuse of %r0 for fi#5 and add reuse of %r1 for fi#5. Therefore, %reg1117 (which is also assigned fi#5) should get %r1, not %r0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34039 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
08a4d5a343e886816b31a78d9b7e70240d9c67be |
|
23-Jan-2007 |
Chris Lattner <sabre@nondot.org> |
Switch this to use SmallSet to avoid mallocs in the common case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33457 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
3c82cab9aad8bd1ae7a9dd03548f721522db79f3 |
|
19-Jan-2007 |
Evan Cheng <evan.cheng@apple.com> |
GetRegForReload() now keeps track which registers have been considered and rejected during its quest to find a suitable reload register. This avoids an infinite loop in case like this: t1 := op t2, t3 t2 <- assigned r0 for use by the reload but ended up reuse r1 t3 <- assigned r1 for use by the reload but ended up reuse r0 t1 <- desires r1 sees r1 is taken by t2, tries t2's reload register r0 sees r0 is taken by t3, tries t3's reload register r1 sees r1 is taken by t2, tries t2's reload register r0 ... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33382 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
cd3245ac45c595da96bb768a55cddc356dff55fe |
|
19-Dec-2006 |
Chris Lattner <sabre@nondot.org> |
Eliminate static ctors from Statistics git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32698 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
5c7e326585f3a543388ba871c3425f7664cd9143 |
|
17-Dec-2006 |
Bill Wendling <isanbard@gmail.com> |
Added an automatic cast to "std::ostream*" etc. from OStream. We then can rework the hacks that had us passing OStream in. We pass in std::ostream* instead, check for null, and then dispatch to the correct print() method. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32636 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
86facc282850f99479584596058a5625b53caa69 |
|
15-Dec-2006 |
Evan Cheng <evan.cheng@apple.com> |
Minor clean up. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32593 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
7a0d51c8e3d6cdc6d961f6525f97f8926fb76c83 |
|
14-Dec-2006 |
Evan Cheng <evan.cheng@apple.com> |
Fix a long-standing spiller bug: If a spillslot value is available in a register, and there is a noop copy that targets that register, the spiller correctly decide not to invalidate the spillslot register. However, even though the noop copy does not clobbers the value. It does start a new intersecting live range. That means the spillslot register is available for use but should not be reused for a two-address instruction modref operand which would clobber the new live range. When we remove the noop copy, update the available information by clearing the canClobber bit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32576 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
cc22a7a2adfea3fc318a6d8ca0c692a8e892105b |
|
08-Dec-2006 |
Evan Cheng <evan.cheng@apple.com> |
Move findTiedToSrcOperand to TargetInstrDescriptor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
5c2a46052b3fa69dbdae483870ebe1b9e50386b5 |
|
08-Dec-2006 |
Evan Cheng <evan.cheng@apple.com> |
Proper fix for PR1037: to determine is a VR is a modref, check 1) whether it is tied to another oeprand, 2) whether is is being tied to by another operand. So the destination operand of a two-address MI can be correctly identified. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32354 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
fe46361719e86c75c9f7470c7f8ed0e3c3611bdf |
|
07-Dec-2006 |
Reid Spencer <rspencer@reidspencer.com> |
Revision 1.83 causes PR1037. Reverted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32305 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
e81561909d128c6e2d8033cb5465a49b2596b26a |
|
07-Dec-2006 |
Bill Wendling <isanbard@gmail.com> |
Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are now cerr, cout, and NullStream resp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
51cdcd197268a7abf19b2698fc824e0da3d98049 |
|
07-Dec-2006 |
Evan Cheng <evan.cheng@apple.com> |
MI keeps a ptr of TargetInstrDescriptor, use it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32296 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
6065f66e7c3fbde299a387d8a42c2d3a57d13c38 |
|
07-Dec-2006 |
Evan Cheng <evan.cheng@apple.com> |
getOperandConstraint returns -1 if the operand does have the specific constraint. This bug was causing excessive spills. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32295 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
ac0b6ae358944ae8b2b5a11dc08f52c3ed89f2da |
|
06-Dec-2006 |
Chris Lattner <sabre@nondot.org> |
Detemplatize the Statistic class. The only type it is instantiated with is 'unsigned'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32279 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
ba59a1e453e110f7b84233f07613f9c5d9a39b87 |
|
01-Dec-2006 |
Evan Cheng <evan.cheng@apple.com> |
Match TargetInstrInfo changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32098 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
b2b9c20b6121a54a41ee1c583a4bff4389622da2 |
|
17-Nov-2006 |
Bill Wendling <isanbard@gmail.com> |
More removal of std::cerr and DEBUG, replacing with DOUT instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31806 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
e077ef6e85fe0c18f135e6c2c78572a44f689b14 |
|
04-Nov-2006 |
Evan Cheng <evan.cheng@apple.com> |
Fixed some spiller bugs exposed by the recent two-address code changes. Now there may be other def(s) apart from the use&def two-address operand. We need to check if the register reuse for a use&def operand may conflicts with another def. Provide a mean to recover from the conflict if it is detected when the defs are processed later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31439 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
e6ae14e1f413987f3de31a7cad1b20a7893f8cae |
|
02-Nov-2006 |
Evan Cheng <evan.cheng@apple.com> |
Rename git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31364 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
360c2dd25a0dc7eaed3d57af47a47ac7d12a6886 |
|
02-Nov-2006 |
Evan Cheng <evan.cheng@apple.com> |
Two-address instructions no longer have to be A := A op C. Now any pair of dest / src operands can be tied together. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31363 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
6ec3626be40963fa405992e219f94d9524fb6c15 |
|
12-Oct-2006 |
Chris Lattner <sabre@nondot.org> |
restore my previous patch, now that the X86 backend bug has been fixed: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20061009/038518.html git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30906 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
b870100f2a2be0e7de99f7710db01a3e1f9d305b |
|
12-Oct-2006 |
Evan Cheng <evan.cheng@apple.com> |
Backing out Chris' last commit. It's breaking llvm-gcc bootstrapping. It's turning: movl -24(%ebp), %esp subl $16, %esp movl -24(%ebp), %ecx into movl -24(%ebp), %esp subl $16, %esp movl %esp, (%esp) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30902 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
f183cabba8ec381685807ab40a6e7e3b4077e95a |
|
12-Oct-2006 |
Chris Lattner <sabre@nondot.org> |
If we see a load from a stack slot into a physreg, consider it as providing the stack slot. This fixes PR943. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30898 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
2926869b4a083fc951484de03a9867eabf81e880 |
|
05-Sep-2006 |
Chris Lattner <sabre@nondot.org> |
Fix a long-standing wart in the code generator: two-address instruction lowering actually *removes* one of the operands, instead of just assigning both operands the same register. This make reasoning about instructions unnecessarily complex, because you need to know if you are before or after register allocation to match up operand #'s with the target description file. Changing this also gets rid of a bunch of hacky code in various places. This patch also includes changes to fold loads into cmp/test instructions in the X86 backend, along with a significant simplification to the X86 spill folding code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30108 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
a4f0b3a084d120cfc5b5bb06f64b222f5cb72740 |
|
27-Aug-2006 |
Chris Lattner <sabre@nondot.org> |
s|llvm/Support/Visibility.h|llvm/Support/Compiler.h| git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29911 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
f7da2c7b0c6293c268881628fc351bed7763f1f4 |
|
25-Aug-2006 |
Chris Lattner <sabre@nondot.org> |
Take advantage of the recent improvements to the liveintervals set (tracking instructions which define each value#) to simplify and improve the coallescer. In particular, this patch: 1. Implements iterative coallescing. 2. Reverts an unsafe hack from handlePhysRegDef, superceeding it with a better solution. 3. Implements PR865, "coallescing" away the second copy in code like: A = B ... B = A This also includes changes to symbolically print registers in intervals when possible. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29862 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
d36d03bf2daec79a364f32aba4f4a672c814c1bd |
|
21-Aug-2006 |
Bill Wendling <isanbard@gmail.com> |
Added a check so that if we have two machine instructions in this form MOV R0, R1 MOV R1, R0 the second machine instruction is removed. Added a regression test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29792 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
cd4317efcf334be10d9a98008a1445d6e12a7712 |
|
21-Jul-2006 |
Jim Laskey <jlaskey@mac.com> |
Eliminate data relocations by using NULL instead of global empty list. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29250 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
ed41f1bb1981a98eea63f00c5988cf62bbdd7c59 |
|
20-Jul-2006 |
Andrew Lenharth <andrewl@lenharth.org> |
Reduce number of exported symbols git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29220 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
f8c68f694c25b1ae8c0e5adb2a19432cb405d232 |
|
29-Jun-2006 |
Chris Lattner <sabre@nondot.org> |
Shave another 27K off libllvmgcc.dylib with visibility hidden git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28973 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
e53f4a055f74bded20d6129b4724ddd17fd199f6 |
|
04-May-2006 |
Chris Lattner <sabre@nondot.org> |
Move some methods out of MachineInstr into MachineOperand git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28102 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
229924a79f9a3b33b767527b9d4249e1133ceeda |
|
02-May-2006 |
Chris Lattner <sabre@nondot.org> |
Fix a latent bug that my spiller patch last week exposed: we were leaving instructions in the virtregfolded map that were deleted. Because they were deleted, newly allocated instructions could end up at the same address, magically finding themselves in the map. The solution is to remove entries from the map when we delete the instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28041 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
8a18c13fa5d226e60a875eff5ae66cefe4093bc9 |
|
01-May-2006 |
Chris Lattner <sabre@nondot.org> |
When promoting a load to a reg-reg copy, where the load was a previous instruction folded with spill code, make sure the remove the load from the virt reg folded map. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28040 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
35f2705e3de4600c3621b883eed9b22e4607ddf4 |
|
01-May-2006 |
Chris Lattner <sabre@nondot.org> |
Remove previous patch, which wasn't quite right. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28039 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
10dbd3ead83e64aae614181ee23965e10f341973 |
|
01-May-2006 |
Evan Cheng <evan.cheng@apple.com> |
Remove temp. option -spiller-check-liveout, it didn't cause any failure nor performance regressions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28029 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
200370fb5617a1719f0054804b412469ce486ebd |
|
30-Apr-2006 |
Evan Cheng <evan.cheng@apple.com> |
Local spiller kills a store if the folded restore is turned into a copy. But this is incorrect if the spilled value live range extends beyond the current BB. It is currently controlled by a temporary option -spiller-check-liveout. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28024 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
ba1fc3daf757c8f880c3069eed20218c91f2c3a8 |
|
28-Apr-2006 |
Chris Lattner <sabre@nondot.org> |
Mapping of physregs can make it so that the designated and input physregs are the same. In this case, don't emit a noop copy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28008 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
addc55af6c7f8b71eedd68d48f6a93ceecff2840 |
|
28-Apr-2006 |
Chris Lattner <sabre@nondot.org> |
When we have a two-address instruction where the input cannot be clobbered and is already available, instead of falling back to emitting a load, fall back to emitting a reg-reg copy. This generates significantly better code for some SSE testcases, as SSE has lots of two-address instructions and none of them are read/modify/write. As one example, this change does: pshufd %XMM5, XMMWORD PTR [%ESP + 84], 255 xorps %XMM2, %XMM5 cmpltps %XMM1, %XMM0 - movaps XMMWORD PTR [%ESP + 52], %XMM0 - movapd %XMM6, XMMWORD PTR [%ESP + 52] + movaps %XMM6, %XMM0 cmpltps %XMM6, XMMWORD PTR [%ESP + 68] movapd XMMWORD PTR [%ESP + 52], %XMM6 movaps %XMM6, %XMM0 cmpltps %XMM6, XMMWORD PTR [%ESP + 36] cmpltps %XMM3, %XMM0 - movaps XMMWORD PTR [%ESP + 20], %XMM0 - movapd %XMM7, XMMWORD PTR [%ESP + 20] + movaps %XMM7, %XMM0 cmpltps %XMM7, XMMWORD PTR [%ESP + 4] movapd XMMWORD PTR [%ESP + 20], %XMM7 cmpltps %XMM4, %XMM0 ... which is far better than a store followed by a load! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28001 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
28bad084118a9746df95084364d7d95de00c3b67 |
|
25-Feb-2006 |
Chris Lattner <sabre@nondot.org> |
Fix a bug that Evan exposed with some changes he's making, and that was exposed with a fastcc problem (breaking pcompress2 on x86 with -enable-x86-fastcc). When reloading a reused reg, make sure to invalidate the reloaded reg, and check to see if there are any other pending uses of the same register. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26369 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
47cb7173ea48691343b1046a0228a87c03b4167e |
|
25-Feb-2006 |
Chris Lattner <sabre@nondot.org> |
Remove debugging printout :) Add a minor compile time win, no codegen change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26368 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
540fec6b38c8107161a0db4f8a6b7cc50be38b4a |
|
25-Feb-2006 |
Chris Lattner <sabre@nondot.org> |
Refactor some code from being inline to being out in a new class with methods. This gets rid of two gotos, which is always nice, and also adds some comments. No functionality change, this is just a refactor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
003cecbc9d210fa23f0ba68ac288748d20780cc7 |
|
04-Feb-2006 |
Jeff Cohen <jeffc@jolt-lang.org> |
Fix VC++ warning. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25957 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
8666249ad6eca27d267f251495545bca132a9a5c |
|
04-Feb-2006 |
Chris Lattner <sabre@nondot.org> |
Handle another case exposed on X86. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25949 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
593c95878b089388f9c82b8c7b1f4731af86c792 |
|
04-Feb-2006 |
Chris Lattner <sabre@nondot.org> |
Fix a nasty problem on two-address machines in the following situation: store EAX -> [ss#0] [ss#0] += 1 ... use(EAX) In this case, it is not valid to rewrite this as: store EAX -> [ss#0] EAX += 1 store EAX -> [ss#0] ;;; this would also delete the store above ... use(EAX) ... because EAX is not a dead at that point. Keep track of which registers we are allowed to clobber, and which ones we aren't, and don't clobber the ones we're not supposed to. :) This should resolve the issues on X86 last night. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25948 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
66cf80f226e04e6704a78da83e08c7b0af944ef1 |
|
04-Feb-2006 |
Chris Lattner <sabre@nondot.org> |
significantly simplify the VirtRegMap code by pulling the SpillSlotsAvailable and PhysRegsAvailable maps out into a new AvailableSpills struct. No functionality change. This paves the way for a bugfix, coming up next. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25947 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
2ba0b02e15d8ed79e0c42fd6f85ab6c142d93a8a |
|
03-Feb-2006 |
Jeff Cohen <jeffc@jolt-lang.org> |
Fix VC++ compilation error caused by using a std::map iterator variable to receive a std::multimap iterator value. For some reason, GCC doesn't have a problem with this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25927 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
109afed40bec552e4d37115c971e082e79eb0093 |
|
03-Feb-2006 |
Chris Lattner <sabre@nondot.org> |
Remove move copies and dead stuff by not clobbering the result reg of a noop copy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25926 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
84e752a8129e7a02ee6e3c6d356a8fd68fbdf698 |
|
03-Feb-2006 |
Chris Lattner <sabre@nondot.org> |
Simplify some code git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25924 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
1118d25d3971bc4fce9715c8c83ea7a197bf2eff |
|
03-Feb-2006 |
Chris Lattner <sabre@nondot.org> |
Add code that checks for noop copies, which triggers when either: 1. a target doesn't know how to fold load/stores into copies, or 2. the spiller rewrites the input to a copy to the same register as the dest instead of to the reloaded reg. This will be moved/improved in the near future, but allows elimination of some ancient x86 hacks. This eliminates 92 copies from SMG2000 on X86 and 163 copies from 252.eon. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25922 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
07cf14112dcdb9c6b20a4f8e17de717b5219dad8 |
|
03-Feb-2006 |
Chris Lattner <sabre@nondot.org> |
Physregs may hold multiple stack slot values at the same time. Keep track of this, and use it to our advantage (bwahahah). This allows us to eliminate another 60 instructions from smg2000 on PPC (probably significantly more on X86). A common old-new diff looks like this: stw r2, 3304(r1) - lwz r2, 3192(r1) stw r2, 3300(r1) - lwz r2, 3192(r1) stw r2, 3296(r1) - lwz r2, 3192(r1) stw r2, 3200(r1) - lwz r2, 3192(r1) stw r2, 3196(r1) - lwz r2, 3192(r1) + or r2, r2, r2 stw r2, 3188(r1) and - lwz r31, 604(r1) - lwz r13, 604(r1) - lwz r14, 604(r1) - lwz r15, 604(r1) - lwz r16, 604(r1) - lwz r30, 604(r1) + or r31, r30, r30 + or r13, r30, r30 + or r14, r30, r30 + or r15, r30, r30 + or r16, r30, r30 + or r30, r30, r30 Removal of the R = R copies is coming next... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25919 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
cd81639d2e3705ee13b1869d6c166b5f5b4c29c4 |
|
03-Feb-2006 |
Chris Lattner <sabre@nondot.org> |
Fix a deficiency in the spiller that Evan noticed. In particular, consider this code: store [stack slot #0], R10 = add R14, [stack slot #0] The spiller didn't know that the store made the value of [stackslot#0] available in R10 *IF* the store came from a copy instruction with the store folded into it. This patch teaches VirtRegMap to look at these stores and recognize the values they make available. In one case Evan provided, this code: divsd %XMM0, %XMM1 movsd %XMM1, QWORD PTR [%ESP + 40] 1) movsd QWORD PTR [%ESP + 48], %XMM1 2) movsd %XMM1, QWORD PTR [%ESP + 48] addsd %XMM1, %XMM0 3) movsd QWORD PTR [%ESP + 48], %XMM1 movsd QWORD PTR [%ESP + 4], %XMM0 turns into: divsd %XMM0, %XMM1 movsd %XMM1, QWORD PTR [%ESP + 40] addsd %XMM1, %XMM0 3) movsd QWORD PTR [%ESP + 48], %XMM1 movsd QWORD PTR [%ESP + 4], %XMM0 In this case, instruction #2 was removed because of the value made available by #1, and inst #1 was later deleted because it is now never used before the stack slot is redefined by #3. This occurs here and there in a lot of code with high spilling, on PPC most of the removed loads/stores are LSU-reject-causing loads, which is nice. On X86, things are much better (because it spills more), where we nuke about 1% of the instructions from SMG2000 and several hundred from eon. More improvements to come... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25917 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
408396014742a05cad1c91949d2226169e3f9d80 |
|
02-Feb-2006 |
Chris Lattner <sabre@nondot.org> |
Move isLoadFrom/StoreToStackSlot from MRegisterInfo to TargetInstrInfo,a far more logical place. Other methods should also be moved if anyoneis interested. :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25913 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
2c2c6c61f100bc7c3df873b11203fcea1b5e18fe |
|
23-Jan-2006 |
Chris Lattner <sabre@nondot.org> |
Add explicit #includes of <iostream> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25515 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
172c362fefe3d6e762ada119d4084ed4ed31595b |
|
04-Jan-2006 |
Chris Lattner <sabre@nondot.org> |
Add an assertion, update DefInst even though no one uses it (dangling pointers don't help anyone) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25081 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
8a61a7524af19d67bd11f8e7d868ca75efbf5c91 |
|
06-Oct-2005 |
Chris Lattner <sabre@nondot.org> |
Fix the LLC regressions on X86 last night. In particular, when undoing previous copy elisions and we discover we need to reload a register, make sure to use the regclass of the original register for the reload, not the class of the current register. This avoid using 16-bit loads to reload 32-bit values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23645 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
22480c43504eca3092f79d9b42bdbb1b413e8e53 |
|
05-Oct-2005 |
Chris Lattner <sabre@nondot.org> |
Fix a bug in the local spiller, where we could take code like this: store r12 -> [ss#2] R3 = load [ss#1] use R3 R3 = load [ss#2] R4 = load [ss#1] and turn it into this code: store R12 -> [ss#2] R3 = load [ss#1] use R3 R3 = R12 R4 = R3 <- oops! The problem was that promoting R3 = load[ss#2] to a copy missed the fact that the instruction invalidated R3 at that point. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23638 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
bf9716b9c48d3b0370c715cd79540945f73dc296 |
|
30-Sep-2005 |
Chris Lattner <sabre@nondot.org> |
Change this code ot pass register classes into the stack slot spiller/reloader code. PrologEpilogInserter hasn't been updated yet though, so targets cannot use this info. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
cea8688ee4637e0f3cffc75e47f15be756f043bf |
|
19-Sep-2005 |
Chris Lattner <sabre@nondot.org> |
Teach the local spiller to turn stack slot loads into register-register copies when possible, avoiding the load (and avoiding the copy if the value is already in the right register). This patch came about when I noticed code like the following being generated: store R17 -> [SS1] ...blah... R4 = load [SS1] This was causing an LSU reject on the G5. This problem was due to the register allocator folding spill code into a reg-reg copy (producing the load), which prevented the spiller from being able to rewrite the load into a copy, despite the fact that the value was already available in a register. In the case above, we now rip out the R4 load and replace it with a R4 = R17 copy. This speeds up several programs on X86 (which spills a lot :) ), e.g. smg2k from 22.39->20.60s, povray from 12.93->12.66s, 168.wupwise from 68.54->53.83s (!), 197.parser from 7.33->6.62s (!), etc. This may have a larger impact in some cases on the G5 (by avoiding LSU rejects), though it probably won't trigger as often (less spilling in general). Targets that implement folding of loads/stores into copies should implement the isLoadFromStackSlot hook to get this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23388 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
50ea01ed5ba23c8988af9fed0b91178e69140a80 |
|
09-Sep-2005 |
Chris Lattner <sabre@nondot.org> |
Use continue in the use-processing loop to make it clear what the early exits are, simplify logic, and cause things to not be nested as deeply. This also uses MRI->areAliases instead of an explicit loop. No functionality change, just code cleanup. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23296 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
edf128a7fa90f2b0b7ee24741a04a7ae1ecd6f7e |
|
22-Apr-2005 |
Misha Brukman <brukman+llvm@gmail.com> |
Remove trailing whitespace git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21420 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
886dd9136f4c5b4523a0958e726955272eb9dfb2 |
|
04-Apr-2005 |
Chris Lattner <sabre@nondot.org> |
Make sure to notice that explicit physregs are used in the function git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21084 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
b0f31bf19b9cd0107900728123d4848eae462e6c |
|
23-Jan-2005 |
Chris Lattner <sabre@nondot.org> |
Update these register allocators to set the PhysRegUsed info in MachineFunction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19791 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
8f1d6402ba73b96993ffd1eb9434b28c828d8856 |
|
14-Jan-2005 |
Chris Lattner <sabre@nondot.org> |
Improve compatibility with acc git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19549 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
27f291600b04c382c390b16fdacd52b910b9164d |
|
26-Oct-2004 |
Chris Lattner <sabre@nondot.org> |
Clean up the MachineBasicBlock.h file, percolating #includes into this file. Patch contributed by Morten Ofstad git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17251 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
47eb6567e22ecf87ebeabc566fac6c02c975a9a4 |
|
15-Oct-2004 |
Chris Lattner <sabre@nondot.org> |
This patch fixes the nasty bug that caused 175.vpr to fail for X86 last night. The problem occurred when trying to reload this instruction: MOV32mr %reg2326, 8, %reg2297, 4, %reg2295 The value of reg2326 was available in EBX, so it was reused from there, instead of reloading it into EDX. The value of reg2297 was available in EDX, so it was reused from there, instead of reloading it into EDI. The value of reg2295 was not available, so we tried reloading it into EBX, its assigned register. However, we checked and saw that we already reloaded something into EBX, so we chose what reg2326 was assigned to (EDX) and reloaded into that register instead. Unfortunately EDX had already been used by reg2297, so reloading into EDX clobbered the value used by the reg2326 operand, breaking the program. The fix for this is to check that the newly picked register is ok. In this case we now find that EDX is already used and try using EDI, which succeeds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17006 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
8df6a594d2781777cd25fe2d00818419a8b10e5c |
|
15-Oct-2004 |
Chris Lattner <sabre@nondot.org> |
This patch adds and improves debugging output. No functionality changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17005 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
7cf34908920dc714eba7525d38747de2cdc81402 |
|
02-Oct-2004 |
Chris Lattner <sabre@nondot.org> |
Do not repeat the map lookup git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16633 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
bec6a9ea1281a0b3b37aece91ab0df21e086af61 |
|
02-Oct-2004 |
Chris Lattner <sabre@nondot.org> |
When a virtual register is folded into an instruction, keep track of whether it was a use, def, or both. This allows us to be less pessimistic in our analysis of them. In practice, this doesn't make a big difference, but it doesn't hurt either. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
52b25db3ef9390271bbfa0b5c6efe0a72ce7cb8e |
|
01-Oct-2004 |
Chris Lattner <sabre@nondot.org> |
Add a simple little improvement to the local spiller to keep track of stores and delete them if they turn out to be dead. This is a useful little hack that even speeds up some programs. For example, it speeds up Ptrdist/ks from 17.53s to 15.59s, and 188.ammp from 149s to 146s. This also speeds up llc :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16630 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
7fb64347d7d1310b5f3f06f7ae97031c73a21797 |
|
01-Oct-2004 |
Chris Lattner <sabre@nondot.org> |
Substantially revamp the local spiller, causing it to actually improve the generated code over the simple spiller. The new local spiller generates substantially better code than the simple one in some cases, by reusing values that are loaded out of stack slots and kept available in registers. This primarily helps programs that are spilling a lot, and there is still stuff that can be done to improve it. This patch makes the local spiller the default, as it's only a tiny bit slower than the simple spiller (it increases the runtime of llc by < 1%). Here are some numbers with speedups. Program #reuse old(s) new(s) Speedup Povray: 3452, 16.87 -> 15.93 (5.5%) 177.mesa: 2176, 2.77 -> 2.76 (0%) 179.art: 35, 28.43 -> 28.01 (1.5%) 183.equake: 55, 61.44 -> 61.41 (0%) 188.ammp: 869, 174 -> 149 (15%) 164.gzip: 43, 40.73 -> 40.71 (0%) 175.vpr: 351, 18.54 -> 17.34 (6.5%) 176.gcc: 2471, 5.01 -> 4.92 (1.8%) 181.mcf 42, 79.30 -> 75.20 (5.2%) 186.crafty: 484, 29.73 -> 30.04 (-1%) 197.parser: 251, 10.47 -> 10.67 (-1%) 252.eon: 1501, 1.98 -> 1.75 (12%) 253.perlbm: 1183, 14.83 -> 14.42 (2.8%) 254.gap: 825, 7.46 -> 7.29 (2.3%) 255.vortex: 285, 10.51 -> 10.27 (2.3%) 256.bzip2: 63, 55.70 -> 55.20 (0.9%) 300.twolf: 830, 21.63 -> 22.00 (-1%) PtrDist/ks 14, 32.75 -> 17.53 (46.5%) Olden/tsp 46, 8.71 -> 8.24 (5.4%) Free/distray 70, 1.09 -> 0.99 (9.2%) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16629 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
dbea9731b12e62f70d9da40cf273cdd9105f987c |
|
30-Sep-2004 |
Chris Lattner <sabre@nondot.org> |
Use more efficient map operations. Fix a bug that would affect hypothetical targets that supported multiple memory operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16614 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
477e4555de341c5de780de3720d6f115ec133c4e |
|
30-Sep-2004 |
Chris Lattner <sabre@nondot.org> |
There is no need to call MachineInstr::print directly, just send the MI& to an ostream. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16613 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
0fc27ccdd374799c8d65b61e89db53ba1ea47358 |
|
30-Sep-2004 |
Chris Lattner <sabre@nondot.org> |
Simplify the logic in the simple spiller and capitalize some variables git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16609 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
5f7d2d45fdd7a62611b94d404aa925a8609b5ed6 |
|
30-Sep-2004 |
Chris Lattner <sabre@nondot.org> |
Switch from defaulting to the 'local' spiller to the 'simple' spiller. The two spillers produce perfectly identical code (at least on povray and eon), but the simple spiller is substantially faster than the local spiller. Once the local spiller is improved, we can switch back. Switching cuts 5.2% off of the llc time for povray (about 1.3s). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16608 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
4ea1b828ebc5d2e8711acf13c2a3fdd7c14fe339 |
|
30-Sep-2004 |
Chris Lattner <sabre@nondot.org> |
Don't use a densemap for keeping track of which vregs are already loaded, just use a simple vector. This speeds up -spiller=simple from taking 22s to taking .1s on povray (debug build). This change does not modify the generated code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16607 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
7f690e625807b9320bf4ae437b8f35258acc99de |
|
30-Sep-2004 |
Chris Lattner <sabre@nondot.org> |
Use longer and more explicit names for instance vars (particularly important data structures). Fix the print method to send to the right ostream, not always cerr. Delete typedefs that are only used once. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16606 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
8c4d88d3697835371ecf6823f4142af13603ad2d |
|
30-Sep-2004 |
Chris Lattner <sabre@nondot.org> |
Reindent code, improve comments, move huge nested methods out of classes, prune #includes, add print/dump methods, etc. No functionality changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16604 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
551ccae044b0ff658fe629dd67edd5ffe75d10e8 |
|
02-Sep-2004 |
Reid Spencer <rspencer@reidspencer.com> |
Changes For Bug 352 Move include/Config and include/Support into include/llvm/Config, include/llvm/ADT and include/llvm/Support. From here on out, all LLVM public header files must be under include/llvm/. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
26eb14ba51c8eccdb3ac69370c6ac859d3be34a4 |
|
16-Aug-2004 |
Chris Lattner <sabre@nondot.org> |
Stop using CreateStackObject(RegClass*) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15775 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
57f1b67c347b9ba1f8a1cdc3a55362d4f2aa8653 |
|
15-Aug-2004 |
Chris Lattner <sabre@nondot.org> |
These methods no longer take a TargetRegisterClass* operand. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15774 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
7848e68c1635ccba5a08d55314d4e5aed5ab54b9 |
|
21-Jul-2004 |
Brian Gaeke <gaeke@uiuc.edu> |
These files don't need to include <iostream> since they include "Support/Debug.h". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15089 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
b8edf61fa9f558ccd68b4b5ac970e3d403d870ea |
|
16-Jul-2004 |
Chris Lattner <sabre@nondot.org> |
Fix IA64 compatibility git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14866 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
b140762a45d21aaed054f15adaff0fc2274d939d |
|
25-Jun-2004 |
Tanya Lattner <tonic@nondot.org> |
Made a fix so that you can print out MachineInstrs that belong to a MachineBasicBlock that is not yet attached to a MachineFunction. This change includes changing the third operand (TargetMachine) to a pointer for the MachineInstr::print function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14389 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
9bcdcd17c7219dbc68de2f11ca2de86471c8c390 |
|
02-Jun-2004 |
Chris Lattner <sabre@nondot.org> |
Adjust to new TargetMachine interface git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13956 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
38af59a43c4176d8f34bd26faeb18b23080a1d9b |
|
29-May-2004 |
Alkis Evlogimenos <alkis@evlogimenos.com> |
Add method to assign stack slot to virtual register without creating a new one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13895 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
6a367f33f333b09b3cad83d06ca88abcaf0c66b0 |
|
09-Mar-2004 |
Alkis Evlogimenos <alkis@evlogimenos.com> |
Spill explicit physical register defs as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12260 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
5ae00066c6fca3ec479245191f1766a553acb1ec |
|
07-Mar-2004 |
Alkis Evlogimenos <alkis@evlogimenos.com> |
As I wrote in the docs, simple is the default spiller :-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12189 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
499b2bad27307f9117656d58effb585f4744a44f |
|
06-Mar-2004 |
Alkis Evlogimenos <alkis@evlogimenos.com> |
Add simple spiller. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12188 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
dd420e060accd1d773c731e77335cff65ca34013 |
|
02-Mar-2004 |
Alkis Evlogimenos <alkis@evlogimenos.com> |
Add a spiller option to llc. A simple spiller will come soon. When we get CFG in the machine code represenation a global spiller will also be possible. Also document the linear scan register allocator but mark it as experimental for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12062 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
5f37502bfbadfa65de087627bd67fd58bb03725c |
|
01-Mar-2004 |
Alkis Evlogimenos <alkis@evlogimenos.com> |
Add the long awaited memory operand folding support for linear scan git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12058 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
57af2cf6f3b1ae250891fb60272bcdb3a964fbf9 |
|
27-Feb-2004 |
Alkis Evlogimenos <alkis@evlogimenos.com> |
Make spiller push stores right after the definition of a register so that they are as far away from the loads as possible. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11895 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
8fa16e47f88975b577fe1cafce1a366b78b2c340 |
|
27-Feb-2004 |
Alkis Evlogimenos <alkis@evlogimenos.com> |
Clear maps right after basic block is processed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11892 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
e3fcabe0681fe0d759593b1bcfab527f730778d8 |
|
26-Feb-2004 |
Alkis Evlogimenos <alkis@evlogimenos.com> |
Fix bugs found with recent addition of assertions in MRegisterInfo::is{Physical,Virtual}Register. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11849 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
4d0d864be3d9a698c4edfe36961a22126f041298 |
|
25-Feb-2004 |
Alkis Evlogimenos <alkis@evlogimenos.com> |
Add DenseMap template and actually use it for for mapping virtual regs to objects. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11840 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
0d6c5b6489b9abb634a1506d183ba47f1bf4d1f0 |
|
24-Feb-2004 |
Alkis Evlogimenos <alkis@evlogimenos.com> |
Move machine code rewriter and spiller outside the register allocator. The implementation is completely rewritten and now employs several optimizations not exercised before. For example for 164.gzip we have 997 loads and 699 stores vs the 1221 loads and 880 stores we have before. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11798 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|
34d9bc9f168d17c52eb57e024580bd9499695f91 |
|
24-Feb-2004 |
Alkis Evlogimenos <alkis@evlogimenos.com> |
Refactor VirtRegMap out of RegAllocLinearScan as the first part of bug 251 (providing a generic machine code rewriter/spiller). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11780 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/VirtRegMap.cpp
|