| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
since then the entire expression must equal zero (similarly for other operations
with an absorbing element). With this in place a bunch of reassociate code for
handling constants is dead since it is all taken care of when linearizing. No
intended functionality change.
llvm-svn: 158398
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
topologies, it is quite possible for a leaf node to have huge multiplicity, for
example: x0 = x*x, x1 = x0*x0, x2 = x1*x1, ... rapidly gives a value which is x
raised to a vast power (the multiplicity, or weight, of x). This patch fixes
the computation of weights by correctly computing them no matter how big they
are, rather than just overflowing and getting a wrong value. It turns out that
the weight for a value never needs more bits to represent than the value itself,
so it is enough to represent weights as APInts of the same bitwidth and do the
right overflow-avoiding dance steps when computing weights. As a side-effect it
reduces the number of multiplies needed in some cases of large powers. While
there, in view of external uses (eg by the vectorizer) I made LinearizeExprTree
static, pushing the rank computation out into users. This is progress towards
fixing PR13021.
llvm-svn: 158358
|
| |
|
|
|
|
| |
much. This gets us an addition 0.9% on 445.gobmk.
llvm-svn: 149952
|
| |
|
|
| |
llvm-svn: 149849
|
| |
|
|
| |
llvm-svn: 149848
|
| |
|
|
|
|
|
|
|
| |
but with a critical fix to the SelectionDAG code that optimizes copies
from strings into immediate stores: the previous code was stopping reading
string data at the first nul. Address this by adding a new argument to
llvm::getConstantStringInfo, preserving the behavior before the patch.
llvm-svn: 149800
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
test to fail.
These are:
r149348
r149351
r149352
r149354
r149356
r149357
r149361
r149362
r149364
r149365
llvm-svn: 149470
|
| |
|
|
|
|
| |
ConstantDataArray::getString instead.
llvm-svn: 149365
|
| |
|
|
|
|
| |
methods and constant fold the clients to false.
llvm-svn: 149362
|
| |
|
|
| |
llvm-svn: 149357
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
kicking in the big win of ConstantDataArray. As part of this, change
the implementation of GetConstantStringInfo in ValueTracking to work
with ConstantDataArray (and not ConstantArray) making it dramatically,
amazingly, more efficient in the process and renaming it to
getConstantStringInfo.
This keeps around a GetConstantStringInfo entrypoint that (grossly)
forwards to getConstantStringInfo and constructs the std::string
required, but existing clients should move over to
getConstantStringInfo instead.
llvm-svn: 149351
|
| |
|
|
| |
llvm-svn: 149255
|
| |
|
|
|
|
| |
to be formed whenever ConstantVector::get is used.
llvm-svn: 149226
|
| |
|
|
|
|
|
| |
we should (theoretically optimize and codegen ConstantDataVector as well
as ConstantVector.
llvm-svn: 149116
|
| |
|
|
| |
llvm-svn: 149077
|
| |
|
|
|
|
|
|
|
| |
ConstantExpr::getWithOperandReplaced and ConstantExpr::replaceUsesOfWithOnConstant
in terms of ConstantExpr::getWithOperands. While we're at it,
make sure that ConstantExpr::getWithOperands covers all instructions: it was
missing insert/extractvalue.
llvm-svn: 149076
|
| |
|
|
|
|
|
| |
more robust) ways to do what it was doing now. Also, add static methods
for decoding a ShuffleVector mask.
llvm-svn: 149028
|
| |
|
|
|
|
|
|
|
|
| |
ConstantVector. Fix some outright bugs in the implementation of
ConstantArray and Constant struct, which would cause us to not make
one big UndefValue when asking for an array/struct with all undef
elements. Enhance Constant::isAllOnesValue to work with
ConstantDataVector.
llvm-svn: 149021
|
| |
|
|
| |
llvm-svn: 149006
|
| |
|
|
|
|
|
| |
helper method for the common operation of extracting an element
out of a constant aggregate.
llvm-svn: 148931
|
| |
|
|
|
|
|
| |
"Introduce a new ConstantVector::getSplat constructor function to
simplify a really common case."
llvm-svn: 148924
|
| |
|
|
|
|
| |
in asserts.
llvm-svn: 148910
|
| |
|
|
|
|
|
|
| |
Original log:
Introduce a new ConstantVector::getSplat constructor function to
simplify a really common case.
llvm-svn: 148906
|
| |
|
|
|
|
| |
simplify a really common case.
llvm-svn: 148901
|
| |
|
|
|
|
|
| |
did something extremely surprising, and shadowed actually useful
implementations that had completely different behavior.
llvm-svn: 148898
|
| |
|
|
| |
llvm-svn: 148805
|
| |
|
|
|
|
|
|
| |
add a ConstantDataArray::getString method that corresponds to the (to be
removed) StringRef version of ConstantArray::get, but is dramatically more
efficient.
llvm-svn: 148804
|
| |
|
|
| |
llvm-svn: 148802
|
| |
|
|
|
|
|
|
| |
and clean up some other misc stuff. Unlike ConstantArray, we will
prefer to emit .fill directives for "String" arrays that all have
the same value, since they are denser than emitting a .ascii
llvm-svn: 148793
|
| |
|
|
|
|
|
|
| |
same semantics as ConstantArray's but much more efficient because they
don't have to return std::string's. The ConstantArray methods will
eventually be removed.
llvm-svn: 148792
|
| |
|
|
| |
llvm-svn: 148790
|
| |
|
|
|
|
| |
Make some CDS methods public.
llvm-svn: 148785
|
| |
|
|
|
|
| |
No need for 'getOperand' :)
llvm-svn: 148778
|
| |
|
|
|
|
|
| |
classes, per PR1324. Not all of their helper functions are implemented,
nothing creates them, and the rest of the compiler doesn't handle them yet.
llvm-svn: 148741
|
| |
|
|
|
|
|
|
| |
using OwningPtr. OwningPtr would barf when the densemap had to reallocate,
which doesn't appear to happen on the regression test suite, but obviously
happens in real life :)
llvm-svn: 148700
|
| |
|
|
| |
llvm-svn: 148698
|
| |
|
|
| |
llvm-svn: 148693
|
| |
|
|
|
|
|
| |
Now that the type system rewrite has landed, there is no need for its
complexity and std::map'ness.
llvm-svn: 148691
|
| |
|
|
| |
llvm-svn: 148578
|
| |
|
|
|
|
| |
http://llvm.org/docs/CodingStandards.html#ll_virtual_anch
llvm-svn: 146960
|
| |
|
|
|
|
|
|
| |
"half precision" floating-point with a first-class type.
This patch adds basic IR support (but not codegen support).
llvm-svn: 146786
|
| |
|
|
| |
llvm-svn: 145801
|
| |
|
|
|
|
| |
simplify it.
llvm-svn: 144555
|
| |
|
|
|
|
|
|
|
|
|
|
| |
assert(!"error message");
To:
assert(0 && "error message");
which is more consistant across the code base.
llvm-svn: 140234
|
| |
|
|
| |
llvm-svn: 138469
|
| |
|
|
|
|
|
|
|
|
| |
This reverts commit 20a05be15ea5271ab6185b83200fa88263362400. (svn rev 138340)
Conflicts:
test/Transforms/InstCombine/bitcast.ll
llvm-svn: 138366
|
| |
|
|
|
|
|
| |
1. Cleanup the tests in ConstantFolding.cpp
2. Implement isAllOnes for Constant, ConstantFP, ConstantVector
llvm-svn: 138340
|
| |
|
|
|
|
|
| |
with an opaque struct type, it doesn't make sense. This should
resolve PR10473.
llvm-svn: 137028
|
| |
|
|
|
|
| |
ConstantStruct and ConstantVector.
llvm-svn: 135905
|
| |
|
|
| |
llvm-svn: 135904
|