|  | Commit message (Collapse) | Author | Age | Files | Lines | 
|---|
| | 
| 
| 
| 
| 
| 
| 
| 
| | doing very similar pointer capture analysis.
Factor out the common logic.  The new version
is from FunctionAttrs since it does a better
job than the version in BasicAliasAnalysis
llvm-svn: 62461 | 
| | 
| 
| 
| | llvm-svn: 62436 | 
| | 
| 
| 
| 
| 
| | suggested by Chris.
llvm-svn: 62099 | 
| | 
| 
| 
| 
| 
| 
| | llvm.memcpy/memset/memmove.  This allows removal of some 
hackish code from basicaa.
llvm-svn: 62071 | 
| | 
| 
| 
| 
| 
| 
| 
| | the argument is marked nocapture - no need to
analyze the argument if the answer is already
known!
llvm-svn: 61753 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | The problematic part of this patch is that we were out of attribute bits,
requiring some fancy bit hacking to make it fit (by shrinking alignment)
without breaking existing users or the file format.
This change will require users to rebuild llvm-gcc to match llvm.
llvm-svn: 61239 | 
| | 
| 
| 
| 
| 
| | builds.
llvm-svn: 61094 | 
| | 
| 
| 
| 
| 
| | intrinsics are properly marked nocapture, the fixme should be addressed.
llvm-svn: 61040 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | parallel, allowing it to decide that P/Q must alias if A/B
must alias in things like:
 P = gep A, 0, i, 1
 Q = gep B, 0, i, 1
This allows GVN to delete 62 more instructions out of 403.gcc.
llvm-svn: 60820 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | tricks based on readnone/readonly functions.
Teach memdep to look past readonly calls when analyzing
deps for a readonly call.  This allows elimination of a
few more calls from 403.gcc:
before:
     63 gvn    - Number of instructions PRE'd
 153986 gvn    - Number of instructions deleted
  50069 gvn    - Number of loads deleted
after:
     63 gvn    - Number of instructions PRE'd
 153991 gvn    - Number of instructions deleted
  50069 gvn    - Number of loads deleted
5 calls isn't much, but this adds plumbing for the next change.
llvm-svn: 60794 | 
| | 
| 
| 
| | llvm-svn: 60697 | 
| | 
| 
| 
| | llvm-svn: 60687 | 
| | 
| 
| 
| 
| 
| 
| 
| | value. It must now be as if the pointer were allocated and has not escaped to
the caller. Thanks to Dan Gohman for pointing out the error in the original
and helping devise this definition.
llvm-svn: 59940 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | indicate functions that allocate, such as operator new, or list::insert. The
actual definition is slightly less strict (for now).
No changes to the bitcode reader/writer, asm printer or verifier were needed.
llvm-svn: 59934 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | 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 | 
| | 
| 
| 
| | llvm-svn: 56513 | 
| | 
| 
| 
| | llvm-svn: 55779 | 
| | 
| 
| 
| 
| 
| | wants a 'nocapture' predicate.
llvm-svn: 52304 | 
| | 
| 
| 
| 
| 
| | in this file, no other changes.
llvm-svn: 52303 | 
| | 
| 
| 
| 
| 
| | the purposes of escape analysis.
llvm-svn: 52302 | 
| | 
| 
| 
| 
| 
| 
| | pointer derived from a local allocation, if the local allocation
never escapes, the pointers can't alias.  This implements PR2436
llvm-svn: 52301 | 
| | 
| 
| 
| 
| 
| 
| 
| | This fixes several minor bugs (such as returning noalias
for comparisons between external weak functions an null) but
is mostly a cleanup.
llvm-svn: 52299 | 
| | 
| 
| 
| 
| 
| 
| 
| | is longer than the second one) should stop after finding one. Added break 
instruction guarantees it. It also changes difference between offsets to 
absolute value of this difference in the condition.
llvm-svn: 51875 | 
| | 
| 
| 
| 
| 
| 
| | several things that were neither in an anonymous namespace nor static
but not intended to be global.
llvm-svn: 51017 | 
| | 
| 
| 
| 
| 
| | warning.
llvm-svn: 50033 | 
| | 
| 
| 
| 
| 
| | argument to the outer function, this isn't correct.
llvm-svn: 49731 | 
| | 
| 
| 
| | llvm-svn: 48579 | 
| | 
| 
| 
| | llvm-svn: 48554 | 
| | 
| 
| 
| | llvm-svn: 47328 | 
| | 
| 
| 
| 
| 
| | ModRef pointers that alias their arguments as well.  This fixes PR2057.
llvm-svn: 47317 | 
| | 
| 
| 
| | llvm-svn: 47272 | 
| | 
| 
| 
| 
| 
| 
| 
| | to explicitly check
that Object is an Argument before casting it to one.
llvm-svn: 47268 | 
| | 
| 
| 
| | llvm-svn: 47263 | 
| | 
| 
| 
| 
| 
| | cases that failed the first test.
llvm-svn: 47253 | 
| | 
| 
| 
| | llvm-svn: 47252 | 
| | 
| 
| 
| 
| 
| 
| | If we see a memcpy of a pointer, make sure to check later
uses of the pointer as well.
llvm-svn: 47250 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | addresses.
Also, noalias arguments are be considered "like" stack allocated ones for this purpose, because
the only way they can be modref'ed is if they escape somewhere in the current function.
llvm-svn: 47247 | 
| | 
| 
| 
| | llvm-svn: 46318 | 
| | 
| 
| 
| 
| 
| 
| | can't be aliased to other known objects.  This allows us to know that byval 
pointer args don't alias globals, etc.
llvm-svn: 46315 | 
| | 
| 
| 
| | llvm-svn: 45418 | 
| | 
| 
| 
| 
| 
| 
| | Let: %q = GEP %p, X, ...
If %p is a GEP, we can chase baseptr further, only if X==0.
llvm-svn: 44999 | 
| | 
| 
| 
| | llvm-svn: 44733 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | 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 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | 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 | 
| | 
| 
| 
| 
| 
| | use them.
llvm-svn: 44403 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | 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 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | OnlyReadsMemoryFns tables are dead!  We
get more, and more accurate, information
from gcc via the readnone and readonly
function attributes.
llvm-svn: 44288 | 
| | 
| 
| 
| 
| 
| | Based on a patch by Török Edwin.
llvm-svn: 44279 | 
| | 
| 
| 
| | llvm-svn: 44193 | 
| | 
| 
| 
| | llvm-svn: 43756 |