summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
Commit message (Collapse)AuthorAgeFilesLines
...
* This nutty patch has been in my tree since before 1.3 went out, and it needsChris Lattner2004-10-121-20/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to go in. This patch allows us to compute the trip count of loops controlled by values loaded from constant arrays. The cannonnical example of this is strlen when passed a constant argument: for (int i = 0; "constantstring"[i]; ++i) ; return i; In this case, it will compute that the loop executes 14 times, which means that the exit value of i is 14. Because of this, the loop gets DCE'd and we are happy. This also applies to anything that does similar things, e.g. loops like this: const float Array[] = { 0.1, 2.1, 3.2, 23.21 }; for (int i = 0; Array[i] < 20; ++i) and is actually fairly general. The problem with this is that it almost never triggers. The reason is that we run indvars and the loop optimizer only at compile time, which is before things like strlen and strcpy have been inlined into the program from libc. Because of this, it almost never is used (it triggers twice in specint2k). I'm committing it because it DOES work, may be useful in the future, and doesn't slow us down at all. If/when we start running the loop optimizer at link-time (-O4?) this will be very nice indeed :) llvm-svn: 16926
* Fix SingleSource/Benchmarks/McGill/chompChris Lattner2004-10-111-0/+1
| | | | llvm-svn: 16912
* Build both archive and relinked objectsReid Spencer2004-10-103-3/+17
| | | | llvm-svn: 16892
* Initial version of automake Makefile.am file.Reid Spencer2004-10-103-0/+86
| | | | llvm-svn: 16885
* Fix a nasty dangling pointer problem, due to a free'd pointer being left inChris Lattner2004-10-071-0/+3
| | | | | | | a map. This caused problems if a later object happened to be allocated at the free'd object's address. llvm-svn: 16813
* Dont' let null nodes sneak past cast instructionsChris Lattner2004-10-061-1/+4
| | | | llvm-svn: 16779
* 'Pass' should now not be derived from by clients. Instead, they should deriveChris Lattner2004-09-2021-35/+35
| | | | | | | from ModulePass. Instead of implementing Pass::run, then should implement ModulePass::runOnModule. llvm-svn: 16436
* Finegrainify namespacificationChris Lattner2004-09-201-7/+4
| | | | | | | | 'Pass' should now not be derived from by clients. Instead, they should derive from ModulePass. Instead of implementing Pass::run, then should implement ModulePass::runOnModule. llvm-svn: 16434
* Fix a nasty iterator invalidation problem I introduced yesterday. ThisChris Lattner2004-09-191-5/+5
| | | | | | | unfortunately is the cause of a bunch of failures from tonight, and the reason the tester is running so slow :( llvm-svn: 16407
* Add CallGraphNode::removeAnyCallEdgeTo methodChris Lattner2004-09-181-0/+12
| | | | llvm-svn: 16398
* When changing a function, make sure to update the CallGraphNode for theChris Lattner2004-09-181-0/+1
| | | | | | function, not just the CallGraph. llvm-svn: 16388
* Implement new changeFunction method, nuke a never implemented one.Chris Lattner2004-09-181-8/+14
| | | | llvm-svn: 16386
* Convert code to compile with vc7.1.Reid Spencer2004-09-151-3/+3
| | | | | | Patch contributed by Paolo Invernizzi. Thanks Paolo! llvm-svn: 16368
* Add some assertionsChris Lattner2004-09-151-2/+3
| | | | llvm-svn: 16366
* Implement an AliasSetTracker::copyValue methodChris Lattner2004-09-141-3/+30
| | | | llvm-svn: 16344
* Fixes to make LLVM compile with vc7.1.Alkis Evlogimenos2004-09-035-2/+6
| | | | | | Patch contributed by Paolo Invernizzi! llvm-svn: 16152
* Changes For Bug 352Reid Spencer2004-09-0131-60/+60
| | | | | | | | Move include/Config and include/Support into include/llvm/Config, include/llvm/ADT and include/llvm/Support. From here on out, all LLVM public header files must be under include/llvm/. llvm-svn: 16137
* Fix a bug that caused the pass to go into infinite loops on trivial testcases.Chris Lattner2004-08-161-1/+2
| | | | | | This is fallout of the Bug 122 changes. llvm-svn: 15811
* Add standard print/dump methods to CallGraph classes.Chris Lattner2004-08-081-16/+22
| | | | llvm-svn: 15569
* Hide this optionChris Lattner2004-08-021-1/+1
| | | | llvm-svn: 15415
* Fix #includes of i*.h => Instructions.h as per PR403.Misha Brukman2004-07-298-13/+8
| | | | llvm-svn: 15334
* Fix #includes of i*.h => Instructions.h as per PR403.Misha Brukman2004-07-293-8/+4
| | | | llvm-svn: 15328
* Merge i*.h headers into Instructions.h as part of bug403.Alkis Evlogimenos2004-07-291-2/+1
| | | | llvm-svn: 15325
* Fix test/Regression/Analysis/BasicAA/2004-07-28-MustAliasbug.llxChris Lattner2004-07-291-5/+9
| | | | | | | This also fixes the miscompilation of MallocBench/gs with dead store elimination enabled. llvm-svn: 15324
* Make the create...() functions for some of these passes return a FunctionPass *.Brian Gaeke2004-07-271-1/+1
| | | | llvm-svn: 15276
* nuke pointless -debug outputChris Lattner2004-07-271-4/+0
| | | | llvm-svn: 15267
* Fix conservative assumption, which was quite broken. Also, notice thatChris Lattner2004-07-271-2/+22
| | | | | | functions known to not access memory (like sin/cos) don't access memory! :) llvm-svn: 15264
* Remove a bogus assertionChris Lattner2004-07-271-3/+0
| | | | llvm-svn: 15261
* Complete rewrite of this pass to be faster, use less memory, be easier toChris Lattner2004-07-271-97/+148
| | | | | | | understand, and more accurate to boot! This implements GlobalModRef/purecse.ll over the previous impl. llvm-svn: 15260
* Use context-sensitive alias analysis to avoid pessimization in clients ofChris Lattner2004-07-271-5/+23
| | | | | | | AliasSetTracker (dse and licm). This implements DeadStoreElimination/context-sensitive.llx llvm-svn: 15254
* Make basicaa a bit more aggressiveChris Lattner2004-07-271-0/+4
| | | | llvm-svn: 15252
* basic-aa can actually provide simple mod/ref infoChris Lattner2004-07-271-3/+3
| | | | llvm-svn: 15251
* This was implemented back in marchChris Lattner2004-07-271-7/+0
| | | | llvm-svn: 15250
* Add some new methodsChris Lattner2004-07-261-0/+13
| | | | llvm-svn: 15230
* Fix a latent bug in the AliasSetTracker that was exposed by the FreeInst ↵Chris Lattner2004-07-251-1/+2
| | | | | | additions and broke a bunch of programs last night. llvm-svn: 15214
* Add support for free instructionsChris Lattner2004-07-251-2/+18
| | | | llvm-svn: 15197
* Clean up reference counting to stop "leaking" alias setsChris Lattner2004-07-221-11/+13
| | | | llvm-svn: 15099
* These files don't need to include <iostream> since they include ↵Brian Gaeke2004-07-212-2/+0
| | | | | | "Support/Debug.h". llvm-svn: 15089
* Add capability to remove aliasing aliassets from an ASTChris Lattner2004-07-211-0/+56
| | | | llvm-svn: 15066
* Make the AST interface a bit richer by returning whether an insertion causedChris Lattner2004-07-211-19/+32
| | | | | | an insertion or not (because the pointer set already existed). llvm-svn: 15064
* Do not ignore casts unless they are pointer-pointer casts. This caused usChris Lattner2004-07-211-4/+8
| | | | | | to miscompile the SingleSource/Regression/C++/pointer_member.cpp program. llvm-svn: 15062
* bug 122:Reid Spencer2004-07-189-48/+32
| | | | | | | | - Replace ConstantPointerRef usage with GlobalValue usage - Minimize redundant isa<GlobalValue> usage - Correct isa<Constant> for GlobalValue subclass llvm-svn: 14942
* Fix incorrect computation of mod/ref sets. Do not ask for mod/ref informationChris Lattner2004-07-171-21/+29
| | | | | | for objects of size 0. llvm-svn: 14908
* Print modref information in a useful way.Chris Lattner2004-07-171-4/+14
| | | | llvm-svn: 14907
* Cleanups: fold two loops into oneChris Lattner2004-07-171-3/+9
| | | | | | New features: -print-all-alias-modref-info option, print more info llvm-svn: 14906
* Be compatible with IA64Chris Lattner2004-07-161-1/+2
| | | | llvm-svn: 14864
* Fixes for PR341Chris Lattner2004-07-153-15/+16
| | | | llvm-svn: 14843
* Fix for PR341Chris Lattner2004-07-151-1/+1
| | | | llvm-svn: 14842
* Simplify logic.Chris Lattner2004-07-141-2/+2
| | | | llvm-svn: 14825
* Disable some code that isn't helping mattersChris Lattner2004-07-081-1/+6
| | | | llvm-svn: 14682
OpenPOWER on IntegriCloud