aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* Partial specialization was not checking the callsite to make sure it was ↵Kenneth Uildriks2010-06-051-9/+33
| | | | | | using the same constants as the specialization, leading to calls to the wrong specialization. Patch by Takumi Nakamura\! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105528 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't track users of undef values; they aren't interesting forDan Gohman2010-06-041-1/+5
| | | | | | | register pressure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105501 91177308-0d34-0410-b5e6-96231b3b80d8
* Copy location info for current function argument from dbg.declare if ↵Devang Patel2010-06-041-4/+2
| | | | | | respective store instruction does not have any location info. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105490 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused codeJim Grosbach2010-06-011-64/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105293 91177308-0d34-0410-b5e6-96231b3b80d8
* fix think-oJim Grosbach2010-06-011-6/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105291 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify things a bit more. Fix prototype to use SmallVectorImpl andJim Grosbach2010-06-011-17/+17
| | | | | | change a few SmallVectors to vanilla C arrays. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105289 91177308-0d34-0410-b5e6-96231b3b80d8
* mirror of r105280 changes for LowerInvoke, which uses the same basic logic hereJim Grosbach2010-06-011-10/+27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105281 91177308-0d34-0410-b5e6-96231b3b80d8
* Use SmallVector instead of std::vector.Jim Grosbach2010-06-011-12/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105279 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR7272: when inlining through a callsite with byval arguments,Duncan Sands2010-05-311-0/+4
| | | | | | | | the newly created allocas may be used by inlined calls, so these need to have their tail call flags cleared. Fixes PR7272. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105255 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid swap when a copy suffices.Benjamin Kramer2010-05-311-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105220 91177308-0d34-0410-b5e6-96231b3b80d8
* The memcpy intrinsic only takes i8* for %src and %dst, so cast them to thatNick Lewycky2010-05-311-2/+2
| | | | | | | first. Fixes PR7265. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105206 91177308-0d34-0410-b5e6-96231b3b80d8
* Move FindAvailableLoadedValue isSafeToLoadUnconditionally out ofDan Gohman2010-05-286-223/+4
| | | | | | | | lib/Transforms/Utils and into lib/Analysis so that Analysis passes can use them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104949 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach instcombine to promote alloca array sizes.Dan Gohman2010-05-281-0/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104945 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix instcombine's handling of alloca to accept non-i32 types.Dan Gohman2010-05-281-8/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104935 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo.Devang Patel2010-05-281-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104914 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo.Devang Patel2010-05-281-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104913 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not drop location info for inlined function args.Devang Patel2010-05-271-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104884 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach instCombine to remove malloc+free if malloc's only uses are comparisonsDuncan Sands2010-05-274-46/+49
| | | | | | | to null. Patch by Matti Niemenmaa. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104871 91177308-0d34-0410-b5e6-96231b3b80d8
* Kill unneeded SExt.Benjamin Kramer2010-05-261-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104692 91177308-0d34-0410-b5e6-96231b3b80d8
* Properly promote operands when optimizing a single-character memcmp.Benjamin Kramer2010-05-251-3/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104648 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a missing newline in debug output.Dan Gohman2010-05-251-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104644 91177308-0d34-0410-b5e6-96231b3b80d8
* DominatorTree.getNode can return null for unreachable blocks.Dan Gohman2010-05-201-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104290 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor code cleanups.Dan Gohman2010-05-201-8/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104287 91177308-0d34-0410-b5e6-96231b3b80d8
* Make Solve check its own post-condition, to reduce clutter in theDan Gohman2010-05-201-1/+2
| | | | | | | top-level LSRInstance logic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104278 91177308-0d34-0410-b5e6-96231b3b80d8
* Add comments.Dan Gohman2010-05-201-0/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104276 91177308-0d34-0410-b5e6-96231b3b80d8
* More code cleanups. Use iterators instead of indices when indicesDan Gohman2010-05-201-22/+24
| | | | | | | aren't needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104273 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix OptimizeShadowIV to set Changed. Change OptimizeLoopTermCond to setDan Gohman2010-05-201-8/+7
| | | | | | | | | | Changed directly instead of using a return value. Rename FilterOutUndesirableDedicatedRegisters's Changed variable to distinguish it from LSRInstance's Changed member. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104269 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some comments.Dan Gohman2010-05-201-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104268 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify this code. Don't do a DomTreeNode lookup for each visited block.Dan Gohman2010-05-201-14/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104267 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor code cleanups.Dan Gohman2010-05-201-20/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104263 91177308-0d34-0410-b5e6-96231b3b80d8
* When canonicalizing icmp operand order to put the loop invariantDan Gohman2010-05-201-0/+1
| | | | | | | | | | | | | operand on the left, the interesting operand is on the right. This fixes a bug where LSR was failing to recognize ICmpZero uses, which led it to be unable to reverse the induction variable in the attached testcase. Delete test/CodeGen/X86/stack-color-with-reg-2.ll, because its test is extremely fragile and hard to meaningfully update. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104262 91177308-0d34-0410-b5e6-96231b3b80d8
* Set Changed to true when canonicalizing ICmp operand order; even thoughDan Gohman2010-05-201-0/+1
| | | | | | | it isn't a very interesting change, it's a change nonetheless. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104260 91177308-0d34-0410-b5e6-96231b3b80d8
* Strip llvm.dbg.lv also.Devang Patel2010-05-201-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104236 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename a variable to avoid shadowing.Dan Gohman2010-05-201-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104234 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor code simplification.Dan Gohman2010-05-201-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104232 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the code for deleting BaseRegs and LSRUses into helper functions,Dan Gohman2010-05-201-5/+22
| | | | | | | | and fix a bug that valgrind noticed where the code would std::swap an element with itself. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104225 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach LSR how to cope better with unrolled loops on targets whereDan Gohman2010-05-191-3/+191
| | | | | | | | | the addressing modes don't make this trivially easy. This allows it to avoid falling into the less precise heuristics in more cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104186 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a comment.Dan Gohman2010-05-181-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104089 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the predicate which checks for non-sensical formulae which haveDan Gohman2010-05-181-4/+5
| | | | | | | constants in registers which partially cancel out their immediate fields. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104088 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out the code for recomputing an LSRUse's Regs set after someDan Gohman2010-05-181-17/+40
| | | | | | | | of its formulae have been removed into a helper function, and also teach it how to update the RegUseTracker. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104087 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out code for estimating search space complexity into a helperDan Gohman2010-05-181-22/+26
| | | | | | | function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104082 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some more debug output.Dan Gohman2010-05-181-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104080 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out the code for deleting a formula from an LSRUse intoDan Gohman2010-05-181-4/+9
| | | | | | | a helper function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104079 91177308-0d34-0410-b5e6-96231b3b80d8
* Make some debug output more informative.Dan Gohman2010-05-181-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104078 91177308-0d34-0410-b5e6-96231b3b80d8
* Print an error message in Formula::print if the HasBaseReg flagDan Gohman2010-05-181-0/+7
| | | | | | | | is inconsistent with the BaseRegs field. It's not print's job to assert on an invalid condition, but it can make one more obvious. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104077 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename RegUseTracker's RegUses member to RegUsesMap to avoidDan Gohman2010-05-181-7/+7
| | | | | | | confusion with LSRInstance's RegUses member. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104076 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach the always inliner to release its inline cost estimates, like the basicNick Lewycky2010-05-151-0/+3
| | | | | | | | inliner did in r103653. Why does the always inliner even bother with cost estimates anyways? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103858 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up, no functional change.Nick Lewycky2010-05-151-9/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103857 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove heinous tabs.Nick Lewycky2010-05-131-7/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103700 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace the core comparison login in merge functions. We can now mergeNick Lewycky2010-05-131-192/+276
| | | | | | | | | | | | | | | | | | | | | | | | | | vector<>::push_back() in: int foo(vector<int> &a, vector<unsigned> &b) { a.push_back(10); b.push_back(11); } to two calls to the same push_back function, or fold away the two copies of push_back() in: struct T { int; }; struct S { char; }; vector<T*> t; vector<S*> s; void f(T *x) { t.push_back(x); } void g(S *x) { s.push_back(x); } but leave f() and g() separate, since they refer to two different global variables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103698 91177308-0d34-0410-b5e6-96231b3b80d8