summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix lint's memcpy and memmove checks, and its basic block traversal.Dan Gohman2010-05-281-5/+8
| | | | llvm-svn: 104970
* Detect self-referential values.Dan Gohman2010-05-281-6/+19
| | | | llvm-svn: 104957
* Revert 104841, 104842, 104876 due to buildbot failures. Radar 7424645.Stuart Hastings2010-05-281-0/+12
| | | | llvm-svn: 104953
* Eli pointed out that va_arg instruction result values don'tDan Gohman2010-05-281-4/+4
| | | | | | reference the stack. llvm-svn: 104951
* Teach lint how to look through simple store+load pairs and otherDan Gohman2010-05-281-10/+75
| | | | | | | effective no-op constructs, to make it more effective on unoptimized IR. llvm-svn: 104950
* Move FindAvailableLoadedValue isSafeToLoadUnconditionally out ofDan Gohman2010-05-282-0/+236
| | | | | | | lib/Transforms/Utils and into lib/Analysis so that Analysis passes can use them. llvm-svn: 104949
* ConstantFoldConstantExpression can theoretically return null.Dan Gohman2010-05-281-4/+8
| | | | llvm-svn: 104948
* Add a lint check for returning the address of stack memory.Dan Gohman2010-05-281-0/+6
| | | | llvm-svn: 104936
* Support for nested functions/classes in debug output. Radar 7424645.Stuart Hastings2010-05-271-12/+0
| | | | llvm-svn: 104841
* Avoid counting InlineAsm as a call - it prevents loop unrolling.Jakob Stoklund Olesen2010-05-261-1/+5
| | | | | | | PR7026 Patch by Pekka Jääskeläinen! llvm-svn: 104780
* Fix Lint printing warnings multiple times. Remove the ErrorStrDan Gohman2010-05-261-5/+2
| | | | | | | option from lintModule, which was an artifact from being based on Verifier code. llvm-svn: 104765
* Reinstate checking of stackrestore, with checking for both ReadDan Gohman2010-05-261-0/+8
| | | | | | and Write, and add a comment explaining this. llvm-svn: 104756
* Stackrestore is not a load.Dan Gohman2010-05-261-5/+0
| | | | llvm-svn: 104752
* Remove a TODO which isn't practical.Dan Gohman2010-05-261-1/+0
| | | | llvm-svn: 104748
* Implement checking of the tail keyword.Dan Gohman2010-05-261-1/+9
| | | | llvm-svn: 104744
* Rename variable. add comment.Devang Patel2010-05-201-2/+5
| | | | llvm-svn: 104274
* Add support to preserve type info for the variables that are removed by the ↵Devang Patel2010-05-141-2/+7
| | | | | | optimizer. llvm-svn: 103798
* Clear CachedFunctionInfo upon Pass::releaseMemory. Because ValueMap will abortNick Lewycky2010-05-121-1/+6
| | | | | | | | | | on RAUW of functions, this is a correctness issue instead of a mere memory usage problem. No testcase until the new MergeFunctions can land. llvm-svn: 103653
* Fix whitespace in debug output to be consistent.Dan Gohman2010-05-101-1/+1
| | | | llvm-svn: 103422
* Remove DIGlobal.Devang Patel2010-05-071-20/+8
| | | | llvm-svn: 103325
* Add DINameSpace::Verify().Devang Patel2010-05-071-0/+11
| | | | llvm-svn: 103318
* Verify variable directly.Devang Patel2010-05-071-36/+0
| | | | llvm-svn: 103305
* Verify compile unit also.Devang Patel2010-05-071-0/+3
| | | | llvm-svn: 103300
* Wrap const MDNode * inside DIDescriptor.Devang Patel2010-05-071-10/+12
| | | | llvm-svn: 103295
* Use overloaded operators instead of DIDescriptor::getNode()Devang Patel2010-05-071-1/+1
| | | | llvm-svn: 103276
* Avoid DIDescriptor::getNode(). Use overloaded operators instead.Devang Patel2010-05-071-83/+83
| | | | llvm-svn: 103272
* Add some words to this output to indicate what the numbers mean.Dan Gohman2010-05-071-4/+4
| | | | llvm-svn: 103264
* Add a simple module-level debug info printer. It just sets up aDan Gohman2010-05-072-0/+87
| | | | | | DebugInfoFinder and iterates over all the contents calling print. llvm-svn: 103262
* Fix the new print functions to call print instead of dump.Dan Gohman2010-05-071-11/+11
| | | | llvm-svn: 103261
* Convert the DebugInfo classes dump() methods into print(raw_ostream &)Dan Gohman2010-05-071-52/+102
| | | | | | methods, and add dump functions implemented in terms of the print. llvm-svn: 103254
* Use the SCEVAddRecExpr::getPostIncExpr utility function insteadDan Gohman2010-05-041-4/+2
| | | | | | of doing the same thing manually. llvm-svn: 102997
* Fix a copy+pasto.Dan Gohman2010-05-041-2/+2
| | | | llvm-svn: 102996
* Do not ignore debug loc attached with llvm.dbg.declare while collecting ↵Devang Patel2010-05-041-3/+1
| | | | | | debug info used by a module. llvm-svn: 102995
* Use getConstant instead of getIntegerSCEV. The two are basically theDan Gohman2010-05-032-26/+26
| | | | | | same, now that getConstant has overloads consistent with ConstantInt::get. llvm-svn: 102965
* Silence warnings about -1 being converted to an unsigned value.Dan Gohman2010-05-031-6/+6
| | | | | | | | Also, pass true for isSigned even when creating constants for unsigned comparisons, because the point is to create an all-ones constant, rather than UINT64_MAX, even for integers wider than 64 bits. llvm-svn: 102946
* Use isTrueWhenEqual and isFalseWhenEqual instead of assuming thatDan Gohman2010-05-031-2/+2
| | | | | | | | SimplifyICmpOperands will simplify such cases to EQ or NE. This makes the correcntess of the code independent on SimplifyICmpOperands doing certain simplifications. llvm-svn: 102927
* In ScalarEvolution::print, don't bother printing out the SCEVs forDan Gohman2010-05-031-1/+1
| | | | | | | comparison instructions, since they aren't interesting, despite having integer result types. llvm-svn: 102925
* In SimplifyICmpOperands, avoid needlessly swapping the operands in theDan Gohman2010-05-031-3/+6
| | | | | | case where both are addrecs in unrelated loops. llvm-svn: 102924
* Factor out the new <= and >= analysis code into SimplifyICmpOperands.Dan Gohman2010-05-031-51/+62
| | | | llvm-svn: 102922
* Added a variant of InlineCostAnalyzer::getInlineCost() that takes the called ↵David Chisnall2010-05-011-3/+9
| | | | | | function as an explicit argument, for use when inlining function pointers. llvm-svn: 102841
* fix PR5009 by making CGSCCPM realize that a call was devirtualizedChris Lattner2010-05-011-5/+36
| | | | | | | if an indirect call site was removed and a direct one was added, not just if an indirect call site was modified to be direct. llvm-svn: 102830
* Implement rdar://6295824 and PR6724 with two tiny changesChris Lattner2010-05-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that can have a big effect :). The first is to enable the iterative SCC passmanager juice that kicks in when the scc passmgr detects that a function pass has devirtualized a call. In this case, it will rerun all the passes it manages on the SCC, up to the iteration count limit (4). This is useful because a function pass may devirualize a call, and we want the inliner to inline it, or pruneeh to infer stuff about it, etc. The second patch is to add *all* call sites to the DevirtualizedCalls list the inliner uses. This list is about to get renamed, but the jist of this is that the inliner now reconsiders *all* inlined call sites as candidates for further inlining. The intuition is this that in cases like this: f() { g(1); } g(int x) { h(x); } We analyze this bottom up, and may decide that it isn't profitable to inline H into G. Next step, we decide that it is profitable to inline G into F, and do so, which means that F now calls H. Even though the call from G -> H may not have been profitable to inline, the call from F -> H may be (in this case because a constant allows folding etc). In my spot checks, this doesn't have a big impact on code. For example, the LLC output for 252.eon grew from 0.02% (from 317252 to 317308) and 176.gcc actually shrunk by .3% (from 1525612 to 1520964 bytes). 252.eon never iterated in the SCC Passmgr, 176.gcc iterated at most 1 time. llvm-svn: 102823
* Dan recently disabled recursive inlining within a function, but weChris Lattner2010-04-301-1/+9
| | | | | | | | | | | | | | | | | | were still inlining self-recursive functions into other functions. Inlining a recursive function into itself has the potential to reduce recursion depth by a factor of 2, inlining a recursive function into something else reduces recursion depth by exactly 1. Since inlining a recursive function into something else is a weird form of loop peeling, turn this off. The deleted testcase was added by Dale in r62107, since then we're leaning towards not inlining recursive stuff ever. In any case, if we like inlining recursive stuff, it should be done within the recursive function itself to get the algorithm recursion depth win. llvm-svn: 102798
* Attach AT_APPLE_optimized attribute to optimized function's debug info.Devang Patel2010-04-301-5/+15
| | | | llvm-svn: 102743
* Set isSigned to true when creating an all-ones integer constant, evenDan Gohman2010-04-301-4/+4
| | | | | | | for unsigned purposes, so >64-bit integer values get a full all-ones value. llvm-svn: 102739
* Silence compiler warnings.Dan Gohman2010-04-301-4/+4
| | | | llvm-svn: 102734
* Add lint checks for invalid uses of memory.Dan Gohman2010-04-301-19/+59
| | | | llvm-svn: 102733
* Refactor.Devang Patel2010-04-291-0/+11
| | | | llvm-svn: 102661
* When checking whether the special handling for an addrec increment whichDan Gohman2010-04-262-3/+2
| | | | | | | | | doesn't dominate the header is needed, don't check whether the increment expression has computable loop evolution. While the operands of an addrec are required to be loop-invariant, they're not required to dominate any part of the loop. This fixes PR6914. llvm-svn: 102389
* ScalarEvolution support for <= and >= loops.Dan Gohman2010-04-241-20/+107
| | | | | | | Also, generalize ScalarEvolutions's min and max recognition to handle some new forms of min and max that this change makes more common. llvm-svn: 102234
OpenPOWER on IntegriCloud