|  | Commit message (Collapse) | Author | Age | Files | Lines | 
|---|
| | 
| 
| 
| | llvm-svn: 62590 | 
| | 
| 
| 
| | llvm-svn: 62545 | 
| | 
| 
| 
| | llvm-svn: 62462 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | 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 | 
| | 
| 
| 
| | llvm-svn: 62430 | 
| | 
| 
| 
| 
| 
| 
| 
| | functionally equivalent
if this works out, I'll change the others next.
llvm-svn: 62385 | 
| | 
| 
| 
| 
| 
| | Make the debugging dump be a full line.
llvm-svn: 62325 | 
| | 
| 
| 
| | llvm-svn: 62279 | 
| | 
| 
| 
| | llvm-svn: 62232 | 
| | 
| 
| 
| 
| 
| | PR3296 and PR3302.
llvm-svn: 62160 | 
| | 
| 
| 
| | llvm-svn: 62104 | 
| | 
| 
| 
| 
| 
| | suggested by Chris.
llvm-svn: 62099 | 
| | 
| 
| 
| 
| 
| 
| | llvm.memcpy/memset/memmove.  This allows removal of some 
hackish code from basicaa.
llvm-svn: 62071 | 
| | 
| 
| 
| | llvm-svn: 61991 | 
| | 
| 
| 
| 
| 
| 
| 
| | will get its preferred alignment.  It has to be careful and cautiously assume
it will just get the ABI alignment.  This prevents instcombine from rounding
up the alignment of a load/store without adjusting the alignment of the alloca.
llvm-svn: 61934 | 
| | 
| 
| 
| 
| 
| 
| 
| | the argument is marked nocapture - no need to
analyze the argument if the answer is already
known!
llvm-svn: 61753 | 
| | 
| 
| 
| 
| 
| | in its hand.
llvm-svn: 61740 | 
| | 
| 
| 
| | llvm-svn: 61724 | 
| | 
| 
| 
| | llvm-svn: 61715 | 
| | 
| 
| 
| 
| 
| | inline the only use of isNegative. Fixes warning reported by Mike Stump.
llvm-svn: 61600 | 
| | 
| 
| 
| 
| 
| | pending a correct solution.
llvm-svn: 61589 | 
| | 
| 
| 
| 
| 
| | parameters are pointers.
llvm-svn: 61451 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | 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 | 
| | 
| 
| 
| | llvm-svn: 61201 | 
| | 
| 
| 
| 
| 
| 
| 
| | llvm.dbg.compile_units to identify source file for various debug entities. Each llvm.dbg.compile_unit matches one file on the disk. However, the backend only supports one DW_TAG_compile_unit per .o file. The backend selects first compile_unit from the vector to construct DW_TAG_compile_unit entry, which is not correct in all cases.
First step to resolve this is, record file name and directory directly in debug info for various debug entities. 
llvm-svn: 61164 | 
| | 
| 
| 
| 
| 
| | builds.
llvm-svn: 61094 | 
| | 
| 
| 
| | llvm-svn: 61087 | 
| | 
| 
| 
| 
| 
| 
| | which source/line a certain BB/instruction comes from, original variable names,
and original (unmangled) C++ name of functions.
llvm-svn: 61085 | 
| | 
| 
| 
| 
| 
| 
| | instruction or BasicBlock, and to search for DbgDeclareInst corresponding to a
variable.
llvm-svn: 61084 | 
| | 
| 
| 
| | llvm-svn: 61083 | 
| | 
| 
| 
| 
| 
| | and support for non-unit strides with signed exit conditions.
llvm-svn: 61082 | 
| | 
| 
| 
| 
| 
| 
| 
| | visited set before they are used.  If used, their blocks need to be
added to the visited set so that subsequent queries don't use conflicting
pointer values in the cache result blocks.
llvm-svn: 61080 | 
| | 
| 
| 
| 
| 
| | intrinsics are properly marked nocapture, the fixme should be addressed.
llvm-svn: 61040 | 
| | 
| 
| 
| 
| 
| 
| | return *just* a clobber of the start block, not other 
random stuff as well.
llvm-svn: 61026 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | memdep keeps track of how PHIs affect the pointer in dep queries, which 
allows it to eliminate the load in cases like rle-phi-translate.ll, which
basically end up being:
BB1:
   X = load P
   br BB3
BB2:
   Y = load Q
   br BB3
BB3:
   R = phi [P] [Q]
   load R
turning "load R" into a phi of X/Y.  In addition to additional exposed
opportunities, this makes memdep safe in many cases that it wasn't before
(which is required for load PRE) and also makes it substantially more 
efficient.  For example, consider:
bb1:  // has many predecessors.
   P = some_operator()
   load P
In this example, previously memdep would scan all the predecessors of BB1
to see if they had something that would mustalias P.  In some cases (e.g.
test/Transforms/GVN/rle-must-alias.ll) it would actually find them and end
up eliminating something.  In many other cases though, it would scan and not
find anything useful.  MemDep now stops at a block if the pointer is defined
in that block and cannot be phi translated to predecessors.  This causes it
to miss the (rare) cases like rle-must-alias.ll, but makes it faster by not
scanning tons of stuff that is unlikely to be useful.  For example, this
speeds up GVN as a whole from 3.928s to 2.448s (60%)!.  IMO, scalar GVN 
should be enhanced to simplify the rle-must-alias pointer base anyway, which
would allow the loads to be eliminated.
In the future, this should be enhanced to phi translate through geps and 
bitcasts as well (as indicated by FIXMEs) making memdep even more powerful.
llvm-svn: 61022 | 
| | 
| 
| 
| 
| 
| 
| | Remove TODO; icmp isn't a binary operator, so this function will never deal
with them.
llvm-svn: 61020 | 
| | 
| 
| 
| 
| 
| | Add missing DIType constructor, needed by DIVariable::getType().
llvm-svn: 60976 | 
| | 
| 
| 
| 
| 
| | linux.
llvm-svn: 60951 | 
| | 
| 
| 
| 
| 
| | optimization of SGE/SLE with unit stride, now that it works properly.
llvm-svn: 60881 | 
| | 
| 
| 
| 
| 
| 
| | causing a bunch of failures when running
"make ENABLE_EXPENSIVE_CHECKS=1 check".
llvm-svn: 60832 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | 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 | 
| | 
| 
| 
| 
| 
| 
| | invalidateCachedPointerInfo.  Thanks to Bill for sending me
a testcase.
llvm-svn: 60805 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | of a pointer.  This allows is to catch more equivalencies.  For example,
the type_lists_compatible_p function used to require two iterations of
the gvn pass (!) to delete its 18 redundant loads because the first pass
would CSE all the addressing computation cruft, which would unblock the
second memdep/gvn passes from recognizing them.  This change allows
memdep/gvn to catch all 18 when run just once on the function (as is 
typical :) instead of just 3.
On all of 403.gcc, this bumps up the # reundandancies found from:
     63 gvn    - Number of instructions PRE'd
 153991 gvn    - Number of instructions deleted
  50069 gvn    - Number of loads deleted
to:
     63 gvn    - Number of instructions PRE'd
 154137 gvn    - Number of instructions deleted
  50185 gvn    - Number of loads deleted
+120 loads deleted isn't bad.
llvm-svn: 60799 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | 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 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | load dependence queries.  This allows GVN to eliminate a few more
instructions on 403.gcc:
 152598 gvn    - Number of instructions deleted
  49240 gvn    - Number of loads deleted
after:
 153986 gvn    - Number of instructions deleted
  50069 gvn    - Number of loads deleted
llvm-svn: 60786 | 
| | 
| 
| 
| 
| 
| | pointer stuff from it, simplifying the code a bit.
llvm-svn: 60783 | 
| | 
| 
| 
| | llvm-svn: 60776 | 
| | 
| 
| 
| | llvm-svn: 60754 | 
| | 
| 
| 
| 
| 
| 
| 
| | the first block of a query specially.  This makes the "complete query
caching" subsystem more effective, avoiding predecessor queries.  This
speeds up GVN another 4%.
llvm-svn: 60752 |