Gabor Greif
1abbde3103
use ArgOperand accessors
...
llvm-svn: 106697
2010-06-23 23:38:07 +00:00
Eric Christopher
7258dcd77f
Revert 101465, it broke internal OpenGL testing.
...
Probably the best way to know that all getOperand() calls have been handled
is to replace that API instead of updating.
llvm-svn: 101579
2010-04-16 23:37:20 +00:00
Gabor Greif
f375520f7b
reapply r101434
...
with a fix for self-hosting
rotate CallInst operands, i.e. move callee to the back
of the operand array
the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary
llvm-svn: 101465
2010-04-16 15:33:14 +00:00
Gabor Greif
403e9694f9
back out r101423 and r101397, they break llvm-gcc self-host on darwin10
...
llvm-svn: 101434
2010-04-16 01:16:20 +00:00
Gabor Greif
33ae80bff7
reapply r101364, which has been backed out in r101368
...
with a fix
rotate CallInst operands, i.e. move callee to the back
of the operand array
the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary
llvm-svn: 101397
2010-04-15 20:51:13 +00:00
Gabor Greif
9fd00c7d25
back out r101364, as it trips the linux nightlybot on some clang C++ tests
...
llvm-svn: 101368
2010-04-15 12:46:56 +00:00
Gabor Greif
aafd209632
rotate CallInst operands, i.e. move callee to the back
...
of the operand array
the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary
llvm-svn: 101364
2010-04-15 10:49:53 +00:00
Dan Gohman
0b4df0425f
Constify GetConstantStringInfo.
...
llvm-svn: 101298
2010-04-14 22:20:45 +00:00
Evan Cheng
2a65429671
Fix a typo in ValueTracking that's causing instcombine to delete needed shift instructions.
...
llvm-svn: 98416
2010-03-13 02:20:29 +00:00
Eric Christopher
4899cbc77d
Move GetStringLength and helper from SimplifyLibCalls to ValueTracking.
...
No functionality change.
llvm-svn: 97793
2010-03-05 06:58:57 +00:00
Duncan Sands
19d0b47b1f
There are two ways of checking for a given type, for example isa<PointerType>(T)
...
and T->isPointerTy(). Convert most instances of the first form to the second form.
Requested by Chris.
llvm-svn: 96344
2010-02-16 11:11:14 +00:00
Duncan Sands
9dff9bec31
Uniformize the names of type predicates: rather than having isFloatTy and
...
isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris!
llvm-svn: 96223
2010-02-15 16:12:20 +00:00
Duncan Sands
26cd6bd0b0
It looks like the changes to the SRem logic of SimplifyDemandedUseBits
...
(fix for PR6165) are needed here too.
llvm-svn: 94801
2010-01-29 06:18:37 +00:00
Chris Lattner
35d3b9dcd0
teach ComputeNumSignBits to look through PHI nodes.
...
llvm-svn: 92964
2010-01-07 23:44:37 +00:00
Benjamin Kramer
d2564e3afb
Move remaining stuff to the isInteger predicate.
...
llvm-svn: 92771
2010-01-05 21:05:54 +00:00
Chris Lattner
a3aef788ec
Fix GetConstantStringInfo to not look into MDString (it works on
...
real data, not metadata) and fix DbgInfoPrinter to not abuse
GetConstantStringInfo.
llvm-svn: 91444
2009-12-15 19:34:20 +00:00
Mon P Wang
bb3eac9e7a
Fixed an assertion failure for tracking sext of a vector of integers
...
llvm-svn: 90290
2009-12-02 04:59:58 +00:00
Chris Lattner
c7bc66dfc6
implement a FIXME: limit the depth that DecomposeGEPExpression goes the same
...
way that getUnderlyingObject does it.
This fixes the 'DecomposeGEPExpression and getUnderlyingObject disagree!'
assertion on sqlite3.
llvm-svn: 90038
2009-11-28 15:12:41 +00:00
Chris Lattner
8e62d0a93d
limit the recursion depth of GetLinearExpression. This
...
fixes a crash analyzing consumer-lame, which had an "%X = add %X, 1"
in unreachable code.
llvm-svn: 90000
2009-11-27 08:32:52 +00:00
Chris Lattner
1bf7ff704a
Implement PR1143 (at -m64) by making basicaa look through extensions. We
...
previously already handled it at -m32 because there were no i32->i64
extensions for addressing.
llvm-svn: 89959
2009-11-26 18:53:33 +00:00
Chris Lattner
d7cabea8ca
fix two transposed lines duncan caught and add an explanatory comment.
...
llvm-svn: 89958
2009-11-26 18:35:46 +00:00
Chris Lattner
9aa846956e
this todo is resolved.
...
llvm-svn: 89957
2009-11-26 17:14:10 +00:00
Chris Lattner
29f82a1465
move DecomposeGEPExpression out into ValueTracking.cpp
...
llvm-svn: 89956
2009-11-26 17:12:50 +00:00
Chris Lattner
4f0b47d9e7
remove some redundant braces
...
llvm-svn: 89912
2009-11-26 01:50:12 +00:00
Nick Lewycky
39dbfd3c58
Remove unused LLVMContext.
...
llvm-svn: 89642
2009-11-23 03:29:18 +00:00
Dan Gohman
6a976bbcb7
Simplify ComputeMultiple so that it doesn't depend on TargetData.
...
llvm-svn: 89175
2009-11-18 00:58:27 +00:00
Victor Hernandez
4744488e8d
Add ComputeMultiple() analysis function that recursively determines if a Value V is a multiple of unsigned Base
...
llvm-svn: 86675
2009-11-10 08:28:35 +00:00
Victor Hernandez
8acf2956b8
Remove AllocationInst. Since MallocInst went away, AllocaInst is the only subclass of AllocationInst, so it no longer is necessary.
...
llvm-svn: 84969
2009-10-23 21:09:37 +00:00
Victor Hernandez
a3aaf85e23
Remove MallocInst from LLVM Instructions.
...
llvm-svn: 84299
2009-10-17 01:18:07 +00:00
Dale Johannesen
f6a987b784
Handle sqrt in CannotBeNegativeZero. absf and absl
...
appear to be misspellings, removed in favor of fabs*.
llvm-svn: 82796
2009-09-25 20:54:50 +00:00
Dan Gohman
94262db4d4
Teach ValueTracking how to look through GlobalAliases. GlobalAliases are
...
not folded in the constant folder because the constant folder doesn't
simplify ConstantExpr operands.
llvm-svn: 81864
2009-09-15 16:14:44 +00:00
Chris Lattner
0cdbc7a2ca
fix ComputeMaskedBits handling of zext/sext/trunc to work with vectors.
...
This fixes PR4905
llvm-svn: 81174
2009-09-08 00:13:52 +00:00
Chris Lattner
4bc2825d0b
add some comments to describe the invariants.
...
llvm-svn: 81173
2009-09-08 00:06:16 +00:00
Torok Edwin
18e03dd70c
Fix DbgStopPointInst->getFileName/getDirectory, broken by the MDNodification in
...
r80406, and readd a -print-dbginfo test.
llvm-svn: 80778
2009-09-02 11:13:56 +00:00
Dan Gohman
05f11351ab
Handle TargetData with const.
...
llvm-svn: 80262
2009-08-27 17:51:25 +00:00
Dan Gohman
5d5bc6d000
Use hasDefinitiveInitializer() instead of testing the same thing
...
by hand, and fix a few places that were using hasInitializer() that
appear to depend on the initializer value.
llvm-svn: 79441
2009-08-19 18:20:44 +00:00
Dan Gohman
dea2358c68
Fix SimplifyLibcalls and ValueTracking to check mayBeOverridden
...
before performing optimizations based on constant string values.
llvm-svn: 79384
2009-08-19 00:11:12 +00:00
Owen Anderson
55f1c09e31
Push LLVMContexts through the IntegerType APIs.
...
llvm-svn: 78948
2009-08-13 21:58:54 +00:00
Dan Gohman
a72f856aa4
Don't assume that external global variables are aligned at their preferred
...
alignment. Only the minimum alignment guaranteed by the ABI may be assumed.
llvm-svn: 78668
2009-08-11 15:50:03 +00:00
Dan Gohman
a6d0afcb74
Fix a bunch of namespace pollution.
...
llvm-svn: 78363
2009-08-07 01:32:21 +00:00
Owen Anderson
5a1acd9912
Move a few more APIs back to 2.5 forms. The only remaining ones left to change back are
...
metadata related, which I'm waiting on to avoid conflicting with Devang.
llvm-svn: 77721
2009-07-31 20:28:14 +00:00
Owen Anderson
b292b8ce70
Move more code back to 2.5 APIs.
...
llvm-svn: 77635
2009-07-30 23:03:37 +00:00
Daniel Dunbar
ca414c7cae
Remove Value::getNameLen
...
llvm-svn: 77148
2009-07-26 08:34:35 +00:00
Owen Anderson
47db941fd3
Get rid of the Pass+Context magic.
...
llvm-svn: 76702
2009-07-22 00:24:57 +00:00
Dan Gohman
80ca01c466
Add a new Operator class, for handling Instructions and ConstantExprs
...
in a convenient manner, factoring out some common code from
InstructionCombining and ValueTracking. Move the contents of
BinaryOperators.h into Operator.h and use Operator to generalize them
to support ConstantExprs as well as Instructions.
llvm-svn: 76232
2009-07-17 20:47:02 +00:00
Owen Anderson
38264b1554
"LLVMContext* " --> "LLVMContext *"
...
llvm-svn: 74878
2009-07-06 23:00:19 +00:00
Owen Anderson
f1f1743b2e
Finish LLVMContext-ing lib/Analysis. This required pushing LLVMContext's through the ValueTracking API.
...
llvm-svn: 74873
2009-07-06 22:37:39 +00:00
Chris Lattner
edb8407f0c
do not try to analyze bitcasts from i64 to <2 x i32> in ComputedMaskedBits. While
...
we could do this, doing so requires adjusting the demanded mask and the code isn't
doing that yet. This fixes PR4495
llvm-svn: 74699
2009-07-02 16:04:08 +00:00
Dan Gohman
2636693a3c
Fix llvm::ComputeNumSignBits to handle pointer types
...
conservatively correctly, instead of aborting.
llvm-svn: 73908
2009-06-22 22:02:32 +00:00
Dan Gohman
7ccc52f131
Support vector casts in more places, fixing a variety of assertion
...
failures.
To support this, add some utility functions to Type to help support
vector/scalar-independent code. Change ConstantInt::get and
ConstantFP::get to support vector types, and add an overload to
ConstantInt::get that uses a static IntegerType type, for
convenience.
Introduce a new getConstant method for ScalarEvolution, to simplify
common use cases.
llvm-svn: 73431
2009-06-15 22:12:54 +00:00