summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix warnings.Owen Anderson2009-08-111-4/+4
| | | | llvm-svn: 78725
* Split EVT into MVT and EVT, the former representing _just_ a primitive type, ↵Owen Anderson2009-08-111-77/+78
| | | | | | | | while the latter is capable of representing either a primitive or an extended type. llvm-svn: 78713
* Tidy #includes.Dan Gohman2009-08-111-0/+1
| | | | llvm-svn: 78677
* SjLj based exception handling unwinding support. This patch is nasty, brutishJim Grosbach2009-08-111-0/+1
| | | | | | | | | | | | | and short. Well, it's kinda short. Definitely nasty and brutish. The front-end generates the register/unregister calls into the SjLj runtime, call-site indices and landing pad dispatch. The back end fills in the LSDA with the call-site information provided by the front end. Catch blocks are not yet implemented. Built on Darwin and verified no llvm-core "make check" regressions. llvm-svn: 78625
* Rename MVT to EVT, in preparation for splitting SimpleValueType out into its ↵Owen Anderson2009-08-101-238/+238
| | | | | | own struct type. llvm-svn: 78610
* Start moving TargetLowering away from using full MVTs and towards ↵Owen Anderson2009-08-101-1/+2
| | | | | | SimpleValueType, which will simplify the privatization of IntegerType in the future. llvm-svn: 78584
* Major calling convention code refactoring.Dan Gohman2009-08-051-55/+26
| | | | | | | | | | | | | | | | | | | Instead of awkwardly encoding calling-convention information with ISD::CALL, ISD::FORMAL_ARGUMENTS, ISD::RET, and ISD::ARG_FLAGS nodes, TargetLowering provides three virtual functions for targets to override: LowerFormalArguments, LowerCall, and LowerRet, which replace the custom lowering done on the special nodes. They provide the same information, but in a more immediately usable format. This also reworks much of the target-independent tail call logic. The decision of whether or not to perform a tail call is now cleanly split between target-independent portions, and the target dependent portion in IsEligibleForTailCallOptimization. This also synchronizes all in-tree targets, to help enable future refactoring and feature work. llvm-svn: 78142
* Propogate the Depth argument when callingDan Gohman2009-08-041-1/+2
| | | | | | | | | TLI.computeMaskedBitsForTargetNode from ComputeMaskedBits, since the former may call back into the latter. This fixes a major compile time problem on a testcase that happnened to hit this in a particularly bad way, PR4643. llvm-svn: 78023
* Print the target flags as an int instead of a char, as they aren'tDan Gohman2009-08-011-4/+4
| | | | | | actually characters. llvm-svn: 77794
* Allow targets to define libcall names for mem(cpy,set,move) intrinsics, ↵Sanjiv Gupta2009-07-301-3/+6
| | | | | | rather than hardcoding them in DAG lowering. llvm-svn: 77586
* Move types back to the 2.5 API.Owen Anderson2009-07-291-6/+5
| | | | llvm-svn: 77516
* Move ConstantFP construction back to the 2.5-ish API.Owen Anderson2009-07-271-1/+1
| | | | llvm-svn: 77247
* Revert the ConstantInt constructors back to their 2.5 forms where possible, ↵Owen Anderson2009-07-241-1/+1
| | | | | | thanks to contexts-on-types. More to come. llvm-svn: 77011
* Get rid of the Pass+Context magic.Owen Anderson2009-07-221-1/+1
| | | | llvm-svn: 76702
* Fix some minor MSVC compiler warnings.Daniel Dunbar2009-07-191-2/+2
| | | | llvm-svn: 76356
* Privatize the ConstantFP table. I'm on a roll!Owen Anderson2009-07-161-1/+1
| | | | llvm-svn: 76097
* Move the ConstantInt uniquing table into LLVMContextImpl. This exposed a ↵Owen Anderson2009-07-161-1/+1
| | | | | | | | number of issues in our current context-passing stuff, which is also fixed here llvm-svn: 76089
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-11/+11
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-11/+12
| | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
* Make EXTRACT_VECTOR_ELT a bit more flexible in terms of the returned Eli Friedman2009-07-091-5/+8
| | | | | | | | | value. Adjust other code to deal with that correctly. Make DAGTypeLegalizer::PromoteIntRes_EXTRACT_VECTOR_ELT take advantage of this new flexibility to simplify the code and make it deal with unusual vectors (like <4 x i1>) correctly. Fixes PR3037. llvm-svn: 75176
* As Chris pointed out, we don't actually need to pass the context around here.Owen Anderson2009-07-091-2/+2
| | | | llvm-svn: 75161
* Thread LLVMContext through MVT and related parts of SDISel.Owen Anderson2009-07-091-6/+8
| | | | llvm-svn: 75153
* Make SelectionDAG::getVectorShuffle work properly for VECTOR_SHUFFLEDan Gohman2009-07-091-2/+2
| | | | | | | | nodes with operand types that differ from the result type. (This doesn't normally happen right now, because SelectionDAGLowering::visitShuffleVector normalizes vector shuffles.) llvm-svn: 75081
* SelectionDAG::SignBitIsZero doesn't work right for vectors,Chris Lattner2009-07-071-0/+4
| | | | | | for now, conservatively return false. llvm-svn: 74969
* Have scoped mutexes take referenes instead of pointers.Owen Anderson2009-07-071-1/+1
| | | | llvm-svn: 74931
* Add NumFixedArgs attribute to CallSDNode which indicates the number of fixed ↵Tilmann Scheller2009-07-031-5/+6
| | | | | | | | | | | arguments in a vararg call. With the SVR4 ABI on PowerPC, vector arguments for vararg calls are passed differently depending on whether they are a fixed or a variable argument. Variable vector arguments always go into memory, fixed vector arguments are put into vector registers. If there are no free vector registers available, fixed vector arguments are put on the stack. The NumFixedArgs attribute allows to decide for an argument in a vararg call whether it belongs to the fixed or variable portion of the parameter list. llvm-svn: 74764
* fix a typo that GCC should have caught that causes crashes with -view-*-dagsChris Lattner2009-06-271-1/+1
| | | | llvm-svn: 74364
* fix a really subtle bug in the cross section of aliases and TLS:Chris Lattner2009-06-261-9/+3
| | | | | | | | | | | the SelectionDAG::getGlobalAddress function properly looks through aliases to determine thread-localness, but then passes the GV* down to GlobalAddressSDNode::GlobalAddressSDNode which does not. Instead of passing down isTarget, just pass down the predetermined node opcode. This fixes some assertions with out of tree changes I'm working on. llvm-svn: 74325
* add targetflags to jump tables and constant pool entries.Chris Lattner2009-06-251-6/+24
| | | | llvm-svn: 74204
* allow setting target operand flags on TargetGlobalAddress nodes.Chris Lattner2009-06-251-6/+19
| | | | llvm-svn: 74203
* start bringing targetoperand flags into isel, first up, ExternalSymbol.Chris Lattner2009-06-251-7/+13
| | | | llvm-svn: 74199
* Provide guards for this shared structure. I'm not sure this actually needsOwen Anderson2009-06-251-3/+8
| | | | | | | | to be shared, but how/where to privatize it is not immediately clear to me. If any SelectionDAG experts see a better solution, please share! llvm-svn: 74180
* Rewrite 73900 per Duncan's suggestion.Dale Johannesen2009-06-241-19/+9
| | | | llvm-svn: 74082
* Fix memcpy expansion so it won't generate invalidDale Johannesen2009-06-221-6/+25
| | | | | | | types for the target (I think). This was breaking the PPC32 calling sequence. llvm-svn: 73900
* Add new function attribute - noimplicitfloatDevang Patel2009-06-051-1/+1
| | | | | | | Update code generator to use this attribute and remove NoImplicitFloat target option. Update llc to set this attribute when -no-implicit-float command line option is used. llvm-svn: 72959
* Don't do the X * 0.0 -> 0.0 transformation in instcombine, becauseDan Gohman2009-06-041-5/+8
| | | | | | | | instcombine doesn't know when it's safe. To partially compensate for this, introduce new code to do this transformation in dagcombine, which can use UnsafeFPMath. llvm-svn: 72872
* Fix comments.Dan Gohman2009-06-041-2/+2
| | | | llvm-svn: 72870
* Revert 72707 and 72709, for the moment.Dale Johannesen2009-06-021-0/+1
| | | | llvm-svn: 72712
* Make the implicit inputs and outputs of target-independentDale Johannesen2009-06-011-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | ADDC/ADDE use MVT::i1 (later, whatever it gets legalized to) instead of MVT::Flag. Remove CARRY_FALSE in favor of 0; adjust all target-independent code to use this format. Most targets will still produce a Flag-setting target-dependent version when selection is done. X86 is converted to use i32 instead, which means TableGen needs to produce different code in xxxGenDAGISel.inc. This keys off the new supportsHasI1 bit in xxxInstrInfo, currently set only for X86; in principle this is temporary and should go away when all other targets have been converted. All relevant X86 instruction patterns are modified to represent setting and using EFLAGS explicitly. The same can be done on other targets. The immediate behavior change is that an ADC/ADD pair are no longer tightly coupled in the X86 scheduler; they can be separated by instructions that don't clobber the flags (MOV). I will soon add some peephole optimizations based on using other instructions that set the flags to feed into ADC. llvm-svn: 72707
* Untabification.Bill Wendling2009-05-301-4/+4
| | | | llvm-svn: 72604
* Make DBG_STOPPOINT nodes, and therefore DBG_LABEL labels, get a DebugLoc, so ↵Chris Lattner2009-05-041-1/+2
| | | | | | | | | that it shows up in -print-machineinstrs. This doesn't appear to affect anything, but it was weird for some DBG_LABELs to have DebugLocs but not all of them. llvm-svn: 70921
* Update comment, replace theoretically impossible check with an assert.Nate Begeman2009-04-291-3/+1
| | | | llvm-svn: 70391
* Implement review feedback for vector shuffle work.Nate Begeman2009-04-291-25/+33
| | | | llvm-svn: 70372
* Add a public method called getAddressSpace() to the GlobalAddressSDNode.Sanjiv Gupta2009-04-291-0/+7
| | | | llvm-svn: 70366
* 2nd attempt, fixing SSE4.1 issues and implementing feedback from duncan.Nate Begeman2009-04-271-19/+135
| | | | | | | | | | | | | | 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
* Fix PR 4057, a crash doing float->char const folding.Dale Johannesen2009-04-241-3/+4
| | | | | | | | This particular one is undefined behavior (although this isn't related to the crash), so it will no longer do it at compile time, which seems better. llvm-svn: 69990
* Revert 69952. Causes testsuite failures on linux x86-64.Rafael Espindola2009-04-241-131/+22
| | | | llvm-svn: 69967
* PR2957Nate Begeman2009-04-241-22/+131
| | | | | | | | | | | | | | 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
* Simplify this code. getConstant knows how to makeDan Gohman2009-04-201-10/+3
| | | | | | broadcasted vector constants. llvm-svn: 69634
* Revise my previous change 68996 as suggested by Duncan.Bob Wilson2009-04-201-1/+2
| | | | llvm-svn: 69607
OpenPOWER on IntegriCloud