summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/AliasSetTracker.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix the way AliasSet::print prints "may alias".Dan Gohman2008-04-211-1/+1
| | | | llvm-svn: 50051
* Teach AliasSetTracker about VAArgInst.Dan Gohman2008-04-141-0/+17
| | | | llvm-svn: 49674
* 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/+2
| | | | 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
* 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-23/+15
| | | | | | | | | | | | | | | 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
* Executive summary: getTypeSize -> getTypeStoreSize / getABITypeSize.Duncan Sands2007-11-011-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The meaning of getTypeSize was not clear - clarifying it is important now that we have x86 long double and arbitrary precision integers. The issue with long double is that it requires 80 bits, and this is not a multiple of its alignment. This gives a primitive type for which getTypeSize differed from getABITypeSize. For arbitrary precision integers it is even worse: there is the minimum number of bits needed to hold the type (eg: 36 for an i36), the maximum number of bits that will be overwriten when storing the type (40 bits for i36) and the ABI size (i.e. the storage size rounded up to a multiple of the alignment; 64 bits for i36). This patch removes getTypeSize (not really - it is still there but deprecated to allow for a gradual transition). Instead there is: (1) getTypeSizeInBits - a number of bits that suffices to hold all values of the type. For a primitive type, this is the minimum number of bits. For an i36 this is 36 bits. For x86 long double it is 80. This corresponds to gcc's TYPE_PRECISION. (2) getTypeStoreSizeInBits - the maximum number of bits that is written when storing the type (or read when reading it). For an i36 this is 40 bits, for an x86 long double it is 80 bits. This is the size alias analysis is interested in (getTypeStoreSize returns the number of bytes). There doesn't seem to be anything corresponding to this in gcc. (3) getABITypeSizeInBits - this is getTypeStoreSizeInBits rounded up to a multiple of the alignment. For an i36 this is 64, for an x86 long double this is 96 or 128 depending on the OS. This is the spacing between consecutive elements when you form an array out of this type (getABITypeSize returns the number of bytes). This is TYPE_SIZE in gcc. Since successive elements in a SequentialType (arrays, pointers and vectors) need to be aligned, the spacing between them will be given by getABITypeSize. This means that the size of an array is the length times the getABITypeSize. It also means that GEP computations need to use getABITypeSize when computing offsets. Furthermore, if an alloca allocates several elements at once then these too need to be aligned, so the size of the alloca has to be the number of elements multiplied by getABITypeSize. Logically speaking this doesn't have to be the case when allocating just one element, but it is simpler to also use getABITypeSize in this case. So alloca's and mallocs should use getABITypeSize. Finally, since gcc's only notion of size is that given by getABITypeSize, if you want to output assembler etc the same as gcc then getABITypeSize is the size you want. Since a store will overwrite no more than getTypeStoreSize bytes, and a read will read no more than that many bytes, this is the notion of size appropriate for alias analysis calculations. In this patch I have corrected all type size uses except some of those in ScalarReplAggregates, lib/Codegen, lib/Target (the hard cases). I will get around to auditing these too at some point, but I could do with some help. Finally, I made one change which I think wise but others might consider pointless and suboptimal: in an unpacked struct the amount of space allocated for a field is now given by the ABI size rather than getTypeStoreSize. I did this because every other place that reserves memory for a type (eg: alloca) now uses getABITypeSize, and I didn't want to make an exception for unpacked structs, i.e. I did it to make things more uniform. This only effects structs containing long doubles and arbitrary precision integers. If someone wants to pack these types more tightly they can always use a packed struct. llvm-svn: 43620
* Use empty() member functions when that's what's being tested for insteadDan Gohman2007-10-031-1/+1
| | | | | | of comparing begin() and end(). llvm-svn: 42585
* when merging two alias sets together, be sure to propagate the volatility ofChris Lattner2007-05-231-3/+5
| | | | | | the inner set. This fixes PR1435 and Transforms/LICM/2007-05-22-VolatileSink.ll llvm-svn: 37305
* Fix typo in comment.Nick Lewycky2007-05-061-1/+1
| | | | llvm-svn: 36873
* 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-1/+2
| | | | | | LLVM's footprint and speed up linking. llvm-svn: 33941
* Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, areBill Wendling2006-12-071-3/+3
| | | | | | now cerr, cout, and NullStream resp. llvm-svn: 32298
* Removed some of the iostream #includes. Moved towards converting to usingBill Wendling2006-11-281-4/+4
| | | | | | llvm streams llvm-svn: 31983
* Explain change with a comment.Nick Lewycky2006-09-171-2/+2
| | | | llvm-svn: 30443
* Fix PR912. The input to erase() must not be a reference to the dataNick Lewycky2006-09-171-1/+2
| | | | | | being erased. llvm-svn: 30442
* eliminate RegisterOpt. It does the same thing as RegisterPass.Chris Lattner2006-08-271-1/+1
| | | | llvm-svn: 29925
* Handle alias sets that have been unified, and thus can have other referencesChris Lattner2006-06-271-3/+3
| | | | | | to them. This fixes a regression in my previous checkin. llvm-svn: 28951
* Don't implement AliasSetTracker::remove in terms of deleteValue. deleteValueChris Lattner2006-06-271-10/+22
| | | | | | | | | causes the pointer to be removed from the underlying alias analysis implementation as well. This impl of remove is also significantly faster than the old one. This fixes: Regression/Transforms/DeadStoreElimination/2006-06-27-AST-Remove.ll llvm-svn: 28950
* Fix a stale pointer issue that caused 300.twolf to fail to build on zionChris Lattner2006-06-261-0/+11
| | | | | | last night. llvm-svn: 28916
* Make the -print-alias-sets pass work for printing out something other thanChris Lattner2006-01-031-11/+3
| | | | | | the default aa impl results. llvm-svn: 25062
* Remove trailing whitespaceMisha Brukman2005-04-211-5/+5
| | | | llvm-svn: 21416
* Treat free operations as volatile, since they cannot be moved. This fixesChris Lattner2005-03-251-0/+3
| | | | | | Transforms/LICM/2005-03-24-LICM-Aggregate-Crash.ll llvm-svn: 20830
* Fix the missing symbols problem Bill was hitting. Patch contributed byChris Lattner2005-03-171-0/+1
| | | | | | Bill Wendling!! llvm-svn: 20649
* Adjust to new alias analysis interfacesChris Lattner2004-12-151-2/+3
| | | | llvm-svn: 18957
* For PR387:\Reid Spencer2004-12-071-1/+1
| | | | | | | Make only one print method to avoid overloaded virtual warnings when \ compiled with -Woverloaded-virtual llvm-svn: 18589
* When merging to alias sets, if they are both must alias, the result is notChris Lattner2004-11-271-8/+22
| | | | | | | a must alias set unless all of the pointers in the resultant set are must aliased together. llvm-svn: 18275
* Add a new interfaceChris Lattner2004-11-261-0/+12
| | | | llvm-svn: 18266
* Remove dead varChris Lattner2004-11-051-1/+0
| | | | llvm-svn: 17485
* Add some assertionsChris Lattner2004-09-151-2/+3
| | | | llvm-svn: 16366
* Implement an AliasSetTracker::copyValue methodChris Lattner2004-09-141-3/+30
| | | | llvm-svn: 16344
* Fix #includes of i*.h => Instructions.h as per PR403.Misha Brukman2004-07-291-3/+1
| | | | llvm-svn: 15334
* Remove a bogus assertionChris Lattner2004-07-271-3/+0
| | | | llvm-svn: 15261
* 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
* 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
* 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
* Add #include <iostream> since Value.h does not #include it any more.Reid Spencer2004-07-041-0/+1
| | | | llvm-svn: 14622
* Rename a methodChris Lattner2004-05-231-2/+2
| | | | llvm-svn: 13676
* Changes to fix up the inst_iterator to pass to boost iterator checks. ThisChris Lattner2004-04-271-1/+1
| | | | | | patch was graciously contributed by Vladimir Prus. llvm-svn: 13185
* Fix a HORRIBLY NASTY bug that caused siod to stop working last night.Chris Lattner2004-03-171-1/+1
| | | | llvm-svn: 12479
* Ok, the assertion was bogus. Calls that do not read/write memory should notChris Lattner2004-03-151-0/+6
| | | | | | have an alias set, just like adds and subtracts don't. llvm-svn: 12422
* This assertion is bogus now that calls do not necessarily read/write memoryChris Lattner2004-03-151-2/+0
| | | | llvm-svn: 12421
OpenPOWER on IntegriCloud