summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
Commit message (Collapse)AuthorAgeFilesLines
* Teach fast-isel to avoid loading a value from memory when it's alreadyDan Gohman2010-07-011-0/+24
| | | | | | | available in a register. This is pretty primitive, but it reduces the number of instructions in common testcases by 4%. llvm-svn: 107380
* Enable on-demand fast-isel.Dan Gohman2010-07-012-1/+10
| | | | llvm-svn: 107377
* Reapply r106422, splitting the code for materializing a value out ofDan Gohman2010-07-012-11/+55
| | | | | | | SelectionDAGBuilder::getValue into a helper function, with fixes to use DenseMaps safely. llvm-svn: 107371
* Don't use operator[] here, because it's not desirable to insert a defaultDan Gohman2010-07-011-2/+5
| | | | | | value if the search fails. llvm-svn: 107368
* grammar tweak in comment.Jim Grosbach2010-06-301-1/+1
| | | | llvm-svn: 107321
* Remove an unused variable. The call to getRoot has side-effects, soDuncan Sands2010-06-301-1/+0
| | | | | | this could break something (but doesn't seem to). llvm-svn: 107295
* use ArgOperand APIGabor Greif2010-06-301-10/+10
| | | | llvm-svn: 107282
* use ArgOperand APIGabor Greif2010-06-301-6/+6
| | | | llvm-svn: 107279
* Add a VT argument to getMinimalPhysRegClass and replace the copy related usesRafael Espindola2010-06-294-7/+7
| | | | | | | | | of getPhysicalRegisterRegClass with it. If we want to make a copy (or estimate its cost), it is better to use the smallest class as more efficient operations might be possible. llvm-svn: 107140
* Remove initialized but otherwise unused variables.Duncan Sands2010-06-291-2/+0
| | | | llvm-svn: 107127
* Unlike other targets, ARM now uses BUILD_VECTORs post-legalization so theyBob Wilson2010-06-281-1/+2
| | | | | | | can't be changed arbitrarily by the DAGCombiner without checking if it is running after legalization. llvm-svn: 107097
* In asm's, output operands with matching input constraintsDale Johannesen2010-06-281-2/+7
| | | | | | | | have to be registers, per gcc documentation. This affects the logic for determining what "g" should lower to. PR 7393. A couple of existing testcases are affected. llvm-svn: 107079
* When splitting a VAARG, remember its alignment.Rafael Espindola2010-06-263-8/+28
| | | | | | This produces terrible but correct code. llvm-svn: 106952
* Change if-conversion block size limit checks to add some flexibility.Evan Cheng2010-06-251-2/+0
| | | | llvm-svn: 106901
* The hasMemory argument is irrelevant to how the argumentDale Johannesen2010-06-252-7/+5
| | | | | | | | | for an "i" constraint should get lowered; PR 6309. While this argument was passed around a lot, this is the only place it was used, so it goes away from a lot of other places. llvm-svn: 106893
* Remove variables which are assigned to but for which the valueDuncan Sands2010-06-254-11/+1
| | | | | | is not used. Spotted by gcc-4.6. llvm-svn: 106854
* use ArgOperand APIGabor Greif2010-06-251-140/+140
| | | | llvm-svn: 106836
* use ArgOperand APIGabor Greif2010-06-251-1/+1
| | | | llvm-svn: 106828
* prune an includeGabor Greif2010-06-251-1/+0
| | | | llvm-svn: 106827
* It's possible that a flag is added to the SDNode that points back to theBill Wendling2010-06-241-11/+19
| | | | | | | original SDNode. This is badness. Also, this function allows one SDNode to point multiple flags to another SDNode. Badness as well. llvm-svn: 106793
* Simplify this code; switch lowering shouldn't produce casesDan Gohman2010-06-241-12/+4
| | | | | | which trivially fold away. llvm-svn: 106765
* Eliminate the other half of the BRCOND optimization, and updateDan Gohman2010-06-241-7/+0
| | | | | | as many tests as possible. llvm-svn: 106749
* Eliminate the first have of the optimization which eliminates BRCONDDan Gohman2010-06-241-3/+1
| | | | | | | | | | | | | when the condition is constant. This optimization shouldn't be necessary, because codegen shouldn't be able to find dead control paths that the IR-level optimizer can't find. And it's undesirable, because it encourages bugpoint to leave "br i1 false" branches in its output. And it wasn't updating the CFG. I updated all the tests I could, but some tests are too reduced and I wasn't able to meaningfully preserve them. llvm-svn: 106748
* Reapply r106634, now that the bug it exposed is fixed.Dan Gohman2010-06-244-111/+50
| | | | llvm-svn: 106746
* Optimize the "bit test" code path for switch lowering in theDan Gohman2010-06-241-15/+27
| | | | | | case where the bit mask has exactly one bit. llvm-svn: 106716
* MorphNodeTo doesn't preserve the memory operands. Because we're morphing a nodeBill Wendling2010-06-231-0/+21
| | | | | | | into the same node, but with different non-memory operands, we need to replace the memory operands after it's finished morphing. llvm-svn: 106643
* Revert r106263, "Fold the ShrinkDemandedOps pass into the regular ↵Daniel Dunbar2010-06-234-50/+111
| | | | | | DAGCombiner pass,"... it was causing both 'file' (with clang) and 176.gcc (with llvm-gcc) to be miscompiled. llvm-svn: 106634
* Some targets don't require the fencing MEMBARRIER instructions surroundingJim Grosbach2010-06-232-0/+56
| | | | | | | | atomic intrinsics, either because the use locking instructions for the atomics, or because they perform the locking directly. Add support in the DAG combiner to fold away the fences. llvm-svn: 106630
* Use A.append(...) instead of A.insert(A.end(), ...) when A is aDan Gohman2010-06-213-5/+5
| | | | | | SmallVector, and other SmallVector simplifications. llvm-svn: 106452
* Revert r106422, which is breaking the non-fast-isel path.Dan Gohman2010-06-212-51/+11
| | | | llvm-svn: 106423
* More changes for non-top-down fast-isel.Dan Gohman2010-06-212-11/+51
| | | | | | | | | | Split the code for materializing a value out of SelectionDAGBuilder::getValue into a helper function, so that it can be used in other ways. Add a new getNonRegisterValue function which uses it, for use in code which doesn't want a CopyFromReg even when FuncMap.ValueMap already has an entry for it. llvm-svn: 106422
* Do one lookup instead of two.Dan Gohman2010-06-211-2/+3
| | | | llvm-svn: 106415
* Generalize this to look in the regular ValueMap in addition toDan Gohman2010-06-211-1/+1
| | | | | | | the LocalValueMap, to make it more flexible when fast-isel isn't proceding straight top-down. llvm-svn: 106414
* Teach regular and fast isel to set dead flags on unused implicit defsDan Gohman2010-06-182-0/+28
| | | | | | on calls and similar instructions. llvm-svn: 106353
* back-end libcall handling for ATOMIC_SWAP (__sync_lock_test_and_set)Jim Grosbach2010-06-182-0/+13
| | | | llvm-svn: 106342
* Fix cross initialization compilation error.Evan Cheng2010-06-181-1/+2
| | | | llvm-svn: 106324
* Add Expand-to-libcall support for additional atomics. This covers the usualJim Grosbach2010-06-182-4/+152
| | | | | | | | | | entries used by llvm-gcc. *_[U]MIN and such can be added later if needed. This enables the front ends to simplify handling of the atomic intrinsics by removing the target-specific decision about which targets can handle the intrinsics. llvm-svn: 106321
* Minor code simplifications.Dan Gohman2010-06-181-18/+12
| | | | llvm-svn: 106286
* Give NamedRegionTimer an Enabled flag, allowing all its clients toDan Gohman2010-06-181-48/+28
| | | | | | | | | | | | | | | | | | | | switch from this: if (TimePassesIsEnabled) { NamedRegionTimer T(Name, GroupName); do_something(); } else { do_something(); // duplicate the code, this time without a timer! } to this: { NamedRegionTimer T(Name, GroupName, TimePassesIsEnabled); do_something(); } llvm-svn: 106285
* Don't replace the old Ordering object with a new one; just clear()Dan Gohman2010-06-181-2/+1
| | | | | | the old one. llvm-svn: 106284
* Don't call clear() on DbgInfo when it's going to be deleted anyway.Dan Gohman2010-06-181-3/+0
| | | | | | | Don't replace the old DbgInfo with a new one when clear() on the old one is sufficient. llvm-svn: 106283
* Change UpdateNodeOperands' operand and return value from SDValue toDan Gohman2010-06-187-84/+97
| | | | | | SDNode *, since it doesn't care about the ResNo value. llvm-svn: 106282
* Eliminate unnecessary uses of getZExtValue().Dan Gohman2010-06-182-3/+3
| | | | llvm-svn: 106279
* isValueValidForType can be a static member function.Dan Gohman2010-06-181-1/+1
| | | | llvm-svn: 106278
* Fold the ShrinkDemandedOps pass into the regular DAGCombiner pass,Dan Gohman2010-06-184-111/+50
| | | | | | which is faster, simpler, and less surprising. llvm-svn: 106263
* Handle ext(ext(x)) -> ext(x) immediately, since it's simple.Dan Gohman2010-06-181-1/+2
| | | | llvm-svn: 106256
* Add a DebugLoc parameter to TargetInstrInfo::InsertBranch(). ThisStuart Hastings2010-06-171-3/+3
| | | | | | | | | | | | addresses a longstanding deficiency noted in many FIXMEs scattered across all the targets. This effectively moves the problem up one level, replacing eleven FIXMEs in the targets with eight FIXMEs in CodeGen, plus one path through FastISel where we actually supply a DebugLoc, fixing Radar 7421831. llvm-svn: 106243
* add missing break. inconsequential as the code shouldn't be reached, butJim Grosbach2010-06-171-0/+1
| | | | | | for correctness' sake, it should be there. llvm-svn: 106229
* Add entries for Expanding atomic intrinsics to libcalls. Just a placeholderJim Grosbach2010-06-171-0/+19
| | | | | | | | | | | | | | for the moment. The implementation of the libcall will follow. Currently, the llvm-gcc knows when the intrinsics can be correctly handled by the back end and only generates them in those cases, issuing libcalls directly otherwise. That's too much coupling. The intrinsics should always be generated and the back end decide how to handle them, be it with a libcall, inline code, or whatever. This patch is a step in that direction. rdar://8097623 llvm-svn: 106227
* ISD::MEMBARRIER should lower to a libcall (__sync_synchronize) if the targetJim Grosbach2010-06-171-1/+13
| | | | | | sets the legalize action to Expand. llvm-svn: 106203
OpenPOWER on IntegriCloud