|  | Commit message (Collapse) | Author | Age | Files | Lines | 
|---|
| | 
| 
| 
| 
| 
| | use postinc iv.
llvm-svn: 89116 | 
| | 
| 
| 
| | llvm-svn: 89110 | 
| | 
| 
| 
| | llvm-svn: 89016 | 
| | 
| 
| 
| 
| 
| 
| | The Mask and LHSMask may not be of the same size, so don't do the
transformation if they're different.
llvm-svn: 88972 | 
| | 
| 
| 
| 
| 
| | a name.
llvm-svn: 88908 | 
| | 
| 
| 
| | llvm-svn: 88865 | 
| | 
| 
| 
| | llvm-svn: 88864 | 
| | 
| 
| 
| 
| 
| | grief. I suspect this patch merely exposed a bug else.
llvm-svn: 88841 | 
| | 
| 
| 
| 
| 
| 
| | zext(icmp). It may be able to optimize that away. This fixes one of the cases
in PR5438.
llvm-svn: 88830 | 
| | 
| 
| 
| 
| 
| | ultimately never used.
llvm-svn: 88763 | 
| | 
| 
| 
| | llvm-svn: 88742 | 
| | 
| 
| 
| | llvm-svn: 87042 | 
| | 
| 
| 
| | llvm-svn: 87035 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | running IPSCCP early, and we run functionattrs interlaced with the inliner,
we often (particularly for small or noop functions) completely propagate
all of the information about a call to its call site in IPSSCP (making a call
dead) and functionattrs is smart enough to realize that the function is
readonly (because it is interlaced with inliner).
To improve compile time and make the inliner threshold more accurate, realize
that we don't have to inline dead readonly function calls.  Instead, just 
delete the call.  This happens all the time for C++ codes, here are some
counters from opt/llvm-ld counting the number of times calls were deleted vs
inlined on various apps:
Tramp3d opt:
  5033 inline                - Number of call sites deleted, not inlined
 24596 inline                - Number of functions inlined
llvm-ld:
  667 inline           - Number of functions deleted because all callers found
  699 inline           - Number of functions inlined
483.xalancbmk opt:
  8096 inline                - Number of call sites deleted, not inlined
 62528 inline                - Number of functions inlined
llvm-ld:
   217 inline           - Number of allocas merged together
  2158 inline           - Number of functions inlined
471.omnetpp:
  331 inline                - Number of call sites deleted, not inlined
 8981 inline                - Number of functions inlined
llvm-ld:
  171 inline           - Number of functions deleted because all callers found
  629 inline           - Number of functions inlined
Deleting a call is much faster than inlining it, and is insensitive to the
size of the callee. :)
llvm-svn: 86975 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | cannot be folded into target cmp instruction.
- Avoid a phase ordering issue where early cmp optimization would prevent the
  later count-to-zero optimization.
- Add missing checks which could cause LSR to reuse stride that does not have
  users.
- Fix a bug in count-to-zero optimization code which failed to find the pre-inc
  iv's phi node.
- Remove, tighten, loosen some incorrect checks disable valid transformations.
- Quite a bit of code clean up.
llvm-svn: 86969 | 
| | 
| 
| 
| 
| 
| 
| | which implements GCC PR18046.  This also gets us 360 more
jump threads on 176.gcc.
llvm-svn: 86953 | 
| | 
| 
| 
| | llvm-svn: 86952 | 
| | 
| 
| 
| 
| 
| 
| 
| | making the new LVI stuff smart enough to subsume some special
cases in the old code.  Disable them when LVI is around, the
testcase still passes.
llvm-svn: 86951 | 
| | 
| 
| 
| | llvm-svn: 86933 | 
| | 
| 
| 
| 
| 
| | allows us to handle the test10 testcase.
llvm-svn: 86924 | 
| | 
| 
| 
| | llvm-svn: 86923 | 
| | 
| 
| 
| | llvm-svn: 86920 | 
| | 
| 
| 
| 
| 
| | uses LVI info when -enable-jump-threading-lvi is passed.
llvm-svn: 86886 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | llvm.invariant.start to be used without necessarily being paired with a call
to llvm.invariant.end.  If you run the entire optimization pipeline then such
calls are in fact deleted (adce does it), but that's actually a good thing since
we probably do want them to be zapped late in the game.  There should really be
an integration test that checks that the llvm.invariant.start call lasts long
enough that all passes that do interesting things with it get to do their stuff
before it is deleted.  But since no passes do anything interesting with it yet
this will have to wait for later.
llvm-svn: 86840 | 
| | 
| 
| 
| | llvm-svn: 86810 | 
| | 
| 
| 
| 
| 
| 
| 
| | start using them in a trivial way when -enable-jump-threading-lvi
is passed.  enable-jump-threading-lvi will be my playground for 
awhile.
llvm-svn: 86789 | 
| | 
| 
| 
| | llvm-svn: 86766 | 
| | 
| 
| 
| | llvm-svn: 86761 | 
| | 
| 
| 
| | llvm-svn: 86748 | 
| | 
| 
| 
| | llvm-svn: 86739 | 
| | 
| 
| 
| 
| 
| | into libanalysis and transformutils.
llvm-svn: 86735 | 
| | 
| 
| 
| 
| 
| | tracked down by Stephan Reiter!
llvm-svn: 86726 | 
| | 
| 
| 
| | llvm-svn: 86723 | 
| | 
| 
| 
| 
| 
| 
| 
| | debug intrinsics, and an unconditional branch when possible.  This
reuses the TryToSimplifyUncondBranchFromEmptyBlock function split
out of simplifycfg.
llvm-svn: 86722 | 
| | 
| 
| 
| | llvm-svn: 86715 | 
| | 
| 
| 
| | llvm-svn: 86705 | 
| | 
| 
| 
| | llvm-svn: 86694 | 
| | 
| 
| 
| | llvm-svn: 86689 | 
| | 
| 
| 
| | llvm-svn: 86683 | 
| | 
| 
| 
| | llvm-svn: 86681 | 
| | 
| 
| 
| 
| 
| | size associated with a malloc; also extend PerformHeapAllocSRoA() to check if the optimized malloc's arg had its highest bit set, so that it is safe for ComputeMultiple() to look through sext instructions while determining the optimized malloc's array size
llvm-svn: 86676 | 
| | 
| 
| 
| 
| 
| 
| | of a computation.  This fixes some infinite loops when dealing with TD that
has no native types.
llvm-svn: 86670 | 
| | 
| 
| 
| | llvm-svn: 86668 | 
| | 
| 
| 
| 
| 
| 
| | memory just like a store" with bug fixed (partial-overwrite.ll is the
regression test).
llvm-svn: 86667 | 
| | 
| 
| 
| | llvm-svn: 86666 | 
| | 
| 
| 
| | llvm-svn: 86656 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | just one level deep.  On the testcase we go from getting this:
F1:                                               ; preds = %T2
  %F = and i1 true, %cond                         ; <i1> [#uses=1]
  br i1 %F, label %X, label %Y
to a fully threaded:
F1:                                               ; preds = %T2
  br label %Y
This changes gets us to the point where we're forming (too many) switch 
instructions on doug's strswitch testcase.
llvm-svn: 86646 | 
| | 
| 
| 
| | llvm-svn: 86639 | 
| | 
| 
| 
| 
| 
| 
| 
| | except that the result may not be a constant.  Switch jump threading to 
use it so that it gets things like (X & 0) -> 0, which occur when phi preds
are deleted and the remaining phi pred was a zero.
llvm-svn: 86637 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | This patch forbids implicit conversion of DenseMap::const_iterator to
DenseMap::iterator which was possible because DenseMapIterator inherited
(publicly) from DenseMapConstIterator. Conversion the other way around is now
allowed as one may expect.
The template DenseMapConstIterator is removed and the template parameter
IsConst which specifies whether the iterator is constant is added to
DenseMapIterator.
Actually IsConst parameter is not necessary since the constness can be
determined from KeyT but this is not relevant to the fix and can be addressed
later.
Patch by Victor Zverovich!
llvm-svn: 86636 |