| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
and T->isPointerTy(). Convert most instances of the first form to the second form.
Requested by Chris.
llvm-svn: 96344
|
| |
|
|
|
|
| |
isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris!
llvm-svn: 96223
|
| |
|
|
| |
llvm-svn: 96011
|
| |
|
|
| |
llvm-svn: 95086
|
| |
|
|
| |
llvm-svn: 95001
|
| |
|
|
| |
llvm-svn: 94982
|
| |
|
|
|
|
|
| |
array types as well as struct types, and which accepts arbitrary
Constant indicies.
llvm-svn: 94981
|
| |
|
|
|
|
|
| |
getOffsetOf, and remove the comment about assuming i8 is byte-aligned,
which is no longer applicable.
llvm-svn: 94738
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
use plain SCEVUnknowns with ConstantExpr::getSizeOf and
ConstantExpr::getOffsetOf constants. This eliminates a bunch of
special-case code.
Also add code for pattern-matching these expressions, for clients that
want to recognize them.
Move ScalarEvolution's logic for expanding array and vector sizeof
expressions into an element count times the element size, to expose
the multiplication to subsequent folding, into the regular constant
folder.
llvm-svn: 94737
|
| |
|
|
|
|
|
|
| |
llvm-as: t.ll:1:25: error: invalid cast opcode for cast from '[4 x i8]' to '[1 x i32]'
@x = constant [1 x i32] bitcast ([4 x i8] c"abcd" to [1 x i32])
^
llvm-svn: 94595
|
| |
|
|
|
|
|
|
|
|
| |
if one of the vectors didn't have elements (such as undef). Fixes PR 6096.
Fix an issue in the constant folder where fcmp (<2 x %ty>, <2 x %ty>) would
have <2 x i1> type if constant folding was successful and i1 type if it wasn't.
This exposed a related issue in the bitcode reader.
llvm-svn: 94069
|
| |
|
|
| |
llvm-svn: 92771
|
| |
|
|
| |
llvm-svn: 92760
|
| |
|
|
| |
llvm-svn: 92650
|
| |
|
|
|
|
| |
global variable initializer to require relocations.
llvm-svn: 92450
|
| |
|
|
| |
llvm-svn: 92311
|
| |
|
|
|
|
|
|
|
|
|
| |
a convention (shadowing the setter with private forwarding function) to
prevent subclasses from accidentally using it.
This exposed some bogosity in ConstantExprs, which was propaging the
opcode of the constant expr into the NUW/NSW/Exact field in the
getWithOperands/getWithOperandReplaced methods.
llvm-svn: 92239
|
| |
|
|
| |
llvm-svn: 91664
|
| |
|
|
|
|
| |
Integer negation only overflows with INT_MIN, but that's an important case.
llvm-svn: 91662
|
| |
|
|
| |
llvm-svn: 90834
|
| |
|
|
| |
llvm-svn: 86251
|
| |
|
|
|
|
|
| |
can be banging on a context at a time, this isn't needed. Owen, please
review.
llvm-svn: 85728
|
| |
|
|
| |
llvm-svn: 85722
|
| |
|
|
|
|
| |
maintain the block use count in SubclassData.
llvm-svn: 85701
|
| |
|
|
|
|
|
| |
indirectbr, thus we don't need "blockaddr(@func, null)". Eliminate it
for simplicity.
llvm-svn: 85699
|
| |
|
|
|
|
|
|
|
|
|
|
| |
block with a blockaddress still referring to it' replace the invalid
blockaddress with a new blockaddress(@func, null) instead of a
inttoptr(1).
This changes the bitcode encoding format, and still needs codegen
support (this should produce a non-zero value, referring to the entry
block of the function would also be quite reasonable).
llvm-svn: 85678
|
| |
|
|
|
|
| |
data.
llvm-svn: 85625
|
| |
|
|
|
|
|
|
|
| |
In the new world order, BlockAddress can have a BasicBlock operand.
This doesn't permute much, because if you have a ConstantExpr (or
anything more specific than Constant) we still know the operand has
to be a Constant.
llvm-svn: 85375
|
| |
|
|
|
|
|
| |
readonly section if a reference to the containing function
is valid in the readonly section.
llvm-svn: 85370
|
| |
|
|
|
|
|
| |
untested and there is no way to use it, next up: doing battle
with asmparser.
llvm-svn: 85349
|
| |
|
|
|
|
| |
at the moment.
llvm-svn: 84529
|
| |
|
|
|
|
|
|
| |
the new predicates I added) instead of going through a context and doing a
pointer comparison. Besides being cheaper, this allows a smart compiler
to turn the if sequence into a switch.
llvm-svn: 83297
|
| |
|
|
|
|
| |
of the constant. This reverts r6544 and r7428.
llvm-svn: 83270
|
| |
|
|
| |
llvm-svn: 83168
|
| |
|
|
|
|
|
| |
there need to be corresponding changes to the constant folders,
done in this patch.
llvm-svn: 82862
|
| |
|
|
| |
llvm-svn: 82823
|
| |
|
|
| |
llvm-svn: 82818
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instead of cloning and RAUWing it.
- Make AbstractTypeUser a friend of Value so that it can offer
its subclasses a way to update a Value's type in place. This
is better than a universally visible setType method on Value,
and it's sufficient for the immediate need.
- Eliminate the constant "convert" functions. This eliminates a
lot of logic duplication, and fixes a complicated bug where a
constant can't actually be cloned during the type refinement
process because some of the types that its folder needs are
half-destroyed, being in the middle of refinement themselves.
- Move the getValType functions from being static overloaded
functions in Constants.cpp to be members of class template
specializations in ConstantsContext.h. This means that the
code ends up getting instantiated twice, however it also
makes it possible to eliminate all "convert" functions, so
it's not a big net code size increase. And if desired, the
duplicate instantiations could be eliminated with some
reorganization.
llvm-svn: 81861
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
how to fold notionally-out-of-bounds array getelementptr indices instead
of just doing these in lib/Analysis/ConstantFolding.cpp, because it can
be done in a fairly general way without TargetData, and because not all
constants are visited by lib/Analysis/ConstantFolding.cpp. This enables
more constant folding.
Also, set the "inbounds" flag when the getelementptr indices are
one-past-the-end.
llvm-svn: 81483
|
| |
|
|
|
|
|
|
|
| |
within the notional bounds of the static type of the getelementptr (which
is not the same as "inbounds") from GlobalOpt into a utility routine,
and use it in ConstantFold.cpp to check whether there are any mis-behaved
indices.
llvm-svn: 81478
|
| |
|
|
| |
llvm-svn: 81172
|
| |
|
|
|
|
| |
breaks MiniSAT on x86_64.
llvm-svn: 81098
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Constant uniquing tables. This allows distinct ConstantExpr objects
with the same operation and different flags.
Even though a ConstantExpr "a + b" is either always overflowing or
never overflowing (due to being a ConstantExpr), it's still necessary
to be able to represent it both with and without overflow flags at
the same time within the IR, because the safety of the flag may
depend on the context of the use. If the constant really does overflow,
it wouldn't ever be safe to use with the flag set, however the use
may be in code that is never actually executed.
This also makes it possible to merge all the flags tests into a single test.
llvm-svn: 80998
|
| |
|
|
|
|
| |
introduced regressions in the Ocaml bindings tests.
llvm-svn: 80969
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and exact flags. Because ConstantExprs are uniqued, creating an
expression with this flag causes all expressions with the same operands
to have the same flag, which may not be safe. Add, sub, mul, and sdiv
ConstantExprs are usually folded anyway, so the main interesting flag
here is inbounds, and the constant folder already knows how to set the
inbounds flag automatically in most cases, so there isn't an urgent need
for the API support.
This can be reconsidered in the future, but for now just removing these
API bits eliminates a source of potential trouble with little downside.
llvm-svn: 80959
|
| |
|
|
|
|
|
|
| |
Use CallbackVH, instead of WeakVH, to hold MDNode elements.
Use FoldingSetNode to unique MDNodes in a context.
Use CallbackVH hooks to update context's MDNodeSet appropriately.
llvm-svn: 80868
|
| |
|
|
| |
llvm-svn: 80841
|
| |
|
|
|
|
|
| |
Use FoldingSetNode to unique MDNodes in a context.
Use CallbackVH hooks to update context's MDNodeSet appropriately.
llvm-svn: 80839
|
| |
|
|
| |
llvm-svn: 79816
|
| |
|
|
|
|
| |
and hasNoSignedWrap, for consistency with the nuw and nsw properties.
llvm-svn: 79539
|