Chris Lattner
2ae054adb0
move a bunch of constant folding code f rom Transforms/Utils/Local.cpp into
...
libanalysis/ConstantFolding.cpp.
llvm-svn: 33679
2007-01-30 23:45:45 +00:00
Chris Lattner
8dbea5454d
adjust to constant folding api changes.
...
llvm-svn: 33673
2007-01-30 23:15:43 +00:00
Reid Spencer
5301e7c605
For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoid
...
confusion with external linkage types.
llvm-svn: 33663
2007-01-30 20:08:39 +00:00
Devang Patel
b64c433619
Use StartPassTimer() and StopPassManager()
...
llvm-svn: 33640
2007-01-29 23:29:54 +00:00
Devang Patel
5a4a315aed
Measure timings.
...
llvm-svn: 33627
2007-01-29 20:08:03 +00:00
Devang Patel
6a47b3c655
Remove dead code.
...
CallGraphSCCPass does not need to implement runOnModule().
It supports runOnSCC().
llvm-svn: 33516
2007-01-26 01:08:18 +00:00
Devang Patel
020f4f2bea
Fix typo.
...
llvm-svn: 33467
2007-01-23 21:55:17 +00:00
Devang Patel
1f8200b404
Add CallGraphSCCPass::assignPassManager().
...
This enables CalLGraphPassManager.
llvm-svn: 33466
2007-01-23 21:52:35 +00:00
Reid Spencer
2eadb5310d
For PR970:
...
Clean up handling of isFloatingPoint() and dealing with PackedType.
Patch by Gordon Henriksen!
llvm-svn: 33415
2007-01-21 00:29:26 +00:00
Reid Spencer
a94d394ad2
For PR1043:
...
This is the final patch for this PR. It implements some minor cleanup
in the use of IntegerType, to wit:
1. Type::getIntegerTypeMask -> IntegerType::getBitMask
2. Type::Int*Ty changed to IntegerType* from Type*
3. ConstantInt::getType() returns IntegerType* now, not Type*
This also fixes PR1120.
Patch by Sheng Zhou.
llvm-svn: 33370
2007-01-19 21:13:56 +00:00
Devang Patel
48537a046c
Add CGPassManager.
...
llvm-svn: 33309
2007-01-17 21:45:01 +00:00
Jeff Cohen
9431075206
Unbreak VC++ build.
...
llvm-svn: 33242
2007-01-15 20:27:18 +00:00
Chris Lattner
26933ddb10
Constant fold llvm.powi.*. This speeds up tramp3d--v4 by 9.5%
...
llvm-svn: 33229
2007-01-15 06:27:37 +00:00
Chris Lattner
03c4953cdd
rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.
...
rename Type::getIntegralTypeMask to Type::getIntegerTypeMask.
This makes naming much more consistent. For example, there are now no longer any
instances of IntegerType that are not considered isInteger! :)
llvm-svn: 33225
2007-01-15 02:27:26 +00:00
Chris Lattner
4442e4b401
Update code to eliminate calls to isInteger, calling isIntegral instead.
...
llvm-svn: 33220
2007-01-15 01:58:56 +00:00
Chris Lattner
f9478e757b
Fix correlated exprs regressions
...
llvm-svn: 33214
2007-01-15 01:02:34 +00:00
Chris Lattner
875d7b2b1d
fit to 80 cols.
...
Remove now-extraneous checks for ptr->ptr bitcasts.
Fix PR1109 and Analysis/BasicAA/2007-01-13-BasePointerBadNoAlias.ll. We
need to consider arbitrary sized objects when checking for nested GEP offsets.
llvm-svn: 33195
2007-01-14 05:57:53 +00:00
Chris Lattner
5a55476211
Fix PR1101 and Analysis/ScalarEvolution/trip-count.ll
...
llvm-svn: 33193
2007-01-14 01:24:47 +00:00
Chris Lattner
19cfb04d04
don't discriminate against bool
...
llvm-svn: 33128
2007-01-12 18:28:58 +00:00
Chris Lattner
3b641bfba5
remove unneeded special cases
...
llvm-svn: 33127
2007-01-12 18:23:49 +00:00
Chris Lattner
0fd2b9f5c0
GEP operands can't be bools
...
llvm-svn: 33125
2007-01-12 18:20:48 +00:00
Reid Spencer
cddc9dfe97
Implement review feedback for the ConstantBool->ConstantInt merge. Chris
...
recommended that getBoolValue be replaced with getZExtValue and that
get(bool) be replaced by get(const Type*, uint64_t). This implements
those changes.
llvm-svn: 33110
2007-01-12 04:24:46 +00:00
Reid Spencer
542964f55b
Rename BoolTy as Int1Ty. Patch by Sheng Zhou.
...
llvm-svn: 33076
2007-01-11 18:21:29 +00:00
Zhou Sheng
75b871fb1e
For PR1043:
...
Merge ConstantIntegral and ConstantBool into ConstantInt.
Remove ConstantIntegral and ConstantBool from LLVM.
llvm-svn: 33073
2007-01-11 12:24:14 +00:00
Reid Spencer
23414c0033
Fix a bug in an assert that would never trigger.
...
llvm-svn: 33005
2007-01-08 05:34:39 +00:00
Reid Spencer
7928c2fb9c
Convert uses of getPrimitiveSize that should be getPrimitiveSizeInBits.
...
llvm-svn: 33003
2007-01-08 01:26:33 +00:00
Chris Lattner
d0c91e1c2e
remove llvm.isunordered
...
llvm-svn: 32991
2007-01-07 08:19:47 +00:00
Chris Lattner
18954852ae
Fix PR1015 and Transforms/IndVarsSimplify/2007-01-06-TripCount.ll, a
...
miscompilation of Qt.
llvm-svn: 32974
2007-01-07 02:24:26 +00:00
Chris Lattner
39087c7127
cast of int to bool no longer does a compare, rendering this fixme
...
obsolete
llvm-svn: 32972
2007-01-07 02:05:20 +00:00
Reid Spencer
c635f47d9a
For PR950:
...
This patch replaces signed integer types with signless ones:
1. [US]Byte -> Int8
2. [U]Short -> Int16
3. [U]Int -> Int32
4. [U]Long -> Int64.
5. Removal of isSigned, isUnsigned, getSignedVersion, getUnsignedVersion
and other methods related to signedness. In a few places this warranted
identifying the signedness information from other sources.
llvm-svn: 32785
2006-12-31 05:48:39 +00:00
Reid Spencer
266e42b312
For PR950:
...
This patch removes the SetCC instructions and replaces them with the ICmp
and FCmp instructions. The SetCondInst instruction has been removed and
been replaced with ICmpInst and FCmpInst.
llvm-svn: 32751
2006-12-23 06:05:41 +00:00
Reid Spencer
cfcec2caac
Add a FIXME about signedness.
...
llvm-svn: 32732
2006-12-21 18:59:16 +00:00
Reid Spencer
a8a90a2f97
Add some comments about things that can go away once signless types are in.
...
llvm-svn: 32727
2006-12-21 06:43:46 +00:00
Chris Lattner
57ef942306
eliminate static ctors from Statistics
...
llvm-svn: 32697
2006-12-19 22:30:33 +00:00
Chris Lattner
0a1e99317e
Fix a bug in GetConstantFactor for affine expressions, in which the existing
...
code was wrong for things like 3+4*i.
llvm-svn: 32662
2006-12-19 01:16:02 +00:00
Bill Wendling
a77f14265b
Added an automatic cast to "std::ostream*" etc. from OStream. We then can
...
rework the hacks that had us passing OStream in. We pass in std::ostream*
instead, check for null, and then dispatch to the correct print() method.
llvm-svn: 32636
2006-12-17 05:15:13 +00:00
John Criswell
764f2c03bc
Changed from PARALLEL_DIRS to DIRS since we're only building one directory.
...
Thanks Reid.
llvm-svn: 32551
2006-12-13 19:42:54 +00:00
John Criswell
ca6e2f71dd
Remove DSA.
...
llvm-svn: 32550
2006-12-13 19:41:57 +00:00
John Criswell
2bcf535e0f
Remove DSA.
...
llvm-svn: 32542
2006-12-13 16:54:24 +00:00
Reid Spencer
df1f19a8ef
Change the interface to SCEVExpander::InsertCastOfTo to take a cast opcode
...
so the decision of which opcode to use is pushed upward to the caller.
Adjust the callers to pass the expected opcode.
llvm-svn: 32535
2006-12-13 08:06:42 +00:00
Reid Spencer
bb65ebf9a1
Replace inferred getCast(V,Ty) calls with more strict variants.
...
Rename getZeroExtend and getSignExtend to getZExt and getSExt to match
the the casting mnemonics in the rest of LLVM.
llvm-svn: 32514
2006-12-12 23:36:14 +00:00
Reid Spencer
1ac0ab0850
Get even more accurate on the casting.
...
llvm-svn: 32478
2006-12-12 09:17:50 +00:00
Reid Spencer
b341b0861d
Change inferred getCast into specific getCast. Passes all tests.
...
llvm-svn: 32469
2006-12-12 05:05:00 +00:00
Chris Lattner
49b090ed61
teach scev to analyze X*4|1 like X*4+c. This allows us to produce:
...
LBB1_1: #bb
movdqa (%esi), %xmm2
movaps %xmm2, %xmm3
punpcklbw %xmm0, %xmm3
movaps %xmm3, %xmm4
punpcklwd %xmm0, %xmm4
cvtdq2ps %xmm4, %xmm4
mulps %xmm1, %xmm4
movaps %xmm4, (%edi)
leal 1(,%eax,4), %ebx
shll $4, %ebx
punpckhwd %xmm0, %xmm3
cvtdq2ps %xmm3, %xmm3
mulps %xmm1, %xmm3
movaps %xmm3, (%edx,%ebx)
leal 2(,%eax,4), %ebx
shll $4, %ebx
punpckhbw %xmm0, %xmm2
movaps %xmm2, %xmm3
punpcklwd %xmm0, %xmm3
cvtdq2ps %xmm3, %xmm3
mulps %xmm1, %xmm3
movaps %xmm3, (%edx,%ebx)
leal 3(,%eax,4), %ebx
shll $4, %ebx
punpckhwd %xmm0, %xmm2
cvtdq2ps %xmm2, %xmm2
mulps %xmm1, %xmm2
movaps %xmm2, (%edx,%ebx)
addl $64, %edi
incl %eax
addl $16, %esi
cmpl %ecx, %eax
jne LBB1_1 #bb
instead of:
LBB1_1: #bb
movdqa (%esi), %xmm2
movaps %xmm2, %xmm3
punpcklbw %xmm0, %xmm3
movaps %xmm3, %xmm4
punpcklwd %xmm0, %xmm4
cvtdq2ps %xmm4, %xmm4
mulps %xmm1, %xmm4
movaps %xmm4, (%edi)
leal 1(,%eax,4), %ebx
shll $4, %ebx
punpckhwd %xmm0, %xmm3
cvtdq2ps %xmm3, %xmm3
mulps %xmm1, %xmm3
movaps %xmm3, (%edx,%ebx)
leal 2(,%eax,4), %ebx
shll $4, %ebx
punpckhbw %xmm0, %xmm2
movaps %xmm2, %xmm3
punpcklwd %xmm0, %xmm3
cvtdq2ps %xmm3, %xmm3
mulps %xmm1, %xmm3
movaps %xmm3, (%edx,%ebx)
leal 3(,%eax,4), %ebx
shll $4, %ebx
punpckhwd %xmm0, %xmm2
cvtdq2ps %xmm2, %xmm2
mulps %xmm1, %xmm2
movaps %xmm2, (%edx,%ebx)
addl $64, %edi
incl %eax
addl $16, %esi
cmpl %ecx, %eax
jne LBB1_1 #bb
for a testcase.
llvm-svn: 32463
2006-12-12 02:26:09 +00:00
Chris Lattner
b2f5973867
clarify some comments, simplify some checks, fix:
...
Regression/Transforms/IndVarsSimplify/2006-12-10-BitCast.ll
llvm-svn: 32420
2006-12-11 00:12:31 +00:00
Bill Wendling
355fc5ad50
Removed more <iostream> includes
...
llvm-svn: 32321
2006-12-07 20:28:15 +00:00
Bill Wendling
f3baad3ee1
Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
...
now cerr, cout, and NullStream resp.
llvm-svn: 32298
2006-12-07 01:30:32 +00:00
Reid Spencer
de09dea742
Adjust to new ConstantIntegral interface for Max/Min tests.
...
llvm-svn: 32289
2006-12-06 20:45:15 +00:00
Chris Lattner
700b873130
Detemplatize the Statistic class. The only type it is instantiated with
...
is 'unsigned'.
llvm-svn: 32279
2006-12-06 17:46:33 +00:00
Chris Lattner
6b2e9d97d1
Simplify code
...
llvm-svn: 32270
2006-12-06 06:35:25 +00:00