Evan Cheng
0ce094c7a8
Add entry.
...
llvm-svn: 33723
2007-01-31 22:11:38 +00:00
Evan Cheng
41bee13a0e
Thumb add sp, #imm requires the immediate value be multiple of 4. For now,
...
change preferred alignment of short, byte, bool to 4.
llvm-svn: 33722
2007-01-31 22:08:40 +00:00
Evan Cheng
476cd5c2d1
Update comment.
...
llvm-svn: 33721
2007-01-31 22:06:44 +00:00
Evan Cheng
8596afac45
Dead comment.
...
llvm-svn: 33719
2007-01-31 21:31:25 +00:00
Reid Spencer
6d6e7a072b
Add some debug output.
...
llvm-svn: 33718
2007-01-31 21:27:38 +00:00
Evan Cheng
a08ef111bb
Thumb asm syntax does not want 's' suffix for flag setting opcodes.
...
llvm-svn: 33717
2007-01-31 20:12:31 +00:00
Chris Lattner
bebab8c026
remove temporary vectors.
...
llvm-svn: 33715
2007-01-31 20:08:52 +00:00
Chris Lattner
237fa61eb7
eliminate temporary vectors
...
llvm-svn: 33713
2007-01-31 20:07:32 +00:00
Chris Lattner
8b052ca7d0
eliminate temporary vectors
...
llvm-svn: 33712
2007-01-31 19:59:55 +00:00
Evan Cheng
1df8529721
When determining whether a pc relative branch / load displacement fits in the
...
instruction field, adjust it for PC value (4 for thumb, 8 for arm).
llvm-svn: 33711
2007-01-31 19:57:44 +00:00
Chris Lattner
539d9c81fd
eliminate a temporary vector while parsing gep's from bc files.
...
llvm-svn: 33710
2007-01-31 19:56:15 +00:00
Chris Lattner
084d1d8706
A relatively simple PPC optimization.
...
llvm-svn: 33709
2007-01-31 19:49:20 +00:00
Chris Lattner
55e5440018
implement the new GEP instruction ctors.
...
llvm-svn: 33708
2007-01-31 19:47:18 +00:00
Evan Cheng
f6e0e6cada
Some comments.
...
llvm-svn: 33707
2007-01-31 18:29:27 +00:00
Evan Cheng
16edf4f9bf
ConstPool island bug: watch out for cases where UserMI is the last MI of the BB.
...
llvm-svn: 33706
2007-01-31 18:19:07 +00:00
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
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
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
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
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
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
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
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
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
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