Chris Lattner
b32b59cd84
Revert another incorrectly applied chunk, which fixes InstCombine/vec_insert_to_shuffle.ll
...
llvm-svn: 33705
2007-01-31 18:09:17 +00:00
Chris Lattner
46ce2a4cca
Fix a minor bug in my patch yesterday that broken ConstProp/bswap.ll
...
llvm-svn: 33704
2007-01-31 18:04:55 +00:00
Lauro Ramos Venancio
e22bc8635e
ARM fix: Miscompilation when frame pointer can't be eliminated. Uninitialized frame pointer register is used.
...
llvm-svn: 33703
2007-01-31 13:12:46 +00:00
Evan Cheng
608ad034b0
Specify the right CC for comparison libcalls.
...
llvm-svn: 33702
2007-01-31 09:30:58 +00:00
Evan Cheng
3ec2e08a37
Allow the target to override the ISD::CondCode that's to be used to test the
...
result of the comparison libcall against zero.
llvm-svn: 33701
2007-01-31 09:29:11 +00:00
Evan Cheng
aa6f0f3b3b
Added O_F32 and O_64 in addition to UO_F32 and UO_64 even though by
...
default they call the same libgcc routine. The result of the calls are
"tested" differently.
llvm-svn: 33700
2007-01-31 09:26:31 +00:00
Evan Cheng
e5f5439313
Observe -soft-float.
...
llvm-svn: 33699
2007-01-31 08:40:13 +00:00
Chris Lattner
b8f4cada84
minor cleanups. Fix off-by-one in accounting the number of nodes when the
...
table grows.
llvm-svn: 33698
2007-01-31 06:04:41 +00:00
Chris Lattner
c2b59bba2a
shutdown at end of run
...
llvm-svn: 33697
2007-01-31 04:45:28 +00:00
Chris Lattner
0deac2a51d
regenerate
...
llvm-svn: 33696
2007-01-31 04:44:08 +00:00
Chris Lattner
b0a0d4f999
eliminate a temporary vector
...
llvm-svn: 33695
2007-01-31 04:43:46 +00:00
Chris Lattner
9888e0a048
elimiante a temporary vector
...
llvm-svn: 33694
2007-01-31 04:42:05 +00:00
Chris Lattner
f456997cb6
eliminate temporary vectors
...
llvm-svn: 33693
2007-01-31 04:40:53 +00:00
Chris Lattner
b5aa990588
Revise APIs for creating constantexpr GEPs to not require the use of vectors.
...
This allows us to eliminate many temporary vectors, and theirassociated malloc/free pairs.
llvm-svn: 33692
2007-01-31 04:40:28 +00:00
Chris Lattner
677cab8ef3
Revise APIs for creating constantexpr GEPs to not require the use of
...
vectors. This allows us to eliminate many temporary vectors, and their
associated malloc/free pairs.
llvm-svn: 33691
2007-01-31 04:39:29 +00:00
Evan Cheng
0ee9a27976
- Added Thumb constpool island support.
...
- Islands are inserted right after the user MI since thumb LDR cannot encode
negative offset.
llvm-svn: 33690
2007-01-31 02:22:22 +00:00
Reid Spencer
0dd2b76a98
Fix version information for new instructions.
...
llvm-svn: 33689
2007-01-31 01:18:59 +00:00
Chris Lattner
eb3d93c6a8
Move symbolic constant folding code to libanalysis.
...
llvm-svn: 33688
2007-01-31 00:53:10 +00:00
Chris Lattner
be153e31f3
Move some symbolic constant folding code out of instcombine into a place
...
it can be used by multiple clients. This specifically allows the inliner
to constant fold symbolically.
llvm-svn: 33687
2007-01-31 00:51:48 +00:00
Reid Spencer
ec249e7f4e
Correct the instruction op codes to meet current head changes.
...
llvm-svn: 33686
2007-01-31 00:38:46 +00:00
Reid Spencer
0a7b4d71e6
Excise documentation about Compaction Tables.
...
llvm-svn: 33685
2007-01-31 00:26:08 +00:00
Chris Lattner
937bf05f43
The local "ConstantFold" method is now just a watered down version of
...
ConstantFoldInstOperands. Switch to ConstantFoldInstOperands and remove
ConstantFold.
llvm-svn: 33683
2007-01-30 23:52:44 +00:00
Chris Lattner
8959334b96
Make this a *real* header:
...
1. Remove using namespace llvm;
2. Remove unneeded #includes.
3. Add #include guard.
Also add prototypes for new code moved from transformutils to libanalysis.
llvm-svn: 33682
2007-01-30 23:47:35 +00:00
Chris Lattner
854464d748
move constant folding code out of Utils/Local into libanalysis
...
llvm-svn: 33681
2007-01-30 23:46:43 +00:00
Chris Lattner
7db51ec161
Adjust #includes to match movement of constant folding code from transformutils to libanalysis.
...
llvm-svn: 33680
2007-01-30 23:46:24 +00:00
Chris Lattner
1765c2eed8
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
4c01d0055a
remove now-dead code.
...
llvm-svn: 33678
2007-01-30 23:29:47 +00:00
Chris Lattner
a49a1d15dc
the inliner pass now passes targetdata down through the inliner api's
...
llvm-svn: 33677
2007-01-30 23:28:39 +00:00
Chris Lattner
23628987e2
The inliner/cloner can now optionally take TargetData info, which can be
...
used by constant folding.
llvm-svn: 33676
2007-01-30 23:22:39 +00:00
Chris Lattner
6bd1447e03
reformat comment
...
llvm-svn: 33675
2007-01-30 23:16:22 +00:00
Chris Lattner
d1acbffe1b
pass TD to constant folding apis
...
llvm-svn: 33674
2007-01-30 23:16:15 +00:00
Chris Lattner
116b82d058
adjust to constant folding api changes.
...
llvm-svn: 33673
2007-01-30 23:15:43 +00:00
Chris Lattner
129e04aa43
use smallvector instead of vector to make constant folding a bit more efficient
...
llvm-svn: 33672
2007-01-30 23:15:19 +00:00
Chris Lattner
58e09aa521
adjust to api change
...
llvm-svn: 33671
2007-01-30 23:14:52 +00:00
Chris Lattner
659afcca15
Change constant folding APIs to take an optional TargetData, and change
...
ConstantFoldInstOperands/ConstantFoldCall to take a pointer to an array
of operands + size, instead of an std::vector.
In some cases, switch to using a SmallVector instead of a vector.
This allows us to get rid of some special case gross code that was there
to avoid the cost of constructing a vector.
llvm-svn: 33670
2007-01-30 23:13:49 +00:00
Chris Lattner
59ba02e557
Change constant folding APIs to take an optional TargetData, and change
...
ConstantFoldInstOperands/ConstantFoldCall to take a pointer to an array
of operands + size, instead of an std::vector.
llvm-svn: 33669
2007-01-30 23:12:47 +00:00
Evan Cheng
b671880197
Combine two tests.
...
llvm-svn: 33668
2007-01-30 23:06:22 +00:00
Evan Cheng
26ee4f882b
During PEI, if the immediate value of sp + offset is too large (i.e. something
...
that would require > 3 instructions to materialize), load the immediate from a
constpool entry.
llvm-svn: 33667
2007-01-30 23:01:46 +00:00
Chris Lattner
27f0acaaec
remove some bits that are not yet meant to land.
...
llvm-svn: 33666
2007-01-30 22:50:32 +00:00
Chris Lattner
b1ada91005
Symbolically evaluate constant expressions like &A[123] - &A[4].f.
...
This occurs in C++ code like:
#include <iostream>
#include <iterator>
int a[] = { 1, 2, 3, 4, 5 };
int main() {
using namespace std;
copy(a, a + sizeof(a)/sizeof(a[0]), ostream_iterator<int>(cout, "\n"));
return 0;
}
Before we would decide the loop trip count is:
sdiv (i32 sub (i32 ptrtoint (i32* getelementptr ([5 x i32]* @a, i32 0, i32 5) to i32), i32 ptrtoint ([5 x i32]* @a to i32)), i32 4)
Now we decide it is "5". Amazing.
This code will need to be refactored, but I'm doing that as a separate
commit.
llvm-svn: 33665
2007-01-30 22:32:46 +00:00
Evan Cheng
0f07707270
- Fix codegen for pc relative constant (e.g. JT) in thumb mode:
...
.set PCRELV0, (LJTI1_0_0-(LPCRELL0+4))
LPCRELL0:
add r1, pc, #PCRELV0
This is not legal since add r1, pc, #c requires the constant be a multiple of 4.
Do the following instead:
.set PCRELV0, (LJTI1_0_0-(LPCRELL0+4))
LPCRELL0:
mov r1, #PCRELV0
add r1, pc
- In thumb mode, it's not possible to use .set generate a pc relative stub
address. The stub is ARM code which is in a different section from the thumb
code. Load the value from a constpool instead.
- Some asm printing clean up.
llvm-svn: 33664
2007-01-30 20:37:08 +00:00
Reid Spencer
19af04a142
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
Reid Spencer
a4b339934a
Compaction tables no longer supported, remove its block ID.
...
llvm-svn: 33662
2007-01-30 19:37:26 +00:00
Reid Spencer
00309bbef6
Bye, Bye Compaction Tables. The benefit compaction tables provides doesn't
...
outweight its computational costs. This patch removes all compaction
table handling from the bcreader and bcwriter. For the record, here's the
difference betweeen having and not having compaction tables for some tests:
Test With Without Size Chg
Olden/mst 5,602 5,598 +0.1%
viterbi 18,026 17,795 +1.3%
obsequi 162,133 166,663 -2.8%
burg 224,090 228,148 -1.8%
kimwitu++ 4,933,263 5,121,159 -3.8%
176.gcc 8,470,424 9,141,539 -7.3%
It seems that it is more beneficial to larger files, but even on the largest
test case we have (176.gcc) it only amounts ot an I/O saving of 7.3%.
llvm-svn: 33661
2007-01-30 19:36:46 +00:00
Reid Spencer
82293f34de
For PR411:
...
Update these tests to not use the same name even though the type of the
value differs. After PR411 hits, type planes will be gone and it will be
illegal for a name to be used twice, regardless of type.
llvm-svn: 33660
2007-01-30 16:16:01 +00:00
Reid Spencer
26e829dec4
Add a gxxcmd variable for the g++ command line used to build llvm.
...
llvm-svn: 33659
2007-01-30 16:06:55 +00:00
Evan Cheng
5e0f0364d0
Copy and paste bug.
...
llvm-svn: 33658
2007-01-30 08:22:33 +00:00
Evan Cheng
3f02e5b1e7
Darwin -static should codegen static ctors / dtors to .constructor / .destructor sections.
...
llvm-svn: 33657
2007-01-30 08:04:53 +00:00
Evan Cheng
78628c7f32
Misseed thumb jumptable branch.
...
llvm-svn: 33656
2007-01-30 08:03:06 +00:00
Reid Spencer
5be7fde6dd
Make the input legal.
...
llvm-svn: 33655
2007-01-30 06:32:25 +00:00