summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Fix infinite recursion in the C++ code which handles movddup by making it ↵Nate Begeman2009-04-291-2/+2
| | | | | | unnecessary. llvm-svn: 70425
* Implement review feedback for vector shuffle work.Nate Begeman2009-04-291-17/+22
| | | | llvm-svn: 70372
* Second attempt:Bill Wendling2009-04-291-8/+8
| | | | | | | | | | | | Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want to use the old behavior, the flag is -O0. This change allows for finer-grained control over which optimizations are run at different -O levels. Most of this work was pretty mechanical. The majority of the fixes came from verifying that a "fast" variable wasn't used anymore. The JIT still uses a "Fast" flag. I'll change the JIT with a follow-up patch. llvm-svn: 70343
* r70270 isn't ready yet. Back this out. Sorry for the noise.Bill Wendling2009-04-281-8/+8
| | | | llvm-svn: 70275
* Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want toBill Wendling2009-04-281-8/+8
| | | | | | | | | | | use the old behavior, the flag is -O0. This change allows for finer-grained control over which optimizations are run at different -O levels. Most of this work was pretty mechanical. The majority of the fixes came from verifying that a "fast" variable wasn't used anymore. The JIT still uses a "Fast" flag. I'm not 100% sure if it's necessary to change it there... llvm-svn: 70270
* Now that PR2957 is resolved, remove a bunch ofDuncan Sands2009-04-271-3/+1
| | | | | | no-longer needed workarounds. llvm-svn: 70234
* 2nd attempt, fixing SSE4.1 issues and implementing feedback from duncan.Nate Begeman2009-04-271-143/+80
| | | | | | | | | | | | | | 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-75/+138
| | | | llvm-svn: 69967
* PR2957Nate Begeman2009-04-241-138/+75
| | | | | | | | | | | | | | 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
* Don't try to make BUILD_VECTOR operands have the sameDuncan Sands2009-04-181-41/+9
| | | | | | | | | | | | | | | | | type as the vector element type: allow them to be of a wider integer type than the element type all the way through the system, and not just as far as LegalizeDAG. This should be safe because it used to be this way (the old type legalizer would produce such nodes), so backends should be able to handle it. In fact only targets which have legal vector types with an illegal promoted element type will ever see this (eg: <4 x i16> on ppc). This fixes a regression with the new type legalizer (vec_splat.ll). Also, treat SCALAR_TO_VECTOR the same as BUILD_VECTOR. After all, it is just a special case of BUILD_VECTOR. llvm-svn: 69467
* Generalize one of the SelectionDAG::ReplaceAllUsesWith overloadsDan Gohman2009-04-151-4/+2
| | | | | | | | to support replacing a node with another that has a superset of the result types. Use this instead of calling ReplaceAllUsesOfValueWith for each value. llvm-svn: 69209
* Change SelectionDAG type legalization to allow BUILD_VECTOR operands to beBob Wilson2009-04-131-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | promoted to legal types without changing the type of the vector. This is following a suggestion from Duncan (http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-February/019923.html). The transformation that used to be done during type legalization is now postponed to DAG legalization. This allows the BUILD_VECTORs to be optimized and potentially handled specially by target-specific code. It turns out that this is also consistent with an optimization done by the DAG combiner: a BUILD_VECTOR and INSERT_VECTOR_ELT may be combined by replacing one of the BUILD_VECTOR operands with the newly inserted element; but INSERT_VECTOR_ELT allows its scalar operand to be larger than the element type, with any extra high bits being implicitly truncated. The result is a BUILD_VECTOR where one of the operands has a type larger the the vector element type. Any code that operates on BUILD_VECTORs may now need to be aware of the potential type discrepancy between the vector element type and the BUILD_VECTOR operands. This patch updates all of the places that I could find to handle that case. llvm-svn: 68996
* 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
OpenPOWER on IntegriCloud