summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix typo in comment again.Nick Lewycky2011-09-061-1/+1
| | | | llvm-svn: 139139
* Apparently we compile the code, not the comments. Thanks Eli!Nick Lewycky2011-09-061-2/+1
| | | | llvm-svn: 139138
* Fix typo in comment.Nick Lewycky2011-09-061-1/+1
| | | | llvm-svn: 139137
* Nope! I had it right the first time. Revert the operative part of r139135 andNick Lewycky2011-09-061-5/+8
| | | | | | add more showing of my work. llvm-svn: 139136
* Fix flipped sign. While there, show my math.Nick Lewycky2011-09-061-2/+9
| | | | llvm-svn: 139135
* No no no, fix typo properly!Nick Lewycky2011-09-061-2/+2
| | | | llvm-svn: 139134
* The logic inside getMulExpr to simplify {a,+,b}*{c,+,d} was wrong, which wasNick Lewycky2011-09-061-13/+20
| | | | | | | visible given a=b=c=d=1, on iteration #1 (the second iteration). Replace it with correct math. Fixes PR10383! llvm-svn: 139133
* Revert r139126 due to selfhost failures reported by buildbots.Nick Lewycky2011-09-061-6/+2
| | | | llvm-svn: 139130
* Teach SCEV to report a max backedge count in one interesting case inNick Lewycky2011-09-051-2/+6
| | | | | | HowFarToZero; the case for a canonical loop. llvm-svn: 139126
* InstSimplify: Don't try to replace an extractvalue/insertvalue pair with the ↵Benjamin Kramer2011-09-051-1/+2
| | | | | | | | original value if types don't match. Fixes clang selfhost. llvm-svn: 139120
* Add some simple insertvalue simplifications, for the purpose of cleaningDuncan Sands2011-09-051-0/+36
| | | | | | up do-nothing exception handling code produced by dragonegg. llvm-svn: 139113
* Use canonical forms for the branch probability zero heutistic.Benjamin Kramer2011-09-041-25/+30
| | | | | | | | - Drop support for X >u 0, it's equivalent to X != 0 and should be canonicalized into the latter. - Add X < 1 -> unlikely, which is what instcombine canonicalizes X <= 0 into. - Add X > -1 -> likely, which is what instcombine canonicalizes X >= 0 into. llvm-svn: 139110
* Comment and clarifying assert.Andrew Trick2011-09-021-0/+1
| | | | llvm-svn: 139036
* After r138010, subroutine type does not have context info. Update type ↵Devang Patel2011-08-311-0/+1
| | | | | | | | verifier accordingly. This fixes ptype.exp gdb testsuite regressions. llvm-svn: 138869
* Fixes following the CR by Chris and Duncan:Nadav Rotem2011-08-291-6/+0
| | | | | | | Optimize chained bitcasts of the form A->B->A. Undo r138722 and change isEliminableCastPair to allow this case. llvm-svn: 138756
* Reapply r138695. Fix PassManager stack depths.Andrew Trick2011-08-293-10/+10
| | | | | | Patch by Xiaoyi Guo! llvm-svn: 138737
* Bitcasts are transitive. Bitcast-Bitcast-X becomes Bitcast-X.Nadav Rotem2011-08-281-0/+6
| | | | llvm-svn: 138722
* Reverting r138695 to see if it fixes clang self host.Andrew Trick2011-08-273-10/+10
| | | | llvm-svn: 138701
* Fix PassManager stack depths.Andrew Trick2011-08-273-10/+10
| | | | | | Patch by Xiaoyi Guo! llvm-svn: 138695
* Whitespace and 80-col.Eric Christopher2011-08-261-40/+43
| | | | llvm-svn: 138654
* LoopInfo::updateUnloop fix, and verify Block->Loop maps.Andrew Trick2011-08-261-2/+13
| | | | | | Fixes an oversight, and adds verification to catch it in the unloop.ll tests. llvm-svn: 138622
* Skip the landingpad instruction when determining the insertion point.Bill Wendling2011-08-241-3/+7
| | | | llvm-svn: 138481
* Implement Constant::isAllOnesValue(). Fix ConstantFolding to use the new api.Nadav Rotem2011-08-241-10/+7
| | | | llvm-svn: 138469
* Revert "Address Duncan's CR request:"Eric Christopher2011-08-231-4/+9
| | | | | | | | | | This reverts commit 20a05be15ea5271ab6185b83200fa88263362400. (svn rev 138340) Conflicts: test/Transforms/InstCombine/bitcast.ll llvm-svn: 138366
* Address Duncan's CR request:Nadav Rotem2011-08-231-9/+4
| | | | | | | 1. Cleanup the tests in ConstantFolding.cpp 2. Implement isAllOnes for Constant, ConstantFP, ConstantVector llvm-svn: 138340
* Add constant folding support for bitcasts of splat vectors to integers.Nadav Rotem2011-08-201-2/+10
| | | | llvm-svn: 138206
* Do not use named md nodes to track variables that are completely optimized. ↵Devang Patel2011-08-192-14/+66
| | | | | | This does not scale while doing LTO with debug info. New approach is to include list of variables in the subprogram info directly. llvm-svn: 138145
* Make a bunch of symbols private.Benjamin Kramer2011-08-191-0/+2
| | | | llvm-svn: 138025
* C API functions must be able to see their extern "C" definitions, or it will ↵Benjamin Kramer2011-08-191-0/+1
| | | | | | be impossible to call them from C. llvm-svn: 138022
* There is no need to add file as context for subroutine type. The subroutine ↵Devang Patel2011-08-181-2/+2
| | | | | | type does not need any context. llvm-svn: 138010
* Revert r137655. There is some question about whether the 'landingpad'Bill Wendling2011-08-171-0/+3
| | | | | | instruction should be marked as potentially reading and/or writing memory. llvm-svn: 137863
* Revert r137781; I agree with Duncan's comment that the situation in question ↵Eli Friedman2011-08-171-5/+4
| | | | | | is clearly impossible given the current structure of the code. llvm-svn: 137853
* Extend the undef ^ undef idiom once more. No testcase: I can't figure out ↵Eli Friedman2011-08-161-4/+5
| | | | | | how to actually trigger the codepath in question at the moment, but it might get exposed in the future. llvm-svn: 137781
* Until now all debug info MDNodes referred to a root MDNode, a compile unit. ↵Devang Patel2011-08-162-71/+122
| | | | | | | | This simplified handling of these needs in dwarf writer. However, one side effect of this is that during link time optimization all these MDNodes are _not_ uniqued. In other words there will be N number of MDNodes describing "int", "char" and all other types, which would suddenly grow when each object file starts using libraries like STL. MDNodes graph structure such that compiler unit keeps track of important MDNodes and update dwarf writer to process mdnodes top-down instead of bottom up. llvm-svn: 137778
* Use the getFirstInsertionPt() method instead of getFirstNonPHI + an 'isa<>'Bill Wendling2011-08-161-5/+2
| | | | | | check for a LandingPadInst. llvm-svn: 137745
* A few places where we want to skip the landingpad instruction for insertion.Bill Wendling2011-08-161-1/+4
| | | | llvm-svn: 137712
* Add a finalize() hook, that'll let DIBuilder construct compile unit lazily.Devang Patel2011-08-151-0/+4
| | | | llvm-svn: 137673
* Add some comments here because the lack of a check for volatile/atomic here ↵Eli Friedman2011-08-151-0/+4
| | | | | | is a bit unusual. llvm-svn: 137662
* Duncan pointed out that the LandingPadInst might read memory. (It might alsoBill Wendling2011-08-151-3/+0
| | | | | | write to memory.) Marking it as such makes some checks for immobility go away. llvm-svn: 137655
* Misc analysis passes that need to be aware of atomic load/store.Eli Friedman2011-08-154-19/+50
| | | | llvm-svn: 137650
* Atomic load/store support in LICM.Eli Friedman2011-08-151-4/+8
| | | | llvm-svn: 137648
* The landingpad instruction isn't loop-invariant.Bill Wendling2011-08-151-0/+3
| | | | llvm-svn: 137628
* Refactor. Global variables are part of compile unit so let CompileUnit ↵Devang Patel2011-08-151-0/+30
| | | | | | create new global variable. llvm-svn: 137621
* Silence a bunch (but not all) "variable written but not read" warningsDuncan Sands2011-08-122-4/+5
| | | | | | when building with assertions disabled. llvm-svn: 137460
* Allow loop unrolling to get known trip counts from ScalarEvolution.Andrew Trick2011-08-111-0/+57
| | | | | | | | | | | | | SCEV unrolling can unroll loops with arbitrary induction variables. It is a prerequisite for -disable-iv-rewrite performance. It is also easily handles loops of arbitrary structure including multiple exits and is generally more robust. This is under a temporary option to avoid affecting default behavior for the next couple of weeks. It is needed so that I can checkin unit tests for updateUnloop. llvm-svn: 137384
* Fix for LoopInfo::updateUnloop. Remove subloop blocks from formerAndrew Trick2011-08-111-16/+29
| | | | | | | | | ancestor loops. I have a unit test that depends on scev-unroll, which unfortunately isn't checked in. But I will check it in when I can. llvm-svn: 137341
* Cleanup. Another thorough review by Nick!Andrew Trick2011-08-111-6/+6
| | | | llvm-svn: 137317
* Reapplying r136844.Andrew Trick2011-08-102-50/+250
| | | | | | | | | | | | | | | | | | | | An algorithm for incrementally updating LoopInfo within a LoopPassManager. The incremental update should be extremely cheap in most cases and can be used in places where it's not feasible to regenerate the entire loop forest. - "Unloop" is a node in the loop tree whose last backedge has been removed. - Perform reverse dataflow on the block inside Unloop to propagate the nearest loop from the block's successors. - For reducible CFG, each block in unloop is visited exactly once. This is because unloop no longer has a backedge and blocks within subloops don't change parents. - Immediate subloops are summarized by the nearest loop reachable from their exits or exits within nested subloops. - At completion the unloop blocks each have a new parent loop, and each immediate subloop has a new parent. llvm-svn: 137276
* Distinguish between two copies of one inlined variable. Take 2.Devang Patel2011-08-101-0/+11
| | | | llvm-svn: 137253
* Cleanup. Added LoopBlocksDFS::perform for simple clients.Andrew Trick2011-08-101-0/+13
| | | | llvm-svn: 137195
OpenPOWER on IntegriCloud