summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Handle Values with no value in getCopyFromRegs.Dan Gohman2010-07-261-0/+4
| | | | llvm-svn: 109415
* Propagate alloca alignment information via variable size object frameEric Christopher2010-07-171-1/+1
| | | | | | | | information. No functional change yet. llvm-svn: 108583
* Revert r108369, sorting llvm.dbg.declare information by source position,Dan Gohman2010-07-161-14/+0
| | | | | | | | | | | | | since it doesn't work for front-ends which don't emit column information (which includes llvm-gcc in its present configuration), and doesn't work for clang for K&R style variables where the variables are declared in a different order from the parameter list. Instead, make a separate pass through the instructions to collect the llvm.dbg.declare instructions in order. This ensures that the debug information for variables is emitted in this order. llvm-svn: 108538
* The SelectionDAGBuilder's handling of debug info, on rareDale Johannesen2010-07-161-12/+38
| | | | | | | | | | occasions, caused code to be generated in a different order. All cases I've seen involved float softening in the type legalizer, and this could be perhaps be fixed there, but it's better not to generate things differently in the first place. 7797940 (6/29/2010..7/15/2010). llvm-svn: 108484
* Revert. This isn't the correct way to go.Bill Wendling2010-07-151-14/+0
| | | | llvm-svn: 108478
* Handle code gen for the unreachable instruction if it's the only instruction inBill Wendling2010-07-151-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the function. We'll just turn it into a "trap" instruction instead. The problem with not handling this is that it might generate a prologue without the equivalent epilogue to go with it: $ cat t.ll define void @foo() { entry: unreachable } $ llc -o - t.ll -relocation-model=pic -disable-fp-elim -unwind-tables .section __TEXT,__text,regular,pure_instructions .globl _foo .align 4, 0x90 _foo: ## @foo Leh_func_begin0: ## BB#0: ## %entry pushq %rbp Ltmp0: movq %rsp, %rbp Ltmp1: Leh_func_end0: ... The unwind tables then have bad data in them causing all sorts of problems. Fixes <rdar://problem/8096481>. llvm-svn: 108473
* 80-col.Eric Christopher2010-07-141-2/+3
| | | | llvm-svn: 108381
* In inline asm treat indirect 'X' constraint as 'm'.Dale Johannesen2010-07-131-3/+5
| | | | | | | This may not be right in all cases, but it's better than asserting which it was doing before. PR 7528. llvm-svn: 108268
* Fix a typo and fit in 80 columns. Found by Bob Wilson.Rafael Espindola2010-07-121-1/+2
| | | | llvm-svn: 108164
* Fix va_arg for doubles. With this patch VAARG nodes always contain theRafael Espindola2010-07-111-1/+2
| | | | | | | | | | | | | | | correct alignment information, which simplifies ExpandRes_VAARG a bit. The patch introduces a new alignment information to TargetLoweringInfo. This is needed since the two natural candidates cannot be used: * The 's' in target data: If this is set to the minimal alignment of any argument, getCallFrameTypeAlignment would return 4 for doubles on ARM for example. * The getTransientStackAlignment method. It is possible for an architecture to have argument less aligned than what we maintain the stack pointer. llvm-svn: 108072
* Reapply bottom-up fast-isel, with several fixes for x86-32:Dan Gohman2010-07-101-91/+22
| | | | | | | | | - Check getBytesToPopOnReturn(). - Eschew ST0 and ST1 for return values. - Fix the PIC base register initialization so that it doesn't ever fail to end up the top of the entry block. llvm-svn: 108039
* --- Reverse-merging r107947 into '.':Bob Wilson2010-07-091-22/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | U utils/TableGen/FastISelEmitter.cpp --- Reverse-merging r107943 into '.': U test/CodeGen/X86/fast-isel.ll U test/CodeGen/X86/fast-isel-loads.ll U include/llvm/Target/TargetLowering.h U include/llvm/Support/PassNameParser.h U include/llvm/CodeGen/FunctionLoweringInfo.h U include/llvm/CodeGen/CallingConvLower.h U include/llvm/CodeGen/FastISel.h U include/llvm/CodeGen/SelectionDAGISel.h U lib/CodeGen/LLVMTargetMachine.cpp U lib/CodeGen/CallingConvLower.cpp U lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp U lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp U lib/CodeGen/SelectionDAG/FastISel.cpp U lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp U lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp U lib/CodeGen/SelectionDAG/InstrEmitter.cpp U lib/CodeGen/SelectionDAG/TargetLowering.cpp U lib/Target/XCore/XCoreISelLowering.cpp U lib/Target/XCore/XCoreISelLowering.h U lib/Target/X86/X86ISelLowering.cpp U lib/Target/X86/X86FastISel.cpp U lib/Target/X86/X86ISelLowering.h llvm-svn: 107987
* Re-apply bottom-up fast-isel, with fixes. Be very careful to avoid emittingDan Gohman2010-07-091-91/+22
| | | | | | a DBG_VALUE after a terminator, or emitting any instructions before an EH_LABEL. llvm-svn: 107943
* Revert 107840 107839 107813 107804 107800 107797 107791.Dan Gohman2010-07-081-22/+91
| | | | | | Debug info intrinsics win for now. llvm-svn: 107850
* Implement bottom-up fast-isel. This has the advantage of not requiringDan Gohman2010-07-071-17/+12
| | | | | | a separate DCE pass over MachineInstrs. llvm-svn: 107804
* Add X86FastISel support for return statements. This entails refactoringDan Gohman2010-07-071-74/+10
| | | | | | | a bunch of stuff, to allow the target-independent calling convention logic to be employed. llvm-svn: 107800
* Move FunctionLoweringInfo.h out into include/llvm/CodeGen. This willDan Gohman2010-07-071-1/+1
| | | | | | allow target-specific fast-isel code to make use of it directly. llvm-svn: 107787
* Split the SDValue out of OutputArg so that SelectionDAG-independentDan Gohman2010-07-071-5/+12
| | | | | | code can do calling-convention queries. This obviates OutputArgReg. llvm-svn: 107786
* CanLowerReturn doesn't need a SelectionDAG; it just needs an LLVMContext.Dan Gohman2010-07-061-2/+3
| | | | | | SelectBasicBlock doesn't needs its BasicBlock argument. llvm-svn: 107712
* Propagate debug loc.Devang Patel2010-07-061-1/+1
| | | | llvm-svn: 107710
* random tidyingChris Lattner2010-07-051-6/+8
| | | | llvm-svn: 107612
* Propagate the AlignStack bit in InlineAsm's to the Dale Johannesen2010-07-021-1/+5
| | | | | | | | | | | | | | | | | | | 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
* Rename CreateReg to CreateRegs, and MakeReg to CreateReg.Dan Gohman2010-07-021-4/+4
| | | | llvm-svn: 107451
* Rename CreateRegForValue to CreateReg, and change its argumentDan Gohman2010-07-011-2/+2
| | | | | | | from a Value to a Type, because it doesn't actually care about the Value. llvm-svn: 107383
* Reapply r106422, splitting the code for materializing a value out ofDan Gohman2010-07-011-11/+53
| | | | | | | SelectionDAGBuilder::getValue into a helper function, with fixes to use DenseMaps safely. llvm-svn: 107371
* Don't use operator[] here, because it's not desirable to insert a defaultDan Gohman2010-07-011-2/+5
| | | | | | value if the search fails. llvm-svn: 107368
* Remove an unused variable. The call to getRoot has side-effects, soDuncan Sands2010-06-301-1/+0
| | | | | | this could break something (but doesn't seem to). llvm-svn: 107295
* use ArgOperand APIGabor Greif2010-06-301-6/+6
| | | | llvm-svn: 107279
* Remove initialized but otherwise unused variables.Duncan Sands2010-06-291-2/+0
| | | | llvm-svn: 107127
* 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. llvm-svn: 106893
* Remove variables which are assigned to but for which the valueDuncan Sands2010-06-251-1/+0
| | | | | | is not used. Spotted by gcc-4.6. llvm-svn: 106854
* use ArgOperand APIGabor Greif2010-06-251-140/+140
| | | | llvm-svn: 106836
* Simplify this code; switch lowering shouldn't produce casesDan Gohman2010-06-241-12/+4
| | | | | | which trivially fold away. llvm-svn: 106765
* 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. llvm-svn: 106716
* Revert r106422, which is breaking the non-fast-isel path.Dan Gohman2010-06-211-49/+11
| | | | llvm-svn: 106423
* 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. llvm-svn: 106422
* Eliminate unnecessary uses of getZExtValue().Dan Gohman2010-06-181-2/+2
| | | | llvm-svn: 106279
* Keep track of incoming debug value of unused argument.Devang Patel2010-06-011-1/+11
| | | | | | Radar 7927666. llvm-svn: 105285
* Reorder some code in SelectionDAGBuilder.Dan Gohman2010-05-291-313/+311
| | | | llvm-svn: 105105
* 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. llvm-svn: 105101
* 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. llvm-svn: 104911
* back out 104862/104869. Can reuse stacksave after all. Very cool.Jim Grosbach2010-05-271-4/+0
| | | | llvm-svn: 104897
* hook ISD::STACKADDR to an intrinsicJim Grosbach2010-05-271-0/+4
| | | | llvm-svn: 104869
* 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. llvm-svn: 104734
* 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. llvm-svn: 104419
* 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. llvm-svn: 103495
* Fixes for Microsoft Visual Studio 2010, from Steven Watanabe!Douglas Gregor2010-05-111-0/+6
| | | | llvm-svn: 103457
* Verify variable directly.Devang Patel2010-05-071-2/+2
| | | | llvm-svn: 103305
* Use getValue() for PHINodes when direct NodeMap access does not work. Devang Patel2010-05-051-1/+15
| | | | llvm-svn: 103126
* Don't pass SDValues by non-const reference unless they may beDan Gohman2010-05-011-1/+2
| | | | | | modified. llvm-svn: 102816
OpenPOWER on IntegriCloud