summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* 2nd attempt, fixing SSE4.1 issues and implementing feedback from duncan.Nate Begeman2009-04-271-87/+66
| | | | | | | | | | | | | | PR2957 ISD::VECTOR_SHUFFLE now stores an array of integers representing the shuffle mask internal to the node, rather than taking a BUILD_VECTOR of ConstantSDNodes as the shuffle mask. A value of -1 represents UNDEF. In addition to eliminating the creation of illegal BUILD_VECTORS just to represent shuffle masks, we are better about canonicalizing the shuffle mask, resulting in substantially better code for some classes of shuffles. llvm-svn: 70225
* Revert 69952. Causes testsuite failures on linux x86-64.Rafael Espindola2009-04-241-66/+87
| | | | llvm-svn: 69967
* PR2957Nate Begeman2009-04-241-87/+66
| | | | | | | | | | | | | | ISD::VECTOR_SHUFFLE now stores an array of integers representing the shuffle mask internal to the node, rather than taking a BUILD_VECTOR of ConstantSDNodes as the shuffle mask. A value of -1 represents UNDEF. In addition to eliminating the creation of illegal BUILD_VECTORS just to represent shuffle masks, we are better about canonicalizing the shuffle mask, resulting in substantially better code for some classes of shuffles. A clean up of x86 shuffle code, and some canonicalizing in DAGCombiner is next. llvm-svn: 69952
* Factor out a bit of code that appears in several places into aDan Gohman2009-04-231-9/+13
| | | | | | utility function. llvm-svn: 69937
* Handle Void types in ComputeValueVTs. This doesn't currently occur,Dan Gohman2009-04-231-0/+3
| | | | | | | but this change makes the code more general and easier to adapt for new purposes. llvm-svn: 69935
* Inline asm's were still introducing bogus dependencies;Dale Johannesen2009-04-181-1/+7
| | | | | | my earlier patch to this code only fixed half of it. llvm-svn: 69408
* Do not treat beginning of inlined scope as beginning of normal function ↵Devang Patel2009-04-161-0/+10
| | | | | | | | | | | | | | | | | | | | | scope if the location info is missing. Insetad of doing ... if (inlined_subroutine && known_location) DW_TAG_inline_subroutine else DW_TAG_subprogram do if (inlined_subroutine) { if (known_location) DW_TAG_inline_subroutine } else { DW_TAG_subprogram } llvm-svn: 69300
* Record line number at the beginning of a func.start.Devang Patel2009-04-161-1/+1
| | | | | | This line was accidently lost yesterday. llvm-svn: 69286
* In -fast mode do what FastISel does.Devang Patel2009-04-161-30/+65
| | | | | | This code could use some refactoring help! llvm-svn: 69254
* Do not force asm's to be chained if they don't touchDale Johannesen2009-04-141-0/+3
| | | | | | | memory and aren't volatile. This was interfering with good scheduling. llvm-svn: 69008
* Make these errors more noticable in build logs.Daniel Dunbar2009-04-131-5/+5
| | | | llvm-svn: 68998
* Right now, Debugging information to encode scopes (DW_TAG_lexical_block) ↵Devang Patel2009-04-131-13/+11
| | | | | | | | relies on DBG_LABEL. Unfortunately this intefers with the quality of optimized code. This patch updates dwarf writer to encode scoping information in DWARF only in FastISel mode. llvm-svn: 68973
* Reapply 68847.Devang Patel2009-04-131-0/+22
| | | | | | Now debug_inlined section is covered by TAI->doesDwarfUsesInlineInfoSection(), which is false by default. llvm-svn: 68964
* Revert r68847. It breaks the build on non-Darwin targets, with this messageDan Gohman2009-04-111-22/+0
| | | | | | | from the assembler: Error: unknown pseudo-op: `.debug_inlined' llvm-svn: 68863
* Keep track of inlined functions and their locations. This information is ↵Devang Patel2009-04-111-0/+22
| | | | | | | | collected when nested llvm.dbg.func.start intrinsics are seen. (Right now, inliner removes nested llvm.dbg.func.start intrinisics during inlining.) Create debug_inlined dwarf section using these information. This info is used by gdb, at least on Darwin, to enable better experience debugging inlined functions. See DwarfWriter.cpp for more information on structure of debug_inlined section. llvm-svn: 68847
* Remove the obsolete SelectionDAG::getNodeValueTypes and simplifyDan Gohman2009-04-091-27/+18
| | | | | | code that uses it by using SelectionDAG::getVTList instead. llvm-svn: 68744
* Generalize ExtendUsesToFormExtLoad to be usable for ANY_EXTEND,Dan Gohman2009-04-091-2/+18
| | | | | | | | | | | | | | | in addition to ZERO_EXTEND and SIGN_EXTEND. Fix a bug in the way it checked for live-out values, and simplify the way it find users by using SDNode::use_iterator's (relatively) new features. Also, make it slightly more permissive on targets with free truncates. In SelectionDAGBuild, avoid creating ANY_EXTEND nodes that are larger than necessary. If the target's SwitchAmountTy has enough bits, use it. This exposes the truncate to optimization early, enabling more optimizations. llvm-svn: 68670
* Don't copy the operand of a SwitchInst into virtual registers asDan Gohman2009-04-091-3/+13
| | | | | | | | | | eagerly. This helps avoid CopyToReg nodes in some cases where they aren't needed, and also helps subsequent optimizer heuristics in cases where the extra nodes would cause the node to appear to have multiple results. This doesn't have a significant impact currently; it'll help an upcoming change. llvm-svn: 68667
* Revert prev. patch for now.Devang Patel2009-04-071-4/+6
| | | | llvm-svn: 68569
* Right now DBG_LABEL are required for llvm.dbg.region_start and ↵Devang Patel2009-04-071-6/+4
| | | | | | llvm.dbg.region_end in non-fast mode also. llvm-svn: 68559
* Fix live-out reg logic to not insert over-aggressive AssertZExtDan Gohman2009-03-311-3/+3
| | | | | | instructions. This fixes lua. llvm-svn: 68083
* Revert 67132. This is breaking some objective-c apps.Evan Cheng2009-03-251-3/+13
| | | | | | Also fixes SDISel so it *does not* force promote return value if the function is not marked signext / zeroext. llvm-svn: 67701
* When optimizing with debug info, don't keep theDale Johannesen2009-03-251-4/+5
| | | | | | | | stoppoint nodes around until Legalize; doing this imposed an ordering on a sequence of loads that came from different lines, interfering with scheduling. llvm-svn: 67692
* more tidying: name the components of PhysReg in the case whenChris Lattner2009-03-241-8/+9
| | | | | | the target constraint specifies a specific physreg. llvm-svn: 67618
* Tidy a bit more.Chris Lattner2009-03-241-3/+3
| | | | llvm-svn: 67617
* simplify this code a bit now that "allocation to a vreg class" can neverChris Lattner2009-03-241-16/+13
| | | | | | fail. llvm-svn: 67616
* Model inline asm constraint which ties an input to an output register as ↵Evan Cheng2009-03-231-29/+21
| | | | | | machine operand TIED_TO constraint. This eliminated the need to pre-allocate registers for these. This also allows register allocator can eliminate the unneeded copies. llvm-svn: 67512
* For inline asm output operand that matches an input. Encode the input ↵Evan Cheng2009-03-201-22/+34
| | | | | | operand index in the high bits. llvm-svn: 67387
* Don't force promotion of return arguments on the callee.Rafael Espindola2009-03-171-9/+0
| | | | | | | Some architectures (like x86) don't require it. This fixes bug 3779. llvm-svn: 67132
* Fix codegen to compute the size of an allocation by multiplying theChris Lattner2009-03-171-8/+17
| | | | | | | | | | | size by the array amount as an i32 value instead of promoting from i32 to i64 then doing the multiply. Not doing this broke wrap-around assumptions that the optimizers (validly) made. The ultimate real fix for this is to introduce i64 version of alloca and remove mallocinst. This fixes PR3829 llvm-svn: 67093
* Oops...I committed too much.Bill Wendling2009-03-131-8/+12
| | | | llvm-svn: 66867
* Temporarily XFAIL this test.Bill Wendling2009-03-131-12/+8
| | | | llvm-svn: 66866
* Pass in a std::string when getting the names of debugging things. This cuts downBill Wendling2009-03-091-8/+12
| | | | | | on the number of times a std::string is created and copied. llvm-svn: 66396
* Revert BuildVectorSDNode related patches: 65426, 65427, and 65296.Evan Cheng2009-02-251-8/+11
| | | | llvm-svn: 65482
* Fix big-endian codegen bug. We're splitting upDale Johannesen2009-02-251-1/+2
| | | | | | | | | | | overly long ints, e.g. i96, into pieces at PHIs and the nodes that feed into them; however big-endian reverses the order of the pieces (for some reason), and wasn't doing it the same way on both sides, so the pieces didn't match and runtime failures ensued. Fixes 188.ammp and sqlite3 on ppc32. llvm-svn: 65481
* Clean up dwarf writer, part 1. This eliminated the horrible recursive ↵Evan Cheng2009-02-251-13/+13
| | | | | | | | 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
* Overhaul my earlier submission due to feedback. It's a large patch, but most ofBill Wendling2009-02-241-1/+0
| | | | | | | | | | | | them are generic changes. - Use the "fast" flag that's already being passed into the asm printers instead of shoving it into the DwarfWriter. - Instead of calling "MI->getParent()->getParent()" for every MI, set the machine function when calling "runOnMachineFunction" in the asm printers. llvm-svn: 65379
* - Use the "Fast" flag instead of "OptimizeForSize" to determine whether to emitBill Wendling2009-02-241-5/+3
| | | | | | | | | | 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-11/+8
| | | | | | | | | 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
* Temporarily revert r65065. It was causing test failures.Bill Wendling2009-02-191-1/+3
| | | | llvm-svn: 65068
* Check for -fast here too.Bill Wendling2009-02-191-3/+1
| | | | llvm-svn: 65065
* Generate these labels when we're in "fast" mode, not simply when we're no inBill Wendling2009-02-191-8/+2
| | | | | | "optimize-for-size" mode. llvm-svn: 65064
* Remove trailing whitespace to reduce later commit patch noise.Scott Michel2009-02-171-92/+92
| | | | | | | | (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-16/+32
| | | | | | | | | | | | 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
* Unbreak the build on win32.Cedric Venet2009-02-141-1/+2
| | | | | | | | | | Cleanup some warning. Remark: when struct/class are declared differently than they are defined, this make problem for VC++ since it seems to mangle class differently that struct. These error are very hard to understand and find. So please, try to keep your definition/declaration in sync. Only tested with VS2008. hope it does not break anything. feel free to revert. llvm-svn: 64554
* Revert this. It was breaking stuff.Bill Wendling2009-02-131-9/+27
| | | | llvm-svn: 64428
* Turn off the old way of handling debug information in the code generator. UseBill Wendling2009-02-131-27/+9
| | | | | | | the new way, where all of the information is passed on SDNodes and machine instructions. llvm-svn: 64427
* Simplify code.Evan Cheng2009-02-091-5/+6
| | | | llvm-svn: 64164
* Make sure constant subscript is truncated to ptr size if it may not fit.Evan Cheng2009-02-091-1/+8
| | | | llvm-svn: 64163
* Remove more non-DebugLoc getNode variants. UseDale Johannesen2009-02-061-16/+11
| | | | | | | | getCALLSEQ_{END,START} to permit passing no DebugLoc there. UNDEF doesn't logically have DebugLoc; add getUNDEF to encapsulate this. llvm-svn: 63978
OpenPOWER on IntegriCloud