summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
Commit message (Collapse)AuthorAgeFilesLines
* Add support to handle debug info attached to an instruction.Devang Patel2009-10-061-0/+2
| | | | | | This is not yet enabled. llvm-svn: 83400
* Set default location for the function if it is not already set.Devang Patel2009-10-061-0/+2
| | | | | | This code is not yet enabled. llvm-svn: 83349
* If location info is attached with an instruction then keep track of alloca ↵Devang Patel2009-10-011-3/+9
| | | | | | slots used by a variable. This info will be used by AsmPrinter to emit debug info for variables. llvm-svn: 83189
* Use MDNode * directly as an RecordSourceLine() argument.Devang Patel2009-09-301-3/+2
| | | | llvm-svn: 83182
* Silence comparison always false warning in -Asserts mode.Reid Kleckner2009-09-301-4/+4
| | | | llvm-svn: 83164
* Fix integer overflow in instruction scheduling. This can happen if we haveReid Kleckner2009-09-303-12/+13
| | | | | | | | | | basic blocks that are so long that their size overflows a short. Also assert that overflow does not happen in the future, as requested by Evan. This fixes PR4401. llvm-svn: 83159
* Remove unnecessary cast.Devang Patel2009-09-291-4/+2
| | | | llvm-svn: 83100
* s/class Metadata/class MetadataContext/gDevang Patel2009-09-281-2/+2
| | | | llvm-svn: 83019
* Do not use global typedef for MDKindID.Devang Patel2009-09-281-2/+2
| | | | llvm-svn: 83016
* Use VerifySchedule instead of doing the work manually.Dan Gohman2009-09-281-33/+3
| | | | llvm-svn: 82995
* Convert comparisons like (x == infinity) to (x >= infinity) on targetsDan Gohman2009-09-261-0/+37
| | | | | | where FCMP_OEQ is not legal and FCMP_OGE is, such as x86. llvm-svn: 82861
* Improve MachineMemOperand handling.Dan Gohman2009-09-254-229/+318
| | | | | | | | | | | | | | | | | | | | | - Allocate MachineMemOperands and MachineMemOperand lists in MachineFunctions. This eliminates MachineInstr's std::list member and allows the data to be created by isel and live for the remainder of codegen, avoiding a lot of copying and unnecessary translation. This also shrinks MemSDNode. - Delete MemOperandSDNode. Introduce MachineSDNode which has dedicated fields for MachineMemOperands. - Change MemSDNode to have a MachineMemOperand member instead of its own fields with the same information. This introduces some redundancy, but it's more consistent with what MachineInstr will eventually want. - Ignore alignment when searching for redundant loads for CSE, but remember the greatest alignment. Target-specific code which previously used MemOperandSDNodes with generic SDNodes now use MemIntrinsicSDNodes, with opcodes in a designated range so that the SelectionDAG framework knows that MachineMemOperand information is available. llvm-svn: 82794
* Rename getTargetNode to getMachineNode, for consistency with theDan Gohman2009-09-251-44/+44
| | | | | | | | naming scheme used in SelectionDAG, where there are multiple kinds of "target" nodes, but "machine" nodes are nodes which represent a MachineInstr. llvm-svn: 82790
* Make sure sin, cos, sqrt calls are marked readonlyDale Johannesen2009-09-251-3/+6
| | | | | | | before producing FSIN, FCOS, FSQRT. If they aren't so marked we have to assume they might set errno. llvm-svn: 82781
* Generate FSQRT from calls to the sqrt function, whichDale Johannesen2009-09-251-0/+9
| | | | | | | | | | | | allows appropriate backends to generate a sqrt instruction. On x86, this isn't done at -O0 because we go through FastISel instead. This is a behavior change from before this series of sqrt patches started. I think this is OK considering that compile speed is most important at -O0, but could be convinced otherwise. llvm-svn: 82778
* Fix combiner-aa issue with bases which are different, but can alias.Nate Begeman2009-09-251-14/+34
| | | | | | | Previously, it treated GV+28 GV+0 as different bases, and assumed they could not alias. llvm-svn: 82753
* Add a version of dumpr() that has a SelectionDAG* argument.Dan Gohman2009-09-251-0/+5
| | | | llvm-svn: 82742
* Use getStoreSize() instead of getStoreSizeInBits()/8.Dan Gohman2009-09-233-5/+5
| | | | llvm-svn: 82656
* Rename several variables from EVT to more descriptive names, now that EVTDan Gohman2009-09-234-38/+39
| | | | | | | is also the name of their type, as declarations like "EVT EVT" look really odd. llvm-svn: 82654
* Give MachineMemOperand an operator<<, factoring out code fromDan Gohman2009-09-231-4/+1
| | | | | | | | | | | | two different places for printing MachineMemOperands. Drop the virtual from Value::dump and instead give Value a protected virtual hook that can be overridden by subclasses to implement custom printing. This lets printing be more consistent, and simplifies printing of PseudoSourceValue values. llvm-svn: 82599
* Change MachineMemOperand's alignment value to be the alignment ofDan Gohman2009-09-211-2/+2
| | | | | | | the base pointer, without the offset. This matches MemSDNode's new alignment behavior, and holds more interesting information. llvm-svn: 82473
* tidy upChris Lattner2009-09-201-3/+3
| | | | llvm-svn: 82397
* Tabs -> spaces, and remove trailing whitespace.Daniel Dunbar2009-09-201-70/+70
| | | | llvm-svn: 82355
* Fix PR4926. When target hook EmitInstrWithCustomInserter() insert new basic ↵Evan Cheng2009-09-191-6/+8
| | | | | | blocks and update CFG, it should also inform sdisel of the changes so the phi source operands will come from the right basic blocks. llvm-svn: 82311
* Enhance EmitInstrWithCustomInserter() so target can specify CFG changes that ↵Evan Cheng2009-09-185-14/+33
| | | | | | | | sdisel will use to properly complete phi nodes. Not functionality change yet. llvm-svn: 82273
* duncan points out the EH selector values are signed.Chris Lattner2009-09-181-1/+1
| | | | llvm-svn: 82245
* Revert r82214. It broke 403.gcc on x86_64 / Darwin.Evan Cheng2009-09-181-12/+5
| | | | llvm-svn: 82215
* Fix a bug in sdisel switch lowering code. When it updates the phi nodes in ↵Evan Cheng2009-09-181-5/+12
| | | | | | | | switch successor blocks, it can introduce multiple phi operands of the same value from different blocks (and may not be on the predecessor list). This can be seen on CodeGen/Generic/2006-09-06-SwitchLowering.ll. But it's not known to cause any real regression (but I have added an assertion for it now). llvm-svn: 82214
* tolerate llvm.eh.selector.i64 on 32-bit systems and llvm.eh.selector.i32 onChris Lattner2009-09-171-21/+24
| | | | | | 64-bit systems. llvm-svn: 82180
* Fix typo.Devang Patel2009-09-161-1/+1
| | | | llvm-svn: 82080
* At iSel time, update DebugLoc based on debug info attached with an instruction.Devang Patel2009-09-161-1/+30
| | | | llvm-svn: 82077
* Do not add the SVOffset to the Node CSE ID. The same pointer argument ↵Nate Begeman2009-09-151-5/+0
| | | | | | | | cannot have different SVOffsets. llvm-svn: 81937
* Better solution for tracking both the original alignment of the access, and ↵Nate Begeman2009-09-153-44/+33
| | | | | | | | the current alignment based on the source value offset. This avoids increasing the size of mem nodes. llvm-svn: 81897
* Remove incorrect CSE code from r81813.Nate Begeman2009-09-151-2/+0
| | | | llvm-svn: 81819
* Substantially speed up combiner-aa in the following ways:Nate Begeman2009-09-151-33/+69
| | | | | | | | | | | | | | 1. Switch from an std::set to a SmallPtrSet for visited chain nodes. 2. Do not force the recursive flattening of token factor nodes, regardless of use count. 3. Immediately process newly created TokenFactor nodes. Also, improve combiner-aa by teaching it that loads to non-overlapping offsets of relatively aligned objects cannot alias. These changes result in a >5x speedup for combiner-aa on most testcases. llvm-svn: 81816
* Teach the legalizer to propagate the original alignment of loads and store whenNate Begeman2009-09-151-6/+11
| | | | | | it splits them. llvm-svn: 81815
* Add an "original alignment" field to load and store nodes. This enables theNate Begeman2009-09-152-19/+28
| | | | | | | DAG Combiner to disambiguate chains for loads and stores of types which are broken up by the Legalizer into smaller pieces. llvm-svn: 81813
* kill off the last use of TRI::AsmName.Chris Lattner2009-09-131-1/+1
| | | | llvm-svn: 81727
* Make fast-isel try ISD::FNEG before resorting to bitcasts and xors.Dan Gohman2009-09-111-1/+9
| | | | llvm-svn: 81493
* Reapply r81171 with a fix: don't try to use i64 when itDan Gohman2009-09-111-4/+19
| | | | | | isn't legal. llvm-svn: 81492
* Don't swap the operands of a subtraction when trying to create aBob Wilson2009-09-101-1/+1
| | | | | | post-decrement load/store. llvm-svn: 81464
* Revert r81171 which was causing pr4927.Bob Wilson2009-09-101-17/+4
| | | | llvm-svn: 81415
* When widening a vector load, use the correct chain. This fixes PR4891.Dan Gohman2009-09-091-1/+1
| | | | llvm-svn: 81343
* change selectiondag to add the sign extended versions of immediate operandsChris Lattner2009-09-081-1/+1
| | | | | | | | to instructions instead of zero extended ones. This makes the asmprinter print signed values more consistently. This apparently only really affects the X86 backend. llvm-svn: 81265
* Fix an abort on a store of an empty struct member. getValue returnsDan Gohman2009-09-081-0/+4
| | | | | | | null in the case of an empty struct, so don't try to call getNumValues on it. llvm-svn: 81180
* Fix a thinko: When lowering fneg with xor, bitcast the operandsDan Gohman2009-09-071-4/+17
| | | | | | | | | from floating-point to integer first, and bitcast the result back to floating-point. Previously, this test was passing by falling back to SelectionDAG lowering. The resulting code isn't as nice, but it's correct and CodeGen now stays on the fast path. llvm-svn: 81171
* Simplify. Testing shows that this is not equivalent to BBI = CR.CaseBB + 1.Duncan Sands2009-09-061-4/+2
| | | | llvm-svn: 81124
* Remove some not-really-used variables, as warnedDuncan Sands2009-09-062-8/+2
| | | | | | about by icc (#593, partial). Patch by Erick Tryzelaar. llvm-svn: 81115
* Remove some unused variables and methods warned about byDuncan Sands2009-09-061-3/+0
| | | | | | icc (#177, partial). Patch by Erick Tryzelaar. llvm-svn: 81106
* Detect VLAs.Devang Patel2009-09-051-1/+5
| | | | | | Do not use DenseMap operator[] because it inserts new entry if lookup fails. Use find() to check an entry in a DenseMap first. llvm-svn: 81058
OpenPOWER on IntegriCloud