summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
Commit message (Collapse)AuthorAgeFilesLines
* Add PR to this FIXME, looks like I didn't commit this change after all.Torok Edwin2009-10-071-1/+2
| | | | llvm-svn: 83457
* Introduce and use convenience methods for getting pointer typesDuncan Sands2009-10-062-2/+2
| | | | | | | where the element is of a basic builtin type. For example, to get an i8* use getInt8PtrTy. llvm-svn: 83379
* Extend ConstantFolding to understand signed overflow variantsEvan Phoenix2009-10-051-0/+24
| | | | llvm-svn: 83338
* Don't treat malloc calls with non-matching prototype as malloc.Torok Edwin2009-10-051-2/+13
| | | | | | | Fixes second part of PR5130, miscompilation in FreeBSD kernel, where malloc takes 3 params, and *does* initialize memory. llvm-svn: 83324
* Remove an unnnecessary LLVMContext argument inDan Gohman2009-10-051-2/+1
| | | | | | ConstantFoldLoadThroughGEPConstantExpr. llvm-svn: 83311
* teach the optimizer how to constant fold uadd/usub intrinsics.Chris Lattner2009-10-051-1/+29
| | | | llvm-svn: 83295
* simplify this code a bunch.Chris Lattner2009-10-051-14/+14
| | | | llvm-svn: 83294
* code simplifications.Chris Lattner2009-10-051-16/+25
| | | | llvm-svn: 83292
* Expand api out in the usual inserter way, though, I do have aMike Stump2009-10-011-3/+17
| | | | | | | question, can we get rid of the BasicBlock versions of all inserters and use Head == 0 to indicate the old case when GetInsertBlock == 0? llvm-svn: 83216
* Add another MDNode into DebugLocTuple. This will be used to keep track of ↵Devang Patel2009-10-011-5/+6
| | | | | | inlined functions. llvm-svn: 83190
* Add isFOO() helpers. Fix getDirectory() and getFilename() for DIScope.Devang Patel2009-09-301-0/+50
| | | | llvm-svn: 83180
* Add a way for a frontend to generate more complex dwarf locationMike Stump2009-09-301-0/+22
| | | | | | | | | | | | | | | | | | information. This allows arbitrary code involving DW_OP_plus_uconst and DW_OP_deref. The scheme allows for easy extention to include, any, or all of the DW_OP_ opcodes. I thought about just exposing all of them, but, wasn't sure if people wanted the dwarf opcodes exposed in the api. Is that a layering violation? With this scheme, the entire existing block scheme used by llvm-gcc can be switched over to the new scheme. I think that would be cleaner, as then the compiler specific bits are not present in llvm proper. Before the old code can be yanked however, similar code in clang would have to be removed. Next up, more testing. llvm-svn: 83120
* Remove std::string uses from DebugInfo interface.Devang Patel2009-09-292-50/+45
| | | | llvm-svn: 83083
* When extending the operands of an addrec, iterate through allDan Gohman2009-09-281-5/+5
| | | | | | | the operands, rather than trying to partition them into a start and a step. This handles non-affine add recurrences correctly. llvm-svn: 83011
* Create a README.txt for lib/Analysis, and add an entry.Dan Gohman2009-09-281-0/+18
| | | | llvm-svn: 83001
* Fix this debug output to handle the case where the loop has been deleted.Dan Gohman2009-09-281-1/+2
| | | | llvm-svn: 82994
* Include the name of the loop header in debug messages.Dan Gohman2009-09-281-4/+9
| | | | llvm-svn: 82993
* Move the dominator verification code out of special code embedded withinDan Gohman2009-09-282-4/+33
| | | | | | | | | | | | the PassManager code into a regular verifyAnalysis method. Also, reorganize loop verification. Make the LoopPass infrastructure call verifyLoop as needed instead of having LoopInfo::verifyAnalysis check every loop in the function after each looop pass. Add a new command-line argument, -verify-loop-info, to enable the expensive full checking. llvm-svn: 82952
* Move this assert to check the condition as soon as it is known.Dan Gohman2009-09-281-1/+1
| | | | llvm-svn: 82951
* Extend the StartPassTimer and StopPassTimer functions so that theDan Gohman2009-09-282-6/+6
| | | | | | | | code that stops the timer doesn't have to search to find the timer object before it stops the timer. This avoids a lock acquisition and a few other things done with the timer running. llvm-svn: 82949
* Fix an old copy+pasto.Dan Gohman2009-09-271-1/+1
| | | | llvm-svn: 82947
* Extract the code for inserting a loop into the loop queue intoDan Gohman2009-09-271-3/+7
| | | | | | a separate function. llvm-svn: 82946
* When a loop is deleted, immediately release all of the activeDan Gohman2009-09-271-0/+9
| | | | | | | | LoopPasses for that loop. This avoids trouble with the PassManager trying to call verifyAnalysis on them, and frees up some memory sooner rather than later. llvm-svn: 82945
* Delete a bogus comment.Dan Gohman2009-09-271-1/+0
| | | | llvm-svn: 82908
* Fix SCEVExpander's canonical addrec expansion code to work on loops thatDan Gohman2009-09-271-19/+12
| | | | | | | | aren't in canonical loop-simplify form, since it doesn't itself depend on LoopSimplify. This means handling loops without preheaders and loops with multiple backedges. llvm-svn: 82905
* Instead of testing whether an instruction dominates the loop preheader,Dan Gohman2009-09-271-3/+3
| | | | | | | | | test whether it properly dominates the loop header. This is equivalent when the loop has a preheader, and has the advantage of working when the loop doesn't have a preheader. Since IVUsers doesn't Require LoopSimplify, the loop isn't guaranteed to have a preheader. llvm-svn: 82899
* Add a properlyDominates member function to ScalarEvolution.Dan Gohman2009-09-271-0/+22
| | | | llvm-svn: 82898
* Remove a redundant #include.Dan Gohman2009-09-271-1/+0
| | | | llvm-svn: 82897
* Fix a case where ScalarEvolution was expanding pointer arithmeticDan Gohman2009-09-261-3/+20
| | | | | | to inttoptr/ptrtoint unnecessarily. llvm-svn: 82864
* Handle sqrt in CannotBeNegativeZero. absf and abslDale Johannesen2009-09-251-3/+7
| | | | | | appear to be misspellings, removed in favor of fabs*. llvm-svn: 82796
* No need to verify that malloc's return type is i8*.Victor Hernandez2009-09-221-1/+1
| | | | llvm-svn: 82561
* Switch DIDescriptor to use a TrackingVH. - This makes it much safer to work ↵Daniel Dunbar2009-09-221-3/+12
| | | | | | with debug info, since it was extraordinarily easy to have dangling pointers thanks to MDNode uniquing. llvm-svn: 82507
* Revert r82404, it is causing a bootstrap miscompile. This is very very Chris Lattner2009-09-201-14/+1
| | | | | | scary, as it indicates a lurking bug. yay. llvm-svn: 82411
* improve memdep to eliminate bitcasts (and aliases, and noop geps) Chris Lattner2009-09-201-1/+14
| | | | | | | early for the stated reasons: this allows it to find more equivalences and depend less on code layout. llvm-svn: 82404
* Tabs -> spaces, and remove trailing whitespace.Daniel Dunbar2009-09-201-2/+2
| | | | llvm-svn: 82355
* Strip trailing whitespace.Daniel Dunbar2009-09-191-58/+58
| | | | llvm-svn: 82332
* Add a comment explaining why you would ever want to do this.Nick Lewycky2009-09-191-0/+3
| | | | llvm-svn: 82319
* Lett users of sparse propagation do their own thing with phi nodes if they wantNick Lewycky2009-09-191-0/+7
| | | | | | | to. This can be combined with LCSSA or SSI form to store more information on a PHINode than can be computed by looking at its incoming values. llvm-svn: 82317
* The flag "--dot-cfg-only" is at the moment equivalent to the flag "--dot-cfg".Duncan Sands2009-09-191-1/+1
| | | | | | | It prints the content of all bbs, instead of printing empty bbs to make the CFG more readable. Fix this. Patch by Tobias Grosser. llvm-svn: 82315
* Enhance analysis passes so that they apply the same analysis to malloc calls ↵Victor Hernandez2009-09-185-12/+50
| | | | | | | | as to MallocInst. Reviewed by Eli Friedman. llvm-svn: 82281
* Update malloc call creation code (AllocType is now the element type of the ↵Victor Hernandez2009-09-181-41/+55
| | | | | | | | | | | | | | | | | | malloc, not the resulting type). In getMallocArraySize(), fix bug in the case that array size is the product of 2 constants. Extend isArrayMalloc() and getMallocArraySize() to handle case where malloc is used as char array. Ensure that ArraySize in LowerAllocations::runOnBasicBlock() is correct type. Extend Instruction::isSafeToSpeculativelyExecute() to handle malloc calls. Add verification for malloc calls. Reviewed by Dan Gohman. llvm-svn: 82257
* Add newlines.Nick Lewycky2009-09-181-2/+2
| | | | llvm-svn: 82206
* Teach ScalarEvolution how to reason about no-wrap flags on loopsDan Gohman2009-09-171-15/+37
| | | | | | | | where the induction variable has a non-unit stride, such as {0,+,2}, and there are expressions such as {1,+,2} inside the loop formed with or or add nsw operators. llvm-svn: 82151
* Provide a way to extract location info from DILocation.Devang Patel2009-09-161-0/+23
| | | | llvm-svn: 82064
* Reapplied r81355 with the problems fixed.Andreas Neustifter2009-09-162-10/+22
| | | | | | | (See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090907/086737.html and http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090907/086746.html) llvm-svn: 82039
* simplify some codeChris Lattner2009-09-161-6/+5
| | | | llvm-svn: 81961
* Teach ValueTracking how to look through GlobalAliases. GlobalAliases areDan Gohman2009-09-151-0/+12
| | | | | | | not folded in the constant folder because the constant folder doesn't simplify ConstantExpr operands. llvm-svn: 81864
* add a new CallGraphNode::replaceCallEdge method and use it fromChris Lattner2009-09-151-0/+17
| | | | | | | | argpromote to avoid invalidating an iterator. This fixes PR4977. All clang tests now pass with expensive checking (on my system at least). llvm-svn: 81843
* make -debug-pass=Executions show information about what call graph nodesChris Lattner2009-09-151-1/+14
| | | | | | are in the SCC for each execution of a CGSCC pass. llvm-svn: 81838
* Bugfix. Sorry.Andreas Neustifter2009-09-111-1/+1
| | | | llvm-svn: 81517
OpenPOWER on IntegriCloud