summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Mark dead physregdefs dead immediately. This helps MachineSink andDan Gohman2009-10-281-0/+2
| | | | | | MachineLICM and other things which run before LiveVariables is run. llvm-svn: 85360
* Create a new InstrEmitter class for translating SelectionDAG nodesDan Gohman2009-10-101-0/+693
into MachineInstrs. This is mostly just moving the code from ScheduleDAGSDNodesEmit.cpp into a new class. This decouples MachineInstr emitting from scheduling. llvm-svn: 83699
OpenPOWER on IntegriCloud