| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 120016
|
| |
|
|
|
|
|
|
| |
are constant. There was in fact one exception to this (phi nodes) - so
remove that exception (InstructionSimplify handles this so there should
be no loss).
llvm-svn: 120015
|
| |
|
|
|
|
| |
then replace the index with zero.
llvm-svn: 119974
|
| |
|
|
|
|
| |
InstructionSimplify.
llvm-svn: 119970
|
| |
|
|
|
|
|
|
| |
pointer (TD is passed to PHITransAddr).
I wonder why this didn't explode earlier.
llvm-svn: 119944
|
| |
|
|
|
|
|
|
|
|
| |
constant
folding improvements: if P points to a type of size zero, turn "gep P, N" into "P".
More generally, if a gep index type has size zero, instcombine could replace the
index with zero, but that is not done here.
llvm-svn: 119942
|
| |
|
|
| |
llvm-svn: 119941
|
| |
|
|
|
|
|
|
|
|
|
| |
zero sized elements. This allows us to compile:
#include <string>
void foo() { std::string s; }
into an empty function.
llvm-svn: 119933
|
| |
|
|
|
|
|
|
| |
destination location of a memcpy/memmove. I'm not clear about whether
TBAA works on these, so I'm leaving it out for now. Dan, please revisit
this when convenient.
llvm-svn: 119928
|
| |
|
|
| |
llvm-svn: 119927
|
| |
|
|
| |
llvm-svn: 119908
|
| |
|
|
| |
llvm-svn: 119800
|
| |
|
|
|
|
| |
of why such threading is pointless.
llvm-svn: 119798
|
| |
|
|
|
|
|
|
| |
preserves LCSSA form out of ScalarEvolution and into the LoopInfo
class. Use it to check that SimplifyInstruction simplifications
are not breaking LCSSA form. Fixes PR8622.
llvm-svn: 119727
|
| |
|
|
| |
llvm-svn: 119706
|
| |
|
|
| |
llvm-svn: 119705
|
| |
|
|
|
|
| |
enabling more PRE. PR8586.
llvm-svn: 119704
|
| |
|
|
|
|
| |
queries, and SCEVExpander getRelevantLoop queries.
llvm-svn: 119595
|
| |
|
|
|
|
|
| |
Some of these maps may merge in the future, but for now it's convenient to have
a utility function for them.
llvm-svn: 119587
|
| |
|
|
|
|
|
| |
memoize the results. This improves compile time in code which highly complex
expressions which get queried many times.
llvm-svn: 119584
|
| |
|
|
|
|
| |
to ScalarEvolution. Delete SCEV::~SCEV. SCEV is no longer virtual.
llvm-svn: 119578
|
| |
|
|
| |
llvm-svn: 119570
|
| |
|
|
|
|
|
| |
functions of ScalarEvolution, in preparation for memoization and
other optimizations.
llvm-svn: 119562
|
| |
|
|
|
|
|
|
|
|
| |
needs to be checked that this won't break LCSSA form.
Change the existing checking method to a more direct one:
rather than seeing if all predecessors belong to the loop,
check that the replacing value is either not in any loop or
is in a loop that contains the phi node.
llvm-svn: 119556
|
| |
|
|
|
|
|
| |
instead of in SCEVAddRecExpr's constructor, in preparation for an
upcoming change.
llvm-svn: 119554
|
| |
|
|
|
|
| |
default ctor with ConstantRange.
llvm-svn: 119550
|
| |
|
|
|
|
|
|
| |
instructions out of InstCombine and into InstructionSimplify. While
there, introduce an m_AllOnes pattern to simplify matching with integers
and vectors with all bits equal to one.
llvm-svn: 119536
|
| |
|
|
|
|
|
| |
phi node itself if it occurs in an unreachable basic block. Protect
against this. Hopefully this will fix some more buildbots.
llvm-svn: 119493
|
| |
|
|
|
|
|
|
| |
simplified to itself (this can only happen in unreachable blocks).
Change it to return null instead. Hopefully this will fix some
buildbot failures.
llvm-svn: 119490
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
class, uses DominatorTree which is an analysis. This change moves all of
the tricky hasConstantValue logic to SimplifyInstruction, and replaces it
with a very simple literal implementation. I already taught users of
hasConstantValue that need tricky stuff to use SimplifyInstruction instead.
I didn't update InlineFunction because the IR looks like it might be in a
funky state at the point it calls hasConstantValue, which makes calling
SimplifyInstruction dangerous since it can in theory do a lot of tricky
reasoning. This may be a pessimization, for example in the case where
all phi node operands are either undef or a fixed constant.
llvm-svn: 119459
|
| |
|
|
|
|
| |
While there, add a note about an inefficiency I noticed.
llvm-svn: 119458
|
| |
|
|
|
|
| |
This fixes some extreme compile times on unrolled sha512 code.
llvm-svn: 119455
|
| |
|
|
|
|
|
|
|
|
|
| |
over a phi node by applying it to each operand may be wrong if the
operation and the phi node are mutually interdependent (the testcase
has a simple example of this). So only do this transform if it would
be correct to perform the operation in each predecessor of the block
containing the phi, i.e. if the other operands all dominate the phi.
This should fix the FFMPEG snow.c regression reported by İsmail Dönmez.
llvm-svn: 119347
|
| |
|
|
|
|
| |
values that are equal to the phi itself.
llvm-svn: 119161
|
| |
|
|
|
|
| |
it to get better phi node simplification.
llvm-svn: 119055
|
| |
|
|
|
|
|
|
|
|
| |
offload the work to hasConstantValue rather than do something more
complicated (such handling mutually recursive phis) because (1) it is
not clear it is worth it; and (2) if it is worth it, maybe such logic
would be better placed in hasConstantValue. Adjust some GVN tests
which are now cleaned up much further (eg: all phi nodes are removed).
llvm-svn: 119043
|
| |
|
|
|
|
|
|
|
|
|
| |
operands are the phi node itself or undef, then return undef.
This logic already existed at a higher level so in practice it
shouldn't make the slightest difference. Note that this code
could be replaced by a call to PN->hasConstantValue(). However
since we bail out the moment we see a non-constant operand, it
is more efficient to have a specialized version of that logic.
llvm-svn: 119041
|
| |
|
|
| |
llvm-svn: 119038
|
| |
|
|
| |
llvm-svn: 119001
|
| |
|
|
|
|
| |
at least.
llvm-svn: 118890
|
| |
|
|
| |
llvm-svn: 118884
|
| |
|
|
|
|
| |
and vaarg instructions.
llvm-svn: 118845
|
| |
|
|
| |
llvm-svn: 118842
|
| |
|
|
| |
llvm-svn: 118822
|
| |
|
|
|
|
| |
these points.
llvm-svn: 118752
|
| |
|
|
|
|
| |
it, so that it doesn't appear to be a known size.
llvm-svn: 118748
|
| |
|
|
|
|
| |
the reverse map too. This fixes seflhost build errors.
llvm-svn: 118729
|
| |
|
|
|
|
|
|
| |
function specific local variable's info.
This fixes radar 8653152. I am checking in testcase as a separate check-in.
llvm-svn: 118726
|
| |
|
|
|
|
| |
for a given instruction into a helper function.
llvm-svn: 118723
|
| |
|
|
|
|
| |
type is insufficient for, or incompatible with, the current query.
llvm-svn: 118721
|