summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
Commit message (Collapse)AuthorAgeFilesLines
* Add a new wrapper node for a DILexicalBlock that encapsulates it and aEric Christopher2011-10-112-1/+43
| | | | | | | | | | | | | file. Since it should only be used when necessary propagate it through the backend code generation and tweak testcases accordingly. This helps with code like in clang's test/CodeGen/debug-info-line.c where we have multiple #line directives within a single lexical block and want to generate only a single block that contains each file change. Part of rdar://10246360 llvm-svn: 141729
* Move replaceCongruentIVs into SCEVExapander and bias toward "expanded"Andrew Trick2011-10-111-0/+100
| | | | | | | | | | | IVs. Indvars previously chose randomly between congruent IVs. Now it will bias the decision toward IVs that SCEVExpander likes to create. This was not done to fix any problem, it's just a welcome side effect of factoring code. llvm-svn: 141633
* Add an extra safety check in front of the optimization in r141442.Andrew Trick2011-10-081-0/+9
| | | | llvm-svn: 141470
* LSR should only reuse phis that match its formula.Andrew Trick2011-10-071-61/+113
| | | | | | Fixes rdar://problem/5064068 llvm-svn: 141442
* Remove the old atomic instrinsics. autoupgrade functionality is included ↵Eli Friedman2011-10-061-20/+0
| | | | | | with this patch. llvm-svn: 141333
* Fixes PR11070 - assert in SCEV getConstantEvolvingPHIOperands.Andrew Trick2011-10-051-16/+10
| | | | llvm-svn: 141219
* Typo. Thanks Bob.Andrew Trick2011-10-051-1/+1
| | | | llvm-svn: 141188
* Fix a broken assert found by -Wparentheses.Chandler Carruth2011-10-051-1/+1
| | | | llvm-svn: 141168
* Fix disabled SCEV analysis caused r141161 and add unit test.Andrew Trick2011-10-051-17/+32
| | | | | | | | I noticed during self-review that my previous checkin disabled some analysis. Even with the reenabled analysis the test case runs in about 5ms. Without the fix, it will take several minutes at least. llvm-svn: 141164
* Avoid exponential recursion in SCEV getConstantEvolvingPHI and ↵Andrew Trick2011-10-051-34/+82
| | | | | | | | | | EvaluateExpression. Note to compiler writers: never recurse on multiple instruction operands without memoization. Fixes rdar://10187945. Was taking 45s, now taking 5ms. llvm-svn: 141161
* The product of two chrec's can always be represented as a chrec.Nick Lewycky2011-10-041-32/+72
| | | | llvm-svn: 141066
* Reapply r140979 with fix! We never did get a testcase, but careful review of theNick Lewycky2011-10-031-4/+15
| | | | | | logic by David Meyer revealed this bug. llvm-svn: 140992
* Revert r140979 due to reports of bootstrap failure.Nick Lewycky2011-10-031-8/+4
| | | | llvm-svn: 140980
* Add one more case we compute a max trip count.Nick Lewycky2011-10-031-4/+8
| | | | llvm-svn: 140979
* Inlining and unrolling heuristics should be aware of free truncs.Andrew Trick2011-10-011-12/+20
| | | | | | | | | | We want heuristics to be based on accurate data, but more importantly we don't want llvm to behave randomly. A benign trunc inserted by an upstream pass should not cause a wild swings in optimization level. See PR11034. It's a general problem with threshold-based heuristics, but we can make it less bad. llvm-svn: 140919
* whitespaceAndrew Trick2011-10-011-46/+46
| | | | llvm-svn: 140916
* indvars: generalize SCEV getPreStartForSignExtend.Andrew Trick2011-09-281-2/+14
| | | | | | | Handle general Add expressions to avoid leaving around redundant 32-bit IVs. llvm-svn: 140701
* PR10628: Fix getModRefInfo so it queries the underlying alias() ↵Eli Friedman2011-09-281-1/+1
| | | | | | implementation correctly while checking nocapture calls. llvm-svn: 140666
* Stop emitting instructions with the name "tmp" they eat up memory and have ↵Benjamin Kramer2011-09-271-7/+7
| | | | | | | | to be uniqued, without any benefit. If someone prefers %tmp42 to %42, run instnamer. llvm-svn: 140634
* Enhance alias analysis for atomic instructions a bit. Upgrade a couple ↵Eli Friedman2011-09-261-0/+40
| | | | | | alias-analysis tests to the new atomic instructions. llvm-svn: 140557
* Fix for DbgInfoPrinter.cpp:174:12: warning: ‘LineNo’ may be used ↵Galina Kistanova2011-09-211-1/+1
| | | | | | uninitialized in this function. llvm-svn: 140281
* Add support to emit debug info for C++0x nullptr type.Devang Patel2011-09-142-1/+28
| | | | llvm-svn: 139751
* Fix typo.Eric Christopher2011-09-121-1/+1
| | | | llvm-svn: 139530
* Add asserts to keep front-ends honest while encoding debug info into LLVM IR ↵Devang Patel2011-09-121-0/+9
| | | | | | using DIBuilder. llvm-svn: 139515
* Set NSW/NUW flags on SCEVAddExpr when the operation is flagged asAndrew Trick2011-09-101-1/+7
| | | | | | | | | | such. I'm doing this now for completeness because I can't think of/remember any reason that it was left out. I'm not sure it will help anything, but if we don't do it we need to explain why in comments. llvm-svn: 139450
* A couple minor corrections to r139276.Eli Friedman2011-09-081-14/+14
| | | | llvm-svn: 139277
* Fix the logic in BasicAliasAnalysis::aliasGEP for comparing GEP's with ↵Eli Friedman2011-09-081-33/+33
| | | | | | variable differences so that it actually does something sane. Fixes PR10881. llvm-svn: 139276
* memset_pattern16 uses a 16 BYTE pattern, not a 16 BIT pattern. Add comments ↵Owen Anderson2011-09-061-2/+4
| | | | | | to that effect. llvm-svn: 139205
* Teach BasicAA about the aliasing properties of memset_pattern16.Owen Anderson2011-09-061-1/+40
| | | | | | Fixes PR10872 and <rdar://problem/10065079>. llvm-svn: 139204
* This transform only handles two-operand AddRec's. Prevent it from trying toNick Lewycky2011-09-061-13/+23
| | | | | | handle anything more complex. Fixes PR10383 again! llvm-svn: 139186
* Now, named mdnode llvm.dbg.cu keeps track of all compile units in a module. ↵Devang Patel2011-09-061-6/+12
| | | | | | Update DebugInfoFinder to collect compile units from llvm.dbg.cu. llvm-svn: 139147
* 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
OpenPOWER on IntegriCloud