Devang Patel
ce00a4dac7
Fix build failure.
...
llvm-svn: 59844
2008-11-21 21:00:20 +00:00
Devang Patel
a2ccbea45a
Silence unused variable warnings.
...
llvm-svn: 59841
2008-11-21 20:00:59 +00:00
Dan Gohman
e1f9be27bc
Tidy up several unbeseeming casts from pointer to intptr_t.
...
llvm-svn: 55779
2008-09-04 17:05:41 +00:00
Chris Lattner
b5e0d71a07
don't use the result of WriteAsOperand
...
llvm-svn: 54979
2008-08-19 04:45:19 +00:00
Gabor Greif
d61f20217a
API change for {BinaryOperator|CmpInst|CastInst}::create*() --> Create. Legacy interfaces will be in place for some time. (Merge from use-diet branch.)
...
llvm-svn: 51200
2008-05-16 19:29:10 +00:00
Dan Gohman
bab18cae46
Clean up the use of static and anonymous namespaces. This turned up
...
several things that were neither in an anonymous namespace nor static
but not intended to be global.
llvm-svn: 51017
2008-05-13 00:00:25 +00:00
Dan Gohman
a363ba510c
Don't include <map> in Pass.h, which doesn't need it. This requires
...
adding <map> to many files that actually do need it.
llvm-svn: 48667
2008-03-21 23:51:57 +00:00
Chris Lattner
0b6ec4a6b2
simplify some code, BreakUpSubtract always returns nonnull now.
...
llvm-svn: 47251
2008-02-18 02:18:25 +00:00
Chris Lattner
51a663a8fe
fix pasto
...
llvm-svn: 47242
2008-02-17 20:54:40 +00:00
Chris Lattner
4a34461d64
Split up subtracts into add+negate if they have a reassociable use or operand
...
that is also a subtract. This implements PR2047 and Transforms/Reassociate/subtest2.ll
llvm-svn: 47241
2008-02-17 20:51:26 +00:00
Chris Lattner
cd6f9cea98
make the logic for breaking up subtracts more explicit, no
...
functionality change.
llvm-svn: 47239
2008-02-17 20:44:51 +00:00
Dan Gohman
aad233ea10
Use empty() instead of comparing size() with zero.
...
llvm-svn: 46514
2008-01-29 13:02:09 +00:00
Chris Lattner
ad9a6ccb83
Remove attribution from file headers, per discussion on llvmdev.
...
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Nick Lewycky
c2306ff5b4
Fix typo in comment.
...
llvm-svn: 36873
2007-05-06 13:37:16 +00:00
Devang Patel
cd45427a87
Drop 'const'
...
llvm-svn: 36662
2007-05-03 01:11:54 +00:00
Devang Patel
8ee9065162
Use 'static const char' instead of 'static const int'.
...
Due to darwin gcc bug, one version of darwin linker coalesces
static const int, which defauts PassID based pass identification.
llvm-svn: 36652
2007-05-02 21:39:20 +00:00
Devang Patel
38a66bc82e
Do not use typeinfo to identify pass in pass manager.
...
llvm-svn: 36632
2007-05-01 21:15:47 +00:00
Reid Spencer
1f970769e8
Prefer non-virtual calls to ConstantInt::isZero over virtual calls to
...
Constant::isNullValue() in situations where it is possible.
llvm-svn: 34821
2007-03-02 00:28:52 +00:00
Reid Spencer
3a7689fe22
Use isUnitValue() instead of getZExtValue() == 1 which will prevent an
...
assert if the ConstantInt's value is large.
llvm-svn: 34814
2007-03-01 21:51:23 +00:00
Reid Spencer
55e4e98a2a
For PR1195:
...
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.
llvm-svn: 34293
2007-02-15 02:26:10 +00:00
Chris Lattner
b131b3e07e
Simplify code by using value::takename
...
llvm-svn: 34176
2007-02-11 01:23:03 +00:00
Reid Spencer
8749d297f5
Apply the VISIBILITY_HIDDEN field to the remaining anonymous classes in
...
the Transforms library. This reduces debug library size by 132 KB, debug
binary size by 376 KB, and reduces link time for llvm tools slightly.
llvm-svn: 33939
2007-02-05 23:32:05 +00:00
Reid Spencer
e33c18f4d2
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
Chris Lattner
c5e1611848
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
Zhou Sheng
23d24526b2
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
4428c3483b
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
Chris Lattner
9e7640cf02
Switch over Transforms/Scalar to use the STATISTIC macro. For each statistic
...
converted, we lose a static initializer. This also allows GCC to emit warnings
about unused statistics.
llvm-svn: 32690
2006-12-19 21:40:18 +00:00
Bill Wendling
23b8b13c9d
Removing even more <iostream> includes.
...
llvm-svn: 32320
2006-12-07 20:04:42 +00:00
Chris Lattner
a531ce882e
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
3d1758e08c
Remove the 'printname' argument to WriteAsOperand. It is always true, and
...
passing false would make the asmprinter fail anyway.
llvm-svn: 32264
2006-12-06 06:16:21 +00:00
Reid Spencer
1abf69e923
For PR950:
...
Replace the REM instruction with UREM, SREM and FREM.
llvm-svn: 31369
2006-11-02 01:53:59 +00:00
Reid Spencer
6833ffe8b8
For PR950:
...
Make necessary changes to support DIV -> [SUF]Div. This changes llvm to
have three division instructions: signed, unsigned, floating point. The
bytecode and assembler are bacwards compatible, however.
llvm-svn: 31195
2006-10-26 06:15:43 +00:00
Reid Spencer
d414793dbc
For PR950:
...
This patch implements the first increment for the Signless Types feature.
All changes pertain to removing the ConstantSInt and ConstantUInt classes
in favor of just using ConstantInt.
llvm-svn: 31063
2006-10-20 07:07:24 +00:00
Chris Lattner
a39dcb5377
eliminate RegisterOpt. It does the same thing as RegisterPass.
...
llvm-svn: 29925
2006-08-27 22:42:52 +00:00
Chris Lattner
2118062b9c
Fix Transforms/Reassociate/2006-04-27-ReassociateVector.ll
...
llvm-svn: 28007
2006-04-28 04:14:49 +00:00
Chris Lattner
92090188c3
Implement a FIXME, recusively reassociating
...
A*A*B + A*A*C --> A*(A*B+A*C) --> A*(A*(B+C))
This implements Reassociate/mul-factor3.ll
llvm-svn: 26757
2006-03-14 16:04:29 +00:00
Chris Lattner
9ccb2201b8
extract some code into a method, no functionality change
...
llvm-svn: 26755
2006-03-14 07:11:11 +00:00
Chris Lattner
0e3d81d8ff
Promote shifts by a constant to multiplies so that we can reassociate
...
(x<<1)+(y<<1) -> (X+Y)<<1. This implements
Transforms/Reassociate/shift-factor.ll
llvm-svn: 26753
2006-03-14 06:55:18 +00:00
Chris Lattner
7694fbc4bb
Add factoring of multiplications, e.g. turning A*A+A*B into A*(A+B).
...
Testcase here: Transforms/Reassociate/mulfactor.ll
llvm-svn: 26524
2006-03-04 09:31:13 +00:00
Chris Lattner
2588f0eb8f
Make iostream #inclusion explicit
...
llvm-svn: 25514
2006-01-22 23:32:06 +00:00
Chris Lattner
371f542759
Fix a problem that Dan Berlin noticed, where reassociation would not succeed
...
in building maximal expressions before simplifying them. In particular, i
cases like this:
X-(A+B+X)
the code would consider A+B+X to be a maximal expression (not understanding
that the single use '-' would be turned into a + later), simplify it (a noop)
then later get simplified again.
Each of these simplify steps is where the cost of reassociation comes from,
so this patch should speed up the already fast pass a bit.
Thanks to Dan for noticing this!
llvm-svn: 23214
2005-09-02 07:07:58 +00:00
Chris Lattner
4cade5915d
Avoid creating garbage instructions, just move the old add instruction
...
to where we need it when converting -(A+B+C) -> -A + -B + -C.
llvm-svn: 23213
2005-09-02 06:38:04 +00:00
Chris Lattner
dfba6f5029
add some assertions and fix problems where reassociate could access the
...
Ops vector out of range
llvm-svn: 23211
2005-09-02 05:23:22 +00:00
Chris Lattner
efc5937add
Fix Regression/Transforms/Reassociate/2005-08-24-Crash.ll
...
llvm-svn: 23019
2005-08-24 17:55:32 +00:00
Chris Lattner
c6571e5c64
Use the new 'moveBefore' method to simplify some code. Really, which is
...
easier to understand? :)
llvm-svn: 22706
2005-08-08 19:11:57 +00:00
Jeff Cohen
bd51ec7461
Eliminate all remaining tabs and trailing spaces.
...
llvm-svn: 22523
2005-07-27 06:12:32 +00:00
Chris Lattner
758f2fe1a3
Fix Reassociate/shifttest.ll
...
llvm-svn: 21839
2005-05-10 03:39:25 +00:00
Chris Lattner
d5a353a675
Implement Reassociate/mul-neg-add.ll
...
llvm-svn: 21788
2005-05-08 21:41:35 +00:00
Chris Lattner
f535f6e808
Bail out earlier
...
llvm-svn: 21786
2005-05-08 21:33:47 +00:00
Chris Lattner
39f74def7f
Teach reassociate that 0-X === X*-1
...
llvm-svn: 21785
2005-05-08 21:28:52 +00:00