aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
Commit message (Collapse)AuthorAgeFilesLines
* The hasMemory argument is irrelevant to how the argumentDale Johannesen2010-06-251-2/+2
| | | | | | | | | | | for an "i" constraint should get lowered; PR 6309. While this argument was passed around a lot, this is the only place it was used, so it goes away from a lot of other places. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106893 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove variables which are assigned to but for which the valueDuncan Sands2010-06-251-1/+0
| | | | | | | is not used. Spotted by gcc-4.6. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106854 91177308-0d34-0410-b5e6-96231b3b80d8
* use ArgOperand APIGabor Greif2010-06-251-140/+140
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106836 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify this code; switch lowering shouldn't produce casesDan Gohman2010-06-241-12/+4
| | | | | | | which trivially fold away. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106765 91177308-0d34-0410-b5e6-96231b3b80d8
* Optimize the "bit test" code path for switch lowering in theDan Gohman2010-06-241-15/+27
| | | | | | | case where the bit mask has exactly one bit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106716 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r106422, which is breaking the non-fast-isel path.Dan Gohman2010-06-211-49/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106423 91177308-0d34-0410-b5e6-96231b3b80d8
* More changes for non-top-down fast-isel.Dan Gohman2010-06-211-11/+49
| | | | | | | | | | | Split the code for materializing a value out of SelectionDAGBuilder::getValue into a helper function, so that it can be used in other ways. Add a new getNonRegisterValue function which uses it, for use in code which doesn't want a CopyFromReg even when FuncMap.ValueMap already has an entry for it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106422 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate unnecessary uses of getZExtValue().Dan Gohman2010-06-181-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106279 91177308-0d34-0410-b5e6-96231b3b80d8
* Keep track of incoming debug value of unused argument.Devang Patel2010-06-011-1/+11
| | | | | | | Radar 7927666. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105285 91177308-0d34-0410-b5e6-96231b3b80d8
* Reorder some code in SelectionDAGBuilder.Dan Gohman2010-05-291-313/+311
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105105 91177308-0d34-0410-b5e6-96231b3b80d8
* SelectionDAG shouldn't have a FunctionLoweringInfo member. RegsForValueDan Gohman2010-05-291-43/+44
| | | | | | | | shouldn't have a TargetLoweringInfo member. And FunctionLoweringInfo::set doesn't needs its EnableFastISel argument. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105101 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate the restriction that the array size in an alloca must be i32.Dan Gohman2010-05-281-5/+6
| | | | | | | This will help reduce the amount of casting required on 64-bit targets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104911 91177308-0d34-0410-b5e6-96231b3b80d8
* back out 104862/104869. Can reuse stacksave after all. Very cool.Jim Grosbach2010-05-271-4/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104897 91177308-0d34-0410-b5e6-96231b3b80d8
* hook ISD::STACKADDR to an intrinsicJim Grosbach2010-05-271-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104869 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust eh.sjlj.setjmp to properly have a chain and to have an opcode entry inJim Grosbach2010-05-261-1/+7
| | | | | | | | ISD::. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104734 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement eh.sjlj.longjmp for ARM. Clean up the intrinsic a bit.Jim Grosbach2010-05-221-0/+5
| | | | | | | Followups: docs patch for the builtin and eh.sjlj.setjmp cleanup to match longjmp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104419 91177308-0d34-0410-b5e6-96231b3b80d8
* I got tired of VISIBILITY_HIDDEN colliding with the gcc enum. Rename itDuncan Sands2010-05-111-1/+1
| | | | | | | | to LLVM_LIBRARY_VISIBILITY and introduce LLVM_GLOBAL_VISIBILITY, which is the opposite, for future use by dragonegg. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103495 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixes for Microsoft Visual Studio 2010, from Steven Watanabe!Douglas Gregor2010-05-111-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103457 91177308-0d34-0410-b5e6-96231b3b80d8
* Verify variable directly.Devang Patel2010-05-071-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103305 91177308-0d34-0410-b5e6-96231b3b80d8
* Use getValue() for PHINodes when direct NodeMap access does not work. Devang Patel2010-05-051-1/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103126 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't pass SDValues by non-const reference unless they may beDan Gohman2010-05-011-1/+2
| | | | | | | modified. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102816 91177308-0d34-0410-b5e6-96231b3b80d8
* Reorgnaize more switch code lowering to clean up some trickyDan Gohman2010-05-011-1/+0
| | | | | | | | | | | | code, and to eliminate the need for the SelectionDAGBuilder state to be live during CodeGenAndEmitDAG calls. Call SDB->clear() before CodeGenAndEmitDAG calls instead of before it, and move the CurDAG->clear() out of SelectionDAGBuilder, which doesn't own the DAG, and into CodeGenAndEmitDAG. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102814 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete the EdgeMapping variable itself.Dan Gohman2010-05-011-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102810 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor.Devang Patel2010-04-291-4/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102661 91177308-0d34-0410-b5e6-96231b3b80d8
* DO not push DBG_VALUE machine instructions for inlined fuction arguments in ↵Devang Patel2010-04-291-0/+7
| | | | | | entry block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102653 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-enable 102565 with fixes.Evan Cheng2010-04-291-9/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102602 91177308-0d34-0410-b5e6-96231b3b80d8
* Temporarily disable my changes to unbreak the build.Evan Cheng2010-04-291-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102590 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not generate duplicate dbg_value instructions for function arguments.Evan Cheng2010-04-291-8/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102585 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid emitting a dbg_value machineinstr that's not going to be inserted into ↵Evan Cheng2010-04-291-0/+2
| | | | | | entry block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102581 91177308-0d34-0410-b5e6-96231b3b80d8
* Check Reg against zero.Evan Cheng2010-04-291-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102573 91177308-0d34-0410-b5e6-96231b3b80d8
* tidy up.Devang Patel2010-04-281-8/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102558 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace r102368 with code that's less fragile. This creates DBG_VALUE ↵Evan Cheng2010-04-281-0/+36
| | | | | | instructions for function arguments early and insert them after instruction selection is done. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102554 91177308-0d34-0410-b5e6-96231b3b80d8
* Ignore DBG_VALUE instructions that points to undef values.Devang Patel2010-04-271-5/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102463 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102410 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove crufty comments.Dale Johannesen2010-04-261-5/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102380 91177308-0d34-0410-b5e6-96231b3b80d8
* Add DBG_VALUE handling for byval parameters; thisDale Johannesen2010-04-261-22/+68
| | | | | | | | | produces a comment on targets that support it, but the Dwarf writer is not hooked up yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102372 91177308-0d34-0410-b5e6-96231b3b80d8
* Sink SelectionDAGBuilder's HandlePHINodesInSuccessorBlocks downDan Gohman2010-04-221-0/+4
| | | | | | | into SelectionDAGBuilder itself. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102128 91177308-0d34-0410-b5e6-96231b3b80d8
* Move HandlePHINodesInSuccessorBlocks functions out of SelectionDAGISelDan Gohman2010-04-221-77/+13
| | | | | | | and into SelectionDAGBuilder and FastISel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102123 91177308-0d34-0410-b5e6-96231b3b80d8
* Move PHINodesToUpdate out of SelectionDAGBuilder and intoDan Gohman2010-04-221-5/+5
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102109 91177308-0d34-0410-b5e6-96231b3b80d8
* Move several SelectionDAG-independent utility functions out of theDan Gohman2010-04-211-0/+1
| | | | | | | SelectionDAG directory and into a new Analysis.cpp file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101975 91177308-0d34-0410-b5e6-96231b3b80d8
* Sink the CopyToExportRegsIfNeeded calls out of SelectionDAGISelDan Gohman2010-04-201-0/+3
| | | | | | | | | into SelectionDAGBuilder. This avoids a separate pass over the instructions, and has the side effect of providing debug location information to the copy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101906 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't send PHI nodes down to SelectionDAGBuilder of FastISel, sinceDan Gohman2010-04-201-0/+4
| | | | | | | they end up doing nothing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101904 91177308-0d34-0410-b5e6-96231b3b80d8
* Sink DebugLoc handling out of SelectionDAGISel into FastISel andDan Gohman2010-04-201-0/+4
| | | | | | | SelectionDAGBuilder, where it doesn't have to be as complicated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101848 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate the CurMBB member from SelectionDAGBuilder. For places thatDan Gohman2010-04-191-58/+80
| | | | | | | | need it, just pass around the parent block of the current instruction explicitly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101822 91177308-0d34-0410-b5e6-96231b3b80d8
* Code that needs a TargetMachine should have access to one directly, ratherDan Gohman2010-04-191-3/+2
| | | | | | | than just getting one through a TargetLowering. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101802 91177308-0d34-0410-b5e6-96231b3b80d8
* Move isInTailCallPosition out of SelectionDAGBuilder, as it isn'tDan Gohman2010-04-191-86/+0
| | | | | | | SelectionDAG-specific. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101801 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete now-unnecessary const_casts.Dan Gohman2010-04-171-7/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101637 91177308-0d34-0410-b5e6-96231b3b80d8
* Use const qualifiers with TargetLowering. This eliminates severalDan Gohman2010-04-171-4/+5
| | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101635 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 101465, it broke internal OpenGL testing.Eric Christopher2010-04-161-132/+132
| | | | | | | | Probably the best way to know that all getOperand() calls have been handled is to replace that API instead of updating. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101579 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid creating virtual registers for unused values.Dan Gohman2010-04-161-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101480 91177308-0d34-0410-b5e6-96231b3b80d8