summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineInstr.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix http://llvm.org/bugs/show_bug.cgi?id=4583Jakob Stoklund Olesen2009-07-191-2/+6
| | | | | | | | Inline asm instructions may have additional <imp-def,kill> register operands. These operands are not marked with a flag like the normal asm operands, so we must not assert that there is a flag. llvm-svn: 76373
* Teach MachineInstr::isRegTiedToDefOperand() to correctly parse inline asm ↵Jakob Stoklund Olesen2009-07-161-8/+12
| | | | | | | | | | | operands. The inline asm operands must be parsed from the first flag, you cannot assume that an immediate operand preceeding a register use operand is the flag. PowerPC "m" operands are represented as (flag, imm, reg) triples. isRegTiedToDefOperand() would incorrectly interpret the imm as the flag. llvm-svn: 76101
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-2/+2
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-2/+3
| | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
* Add a bit IsUndef to MachineOperand. This indicates the def / use register ↵Evan Cheng2009-06-301-5/+11
| | | | | | | | | | operand is defined by an implicit_def. That means it can def / use any register and passes (e.g. register scavenger) can feel free to ignore them. The register allocator, when it allocates a register to a virtual register defined by an implicit_def, can allocate any physical register without worrying about overlapping live ranges. It should mark all of operands of the said virtual register so later passes will do the right thing. This is not the best solution. But it should be a lot less fragile to having the scavenger try to track what is defined by implicit_def. llvm-svn: 74518
* Rearrange some stuff in MachineOperand and add a new TargetFlags field.Chris Lattner2009-06-241-25/+29
| | | | llvm-svn: 74087
* Fix support for inline asm input / output operand tying when operand spans ↵Evan Cheng2009-06-241-11/+23
| | | | | | across multiple registers (e.g. two i64 operands in 32-bit mode). llvm-svn: 74053
* Remove some unnecessary #includes.Dan Gohman2009-06-051-1/+0
| | | | llvm-svn: 72948
* Make DebugLoc independent of DwarfWriter.Argyrios Kyrtzidis2009-04-301-1/+4
| | | | | | | | -Replace DebugLocTuple's Source ID with CompileUnit's GlobalVariable* -Remove DwarfWriter::getOrCreateSourceID -Make necessary changes for the above (fix callsites, etc.) llvm-svn: 70520
* MachineInstr::isRegTiedTo{Use,Def}Operand can safely be made const.Jakob Stoklund Olesen2009-04-291-2/+4
| | | | llvm-svn: 70408
* Fix MachineInstr::getNumExplicitOperands to countDan Gohman2009-04-151-2/+2
| | | | | | variadic operands correctly. Patch by Jakob Stoklund Olesen! llvm-svn: 69190
* Give RemoveRegOperandFromRegInfo a comment and move theDan Gohman2009-04-151-0/+15
| | | | | | code out of line. llvm-svn: 69124
* ignore register zero in isRegTiedToUseOperand, following the example ofChris Lattner2009-04-091-1/+1
| | | | | | isRegTiedToDefOperand. Thanks to Bob for pointing this out! llvm-svn: 68734
* Fix pr3954. The register scavenger asserts for inline assembly withBob Wilson2009-04-091-9/+17
| | | | | | | | | | | | register destinations that are tied to source operands. The TargetInstrDescr::findTiedToSrcOperand method silently fails for inline assembly. The existing MachineInstr::isRegReDefinedByTwoAddr was very close to doing what is needed, so this revision makes a few changes to that method and also renames it to isRegTiedToUseOperand (for consistency with the very similar isRegTiedToDefOperand and because it handles both two-address instructions and inline assembly with tied registers). llvm-svn: 68714
* reg0 references are not real registers. This fixes a crash on the Chris Lattner2009-04-091-1/+1
| | | | | | attached testcase. llvm-svn: 68712
* Model inline asm constraint which ties an input to an output register as ↵Evan Cheng2009-03-231-1/+60
| | | | | | machine operand TIED_TO constraint. This eliminated the need to pre-allocate registers for these. This also allows register allocator can eliminate the unneeded copies. llvm-svn: 67512
* Added MachineInstr::isRegTiedToDefOperand to check for two-addressness.Evan Cheng2009-03-191-1/+19
| | | | llvm-svn: 67335
* Print out debug info when printing the machine instruction.Bill Wendling2009-02-191-0/+9
| | | | llvm-svn: 65067
* Add a DebugLoc field and some simple accessors.Dale Johannesen2009-01-271-7/+46
| | | | llvm-svn: 63152
* Use isTerminator() instead of isBranch()||isReturn() inDan Gohman2008-12-231-1/+1
| | | | | | | | several places. isTerminator() returns true for a superset of cases, and includes things like FP_REG_KILL, which are nither return or branch but aren't safe to move/remat/etc. llvm-svn: 61373
* Print subreg information in MachineInstr::dump.Dan Gohman2008-12-181-1/+5
| | | | llvm-svn: 61213
* Minor code simplification.Dan Gohman2008-12-091-3/+3
| | | | llvm-svn: 60804
* Drop the reg argument to isRegReDefinedByTwoAddr, which was redundant.Dan Gohman2008-12-051-3/+4
| | | | llvm-svn: 60586
* Add more const qualifiers. This fixes build breakage from r59540.Dan Gohman2008-11-181-1/+1
| | | | llvm-svn: 59542
* Make some methods const.Dan Gohman2008-11-181-2/+4
| | | | llvm-svn: 59540
* Added missing print functions that take a raw_ostreamMon P Wang2008-10-101-2/+11
| | | | llvm-svn: 57339
* Switch the MachineOperand accessors back to the short names likeDan Gohman2008-10-031-24/+24
| | | | | | isReg, etc., from isRegister, etc. llvm-svn: 57006
* Fix a think-o in isSafeToMove. This fixes it from thinking thatDan Gohman2008-10-021-1/+1
| | | | | | volatile memory references are safe to move. llvm-svn: 56948
* Next round of earlyclobber handling. Approach theDale Johannesen2008-09-241-8/+1
| | | | | | | | | | RA problem by expanding the live interval of an earlyclobber def back one slot. Remove overlap-earlyclobber throughout. Remove earlyclobber bits and their handling from live internals. llvm-svn: 56539
* Add a method to MachineInstr for testing whether it makesDan Gohman2008-09-241-9/+30
| | | | | | any volatile memory references. llvm-svn: 56528
* Add a bit to mark operands of asm's that conflictDale Johannesen2008-09-171-1/+10
| | | | | | | | | with an earlyclobber operand elsewhere. Propagate this bit and the earlyclobber bit through SDISel. Change linear-scan RA not to allocate regs in a way that conflicts with an earlyclobber. See also comments. llvm-svn: 56290
* adjust last patch per review feedbackDale Johannesen2008-09-141-3/+3
| | | | llvm-svn: 56194
* Remove isImm(), isReg(), and friends, in favor of Dan Gohman2008-09-131-15/+15
| | | | | | | | | isImmediate(), isRegister(), and friends, to avoid confusion about having two different names with the same meaning. I'm not attached to the longer names, and would be ok with changing to the shorter names if others prefer it. llvm-svn: 56189
* Pass "earlyclobber" bit through to machineDale Johannesen2008-09-121-2/+6
| | | | | | | representation; coalescer and RA need to know about it. No functional change. llvm-svn: 56161
* Fix addRegisterDead and addRegisterKilled to be more thoroughDan Gohman2008-09-031-19/+34
| | | | | | | | | | | | | | | | when searching for redundant subregister dead/kill bits. Previously it was common to see instructions marked like this: "RET %EAX<imp-use,kill>, %AX<imp-use,kill>" With this change, addRegisterKilled continues scanning after finding the %EAX operand, so it proceeds to discover the redundant %AX kill and eliminates it, producing this: "RET %EAX<imp-use,kill>" This currently has no effect on the generated code. llvm-svn: 55698
* Fold isRematerializable checks into isSafeToReMat.Evan Cheng2008-08-301-1/+3
| | | | llvm-svn: 55563
* Move the check whether it's worth remating to caller.Evan Cheng2008-08-271-3/+1
| | | | llvm-svn: 55434
* Refactor isSafeToReMat out of 2addr pass.Evan Cheng2008-08-271-0/+25
| | | | llvm-svn: 55430
* simplify PseudoSourceValue printing a bit. Unnest all of ↵Chris Lattner2008-08-241-3/+5
| | | | | | PseudoSourceValue.cpp from the llvm namespace. llvm-svn: 55293
* Print PseudoSourceValue.Evan Cheng2008-08-241-2/+2
| | | | llvm-svn: 55291
* Change the FoldingSetNodeID usage for objects which carryDan Gohman2008-08-201-0/+10
| | | | | | | | alignment and volatility information, such as loads and stores, to reduce the number of integer values added to the FoldingSetNodeID. llvm-svn: 55058
* Move MachineInstr::getOpcode inline.Owen Anderson2008-08-141-6/+0
| | | | llvm-svn: 54807
* Speed up addRegisterDead by adding more fast checks before performing the ↵Owen Anderson2008-08-141-1/+3
| | | | | | | | | expensive subregister query, and by increasing the size of the subregister hashtable so that there are fewer collisions. llvm-svn: 54781
* Fold the useful features of alist and alist_node into ilist, andDan Gohman2008-07-281-5/+4
| | | | | | | | | | | | | | | | a new ilist_node class, and remove them. Unlike alist_node, ilist_node doesn't attempt to manage storage itself, so it avoids the associated problems, including being opaque in gdb. Adjust the Recycler class so that it doesn't depend on alist_node. Also, change it to use explicit Size and Align parameters, allowing it to work when the largest-sized node doesn't have the greatest alignment requirement. Change MachineInstr's MachineMemOperand list from a pool-backed alist to a std::list for now. llvm-svn: 54146
* Now that the MachineInstr leaks are fixed, enable leak checkingDan Gohman2008-07-211-0/+2
| | | | | | in the MachineInstr clone code. llvm-svn: 53868
* Fix a memory leak in LiveIntervalAnalysis.Evan Cheng2008-07-191-7/+5
| | | | llvm-svn: 53779
* Re-introduce LeakDetector support for MachineInstrs and MachineBasicBlocks.Dan Gohman2008-07-171-0/+8
| | | | | | | Fix a leak that this turned up in LowerSubregs.cpp. And, comment a leak in LiveIntervalAnalysis.cpp. llvm-svn: 53746
* Add an assert to check for empty flags for MachineMemOperand.Dan Gohman2008-07-161-0/+1
| | | | llvm-svn: 53680
* Trim unnecessary #includes.Dan Gohman2008-07-111-1/+0
| | | | llvm-svn: 53471
* - Change the horrible N^2 isRegReDefinedByTwoAddr. Now callers must supply ↵Evan Cheng2008-07-101-13/+8
| | | | | | | | the operand index of def machineoperand and at most one full scan of non-implicit operands is needed. - Change local register allocator to use the new isRegReDefinedByTwoAddr instead of reinventing the wheel. llvm-svn: 53394
OpenPOWER on IntegriCloud