summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Fix off by one error. I misunderstood the comment about killedAt.Rafael Espindola2011-07-011-1/+1
| | | | llvm-svn: 134229
* Check the liveinterval, not the kill flag.Rafael Espindola2011-07-011-7/+10
| | | | llvm-svn: 134228
* Don't inflate register classes used by inline asm.Jakob Stoklund Olesen2011-07-011-0/+3
| | | | | | | | | | | | The constraints are represented by the register class of the original virtual register created for the inline asm. If the register class were included in the operand descriptor, we might be able to do this. For now, just give up on regclass inflation when inline asm is involved. No test case, this bug hasn't happened yet. llvm-svn: 134226
* Add 134199 back, but disable the optimization when the second copy is a kill.Rafael Espindola2011-07-011-10/+100
| | | | llvm-svn: 134216
* Revert my previous patch while I debug llvm-gcc bootstrap.Rafael Espindola2011-06-301-95/+10
| | | | llvm-svn: 134201
* Don't give up on coalescing A and B when we findRafael Espindola2011-06-301-10/+95
| | | | | | | | | | | | A = X B = X Instead, proceed as if we had found A = X B = A llvm-svn: 134199
* Create a isFullCopy predicate.Rafael Espindola2011-06-301-5/+1
| | | | llvm-svn: 134189
* Remove dead code.Rafael Espindola2011-06-301-88/+0
| | | | llvm-svn: 134148
* Reapply r134047 now that the world is ready for it.Jakob Stoklund Olesen2011-06-303-138/+291
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch will sometimes choose live range split points next to interference instead of always splitting next to a register point. That means spill code can now appear almost anywhere, and it was necessary to fix code that didn't expect that. The difficult places were: - Between a CALL returning a value on the x87 stack and the corresponding FpPOP_RETVAL (was FpGET_ST0). Probably also near x87 inline assembly, but that didn't actually show up in testing. - Between a CALL popping arguments off the stack and the corresponding ADJCALLSTACKUP. Both are fixed now. The only place spill code can't appear is after terminators, see SplitAnalysis::getLastSplitPoint. Original commit message: Rewrite RAGreedy::splitAroundRegion, now with cool ASCII art. This function has to deal with a lot of special cases, and the old version got it wrong sometimes. In particular, it would sometimes leave multiple uses in the stack interval in a single block. That causes bad code with multiple reloads in the same basic block. The new version handles block entry and exit in a single pass. It first eliminates all the easy cases, and then goes on to create a local interval for the blocks with difficult interference. Previously, we would only create the local interval for completely isolated blocks. It can happen that the stack interval becomes completely empty because we could allocate a register in all edge bundles, and the new local intervals deal with the interference. The empty stack interval is harmless, but we need to remove a SplitKit assertion that checks for empty intervals. llvm-svn: 134125
* Remove getRegClassForInlineAsmConstraint and all dependencies.Eric Christopher2011-06-302-108/+0
| | | | | | Fixes rdar://9643582 llvm-svn: 134123
* Revert r133953 for now.Devang Patel2011-06-292-24/+0
| | | | llvm-svn: 134116
* make compose and isMoveInstr static functions.Rafael Espindola2011-06-292-16/+10
| | | | llvm-svn: 134093
* Revert a part of r126557 which could create unschedulable DAGs.Benjamin Kramer2011-06-291-32/+0
| | | | llvm-svn: 134067
* Revert r134047 while investigating a llvm-gcc-i386-linux-selfhostJakob Stoklund Olesen2011-06-293-291/+138
| | | | | | miscompile. llvm-svn: 134053
* Sink SubtargetFeature and TargetInstrItineraries (renamed ↵Evan Cheng2011-06-295-3/+5
| | | | | | MCInstrItineraries) into MC. llvm-svn: 134049
* Rewrite RAGreedy::splitAroundRegion, now with cool ASCII art.Jakob Stoklund Olesen2011-06-293-138/+291
| | | | | | | | | | | | | | | | | | | | This function has to deal with a lot of special cases, and the old version got it wrong sometimes. In particular, it would sometimes leave multiple uses in the stack interval in a single block. That causes bad code with multiple reloads in the same basic block. The new version handles block entry and exit in a single pass. It first eliminates all the easy cases, and then goes on to create a local interval for the blocks with difficult interference. Previously, we would only create the local interval for completely isolated blocks. It can happen that the stack interval becomes completely empty because we could allocate a register in all edge bundles, and the new local intervals deal with the interference. The empty stack interval is harmless, but we need to remove a SplitKit assertion that checks for empty intervals. llvm-svn: 134047
* Move CallFrameSetupOpcode and CallFrameDestroyOpcode to TargetInstrInfo.Evan Cheng2011-06-281-4/+6
| | | | llvm-svn: 134030
* - Rename TargetInstrDesc, TargetOperandInfo to MCInstrDesc and MCOperandInfo andEvan Cheng2011-06-2827-257/+258
| | | | | | | | sink them into MC layer. - Added MCInstrInfo, which captures the tablegen generated static data. Chang TargetInstrInfo so it's based off MCInstrInfo. llvm-svn: 134021
* Print registers by name instead of by number.Jakob Stoklund Olesen2011-06-281-6/+7
| | | | llvm-svn: 134013
* Fix CMake build by removing this now dead file.Chandler Carruth2011-06-281-1/+0
| | | | llvm-svn: 133981
* Fix a bad iterator dereference that Evan uncovered.Jakob Stoklund Olesen2011-06-281-2/+4
| | | | llvm-svn: 133978
* Remove RegClass2VRegMap from MachineRegisterInfo.Evan Cheng2011-06-271-14/+0
| | | | llvm-svn: 133967
* Remove the experimental (and unused) pre-ra splitting pass. Greedy regalloc ↵Evan Cheng2011-06-273-1440/+0
| | | | | | can split live ranges. llvm-svn: 133962
* During bottom up fast-isel, instructions emitted to materalize registers are ↵Devang Patel2011-06-272-0/+24
| | | | | | at top of basic block and do not have debug location. This may misguide debugger while entering the basic block and sometimes debugger provides semi useful view of current location to developer by picking up previous known location as current location. Assign a sensible location to the first instruction in a basic block, if it does not have one location derived from source file, so that debugger can provide meaningful user experience to developers in edge cases. llvm-svn: 133953
* More refactoring. Move getRegClass from TargetOperandInfo to TargetInstrInfo.Evan Cheng2011-06-2710-19/+20
| | | | llvm-svn: 133944
* The index stored in the RegDefIter is one after the current index. When ↵Owen Anderson2011-06-271-1/+1
| | | | | | getting the index, decrement it so that it points to the current element. Fixes an off-by-one bug encountered when trying to make use of MVT::untyped. llvm-svn: 133923
* pre-RA-sched: Cleanup register pressure tracking.Andrew Trick2011-06-272-16/+4
| | | | | | | | Removed the check that peeks past EXTRA_SUBREG, which I don't think makes sense any more. Intead treat it as a normal register def. No significant affect on x86 or ARM benchmarks. llvm-svn: 133917
* Track live-out physical registers in MachineDCE.Jakob Stoklund Olesen2011-06-271-3/+8
| | | | | | Patch by Sanjoy Das! llvm-svn: 133910
* Distinguish early clobber output operands from clobbered registers.Jakob Stoklund Olesen2011-06-275-5/+8
| | | | | | | | | | | | | | | | | | | | | | Both become <earlyclobber> defs on the INLINEASM MachineInstr, but we now use two different asm operand kinds. The new Kind_Clobber is treated identically to the old Kind_RegDefEarlyClobber for now, but x87 floating point stack inline assembly does care about the difference. This will pop a register off the stack: asm("fstp %st" : : "t"(x) : "st"); While this will pop the input and push an output: asm("fst %st" : "=&t"(r) : "t"(x)); We need to know if ST0 was a clobber or an output operand, and we can't depend on <dead> flags for that. llvm-svn: 133902
* Decode and pretty print inline asm operand descriptors.Jakob Stoklund Olesen2011-06-271-1/+22
| | | | | | | | | | The INLINEASM MachineInstrs have an immediate operand describing each original inline asm operand. Decode the bits in MachineInstr::print() so it is easier to read: INLINEASM <es:rorq $1,$0>, $0:[regdef], %vreg0<def>, %vreg1<def>, $1:[imm], 1, $2:[reguse] [tiedto:$0], %vreg2, %vreg3, $3:[regdef-ec], %EFLAGS<earlyclobber,imp-def> llvm-svn: 133901
* Remove unused methods.Rafael Espindola2011-06-261-13/+0
| | | | llvm-svn: 133900
* There is only one register coalescer. Merge it into the base class andRafael Espindola2011-06-268-197/+151
| | | | | | remove the analysis group. llvm-svn: 133899
* Merge SimpleRegisterCoalescing.cpp into RegisterCoalescer.cpp.Rafael Espindola2011-06-263-1541/+1523
| | | | llvm-svn: 133897
* merge SimpleRegisterCoalescing.h into RegisterCoalescer.h.Rafael Espindola2011-06-264-156/+129
| | | | llvm-svn: 133896
* Move RegisterCoalescer.h to lib/CodeGen.Rafael Espindola2011-06-269-9/+253
| | | | llvm-svn: 133895
* Remove unnecessary wrapper.Rafael Espindola2011-06-262-27/+17
| | | | llvm-svn: 133886
* The scheduler needs to be aware on the existence of untyped nodes when it ↵Owen Anderson2011-06-241-1/+2
| | | | | | performs type propagation for EXTRACT_SUBREG. llvm-svn: 133838
* Handle debug info for i128 constants.Devang Patel2011-06-247-28/+38
| | | | llvm-svn: 133821
* SimplifyRafael Espindola2011-06-241-14/+6
| | | | llvm-svn: 133798
* Now that bb with phis are not considered simple, duplicate them even ifRafael Espindola2011-06-241-12/+18
| | | | | | we cannot duplicate to every predecessor. llvm-svn: 133797
* Simplify now that blocks with phis are not considered simple.Rafael Espindola2011-06-241-15/+0
| | | | llvm-svn: 133793
* Starting to refactor Target to separate out code that's needed to fully describeEvan Cheng2011-06-241-1/+1
| | | | | | | | | | | | target machine from those that are only needed by codegen. The goal is to sink the essential target description into MC layer so we can start building MC based tools without needing to link in the entire codegen. First step is to refactor TargetRegisterInfo. This patch added a base class MCRegisterInfo which TargetRegisterInfo is derived from. Changed TableGen to separate register description from the rest of the stuff. llvm-svn: 133782
* Use the presence of the __compact_unwind section to indicate that a targetBill Wendling2011-06-231-10/+7
| | | | | | supports compact unwind info instead of having a separate flag indicating this. llvm-svn: 133685
* Move more logic to shouldTailDuplicate and only duplicate regular bb beforeRafael Espindola2011-06-231-21/+45
| | | | | | | | | | register allocation if it has a indirectbr or if we can duplicate it to every predecessor. This fixes the SingleSource/Benchmarks/Shootout-C++/matrix.cpp regression but keeps the previous improvements to sunspider. llvm-svn: 133682
* Add a flag that indicates whether a target supports compact unwind info or not.Bill Wendling2011-06-221-2/+6
| | | | llvm-svn: 133662
* Reenable tail duplication of bb with just an unconditional jump, butRafael Espindola2011-06-221-4/+4
| | | | | | don't remove blocks that have their address taken. llvm-svn: 133659
* Add a __LD,__compact_unwind section.Bill Wendling2011-06-221-0/+6
| | | | | | | | If the linker supports it, this will hold the CIE and FDE information in a compact format. The implementation of the compact unwinding emission is coming soon. llvm-svn: 133658
* Revert r133607. This is causing failures in the Clang gccTestSuite.Chad Rosier2011-06-221-3/+3
| | | | | | Specifically, gcc.c-torture/compile/pr21356.c. llvm-svn: 133646
* Emit trailing padding on constant vectors when TargetData says that the vectorNick Lewycky2011-06-221-0/+7
| | | | | | is larger than the sum of the elements (including per-element padding). llvm-svn: 133631
* Replace the existing forms of ConstantArray::get() with a single formJay Foad2011-06-222-3/+3
| | | | | | that takes an ArrayRef. llvm-svn: 133615
OpenPOWER on IntegriCloud