summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Add support for promoting SETCC operations.Jakob Stoklund Olesen2009-07-241-5/+7
| | | | llvm-svn: 76987
* Make promotion in operation legalization for SETCC work correctly.Eli Friedman2009-07-171-23/+5
| | | | llvm-svn: 76153
* Move a few more convenience factory functions from Constant to LLVMContext.Owen Anderson2009-07-151-3/+5
| | | | llvm-svn: 75840
* Move EVER MORE stuff over to LLVMContext.Owen Anderson2009-07-141-1/+2
| | | | llvm-svn: 75703
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-16/+16
| | | | | | | | | 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
* Implement support for promotion of AND/OR/XOR on integer types.Jakob Stoklund Olesen2009-07-121-8/+19
| | | | | | The blackfin processor has a legal i16 type, but only logic operations on i32. llvm-svn: 75419
* Fix types in PromoteNode handling of CTPOP and friends.Jakob Stoklund Olesen2009-07-121-3/+3
| | | | llvm-svn: 75418
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-13/+13
| | | | | | | | | 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
* Convert more assert(0)+abort() -> LLVM_UNREACHABLE,Torok Edwin2009-07-111-4/+4
| | | | | | and abort()/exit() -> llvm_report_error(). llvm-svn: 75363
* Make EXTRACT_VECTOR_ELT a bit more flexible in terms of the returned Eli Friedman2009-07-091-1/+5
| | | | | | | | | 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
* Thread LLVMContext through MVT and related parts of SDISel.Owen Anderson2009-07-091-11/+17
| | | | llvm-svn: 75153
* Add NumFixedArgs attribute to CallSDNode which indicates the number of fixed ↵Tilmann Scheller2009-07-031-2/+2
| | | | | | | | | | | 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
* This increases the maximum for MVT::LAST_VALUETYPEDavid Greene2009-06-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This change doubles the allowable value for MVT::LAST_VALUETYPE. It does this by doing several things. 1. Introduces MVT::MAX_ALLOWED_LAST_VALUETYPE which in this change has a value of 64. This value contains the current maximum for the MVT::LAST_VALUETYPE. 2. Instead of checking "MVT::LAST_VALUETYPE <= 32", all of those uses now become "MVT::LAST_VALUETYPE <= MVT::MAX_ALLOWED_LAST_VALUETYPE" 3. Changes the dimension of the ValueTypeActions from 2 elements to four elements and adds comments ahead of the declaration indicating the it is "(MVT::MAX_ALLOWED_LAST_VALUETYPE/32) * 2". This at least lets us find what is affected if and when MVT::MAX_ALLOWED_LAST_VALUETYPE gets changed. 4. Adds initializers for the new elements of ValueTypeActions. This does NOT add any types in MVT. That would be done separately. This doubles the size of ValueTypeActions from 64 bits to 128 bits and gives us the freedom to add more types for AVX. llvm-svn: 74110
* Add some generic expansion logic for SMULO and UMULO. Fixes UMULO Eli Friedman2009-06-161-0/+47
| | | | | | | | support for x86, and UMULO/SMULO for many architectures, including PPC (PR4201), ARM, and Cell. The resulting expansion isn't perfect, but it's not bad. llvm-svn: 73477
* Slightly generalize the code that handles shuffles of consecutive loads Eli Friedman2009-06-071-78/+37
| | | | | | | | | | | on x86 to handle more cases. Fix a bug in said code that would cause it to read past the end of an object. Rewrite the code in SelectionDAGLegalize::ExpandBUILD_VECTOR to be a bit more general. Remove PerformBuildVectorCombine, which is no longer necessary with these changes. In addition to simplifying the code, with this change, we can now catch a few more cases of consecutive loads. llvm-svn: 73012
* Fix the expansion for CONCAT_VECTORS so that it doesn't create illegal Eli Friedman2009-06-061-17/+1
| | | | | | types. llvm-svn: 72993
* Factor out a couple of helpers.Eli Friedman2009-06-061-78/+101
| | | | llvm-svn: 72992
* Re-commit r72514 and r72516 with a fixed version of BR_CC lowering. Eli Friedman2009-05-281-87/+38
| | | | | | | This patch removes some special cases for opcodes and does a bit of cleanup. llvm-svn: 72536
* Temporarily revert r72514 (and dependent patch r72516). It was causing thisBill Wendling2009-05-281-36/+87
| | | | | | | | | | | | failure during llvm-gcc bootstrap: Assertion failed: (!Tmp2.getNode() && "Can't legalize BR_CC with legal condition!"), function ExpandNode, file /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore.roots/llvmCore~obj/src/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp, line 2923. /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/libgcc2.c:1727: internal compiler error: Abort trap Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://developer.apple.com/bugreporter> for instructions. llvm-svn: 72530
* Remove a couple of useless functions.Eli Friedman2009-05-281-34/+6
| | | | llvm-svn: 72516
* Remove special cases for more opcodes.Eli Friedman2009-05-281-65/+42
| | | | | | | | | This is basically the end of this series of patches for LegalizeDAG; the remaining special cases can't be removed without more infrastructure work. There's a FIXME for each relevant opcode near the beginning of SelectionDAGLegalize::LegalizeOp. llvm-svn: 72514
* Remove special case for SETCC opcode; add some comments explaining why Eli Friedman2009-05-281-73/+63
| | | | | | some special cases are necessary. llvm-svn: 72511
* Some minor cleanups.Eli Friedman2009-05-281-54/+30
| | | | llvm-svn: 72509
* Minor cleanups; add a better explanation for the issue with Eli Friedman2009-05-271-23/+10
| | | | | | BUILD_VECTOR. llvm-svn: 72469
* Remove more special cases for opcodes.Eli Friedman2009-05-271-310/+201
| | | | llvm-svn: 72468
* Remove special cases for more opcodes.Eli Friedman2009-05-271-205/+120
| | | | llvm-svn: 72467
* Removing more special cases from LegalizeDAG.Eli Friedman2009-05-271-191/+78
| | | | llvm-svn: 72465
* Eliminate more special cases for opcodes.Eli Friedman2009-05-271-192/+105
| | | | llvm-svn: 72464
* Remove more special cases from LegalizeDAG.Eli Friedman2009-05-271-210/+145
| | | | llvm-svn: 72456
* Remove unused argument.Eli Friedman2009-05-271-11/+6
| | | | llvm-svn: 72455
* Remove more opcode special cases.Eli Friedman2009-05-271-159/+70
| | | | llvm-svn: 72454
* Start of refactoring LegalizeDAG so that we don't need specialized Eli Friedman2009-05-271-1185/+363
| | | | | | handling for every single opcode. llvm-svn: 72447
* Delete a bunch of dead code from LegalizeDAG.Eli Friedman2009-05-261-3667/+29
| | | | llvm-svn: 72414
* Minor improvement to FCOPYSIGN to use BIT_CONVERT in cases where the Eli Friedman2009-05-241-10/+24
| | | | | | corresponding integer type is legal. llvm-svn: 72373
* Rewrite ISD::FCOPYSIGN lowering to never use i64. Not really ideal, but Eli Friedman2009-05-241-30/+21
| | | | | | it's late, and I don't have any better ideas at the moment. Fixes PR4257. llvm-svn: 72363
* Remove checks of getTypeAction from LegalizeOp; we already assert that Eli Friedman2009-05-241-503/+105
| | | | | | | all results and all operands are legal, so this change shouldn't affect behavior at all. llvm-svn: 72359
* Disable type legalization in LegalizeDAG.Eli Friedman2009-05-241-94/+39
| | | | | | | This leaves around 4000 lines of dead code; I'll clean that up in subsequent commits. llvm-svn: 72358
* Fix a bug in the expansion of EXTRACT_SUBVECTOR in Eli Friedman2009-05-231-1/+2
| | | | | | ExpandExtractFromVectorThroughStack. llvm-svn: 72351
* Add a proper implementation of EXTRACT_SUBVECTOR legalization that Eli Friedman2009-05-231-19/+42
| | | | | | | | doesn't split legal vector operands. This is necessary because the type legalization (and therefore, vector splitting) code will be going away soon. llvm-svn: 72349
* Use v.data() instead of &v[0] when SmallVector v might be empty.Jay Foad2009-05-211-1/+1
| | | | llvm-svn: 72210
* When scalarizing a vector BITCAST, check whether the operand has vectorDan Gohman2009-05-111-1/+2
| | | | | | | | type, rather than assume that it does. If the operand is not vector, it shouldn't be run through ScalarizeVectorOp. This fixes one of the testcases in PR3886. llvm-svn: 71453
* Rename PaddedSize to AllocSize, in the hope that thisDuncan Sands2009-05-091-1/+1
| | | | | | | will make it more obvious what it represents, and stop it being confused with the StoreSize. llvm-svn: 71349
* Properly expand libcalls for urem / srem. Also make code more straightforward.Anton Korobeynikov2009-05-081-29/+40
| | | | llvm-svn: 71238
* Add generic expansion of SUB when ADD and XORDuncan Sands2009-05-061-8/+12
| | | | | | are legal. Based on a patch by Micah Villmow. llvm-svn: 71078
* Properly handle sdiv / udiv / srem / urem libcallsAnton Korobeynikov2009-05-031-7/+11
| | | | llvm-svn: 70764
* Add libcall expansion for 16 and 128 bit mulsAnton Korobeynikov2009-05-031-0/+4
| | | | llvm-svn: 70749
* Allow CONCAT_VECTORS nodes to be legal or have custom lowering for some targets.Bob Wilson2009-05-011-14/+37
| | | | | | Changes to take advantage of this will come later. llvm-svn: 70560
* Make DebugLoc independent of DwarfWriter.Argyrios Kyrtzidis2009-04-301-5/+2
| | | | | | | | -Replace DebugLocTuple's Source ID with CompileUnit's GlobalVariable* -Remove DwarfWriter::getOrCreateSourceID -Make necessary changes for the above (fix callsites, etc.) llvm-svn: 70520
* Instead of passing in an unsigned value for the optimization level, use an enum,Bill Wendling2009-04-291-5/+6
| | | | | | | which better identifies what the optimization is doing. And is more flexible for future uses. llvm-svn: 70440
OpenPOWER on IntegriCloud