#
86d51b89 |
| 13-Dec-2007 |
Wojciech Matyjewicz <wmatyjewicz@fastmail.fm> |
Make these loops follow GetGEPOperands() behavior. Let: %q = GEP %p, X, ... If %p is a GEP, we can chase baseptr further, only if X==0.
llvm-svn: 44999
|
#
3f42d120 |
| 09-Dec-2007 |
Chris Lattner <sabre@nondot.org> |
Fix PR1782, patch by Wojtek Matyjewicz!
llvm-svn: 44733
|
#
38ef3a8e |
| 03-Dec-2007 |
Duncan Sands <baldrick@free.fr> |
Rather than having special rules like "intrinsics cannot throw exceptions", just mark intrinsics with the nounwind attribute. Likewise, mark intrinsics as readnone/readonly and get rid of special al
Rather than having special rules like "intrinsics cannot throw exceptions", just mark intrinsics with the nounwind attribute. Likewise, mark intrinsics as readnone/readonly and get rid of special aliasing logic (which didn't use anything more than this anyway).
llvm-svn: 44544
show more ...
|
#
68b6f509 |
| 01-Dec-2007 |
Duncan Sands <baldrick@free.fr> |
Integrate the readonly/readnone logic more deeply into alias analysis. This meant updating the API which now has versions of the getModRefBehavior, doesNotAccessMemory and onlyReadsMemory methods wh
Integrate the readonly/readnone logic more deeply 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
show more ...
|
#
5208d1ab |
| 28-Nov-2007 |
Duncan Sands <baldrick@free.fr> |
Add some convenience methods for querying attributes, and use them.
llvm-svn: 44403
|
#
ad0ea2d4 |
| 27-Nov-2007 |
Duncan Sands <baldrick@free.fr> |
Fix PR1146: parameter attributes are longer part of the function type, instead they belong to functions and function calls. This is an updated and slightly corrected version of Reid Spencer's origin
Fix PR1146: parameter attributes are longer part of the function type, instead they belong to functions and function calls. This is an updated and slightly corrected version of Reid Spencer's original patch. The only known problem is that auto-upgrading of bitcode files doesn't seem to work properly (see test/Bitcode/AutoUpgradeIntrinsics.ll). Hopefully a bitcode guru (who might that be? :) ) will fix it.
llvm-svn: 44359
show more ...
|
#
8a3e9d2b |
| 23-Nov-2007 |
Duncan Sands <baldrick@free.fr> |
Ding dong, the DoesntAccessMemoryFns and OnlyReadsMemoryFns tables are dead! We get more, and more accurate, information from gcc via the readnone and readonly function attributes.
llvm-svn: 44288
|
#
38a5e82e |
| 22-Nov-2007 |
Duncan Sands <baldrick@free.fr> |
Teach alias analysis about readnone/readonly functions. Based on a patch by Török Edwin.
llvm-svn: 44279
|
#
1db762ba |
| 16-Nov-2007 |
Tanya Lattner <tonic@nondot.org> |
Fix for PR1801
llvm-svn: 44193
|
#
0fc613b8 |
| 06-Nov-2007 |
Chris Lattner <sabre@nondot.org> |
Fix PR1774 and BasicAA/2007-11-05-SizeCrash.ll
llvm-svn: 43756
|
#
44b8721d |
| 01-Nov-2007 |
Duncan Sands <baldrick@free.fr> |
Executive summary: getTypeSize -> getTypeStoreSize / getABITypeSize. The meaning of getTypeSize was not clear - clarifying it is important now that we have x86 long double and arbitrary precision int
Executive summary: getTypeSize -> getTypeStoreSize / getABITypeSize. 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
show more ...
|
#
b7971bbd |
| 26-Oct-2007 |
Owen Anderson <resistor@mac.com> |
Make a comment better.
llvm-svn: 43379
|
#
7827a3f3 |
| 25-Oct-2007 |
Owen Anderson <resistor@mac.com> |
Fix for PR1741.
llvm-svn: 43326
|
Revision tags: llvmorg-2.1.0 |
|
#
e2f23a3a |
| 07-Sep-2007 |
Owen Anderson <resistor@mac.com> |
Add lengthof and endof templates that hide a lot of sizeof computations. Patch by Sterling Stein!
llvm-svn: 41758
|
#
19ce37a1 |
| 05-Sep-2007 |
Evan Cheng <evan.cheng@apple.com> |
Missing break. Patch by Wojciech Matyjewicz.
llvm-svn: 41727
|
#
bebc3bb2 |
| 06-Aug-2007 |
Chandler Carruth <chandlerc@gmail.com> |
This resolves a regression of BasicAA which failed to find any memory information for overloaded intrinsics (PR1600). This resolves that issue, and improves the matching scheme to use a BitVector rat
This resolves a regression of BasicAA which failed to find any memory information for overloaded intrinsics (PR1600). This resolves that issue, and improves the matching scheme to use a BitVector rather than a binary search.
llvm-svn: 40872
show more ...
|
#
6493fc79 |
| 05-Aug-2007 |
Chris Lattner <sabre@nondot.org> |
Upgrade BasicAliasAnalysis::getModRefBehavior to not call Value::getName, which dynamically allocates the string result. This speeds up dse on the testcase from PR1432 from 0.3781s to 0.1804s (2.1x)
Upgrade BasicAliasAnalysis::getModRefBehavior to not call Value::getName, which dynamically allocates the string result. This speeds up dse on the testcase from PR1432 from 0.3781s to 0.1804s (2.1x).
llvm-svn: 40838
show more ...
|
#
531f260a |
| 02-Aug-2007 |
Christopher Lamb <christopher.lamb@gmail.com> |
Implement review feedback.
llvm-svn: 40745
|
#
1a802014 |
| 02-Aug-2007 |
Christopher Lamb <christopher.lamb@gmail.com> |
Teach BasicAA about noalias parameter attributes, but do it correctly this time.
llvm-svn: 40711
|
#
28315240 |
| 31-Jul-2007 |
Christopher Lamb <christopher.lamb@gmail.com> |
Revert overly aggressive interpretation of noalias
llvm-svn: 40635
|
#
b08423b3 |
| 31-Jul-2007 |
Christopher Lamb <christopher.lamb@gmail.com> |
Teach BasicAA about noalias function parameters. Passes all of DejaGNU and test-suite.
llvm-svn: 40624
|
#
06c60b60 |
| 16-Jul-2007 |
Dan Gohman <gohman@apple.com> |
Fix comments about vectors to use the current wording.
llvm-svn: 39921
|
#
1eb8ed47 |
| 02-Jul-2007 |
Dan Gohman <gohman@apple.com> |
Add explicit keywords.
llvm-svn: 37839
|
#
02b0997b |
| 18-Jun-2007 |
Anton Korobeynikov <asl@math.spbu.ru> |
Make BasicAliasAnalysis correctly register itself. Patch by Devang
llvm-svn: 37627
|
Revision tags: llvmorg-2.0.0 |
|
#
8c78a0bf |
| 03-May-2007 |
Devang Patel <dpatel@apple.com> |
Drop 'const'
llvm-svn: 36662
|