summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/IPA/GlobalsModRef.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Factorize code: remove variants of "strip offDuncan Sands2008-10-011-27/+4
| | | | | | | | | | | pointer bitcasts and GEP's", and centralize the logic in Value::getUnderlyingObject. The difference with stripPointerCasts is that stripPointerCasts only strips GEPs if all indices are zero, while getUnderlyingObject strips GEPs no matter what the indices are. llvm-svn: 56922
* Fix PR2792: treat volatile loads as writing memory somewhere.Duncan Sands2008-09-131-3/+11
| | | | | | Treat stores as reading memory, just to play safe. llvm-svn: 56188
* Rather than marking all internal globals "Ref"Duncan Sands2008-09-121-17/+11
| | | | | | | | | | | | | | | | when a readonly declaration is called, set a flag. This is faster and uses less memory. In theory it is less accurate, because before only those internal globals that were read by someone were being marked "Ref", but now all are. But in practice, thanks to other passes, all internal globals of the kind considered here will be both read and stored to: those only read will have been turned into constants, and those only stored to will have been deleted. llvm-svn: 56143
* Intrinsics don't touch internal global variablesDuncan Sands2008-09-111-2/+4
| | | | | | | (unless passed one via a parameter), even if they are IntrWriteMem. llvm-svn: 56115
* Intrinsics don't read these kinds of globalDuncan Sands2008-09-111-5/+7
| | | | | | variables. llvm-svn: 56105
* Neaten this up a bit. No functionality change.Duncan Sands2008-09-041-15/+14
| | | | llvm-svn: 55789
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-041-1/+1
| | | | llvm-svn: 55779
* If a SCC has a node without a function, then the SCCDuncan Sands2008-09-031-9/+14
| | | | | | | | | | analysis would bail out without removing function records for other members of the SCC (which may exist if those functions read or wrote global variables). Since these are initialized to "readnone", this resulted in incorrect alias analysis results. llvm-svn: 55714
* Fix maxo bado thinko.Duncan Sands2008-09-031-1/+1
| | | | llvm-svn: 55700
* Since onlyReadsMemory returns true if in factDuncan Sands2008-09-031-2/+4
| | | | | | | | doesNotAccessMemory, check doesNotAccessMemory first, since otherwise functions may be marked readonly rather than readnone. llvm-svn: 55697
* Cleanup GlobalsModRef a bit. When analysing theDuncan Sands2008-09-031-104/+108
| | | | | | | | | | | callgraph, when one member of a SCC calls another then the analysis would drop to mod-ref because there is (usually) no function info for the callee yet; fix this. Teach the analysis about function attributes, in particular the readonly attribute (which requires being careful about globals). llvm-svn: 55696
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-131-6/+5
| | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017
* Restore isCFGOnly property of various analysis passes.Devang Patel2008-03-201-1/+1
| | | | llvm-svn: 48579
* PassInfo keep tracks whether a pass is an analysis pass or not.Devang Patel2008-03-191-2/+3
| | | | llvm-svn: 48554
* Do not use virtual function to identify an analysis pass.Devang Patel2008-03-191-4/+1
| | | | llvm-svn: 48520
* Identify Analysis pass.Devang Patel2008-03-181-0/+3
| | | | | | | Do not run analysis pass again if analysis info is still available. This fixes PR1441. llvm-svn: 48476
* Unbreak build with gcc 4.3: provide missed includes and silence most ↵Anton Korobeynikov2008-02-201-1/+2
| | | | | | annoying warnings. llvm-svn: 47367
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Integrate the readonly/readnone logic more deeplyDuncan Sands2007-12-011-1/+1
| | | | | | | | | | | | | | | into alias analysis. This meant updating the API which now has versions of the getModRefBehavior, doesNotAccessMemory and onlyReadsMemory methods which take a callsite parameter. These should be used unless the callsite is not known, since in general they can do a better job than the versions that take a function. Also, users should no longer call the version of getModRefBehavior that takes both a function and a callsite. To reduce the chance of misuse it is now protected. llvm-svn: 44487
* chain update requests properly.Chris Lattner2007-11-301-0/+3
| | | | llvm-svn: 44460
* Drop 'const'Devang Patel2007-05-031-2/+2
| | | | llvm-svn: 36662
* Use 'static const char' instead of 'static const int'.Devang Patel2007-05-021-2/+2
| | | | | | | Due to darwin gcc bug, one version of darwin linker coalesces static const int, which defauts PassID based pass identification. llvm-svn: 36652
* Do not use typeinfo to identify pass in pass manager.Devang Patel2007-05-011-0/+4
| | | | llvm-svn: 36632
* Make classes in anonymous namespaces use VISIBILITY_HIDDEN to help reduceReid Spencer2007-02-051-3/+5
| | | | | | LLVM's footprint and speed up linking. llvm-svn: 33941
* For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoidReid Spencer2007-01-301-2/+2
| | | | | | confusion with external linkage types. llvm-svn: 33663
* For PR950:Reid Spencer2006-12-231-2/+2
| | | | | | | | This patch removes the SetCC instructions and replaces them with the ICmp and FCmp instructions. The SetCondInst instruction has been removed and been replaced with ICmpInst and FCmpInst. llvm-svn: 32751
* eliminate static ctors from StatisticsChris Lattner2006-12-191-16/+8
| | | | llvm-svn: 32697
* Detemplatize the Statistic class. The only type it is instantiated withChris Lattner2006-12-061-5/+5
| | | | | | is 'unsigned'. llvm-svn: 32279
* For PR950:Reid Spencer2006-11-271-4/+4
| | | | | | | | | | The long awaited CAST patch. This introduces 12 new instructions into LLVM to replace the cast instruction. Corresponding changes throughout LLVM are provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the exception of 175.vpr which fails only on a slight floating point output difference. llvm-svn: 31931
* Fixme is already doneChris Lattner2006-10-011-1/+0
| | | | llvm-svn: 30685
* Teach globalsmodref-aa to track scalar pointer global variables which pointChris Lattner2006-10-011-52/+209
| | | | | | | | | to unaliased allocations. Use this information to disambiguate pointers loaded from them. This is a very common case, so it's worthwhile to handle efficiently. This implements Analysis/GlobalsModRef/indirect-global.ll llvm-svn: 30684
* simplify AnalysisGroup registration, eliminating one typeid call.Chris Lattner2006-08-281-1/+1
| | | | llvm-svn: 29932
* eliminate RegisterOpt. It does the same thing as RegisterPass.Chris Lattner2006-08-271-2/+2
| | | | llvm-svn: 29925
* Change the callgraph representation to store the callsite along with theChris Lattner2006-07-121-1/+1
| | | | | | | | | | | target CG node. This allows the inliner to properly update the callgraph when using the pruning inliner. The pruning inliner may not copy over all call sites from a callee to a caller, so the edges corresponding to those call sites should not be copied over either. This fixes PR827 and Transforms/Inline/2006-07-12-InlinePruneCGUpdate.ll llvm-svn: 29120
* Malloc/Free have mod/ref effects. Do not allow CSE of function calls thatChris Lattner2005-04-221-0/+2
| | | | | | call malloc/free. This fixes PR555. llvm-svn: 21443
* Convert tabs to spacesMisha Brukman2005-04-221-2/+2
| | | | llvm-svn: 21439
* Remove trailing whitespaceMisha Brukman2005-04-211-11/+11
| | | | llvm-svn: 21416
* Simplify dead code into a fixme :)Chris Lattner2005-03-241-13/+4
| | | | llvm-svn: 20800
* fix a compiler crash in runtime/libprofileChris Lattner2005-03-241-1/+1
| | | | llvm-svn: 20799
* wrap a long lineChris Lattner2005-03-231-1/+2
| | | | llvm-svn: 20797
* If we are calling an external function, chain to another AA to potentiallyChris Lattner2005-03-231-8/+20
| | | | | | | | decide, don't just immediately give up. This implements GlobalsModRef/chaining-analysis.ll llvm-svn: 20796
* This mega patch converts us from using Function::a{iterator|begin|end} toChris Lattner2005-03-151-1/+1
| | | | | | | | using Function::arg_{iterator|begin|end}. Likewise Module::g* -> Module::global_*. This patch is contributed by Gabor Greif, thanks! llvm-svn: 20597
* Actually overload the virtual method. This fixesChris Lattner2004-12-171-1/+2
| | | | | | | Regression/Analysis/GlobalsModRef/purecse.ll. Isn't this what the -Woverload-whatever flag would warn about :) llvm-svn: 19018
* Adjust to new alias analysis interfacesChris Lattner2004-12-151-10/+8
| | | | llvm-svn: 18957
* For PR387:\Reid Spencer2004-12-071-0/+3
| | | | | | Add getModRefInfo method to avoid overloaded virtuals llvm-svn: 18601
* 'Pass' should now not be derived from by clients. Instead, they should deriveChris Lattner2004-09-201-2/+2
| | | | | | | from ModulePass. Instead of implementing Pass::run, then should implement ModulePass::runOnModule. llvm-svn: 16436
* Changes For Bug 352Reid Spencer2004-09-011-3/+3
| | | | | | | | 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
* 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
* 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
OpenPOWER on IntegriCloud