summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/AliasSetTracker.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* when merging two alias sets, the result set is volatile if eitherChris Lattner2010-08-291-0/+1
| | | | | | | | | of the sets is volatile. We were dropping the volatile bit of the merged in set, leading (luckily) to assertions in cases like PR7535. I cannot produce a testcase that repros with opt, but this is obviously correct. llvm-svn: 112402
* more cleanupChris Lattner2010-08-291-8/+8
| | | | llvm-svn: 112401
* clean this upChris Lattner2010-08-291-51/+53
| | | | llvm-svn: 112400
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-061-1/+1
| | | | llvm-svn: 110460
* Revert r110396 to fix buildbots.Owen Anderson2010-08-061-1/+1
| | | | llvm-svn: 110410
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-051-1/+1
| | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
* Thread const correctness through a bunch of AliasAnalysis interfaces andDan Gohman2010-08-031-1/+1
| | | | | | | | | | | | eliminate several const_casts. Make CallSite implicitly convertible to ImmutableCallSite. Rename the getModRefBehavior for intrinsic IDs to getIntrinsicModRefBehavior to avoid overload ambiguity with CallSite, which happens to be implicitly convertible to bool. llvm-svn: 110155
* simplifyGabor Greif2010-07-281-2/+1
| | | | llvm-svn: 109577
* Fix batch of converting RegisterPass<> to INTIALIZE_PASS().Owen Anderson2010-07-211-2/+2
| | | | llvm-svn: 109045
* Change dbgs() back to errs() as Chris requested.David Greene2009-12-231-1/+1
| | | | llvm-svn: 92073
* Convert debug messages to use dbgs(). Generally this meansDavid Greene2009-12-231-3/+4
| | | | | | s/errs/dbgs/g except for certain special cases. llvm-svn: 92029
* Remove the AliasAnalysis::getMustAliases method, which is dead.Chris Lattner2009-11-221-6/+0
| | | | | | | | The hasNoModRefInfoForCalls isn't worth it as a filter because basicaa provides m/r info and everything chains to it, so remove it. llvm-svn: 89599
* remove unneeded checks of isFreeCallChris Lattner2009-11-031-16/+0
| | | | llvm-svn: 85866
* Rename MallocFreeHelper as MemoryBuiltinsVictor Hernandez2009-10-271-1/+1
| | | | llvm-svn: 85286
* Rename MallocHelper as MallocFreeHelper, since it now also identifies calls ↵Victor Hernandez2009-10-261-1/+1
| | | | | | to free() llvm-svn: 85181
* Remove FreeInst.Victor Hernandez2009-10-261-17/+16
| | | | | | | Remove LowerAllocations pass. Update some more passes to treate free calls just like they were treating FreeInst. llvm-svn: 85176
* Remove includes of Support/Compiler.h that are no longer needed after theNick Lewycky2009-10-251-1/+0
| | | | | | VISIBILITY_HIDDEN removal. llvm-svn: 85043
* Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.Nick Lewycky2009-10-251-1/+1
| | | | | | | Chris claims we should never have visibility_hidden inside any .cpp file but that's still not true even after this commit. llvm-svn: 85042
* eliminate the std::ostream form of WriteAsOperand and update clients.Chris Lattner2009-08-231-7/+8
| | | | | | This also updates dominator related stuff. llvm-svn: 79825
* Fix some problems with ASTCallbackVH in its use as a DenseMap key.Dan Gohman2009-07-311-4/+6
| | | | llvm-svn: 77696
* Use CallbackVH in AliasSetTracker to avoid getting stuck withDan Gohman2009-07-301-4/+20
| | | | | | dangling Value*s. llvm-svn: 77623
* Make AliasAnalysis and related classes useDan Gohman2009-07-251-5/+4
| | | | | | getAnalysisIfAvailable<TargetData>(). llvm-svn: 77028
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-1/+1
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-1/+2
| | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
* getEntryFor() may invalidate DenseMap iterator.Devang Patel2009-03-301-0/+1
| | | | | | Walking an invalidated iterator is not a good idea. llvm-svn: 68047
* reimplement AliasSetTracker in terms of DenseMap instead of hash_map,Chris Lattner2009-03-091-36/+52
| | | | | | hopefully no functionality change. llvm-svn: 66398
* Ignore the debug info intrinsics when adding instructions into alias sets.Zhou Sheng2009-03-031-0/+3
| | | | llvm-svn: 65934
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-041-1/+1
| | | | llvm-svn: 55779
* Free and vaarg are not really volatile.Chris Lattner2008-05-221-9/+2
| | | | llvm-svn: 51407
* Fix PR2346 by marking vaarg as volatile so that licm doesn't try toChris Lattner2008-05-201-1/+4
| | | | | | hoist them. llvm-svn: 51356
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-131-2/+4
| | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017
* 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
OpenPOWER on IntegriCloud