summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Update comment.Devang Patel2010-07-071-3/+4
| | | | llvm-svn: 107796
* Reapply r107655 with fixes; insert the pseudo instruction intoDan Gohman2010-07-061-2/+5
| | | | | | | the block before calling the expansion hook. And don't put EFLAGS in a mbb's live-in list twice. llvm-svn: 107691
* Propagate the AlignStack bit in InlineAsm's to the Dale Johannesen2010-07-021-0/+6
| | | | | | | | | | | | | | | | | | | PrologEpilog code, and use it to determine whether the asm forces stack alignment or not. gcc consistently does not do this for GCC-style asms; Apple gcc inconsistently sometimes does it for asm blocks. There is no convenient place to put a bit in either the SDNode or the MachineInstr form, so I've added an extra operand to each; unlovely, but it does allow for expansion for more bits, should we need it. PR 5125. Some existing testcases are affected. The operand lists of the SDNode and MachineInstr forms are indexed with awesome mnemonics, like "2"; I may fix this someday, but not now. I'm not making it any worse. If anyone is inspired I think you can find all the right places from this patch. llvm-svn: 107506
* Add a VT argument to getMinimalPhysRegClass and replace the copy related usesRafael Espindola2010-06-291-4/+4
| | | | | | | | | of getPhysicalRegisterRegClass with it. If we want to make a copy (or estimate its cost), it is better to use the smallest class as more efficient operations might be possible. llvm-svn: 107140
* Teach regular and fast isel to set dead flags on unused implicit defsDan Gohman2010-06-181-0/+27
| | | | | | on calls and similar instructions. llvm-svn: 106353
* Mark physregs defined by inline asm as implicit.Jakob Stoklund Olesen2010-06-091-2/+6
| | | | | | | This is a bit of a hack to make inline asm look more like call instructions. It would be better to produce correct dead flags during isel. llvm-svn: 105749
* Add argument name comments.Jakob Stoklund Olesen2010-06-091-2/+6
| | | | llvm-svn: 105665
* Continuously refine the register class of REG_SEQUENCE def with all the ↵Evan Cheng2010-05-181-2/+3
| | | | | | source registers and sub-register indices. llvm-svn: 104051
* Fix PR7162: Use source register classes and sub-indices to determine the ↵Evan Cheng2010-05-181-4/+6
| | | | | | correct register class of the definitions of REG_SEQUENCE. llvm-svn: 104050
* Don't set kill flags for instructions which the scheduler has cloned.Dan Gohman2010-05-141-16/+28
| | | | llvm-svn: 103827
* Don't set kill flags on uses of CopyFromReg nodes. InstrEmitter doesn'tDan Gohman2010-05-111-9/+16
| | | | | | | create separate virtual registers for CopyFromReg values, so uses of them don't necessarily kill the value. llvm-svn: 103519
* Indentation.Evan Cheng2010-05-101-4/+4
| | | | llvm-svn: 103441
* SDDbgValues are apparently not being legalized. Fix a symptom of the problem,Dan Gohman2010-05-071-1/+7
| | | | | | | and not the real problem itself, by dropping debug info for i128 values. rdar://7958162. llvm-svn: 103310
* Add a DebugLoc argument to TargetInstrInfo::copyRegToReg, so that itDan Gohman2010-05-061-4/+4
| | | | | | doesn't have to guess. llvm-svn: 103194
* Teach scheduler about REG_SEQUENCE.Evan Cheng2010-05-041-2/+41
| | | | llvm-svn: 102984
* Re-enable isel kill flags, now that the local allocator is ignoring them.Dan Gohman2010-05-041-4/+0
| | | | llvm-svn: 102981
* Re-disable kill flags, as there is more trouble.Dan Gohman2010-05-011-0/+4
| | | | llvm-svn: 102826
* Re-enable kill flags from SelectionDAGISel, with a fix: don'tDan Gohman2010-05-011-5/+1
| | | | | | try to put a kill flag on a DBG_INFO instruction. llvm-svn: 102820
* Get rid of the EdgeMapping map. Instead, just check for BasicBlockDan Gohman2010-05-011-3/+2
| | | | | | changes before doing phi lowering for switches. llvm-svn: 102809
* EmitDbgValue doesn't need its EdgeMapping argument.Dan Gohman2010-04-301-3/+3
| | | | llvm-svn: 102742
* Temporarily disable SelectionDAG kill flags, which are causing trouble.Dan Gohman2010-04-301-0/+4
| | | | llvm-svn: 102680
* Set register kill flags on the SelectionDAG path, at least in theDan Gohman2010-04-301-1/+12
| | | | | | easy cases. llvm-svn: 102678
* Avoid adding a null MD node operand, which crashes with "-debug" when tryingBob Wilson2010-04-261-1/+2
| | | | | | to print the operand. llvm-svn: 102395
* - Move TargetLowering::EmitTargetCodeForFrameDebugValue to TargetInstrInfo ↵Evan Cheng2010-04-261-3/+1
| | | | | | | | and rename it to emitFrameIndexDebugValue. - Teach spiller to modify DBG_VALUE instructions to reference spill slots. llvm-svn: 102323
* Stop abusing EmitInstrWithCustomInserter for target-dependentDale Johannesen2010-04-251-9/+8
| | | | | | | | form of DEBUG_VALUE, as it doesn't have reasonable default behavior for unsupported targets. Add a new hook instead. No functional change. llvm-svn: 102320
* Delete a redundant return statement.Dan Gohman2010-04-201-1/+0
| | | | llvm-svn: 101860
* Add const qualifiers to CodeGen's use of LLVM IR constructs.Dan Gohman2010-04-151-3/+3
| | | | llvm-svn: 101334
* Have the inst emitter add the !srcloc mdnode to the machine instr.Chris Lattner2010-04-071-0/+6
| | | | | | | Have the asmprinter use the mdnode to scavenge a source location if present. Document this nonsense in langref. llvm-svn: 100607
* Three changes:Chris Lattner2010-04-071-9/+9
| | | | | | | | | | | | | | | 1. Introduce some enums and accessors in the InlineAsm class that eliminate a ton of magic numbers when handling inline asm SDNode. 2. Add a new MDNodeSDNode selection dag node type that holds a MDNode (shocking!) 3. Add a new argument to ISD::INLINEASM nodes that hold !srcloc metadata, propagating it to the instruction emitter, which drops it. No functionality change. llvm-svn: 100605
* Allow for the possibility that a debug-value pointsDale Johannesen2010-04-061-2/+13
| | | | | | to a SDNode that didn't have code generated for it. llvm-svn: 100566
* LiveVariables should clear kill / dead markers first. This allows us to ↵Evan Cheng2010-03-261-3/+1
| | | | | | remove a hack in the scheduler. llvm-svn: 99597
* fix a valgrind error on copy-constructor-synthesis.cpp, which is caused whenChris Lattner2010-03-251-2/+3
| | | | | | | | the custom insertion hook deletes the instruction, then we try to set dead flags on it. Neither the code that I added nor the code that was there before was safe. llvm-svn: 99538
* Make the NDEBUG assertion stronger and more clear what is Chris Lattner2010-03-251-5/+20
| | | | | | | | | | | | | | | | | | | | | happening. Enhance scheduling to set the DEAD flag on implicit defs more aggressively. Before, we'd set an implicit def operand to dead if it were present in the SDNode corresponding to the machineinstr but had no use. Now we do it in this case AND if the implicit def does not exist in the SDNode at all. This exposes a couple of problems: one is the FIXME, which causes a live intervals crash on CodeGen/X86/sibcall.ll. The second is that it makes machinecse and licm more aggressive (which is a good thing) but also exposes a case where licm hoists a set0 and then it doesn't get resunk. Talking to codegen folks about both these issues, but I need this patch in in the meantime. llvm-svn: 99485
* reapply 99444/99445, which I speculatively reverted inChris Lattner2010-03-251-77/+82
| | | | | | r99453. llvm-svn: 99482
* Change how dbg_value sdnodes are converted into machine instructions. Their ↵Evan Cheng2010-03-251-60/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | placement should be determined by the relative order of incoming llvm instructions. The scheduler will now use the SDNode ordering information to determine where to insert them. A dbg_value instruction is inserted after the instruction with the last highest source order and before the instruction with the next highest source order. It will optimize the placement by inserting right after the instruction that produces the value if they have consecutive order numbers. Here is a theoretical example that illustrates why the placement is important. tmp1 = store tmp1 -> x ... tmp2 = add ... ... call ... store tmp2 -> x Now mem2reg comes along: tmp1 = dbg_value (tmp1 -> x) ... tmp2 = add ... ... call ... dbg_value (tmp2 -> x) When the debugger examine the value of x after the add instruction but before the call, it should have the value of tmp1. Furthermore, for dbg_value's that reference constants, they should not be emitted at the beginning of the block (since they do not have "producers"). This patch also cleans up how SDISel manages DbgValue nodes. It allow a SDNode to be referenced by multiple SDDbgValue nodes. When a SDNode is deleted, it uses the information to find the SDDbgValues and invalidate them. They are not deleted until the corresponding SelectionDAG is destroyed. llvm-svn: 99469
* revert 99444/99445. This doesn't cause the failure of Chris Lattner2010-03-241-82/+77
| | | | | | | | 2006-07-19-stwbrx-crash.ll for me, but it's the only likely patch in the blame list of several bots. Lets see if this fixes it. llvm-svn: 99453
* remove dead argument.Chris Lattner2010-03-241-2/+1
| | | | llvm-svn: 99445
* split EmitNode in half to reduce indentation.Chris Lattner2010-03-241-77/+83
| | | | llvm-svn: 99444
* Rename SDDbgValue.h to SDNodeDbgValue.h for consistency.Evan Cheng2010-03-141-1/+1
| | | | llvm-svn: 98513
* change the LabelSDNode to be EHLabelSDNode and make it holdChris Lattner2010-03-141-0/+7
| | | | | | | | an MCSymbol. Make the EH_LABEL MachineInstr hold its label with an MCSymbol instead of ID. Fix a bug in MMI.cpp which would return labels named "Label4" instead of "label4". llvm-svn: 98463
* Cosmetic: lengthen names and improve comments.Dale Johannesen2010-03-101-3/+3
| | | | llvm-svn: 98202
* Progress towards shepherding debug info through SelectionDAG.Dale Johannesen2010-03-101-13/+34
| | | | | | | No functional effect yet. This is still evolving and should not be viewed as final. llvm-svn: 98195
* Add some new bits of debug info handling. NoDale Johannesen2010-03-061-0/+51
| | | | | | functional change yet. llvm-svn: 97855
* move target-independent opcodes out of TargetInstrInfoChris Lattner2010-02-091-14/+14
| | | | | | | | | into TargetOpcodes.h. #include the new TargetOpcodes.h into MachineInstr. Add new inline accessors (like isPHI()) to MachineInstr, and start using them throughout the codebase. llvm-svn: 95687
* Trim unneeded includes.Evan Cheng2010-01-211-1/+0
| | | | llvm-svn: 94105
* Target-independent support for TargetFlags on BlockAddress operands,Dan Gohman2009-11-201-1/+2
| | | | | | and support for blockaddresses in x86-32 PIC mode. llvm-svn: 89506
* Fix a typo in a comment.Dan Gohman2009-11-161-1/+1
| | | | llvm-svn: 88953
* Don't mark registers dead here when processing nodes with MVT::FlagDan Gohman2009-10-301-1/+5
| | | | | | | results. This works around a problem affecting targets which rely on MVT::Flag to handle physical register defs. llvm-svn: 85638
* Initial target-independent CodeGen support for BlockAddresses.Dan Gohman2009-10-301-0/+2
| | | | llvm-svn: 85556
* Rename usesCustomDAGSchedInserter to usesCustomInserter, and update aDan Gohman2009-10-291-1/+1
| | | | | | | | bunch of associated comments, because it doesn't have anything to do with DAGs or scheduling. This is another step in decoupling MachineInstr emitting from scheduling. llvm-svn: 85517
OpenPOWER on IntegriCloud