summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
Commit message (Collapse)AuthorAgeFilesLines
...
* Simplify this code.Dan Gohman2010-03-181-16/+8
| | | | llvm-svn: 98853
* Define placement new wrappers for BumpPtrAllocator andDan Gohman2010-03-182-24/+21
| | | | | | | RecyclingAllocator to allow client code to be simpler, and simplify several clients. llvm-svn: 98847
* Add the ability to "intern" FoldingSetNodeID data into aDan Gohman2010-03-181-16/+16
| | | | | | | | | | | | BumpPtrAllocator-allocated region to allow it to be stored in a more compact form and to avoid the need for a non-trivial destructor call. Use this new mechanism in ScalarEvolution instead of FastFoldingSetNode to avoid leaking memory in the case where a FoldingSetNodeID uses heap storage, and to reduce overall memory usage. llvm-svn: 98829
* Reapply r98755 with a thinko which miscompiled gengtype fixed.Dan Gohman2010-03-182-34/+35
| | | | llvm-svn: 98793
* Revert 98755, which may be causing trouble.Dan Gohman2010-03-172-35/+34
| | | | llvm-svn: 98762
* Change SCEVNAryExpr's operand array from a SmallVector to a plainDan Gohman2010-03-172-34/+35
| | | | | | | | | | pointer and length, and allocate the arrays in ScalarEvolution's BumpPtrAllocator, so that they get released when their owning SCEV gets released. SCEVs are immutable, so they don't need to worry about operand array resizing. This fixes a memory leak reported in PR6637. llvm-svn: 98755
* Treat copysignl like the other copysign functions.Duncan Sands2010-03-151-1/+1
| | | | llvm-svn: 98542
* Fix a typo in ValueTracking that's causing instcombine to delete needed ↵Evan Cheng2010-03-131-1/+1
| | | | | | shift instructions. llvm-svn: 98416
* Do not ignore arg_size() impact while counting bb instructions.Devang Patel2010-03-131-3/+2
| | | | llvm-svn: 98408
* Remove extra parameter.Devang Patel2010-03-131-5/+4
| | | | llvm-svn: 98403
* Do not overestimate code size reduction in presense of debug info.Devang Patel2010-03-131-6/+11
| | | | | | Use CodeMetrics.analyzeBasicBlock() to estimate BB size. llvm-svn: 98401
* When constant folding GEP of GEP, do not crash if an index ofDuncan Sands2010-03-121-1/+13
| | | | | | the inner GEP is not a ConstantInt. llvm-svn: 98359
* Add a DominatorTree argument to isLCSSA so that it doesn't have toDan Gohman2010-03-101-9/+2
| | | | | | | compute a set of reachable blocks for itself each time it is called, which is fairly frequently. llvm-svn: 98179
* Constant-fold GEP-of-GEP into a single GEP.Dan Gohman2010-03-101-0/+11
| | | | llvm-svn: 98178
* Avoid analyzing instructions in blocks not reachable from the entry block.Dan Gohman2010-03-091-2/+9
| | | | | | They are lots of trouble, and they don't matter. This fixes PR6559. llvm-svn: 98103
* Try to keep the cached inliner costs around for a bit longer for big functions.Jakob Stoklund Olesen2010-03-091-0/+42
| | | | | | | | | | | | | | | The Caller cost info would be reset everytime a callee was inlined. If the caller has lots of calls and there is some mutual recursion going on, the caller cost info could be calculated many times. This patch reduces inliner runtime from 240s to 0.5s for a function with 20000 small function calls. This is a more conservative version of r98089 that doesn't break the clang test CodeGenCXX/temp-order.cpp. That test relies on rather extreme inlining for constant folding. llvm-svn: 98099
* Revert r98089, it was breaking a clang test.Jakob Stoklund Olesen2010-03-091-36/+0
| | | | llvm-svn: 98094
* Try to keep the cached inliner costs around for a bit longer for big functions.Jakob Stoklund Olesen2010-03-091-0/+36
| | | | | | | | | | | The Caller cost info would be reset everytime a callee was inlined. If the caller has lots of calls and there is some mutual recursion going on, the caller cost info could be calculated many times. This patch reduces inliner runtime from 240s to 0.5s for a function with 20000 small function calls. llvm-svn: 98089
* Permit inlining into huge functions. This heuristic is ancient, and inliningJakob Stoklund Olesen2010-03-091-5/+0
| | | | | | can sometimes help reduce function size. llvm-svn: 98088
* Make isLCSSA ignore uses in blocks not reachable from the entry block,Dan Gohman2010-03-091-3/+14
| | | | | | as LCSSA no longer transforms such uses. llvm-svn: 98033
* Another place where debug info affected codegen.Dale Johannesen2010-03-091-0/+2
| | | | llvm-svn: 98026
* Start using DIFile. See updated SourceLevelDebugging.html for more information.Devang Patel2010-03-091-24/+25
| | | | | | | | | This patch updates LLVMDebugVersion to 8. Debug info descriptors encoded using LLVMDebugVersion 7 is supported. Corresponding llvmgcc and clang FE commits are required. llvm-svn: 98020
* Introduce DIFile. This will be used to represent header files and source ↵Devang Patel2010-03-081-0/+23
| | | | | | file(s) in debug info. llvm-svn: 97994
* Derive DIType from DIScope. This simplifies getContext() where for members ↵Devang Patel2010-03-081-1/+9
| | | | | | the context is a type. This also eliminates need of CompileUnitMaps maintained by dwarf writer. llvm-svn: 97990
* Remove DbgNode checks in constructor. Debug descriptors are intended to be ↵Devang Patel2010-03-081-9/+0
| | | | | | light weight wrappers. llvm-svn: 97988
* Avoid using DIDescriptor.isNull(). Devang Patel2010-03-081-81/+64
| | | | | | This is a first step towards eliminating checks in Descriptor constructors. llvm-svn: 97975
* Revert r97947.Devang Patel2010-03-081-64/+81
| | | | llvm-svn: 97963
* Avoid using DIDescriptor.isNull().Devang Patel2010-03-081-81/+64
| | | | | | This is a first step towards eliminating unncessary constructor checks in light weight DIDescriptor wrappers. llvm-svn: 97947
* Fix another case where LSR was affected by debug info.Dale Johannesen2010-03-061-1/+12
| | | | llvm-svn: 97865
* Fix a case where LSR is sensitive to debug info.Dale Johannesen2010-03-051-0/+9
| | | | llvm-svn: 97830
* Move GetStringLength and helper from SimplifyLibCalls to ValueTracking.Eric Christopher2010-03-051-0/+129
| | | | | | No functionality change. llvm-svn: 97793
* fix incorrect folding of icmp with undef, PR6481.Chris Lattner2010-03-031-4/+3
| | | | llvm-svn: 97659
* Make SCEVExpander and LSR more aggressive about hoisting expressions outDan Gohman2010-03-031-47/+224
| | | | | | of loops. llvm-svn: 97642
* Revert r97580; that's not the right way to fix this.Dan Gohman2010-03-031-121/+31
| | | | llvm-svn: 97639
* When expanding an expression such as (A + B + C + D), sort the operandsDan Gohman2010-03-021-31/+121
| | | | | | | by loop depth and emit loop-invariant subexpressions outside of loops. This speeds up MultiSource/Applications/viterbi and others. llvm-svn: 97580
* Non-affine post-inc SCEV expansions have more code which must beDan Gohman2010-03-021-1/+1
| | | | | | | emitted after the increment. Make sure the insert position reflects this. This fixes PR6453. llvm-svn: 97537
* Update CMake build.Ted Kremenek2010-03-011-1/+0
| | | | llvm-svn: 97488
* remove anders-aa from mainline, it isn't maintained and isChris Lattner2010-03-011-2868/+0
| | | | | | tantalyzing enough that people keep trying to use it. llvm-svn: 97483
* Add a comment.Dan Gohman2010-03-011-1/+5
| | | | llvm-svn: 97459
* Spelling fixes.Dan Gohman2010-03-013-20/+20
| | | | llvm-svn: 97453
* Fix a missing newline in debug output.Dan Gohman2010-03-011-1/+1
| | | | llvm-svn: 97449
* Make LoopSimplify change conditional branches in loop exiting blocksDan Gohman2010-02-251-13/+28
| | | | | | | | | | | | which branch on undef to branch on a boolean constant for the edge exiting the loop. This helps ScalarEvolution compute trip counts for loops. Teach ScalarEvolution to recognize single-value PHIs, when safe, and ForgetSymbolicName to forget such single-value PHI nodes as apprpriate in ForgetSymbolicName. llvm-svn: 97126
* ConstantFoldInstOperands can theoretically return null if itDan Gohman2010-02-241-2/+3
| | | | | | didn't fold anything. llvm-svn: 97049
* Simplify this code; these casts aren't necessary.Dan Gohman2010-02-241-12/+4
| | | | llvm-svn: 97048
* Convert a few more backedge-taken count functions to use BackedgeTakenInfo.Dan Gohman2010-02-241-14/+13
| | | | llvm-svn: 97042
* Reapply r97010, the speculative revert failed.Daniel Dunbar2010-02-242-33/+29
| | | | llvm-svn: 97036
* Speculatively revert r97010, "Add an argument to PHITranslateValue to specifyDaniel Dunbar2010-02-242-29/+33
| | | | | | the DominatorTree. ...", in hopes of restoring poor old PPC bootstrap. llvm-svn: 97027
* Add an argument to PHITranslateValue to specify the DominatorTree. If thisBob Wilson2010-02-242-33/+29
| | | | | | | | | | | | | | | | | | | | argument is non-null, pass it along to PHITranslateSubExpr so that it can prefer using existing values that dominate the PredBB, instead of just blindly picking the first equivalent value that it finds on a uselist. Also when the DominatorTree is specified, have PHITranslateValue filter out any result that does not dominate the PredBB. This is basically just refactoring the check that used to be in GetAvailablePHITranslatedSubExpr and also in GVN. Despite my initial expectations, this change does not affect the results of GVN for any testcases that I could find, but it should help compile time. Before this change, if PHITranslateSubExpr picked a value that does not dominate, PHITranslateWithInsertion would then insert a new value, which GVN would later determine to be redundant and would replace. By picking a good value to begin with, we save GVN the extra work of inserting and then replacing a new value. llvm-svn: 97010
* Remove the code which constant-folded ptrtoint(inttoptr(x)+c) toDan Gohman2010-02-231-37/+5
| | | | | | | | | | | getelementptr. Despite only doing so in the case where x is a known array object and c can be converted to an index within range, this could still be invalid if c is actually the address of an object allocated outside of LLVM. Also, SCEVExpander, the original motivation for this code, has since been improved to avoid inttoptr+ptroint in more cases. llvm-svn: 96950
* Canonicalize ConstantInts to the right operand of commutativeDan Gohman2010-02-221-2/+2
| | | | | | | | | | operators. The test difference is just due to the multiplication operands being commuted (and thus requiring a more elaborate match). In optimized code, that expression would be folded. llvm-svn: 96816
OpenPOWER on IntegriCloud