summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Refactor some code in SelectionDAGLegalize::ExpandBUILD_VECTOR.Bob Wilson2009-04-131-24/+19
| | | | llvm-svn: 68981
* Clean up a bunch of whitespace issues and fix a comment typo.Bob Wilson2009-04-101-72/+74
| | | | | | No functional changes. llvm-svn: 68808
* Remove the obsolete SelectionDAG::getNodeValueTypes and simplifyDan Gohman2009-04-091-1/+1
| | | | | | code that uses it by using SelectionDAG::getVTList instead. llvm-svn: 68744
* Delete ISD::INSERT_SUBREG and ISD::EXTRACT_SUBREG, which are unused.Dan Gohman2009-04-031-17/+0
| | | | | | | Note that these are distinct from TargetInstrInfo::INSERT_SUBREG and TargetInstrInfo::EXTRACT_SUBREG, which are used. llvm-svn: 68355
* To convert the StopPoint insn into an assembler directive by ISel, we need ↵Sanjiv Gupta2009-04-021-0/+4
| | | | | | to have access to the line number field. So we convert that info as an operand by custom handling DBG_STOPPOINT in legalize. llvm-svn: 68329
* For inline asm output operand that matches an input. Encode the input ↵Evan Cheng2009-03-201-1/+2
| | | | | | operand index in the high bits. llvm-svn: 67387
* Fix some significant problems with constant pools that resulted in ↵Evan Cheng2009-03-131-4/+4
| | | | | | | | | | | | | | | | | | | | | | | unnecessary paddings between constant pool entries, larger than necessary alignments (e.g. 8 byte alignment for .literal4 sections), and potentially other issues. 1. ConstantPoolSDNode alignment field is log2 value of the alignment requirement. This is not consistent with other SDNode variants. 2. MachineConstantPool alignment field is also a log2 value. 3. However, some places are creating ConstantPoolSDNode with alignment value rather than log2 values. This creates entries with artificially large alignments, e.g. 256 for SSE vector values. 4. Constant pool entry offsets are computed when they are created. However, asm printer group them by sections. That means the offsets are no longer valid. However, asm printer uses them to determine size of padding between entries. 5. Asm printer uses expensive data structure multimap to track constant pool entries by sections. 6. Asm printer iterate over SmallPtrSet when it's emitting constant pool entries. This is non-deterministic. Solutions: 1. ConstantPoolSDNode alignment field is changed to keep non-log2 value. 2. MachineConstantPool alignment field is also changed to keep non-log2 value. 3. Functions that create ConstantPool nodes are passing in non-log2 alignments. 4. MachineConstantPoolEntry no longer keeps an offset field. It's replaced with an alignment field. Offsets are not computed when constant pool entries are created. They are computed on the fly in asm printer and JIT. 5. Asm printer uses cheaper data structure to group constant pool entries. 6. Asm printer compute entry offsets after grouping is done. 7. Change JIT code to compute entry offsets on the fly. llvm-svn: 66875
* Oops...I committed too much.Bill Wendling2009-03-131-2/+3
| | | | llvm-svn: 66867
* Temporarily XFAIL this test.Bill Wendling2009-03-131-3/+2
| | | | llvm-svn: 66866
* Pass in a std::string when getting the names of debugging things. This cuts downBill Wendling2009-03-091-2/+3
| | | | | | on the number of times a std::string is created and copied. llvm-svn: 66396
* random cleanups.Chris Lattner2009-03-081-4/+3
| | | | llvm-svn: 66357
* Revert BuildVectorSDNode related patches: 65426, 65427, and 65296.Evan Cheng2009-02-251-21/+24
| | | | llvm-svn: 65482
* Clean up dwarf writer, part 1. This eliminated the horrible recursive ↵Evan Cheng2009-02-251-2/+2
| | | | | | | | getGlobalVariablesUsing and replaced it something readable. It eliminated use of slow UniqueVector and replaced it with StringMap, SmallVector, and DenseMap, etc. It also fixed some non-deterministic behavior. This is a very minor compile time win. llvm-svn: 65438
* - Use the "Fast" flag instead of "OptimizeForSize" to determine whether to emitBill Wendling2009-02-241-7/+9
| | | | | | | | | | a DBG_LABEL or not. We want to fall back to the original way of emitting debug info when we're in -O0/-fast mode. - Add plumbing in to pass the "Fast" flag to places that need it. - XFAIL DebugInfo/deaddebuglabel.ll. This is finding 11 labels instead of 8. I need to investigate still. llvm-svn: 65367
* Introduce the BuildVectorSDNode class that encapsulates the ISD::BUILD_VECTORScott Michel2009-02-221-25/+21
| | | | | | | | | instruction. The class also consolidates the code for detecting constant splats that's shared across PowerPC and the CellSPU backends (and might be useful for other backends.) Also introduces SelectionDAG::getBUID_VECTOR() for generating new BUILD_VECTOR nodes. llvm-svn: 65296
* Remove trailing whitespace to reduce later commit patch noise.Scott Michel2009-02-171-355/+355
| | | | | | | | (Note: Eventually, commits like this will be handled via a pre-commit hook that does this automagically, as well as expand tabs to spaces and look for 80-col violations.) llvm-svn: 64827
* --- Merging (from foreign repository) r64714 into '.':Bill Wendling2009-02-171-8/+15
| | | | | | | | | | | | U include/llvm/CodeGen/DebugLoc.h U lib/CodeGen/SelectionDAG/LegalizeDAG.cpp U lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp U lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp Enable debug location generation at -Os. This goes with the reapplication of the r63639 patch. llvm-svn: 64715
* Revert this. It was breaking stuff.Bill Wendling2009-02-131-2/+31
| | | | llvm-svn: 64428
* Turn off the old way of handling debug information in the code generator. UseBill Wendling2009-02-131-31/+2
| | | | | | | the new way, where all of the information is passed on SDNodes and machine instructions. llvm-svn: 64427
* Use getDebugLoc forwarder instead of getNode()->getDebugLoc.Dale Johannesen2009-02-071-3/+3
| | | | | | No functional change. llvm-svn: 64026
* Get rid of the last non-DebugLoc versions of getNode!Dale Johannesen2009-02-071-3/+3
| | | | | | | | | | | | Many targets build placeholder nodes for special operands, e.g. GlobalBaseReg on X86 and PPC for the PIC base. There's no sensible way to associate debug info with these. I've left them built with getNode calls with explicit DebugLoc::getUnknownLoc operands. I'm not too happy about this but don't see a good improvement; I considered adding a getPseudoOperand or something, but it seems to me that'll just make it harder to read. llvm-svn: 63992
* Remove more non-DebugLoc getNode variants. UseDale Johannesen2009-02-061-24/+23
| | | | | | | | getCALLSEQ_{END,START} to permit passing no DebugLoc there. UNDEF doesn't logically have DebugLoc; add getUNDEF to encapsulate this. llvm-svn: 63978
* And one more file.Dale Johannesen2009-02-061-3/+4
| | | | llvm-svn: 63971
* Remove non-DebugLoc versions of getLoad and getStore.Dale Johannesen2009-02-041-2/+3
| | | | | | Adjust the many callers of those versions. llvm-svn: 63767
* Avoids generating a legalization assert for the case where a vector type is ↵Mon P Wang2009-02-041-2/+10
| | | | | | | | | | legal but when legalizing the operation, we split the vector type and generate a library call whose type needs to be promoted. For example, X86 with SSE on but MMX off, a divide v2i64 will be scalarized to 2 calls to a library using i64. llvm-svn: 63760
* Remove non-DebugLoc forms of the exotic formsDale Johannesen2009-02-041-1/+2
| | | | | | of Lod and Sto; patch uses. llvm-svn: 63716
* Fill in more omissions in DebugLog propagation.Dale Johannesen2009-02-041-16/+16
| | | | | | I think that's it for this directory. llvm-svn: 63690
* Propagation in TargetLowering. Includes passing a DLDale Johannesen2009-02-031-3/+3
| | | | | | into SimplifySetCC which gets called elsewhere. llvm-svn: 63583
* Last DebugLoc propagation for this file.Dale Johannesen2009-02-021-180/+204
| | | | llvm-svn: 63574
* More DebugLoc propagation. This should be everythingDale Johannesen2009-02-021-100/+112
| | | | | | except LegalizeOp itself. llvm-svn: 63560
* DebugLoc propagation. ExpandOp and PromoteOp,Dale Johannesen2009-02-021-307/+330
| | | | | | among others. llvm-svn: 63555
* More DebugLoc propagation.Dale Johannesen2009-02-021-109/+127
| | | | llvm-svn: 63543
* DebugLoc propagation for int<->fp conversions.Dale Johannesen2009-02-021-74/+89
| | | | llvm-svn: 63537
* Fix PR3453 and probably a bunch of other potentialDuncan Sands2009-02-011-4/+6
| | | | | | | | | crashes or wrong code with codegen of large integers: eliminate the legacy getIntegerVTBitMask and getIntegerVTSignBit methods, which returned their value as a uint64_t, so couldn't handle huge types. llvm-svn: 63494
* Fix PR3401: when using large integers, the typeDuncan Sands2009-01-311-26/+19
| | | | | | | | | | | | | returned by getShiftAmountTy may be too small to hold shift values (it is an i8 on x86-32). Before and during type legalization, use a large but legal type for shift amounts: getPointerTy; afterwards use getShiftAmountTy, fixing up any shift amounts with a big type during operation legalization. Thanks to Dan for writing the original patch (which I shamelessly pillaged). llvm-svn: 63482
* Make LowerCallTo and LowerArguments take a DebugLocDale Johannesen2009-01-301-2/+4
| | | | | | argument. Adjust all callers and overloaded versions. llvm-svn: 63444
* Get rid of the non-DebugLoc-ified getNOT() method.Bill Wendling2009-01-301-3/+5
| | | | llvm-svn: 63442
* Explicitly add PseudoSourceValue information when loweringDan Gohman2009-01-291-10/+11
| | | | | | BUILD_VECTOR and conversions to stack operations. llvm-svn: 63333
* Make isOperationLegal do what its name suggests, and introduce aDan Gohman2009-01-281-25/+28
| | | | | | | | | | | | | | | new isOperationLegalOrCustom, which does what isOperationLegal previously did. Update a bunch of callers to use isOperationLegalOrCustom instead of isOperationLegal. In some case it wasn't obvious which behavior is desired; when in doubt I changed then to isOperationLegalOrCustom as that preserves their previous behavior. This is for the second half of PR3376. llvm-svn: 63212
* Use ValueType::bitsLT to simplify some code.Dan Gohman2009-01-281-1/+1
| | | | llvm-svn: 63170
* Use ZERO_EXTEND instead of ANY_EXTEND when promotingDan Gohman2009-01-281-1/+1
| | | | | | | shift amounts, to avoid implicitly assuming that target architectures will ignore the high bits. llvm-svn: 63169
* Add an assertion to the form of SelectionDAG::getConstant that takesDan Gohman2009-01-271-1/+1
| | | | | | | | a uint64_t to verify that the value is in range for the given type, to help catch accidental overflow. Fix a few places that relied on getConstant implicitly truncating the value. llvm-svn: 63128
* Fix an indent and a typo.Nate Begeman2009-01-241-1/+1
| | | | llvm-svn: 62940
* Add SelectionDAG::getNOT method to construct bitwise NOT operations,Bob Wilson2009-01-221-4/+2
| | | | | | | corresponding to the "not" and "vnot" PatFrags. Use the new method in some places where it seems appropriate. llvm-svn: 62768
* CellSPU:Scott Michel2009-01-211-0/+4
| | | | | | | | | | | | | - Ensure that (operation) legalization emits proper FDIV libcall when needed. - Fix various bugs encountered during llvm-spu-gcc build, along with various cleanups. - Start supporting double precision comparisons for remaining libgcc2 build. Discovered interesting DAGCombiner feature, which is currently solved via custom lowering (64-bit constants are not legal on CellSPU, but DAGCombiner insists on inserting one anyway.) - Update README. llvm-svn: 62664
* More consts on TargetLowering references.Dan Gohman2009-01-151-1/+1
| | | | llvm-svn: 62262
* Use const with TargetLowering references in a few more places.Dan Gohman2009-01-151-4/+5
| | | | llvm-svn: 62260
* Use DebugInfo interface to lower dbg_* intrinsics.Devang Patel2009-01-131-6/+11
| | | | llvm-svn: 62127
* Rename getABITypeSize to getTypePaddedSize, asDuncan Sands2009-01-121-2/+3
| | | | | | suggested by Chris. llvm-svn: 62099
* Fix PR3274: when promoting the condition of a BRCOND node,Duncan Sands2009-01-011-50/+57
| | | | | | | | | | promote from i1 all the way up to the canonical SetCC type. In order to discover an appropriate type to use, pass MVT::Other to getSetCCResultType. In order to be able to do this, change getSetCCResultType to take a type as an argument, not a value (this is also more logical). llvm-svn: 61542
OpenPOWER on IntegriCloud