summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
Commit message (Collapse)AuthorAgeFilesLines
* While lowering dbg_declare, emit DBG_VALUE machine instruction if alloca ↵Devang Patel2010-04-281-11/+11
| | | | | | matching llvm.dbg.declare intrinsic is missing. llvm-svn: 102513
* Try operation promotion only if regular dag combine and target-specific ones ↵Evan Cheng2010-04-281-15/+42
| | | | | | failed to do anything. llvm-svn: 102492
* Ignore DBG_VALUE instructions that points to undef values.Devang Patel2010-04-271-5/+0
| | | | llvm-svn: 102463
* - When legal, promote a load to zextload rather than ext load.Evan Cheng2010-04-271-6/+20
| | | | | | - Catch more further dag combine opportunities as result of operand promotion, e.g. (i32 anyext (i16 trunc (i32 x))) -> (i32 x) llvm-svn: 102455
* Revert a small part of 102372; this fixes at least oneDale Johannesen2010-04-271-0/+5
| | | | | | | | of the dbg testsuite regressions. I don't think this is really the right fix; this change exposed an existing problem upstream somewhere. llvm-svn: 102410
* 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
* Remove crufty comments.Dale Johannesen2010-04-261-5/+0
| | | | llvm-svn: 102380
* Add DBG_VALUE handling for byval parameters; thisDale Johannesen2010-04-263-27/+84
| | | | | | | produces a comment on targets that support it, but the Dwarf writer is not hooked up yet. llvm-svn: 102372
* - Move TargetLowering::EmitTargetCodeForFrameDebugValue to TargetInstrInfo ↵Evan Cheng2010-04-263-16/+18
| | | | | | | | 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
* Add comment re byval args. Doesn't actually work this way yet.Dale Johannesen2010-04-251-1/+3
| | | | | | xs llvm-svn: 102316
* When a load operand is promoted to an extload, replace other uses with uses ↵Evan Cheng2010-04-241-30/+67
| | | | | | of extload result truncated. llvm-svn: 102236
* Apply a fix for a vector setcc dagcombine from Jan Sjodin. NoDan Gohman2010-04-241-1/+2
| | | | | | testcase yet, as the testcase now fails downstream. llvm-svn: 102228
* Code refactoring.Evan Cheng2010-04-231-11/+12
| | | | llvm-svn: 102202
* Move FastISel's HandlePHINodesInSuccessorBlocks call down into FastISelDan Gohman2010-04-232-14/+6
| | | | | | itself too. llvm-svn: 102176
* Sink SelectionDAGBuilder's HandlePHINodesInSuccessorBlocks downDan Gohman2010-04-223-15/+7
| | | | | | into SelectionDAGBuilder itself. llvm-svn: 102128
* Move HandlePHINodesInSuccessorBlocks functions out of SelectionDAGISelDan Gohman2010-04-224-81/+86
| | | | | | and into SelectionDAGBuilder and FastISel. llvm-svn: 102123
* - It's not safe to promote rotates (at least not trivially).Evan Cheng2010-04-221-25/+46
| | | | | | - Some code refactoring. llvm-svn: 102111
* Fix a comment.Dan Gohman2010-04-221-1/+1
| | | | llvm-svn: 102110
* Move PHINodesToUpdate out of SelectionDAGBuilder and intoDan Gohman2010-04-224-36/+44
| | | | | | | | | FunctionLoweringInfo, as it isn't SelectionDAG-specific. This isn't completely natural, as PHI node state is not per-function but rather per-basic-block, however there's currently no other convenient per-basic-block state to group it with. llvm-svn: 102109
* Add more const qualifiers on TargetMachine and friends.Dan Gohman2010-04-212-2/+3
| | | | llvm-svn: 101977
* Move several SelectionDAG-independent utility functions out of theDan Gohman2010-04-213-310/+2
| | | | | | SelectionDAG directory and into a new Analysis.cpp file. llvm-svn: 101975
* Add another variant of this test which found a place whereDan Gohman2010-04-211-1/+2
| | | | | | | CodeGen's ComputeMaskedBits was being over-conservative when computing bits for an ADD. llvm-svn: 101963
* Because of the EMMS problem, right now we have to supportDale Johannesen2010-04-201-1/+1
| | | | | | | | | | | user-defined operations that use MMX register types, but the compiler shouldn't generate them on its own. This adds a Synthesizable abstraction to represent this, and changes the vector widening computation so it won't produce MMX types. (The motivation is to remove noise from the ABI compatibility part of the gcc test suite, which has some breakage right now.) llvm-svn: 101951
* Sink the CopyToExportRegsIfNeeded calls out of SelectionDAGISelDan Gohman2010-04-202-6/+3
| | | | | | | | into SelectionDAGBuilder. This avoids a separate pass over the instructions, and has the side effect of providing debug location information to the copy. llvm-svn: 101906
* Don't send PHI nodes down to SelectionDAGBuilder of FastISel, sinceDan Gohman2010-04-204-6/+10
| | | | | | they end up doing nothing. llvm-svn: 101904
* Sink this use_empty() check into isUsedOutsideOfDefiningBlock.Dan Gohman2010-04-201-1/+2
| | | | llvm-svn: 101902
* If a PHI node somehow has debug info, propogate it to the MachineInstr PHI.Dan Gohman2010-04-201-1/+1
| | | | llvm-svn: 101901
* Don't iterate through the whole block just to find the PHI nodes.Dan Gohman2010-04-201-6/+3
| | | | llvm-svn: 101900
* Delete a redundant return statement.Dan Gohman2010-04-201-1/+0
| | | | llvm-svn: 101860
* The visitXOR method can return the same SDNode. If so, we don't want to deleteBill Wendling2010-04-201-1/+1
| | | | | | it as it's not dead. llvm-svn: 101855
* Remove this debug output; it isn't that useful, and it's incompleteDan Gohman2010-04-201-2/+0
| | | | | | in the case where a basic block is split. llvm-svn: 101850
* Sink DebugLoc handling out of SelectionDAGISel into FastISel andDan Gohman2010-04-204-39/+15
| | | | | | SelectionDAGBuilder, where it doesn't have to be as complicated. llvm-svn: 101848
* Remove MachineFunction's DefaultDebugLoc member, and make DwarfDebug.cppDan Gohman2010-04-201-5/+0
| | | | | | responsible for figuring out what that's supposed to be on its own. llvm-svn: 101844
* Reapply the removal of SelectionDAGISel's BB, with a fix for the caseDan Gohman2010-04-201-17/+21
| | | | | | | where multiple blocks are emitted; functions which do this need to return the new BB so that their callers can stay current. llvm-svn: 101843
* Revert 101825, which is causing trouble.Dan Gohman2010-04-191-15/+14
| | | | llvm-svn: 101832
* Eliminate SelectionDAGISel's "current block" member. Just pass it asDan Gohman2010-04-191-14/+15
| | | | | | an argument to things that need it. llvm-svn: 101825
* Eliminate the CurMBB member from SelectionDAGBuilder. For places thatDan Gohman2010-04-193-84/+106
| | | | | | | need it, just pass around the parent block of the current instruction explicitly. llvm-svn: 101822
* More progress on promoting i16 operations to i32 for x86. Work in progress.Evan Cheng2010-04-191-9/+118
| | | | llvm-svn: 101808
* Give SelectionDAG a TargetMachine too, rather than having itDan Gohman2010-04-192-7/+3
| | | | | | fetch one from the MachineFunction. llvm-svn: 101807
* More 80 col violation.Evan Cheng2010-04-191-2/+4
| | | | llvm-svn: 101806
* Code that needs a TargetMachine should have access to one directly, ratherDan Gohman2010-04-194-13/+13
| | | | | | than just getting one through a TargetLowering. llvm-svn: 101802
* Move isInTailCallPosition out of SelectionDAGBuilder, as it isn'tDan Gohman2010-04-193-86/+95
| | | | | | SelectionDAG-specific. llvm-svn: 101801
* Fix -Wcast-qual warnings.Dan Gohman2010-04-171-2/+2
| | | | llvm-svn: 101655
* Delete now-unnecessary const_casts.Dan Gohman2010-04-172-8/+8
| | | | llvm-svn: 101637
* Use const qualifiers with TargetLowering. This eliminates severalDan Gohman2010-04-179-15/+18
| | | | | | | | | | | | | const_casts, and it reinforces the design of the Target classes being immutable. SelectionDAGISel::IsLegalToFold is now a static member function, because PIC16 uses it in an unconventional way. There is more room for API cleanup here. And PIC16's AsmPrinter no longer uses TargetLowering. llvm-svn: 101635
* More work to allow dag combiner to promote 16-bit ops to 32-bit.Evan Cheng2010-04-173-44/+123
| | | | llvm-svn: 101621
* Another 80 col violation.Evan Cheng2010-04-171-1/+2
| | | | llvm-svn: 101620
* Revert 101465, it broke internal OpenGL testing.Eric Christopher2010-04-162-138/+139
| | | | | | | Probably the best way to know that all getOperand() calls have been handled is to replace that API instead of updating. llvm-svn: 101579
* (i32 sext_in_reg (i32 aext (i16 x)), i16) -> (i32 sext x). No known test ↵Evan Cheng2010-04-161-1/+2
| | | | | | case until -promote-16bit is enabled. llvm-svn: 101551
OpenPOWER on IntegriCloud