summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Convert some tab stops into spaces.Duncan Sands2010-07-124-31/+31
| | | | llvm-svn: 108130
* Convert the last use of getPhysicalRegisterRegClass and remove it.Rafael Espindola2010-07-121-1/+5
| | | | | | | | | | | | AggressiveAntiDepBreaker should not be using getPhysicalRegisterRegClass. An instruction might be using a register that can only be replaced with one from a subclass of getPhysicalRegisterRegClass. With this patch we use getMinimalPhysRegClass. This is correct, but conservative. We should check the uses of the register and select the largest register class that can be used in all of them. llvm-svn: 108122
* Don't use getPhysicalRegisterRegClass in PBQP. The existing checks that theRafael Espindola2010-07-121-15/+10
| | | | | | | | | | physical register can be allocated in the class of the virtual are sufficient. I think that the test for virtual registers is more strict than it needs to be, it should be possible to coalesce two virtual registers the class of one is a subclass of the other. llvm-svn: 108118
* Convert the last getPhysicalRegisterRegClass in VirtRegRewriter.cpp toRafael Espindola2010-07-121-1/+1
| | | | | | | | | getMinimalPhysRegClass. It was used to produce spills, and it is better to use the most specific class if possible. Update getLoadStoreRegOpcode to handle GR32_AD. llvm-svn: 108115
* change machinelicm to use MachineInstr::isSafeToMove. NoChris Lattner2010-07-121-18/+8
| | | | | | | | intended functionality change. The avoidance of hoistiing implicitdef seems wrong though. llvm-svn: 108109
* Remove TargetInstrInfo::copyRegToReg entirely.Jakob Stoklund Olesen2010-07-111-17/+0
| | | | | | | Targets must now implement TargetInstrInfo::copyPhysReg instead. There is no longer a default implementation forwarding to copyRegToReg. llvm-svn: 108095
* Convert uses of getPhysicalRegisterRegClass in VirtRegRewriter.cpp.Rafael Espindola2010-07-111-2/+2
| | | | | | | | | | | | The first one was used just to call isSafeToMoveRegClassDefs. In general, using a more specific reg class is better, in practice only x86 implements that method and the results are always the same. The second one is in FindFreeRegister and is used to check if a register is in a register class, a much more direct call to contains is better as it should cover more cases and is faster. llvm-svn: 108093
* Remove two other uses of ATTRIBUTE_UNUSED for variables only used withinChandler Carruth2010-07-111-3/+2
| | | | | | | | assert()s, switching to void-casts. Removed an unneeded Compiler.h include as a result. There are two other uses in LLVM, but they're not due to assert()s, so I've left them alone. llvm-svn: 108088
* Use COPY for fast-isel bitconvert, but don't create cross-class copies.Jakob Stoklund Olesen2010-07-111-7/+6
| | | | | | This doesn't change the behavior of SelectBitcast for X86. llvm-svn: 108073
* Fix va_arg for doubles. With this patch VAARG nodes always contain theRafael Espindola2010-07-116-9/+12
| | | | | | | | | | | | | | | correct alignment information, which simplifies ExpandRes_VAARG a bit. The patch introduces a new alignment information to TargetLoweringInfo. This is needed since the two natural candidates cannot be used: * The 's' in target data: If this is set to the minimal alignment of any argument, getCallFrameTypeAlignment would return 4 for doubles on ARM for example. * The getTransientStackAlignment method. It is possible for an architecture to have argument less aligned than what we maintain the stack pointer. llvm-svn: 108072
* Use COPY for extracting ImplicitDef'ed values from fast-isel instructions.Jakob Stoklund Olesen2010-07-111-30/+12
| | | | | | | This assumes that the registers can be copied which is probably a safe assumption. llvm-svn: 108070
* Use COPY in FastISel everywhere it is safe and trivial.Jakob Stoklund Olesen2010-07-111-8/+4
| | | | | | | The remaining copyRegToReg calls actually check the return value (shock!), so we cannot trivially replace them with COPY instructions. llvm-svn: 108069
* Replace copyRegToReg with COPY everywhere in lib/CodeGen except for FastISel.Jakob Stoklund Olesen2010-07-107-98/+62
| | | | llvm-svn: 108062
* Only collect subreg extracting copies for later coalescing.Jakob Stoklund Olesen2010-07-101-1/+1
| | | | | | This also avoids fatal copies from physregs. llvm-svn: 108061
* Fix a bug in the code which re-inserts DBG_VALUE nodes after scheduling;Dan Gohman2010-07-101-1/+3
| | | | | | | | if a block is split (by a custom inserter), the insert point may be in a different block than it was originally. This fixes 32-bit llvm-gcc bootstrap builds, and I haven't been able to reproduce it otherwise. llvm-svn: 108060
* Emit COPY instructions instead of using copyRegToReg in InstrEmitter,Jakob Stoklund Olesen2010-07-104-53/+21
| | | | | | | | | ScheduleDAGEmit, TwoAddressLowering, and PHIElimination. This switches the bulk of register copies to using COPY, but many less used copyRegToReg calls remain. llvm-svn: 108050
* Insert IMPLICIT_DEF instructions at the current insert position, notDan Gohman2010-07-101-1/+1
| | | | | | at the end of the block. llvm-svn: 108045
* Reapply bottom-up fast-isel, with several fixes for x86-32:Dan Gohman2010-07-109-263/+383
| | | | | | | | | - Check getBytesToPopOnReturn(). - Eschew ST0 and ST1 for return values. - Fix the PIC base register initialization so that it doesn't ever fail to end up the top of the entry block. llvm-svn: 108039
* Update DBG_VALUE to refer appropriate stack slot in case of a spill.Devang Patel2010-07-091-2/+19
| | | | llvm-svn: 108023
* Fix small bug in isMoveInstr -> COPY translationJakob Stoklund Olesen2010-07-091-3/+4
| | | | llvm-svn: 108013
* Automatically fold COPY instructions into stack load/store.Jakob Stoklund Olesen2010-07-091-9/+75
| | | | llvm-svn: 108012
* Remat uncoalescable COPY instrsJakob Stoklund Olesen2010-07-091-0/+11
| | | | llvm-svn: 108010
* Clarify what mysterious check means.Bill Wendling2010-07-091-0/+3
| | | | llvm-svn: 108005
* Fix MachineLICM to actually visit inner loops.Dan Gohman2010-07-091-3/+11
| | | | llvm-svn: 108001
* Change TII::foldMemoryOperand API to require the machine instruction to beJakob Stoklund Olesen2010-07-095-31/+32
| | | | | | | | | | | | | | inserted in a MBB, and return an already inserted MI. This target API change is necessary to allow foldMemoryOperand to call storeToStackSlot and loadFromStackSlot when folding a COPY to a stack slot reference in a target independent way. The foldMemoryOperandImpl hook is going to change in the same way, but I'll wait until COPY folding is actually implemented. Most targets only fold copies and won't need to specialize this hook at all. llvm-svn: 107991
* --- Reverse-merging r107947 into '.':Bob Wilson2010-07-099-383/+263
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | U utils/TableGen/FastISelEmitter.cpp --- Reverse-merging r107943 into '.': U test/CodeGen/X86/fast-isel.ll U test/CodeGen/X86/fast-isel-loads.ll U include/llvm/Target/TargetLowering.h U include/llvm/Support/PassNameParser.h U include/llvm/CodeGen/FunctionLoweringInfo.h U include/llvm/CodeGen/CallingConvLower.h U include/llvm/CodeGen/FastISel.h U include/llvm/CodeGen/SelectionDAGISel.h U lib/CodeGen/LLVMTargetMachine.cpp U lib/CodeGen/CallingConvLower.cpp U lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp U lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp U lib/CodeGen/SelectionDAG/FastISel.cpp U lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp U lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp U lib/CodeGen/SelectionDAG/InstrEmitter.cpp U lib/CodeGen/SelectionDAG/TargetLowering.cpp U lib/Target/XCore/XCoreISelLowering.cpp U lib/Target/XCore/XCoreISelLowering.h U lib/Target/X86/X86ISelLowering.cpp U lib/Target/X86/X86FastISel.cpp U lib/Target/X86/X86ISelLowering.h llvm-svn: 107987
* cache result of operator*Gabor Greif2010-07-091-4/+8
| | | | llvm-svn: 107980
* Avoid creating %physreg:subidx operands in ↵Jakob Stoklund Olesen2010-07-091-1/+4
| | | | | | | | SimpleRegisterCoalescing::RemoveCopyByCommutingDef. This fixes PR7602. llvm-svn: 107957
* Deal with a few remaining spots that assume physical registers have live ↵Jakob Stoklund Olesen2010-07-091-2/+4
| | | | | | | | intervals. This fixes PR7601. llvm-svn: 107955
* Fix broken isCopy handling in TrimLiveIntervalToLastUse.Jakob Stoklund Olesen2010-07-091-3/+7
| | | | llvm-svn: 107950
* Handle COPY in VirtRegRewriter.Jakob Stoklund Olesen2010-07-091-0/+28
| | | | llvm-svn: 107949
* Re-apply bottom-up fast-isel, with fixes. Be very careful to avoid emittingDan Gohman2010-07-099-263/+383
| | | | | | a DBG_VALUE after a terminator, or emitting any instructions before an EH_LABEL. llvm-svn: 107943
* Reenable DAG combining for vector shuffles. It looks like it was temporarilyBob Wilson2010-07-091-2/+0
| | | | | | | | disabled and then never turned back on again. Adjust some tests, one because this change avoids an unnecessary instruction, and the other to make it continue testing what it was intended to test. llvm-svn: 107941
* Reverting r107918 and r107919. Radar 8063111.Stuart Hastings2010-07-081-4/+11
| | | | llvm-svn: 107930
* Revert "Fix broken isCopy handling in TrimLiveIntervalToLastUse"Jakob Stoklund Olesen2010-07-081-7/+3
| | | | | | This reverts commit 107921. It broke the clang self host. llvm-svn: 107926
* Relax assertion. In optimized code, it is possible that first instruction is ↵Devang Patel2010-07-081-1/+1
| | | | | | | | coming from a inlined function. This fixes PR7596 . llvm-svn: 107923
* Extension of r107506. Make sure that we don't mark a function as having a callBill Wendling2010-07-081-1/+2
| | | | | | if the inline ASM doesn't need a stack frame. llvm-svn: 107922
* Fix broken isCopy handling in TrimLiveIntervalToLastUseJakob Stoklund Olesen2010-07-081-3/+7
| | | | llvm-svn: 107921
* Fix decl/def debug info for template functions. Radar 8063111.Stuart Hastings2010-07-081-11/+4
| | | | llvm-svn: 107919
* Reuse DIEInteger for 1. This is frequently used while emitting an attribute ↵Devang Patel2010-07-082-1/+5
| | | | | | using dwarf::DW_FORM_flag form. llvm-svn: 107903
* Clean up scavengeRegister() a bit to prefer available regs, which allowsJim Grosbach2010-07-082-18/+7
| | | | | | | | the simplification of frame index register scavenging to not have to check for available registers directly and instead just let scavengeRegister() handle it. llvm-svn: 107880
* Convert EXTRACT_SUBREG to COPY when emitting machine instrs.Jakob Stoklund Olesen2010-07-0813-113/+88
| | | | | | | | | EXTRACT_SUBREG no longer appears as a machine instruction. Use COPY instead. Add isCopy() checks in many places using isMoveInstr() and isExtractSubreg(). The isMoveInstr hook will be removed later. llvm-svn: 107879
* Remove references to INSERT_SUBREG after de-SSA.Jakob Stoklund Olesen2010-07-087-131/+9
| | | | | | | Fix X86InstrInfo::convertToThreeAddressWithLEA to generate COPY instead of INSERT_SUBREG. llvm-svn: 107878
* Merge the duplicated iabs optimization in DAGCombiner and let it detected a ↵Benjamin Kramer2010-07-081-30/+26
| | | | | | few more idioms. llvm-svn: 107868
* Add TargetInstrInfo::copyPhysReg hook and use it from LowerSubregs.Jakob Stoklund Olesen2010-07-082-36/+25
| | | | | | | | | This target hook is intended to replace copyRegToReg entirely, but for now it calls copyRegToReg. Any remaining calls to copyRegToReg wil be replaced by COPY instructions. llvm-svn: 107854
* Revert 107840 107839 107813 107804 107800 107797 107791.Dan Gohman2010-07-088-306/+262
| | | | | | Debug info intrinsics win for now. llvm-svn: 107850
* When processing frame index virtual registers, consider all available registersJim Grosbach2010-07-082-3/+23
| | | | | | | | (if there are any) and use the one which remains available for the longest rather than just using the first one. This should help enable better re-use of the loaded frame index values. rdar://7318760 llvm-svn: 107847
* Don't forward-declare registers for static allocas, which we'llDan Gohman2010-07-071-1/+3
| | | | | | | prefer to materialize as local constants. This fixes the clang bootstrap abort. llvm-svn: 107840
* Fix -fast-isel-abort to check the right instruction.Dan Gohman2010-07-071-1/+1
| | | | llvm-svn: 107839
* One MDNode may be used to create regular DIE as well as abstract DIE.Devang Patel2010-07-072-1/+17
| | | | | | Keep track of abstract subprogram DIEs. llvm-svn: 107822
OpenPOWER on IntegriCloud