Chris Lattner
8dbea5454d
adjust to constant folding api changes.
...
llvm-svn: 33673
2007-01-30 23:15:43 +00:00
Chris Lattner
0d74d3c09b
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
6fc4b46d43
adjust to api change
...
llvm-svn: 33671
2007-01-30 23:14:52 +00:00
Chris Lattner
2c4610e4ca
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
1e6cf2ee3c
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
421fdb2a7e
Combine two tests.
...
llvm-svn: 33668
2007-01-30 23:06:22 +00:00
Evan Cheng
dd7a688bb8
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
2b15f2ba9d
remove some bits that are not yet meant to land.
...
llvm-svn: 33666
2007-01-30 22:50:32 +00:00
Chris Lattner
4284f6463a
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
83f35170fa
- 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
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
Reid Spencer
3a0bbb0a4d
Compaction tables no longer supported, remove its block ID.
...
llvm-svn: 33662
2007-01-30 19:37:26 +00:00
Reid Spencer
f1826e2adf
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
af6a408117
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
6f880918d0
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
95b85e34ff
Copy and paste bug.
...
llvm-svn: 33658
2007-01-30 08:22:33 +00:00
Evan Cheng
0e083d0161
Darwin -static should codegen static ctors / dtors to .constructor / .destructor sections.
...
llvm-svn: 33657
2007-01-30 08:04:53 +00:00
Evan Cheng
ce8fa3ed83
Misseed thumb jumptable branch.
...
llvm-svn: 33656
2007-01-30 08:03:06 +00:00
Reid Spencer
6ebc06f702
Make the input legal.
...
llvm-svn: 33655
2007-01-30 06:32:25 +00:00
Evan Cheng
fcb9b8b0b7
Add / merge tests.
...
llvm-svn: 33654
2007-01-30 03:06:19 +00:00
Evan Cheng
e43ca022bf
In thumb mode, round up stack frame size to multiple of 4 since add/sub
...
sp, imm instructions implicitly multiply the offset by 4.
llvm-svn: 33653
2007-01-30 02:57:02 +00:00
Evan Cheng
c419d983d6
Thumb eliminateFrameIndex fixes.
...
llvm-svn: 33652
2007-01-30 02:36:01 +00:00
Evan Cheng
1cd3c0efb8
Change the operand orders to t_addrmode_s* to make it easier to morph
...
instructions that use these address modes to instructions that use
t_addrmode_sp.
llvm-svn: 33651
2007-01-30 02:35:32 +00:00
Evan Cheng
7fa6964dc2
- In thumb mode, if size of MachineFunction is >= 2048, force LR to be
...
spilled (if it is not already).
- If LR is spilled, use BL to implement far jumps. LR is not used as a GPR
in thumb mode so it can be clobbered if it is properly spilled / restored
in prologue / epilogue.
- If LR is force spilled but no far jump has been emitted, try undo'ing the
spill by:
push lr -> delete
pop pc -> bx lr
llvm-svn: 33650
2007-01-30 01:18:38 +00:00
Evan Cheng
863736b0ad
Use BL to implement Thumb far jumps.
...
llvm-svn: 33649
2007-01-30 01:13:37 +00:00
Chris Lattner
6acab41ede
test that the 'ir' constraint works.
...
llvm-svn: 33646
2007-01-29 23:55:20 +00:00
Evan Cheng
760c68b8af
Factor GetInstSize() out of constpool island pass.
...
llvm-svn: 33644
2007-01-29 23:45:17 +00:00
Chris Lattner
d27f95e08d
add initial support for handling inline asms with multiple constraints.
...
This doesn't do the "right thing" but will probably work in most cases.
This implements CodeGen/PowerPC/2007-01-29-lbrx-asm.ll.
llvm-svn: 33643
2007-01-29 23:45:14 +00:00
Chris Lattner
9699e54088
new testcase
...
llvm-svn: 33642
2007-01-29 23:45:03 +00:00
Jim Laskey
ee23de6c36
Out of line function.
...
llvm-svn: 33641
2007-01-29 23:40:33 +00:00
Devang Patel
b64c433619
Use StartPassTimer() and StopPassManager()
...
llvm-svn: 33640
2007-01-29 23:29:54 +00:00
Jim Laskey
3f9f250928
Only gather frame info if debug or eh.
...
llvm-svn: 33639
2007-01-29 23:20:22 +00:00
Devang Patel
1c3633e461
- Undo previous check-in (i.e. Do not export TimingInfo class through
...
PassManagers.h).
- Add StopPassTimer() and StartPassTimer() to expose TimingInfo to
CallGraphPassManager
- Use these two APIs in CalLgraphPassManager to measure timings.
llvm-svn: 33638
2007-01-29 23:10:37 +00:00
Nate Begeman
eda5997cc8
Finish off bug 680, allowing targets to custom lower frame and return
...
address nodes.
llvm-svn: 33636
2007-01-29 22:58:52 +00:00
Nate Begeman
e3b09fbbb0
We'd still like to register allocate r2 on darwin before the callee-save
...
regs.
llvm-svn: 33635
2007-01-29 22:57:48 +00:00
Jim Laskey
52726f5837
rename flag
...
llvm-svn: 33634
2007-01-29 22:40:03 +00:00
Evan Cheng
8953edc8a5
Comment.
...
llvm-svn: 33633
2007-01-29 22:23:02 +00:00
Evan Cheng
43e8518d8b
Remember if LR register has been spilled in this function.
...
llvm-svn: 33632
2007-01-29 22:22:24 +00:00
Anton Korobeynikov
b8d8b82950
Save all registers by default, as they can be used to pass parameters
...
for "inreg" calls
llvm-svn: 33631
2007-01-29 21:28:01 +00:00
Nate Begeman
17f250005a
Update some of the llvm in the readme
...
llvm-svn: 33630
2007-01-29 21:21:22 +00:00
Nate Begeman
2a562ba47b
Properly support cstrings
...
llvm-svn: 33629
2007-01-29 21:20:42 +00:00
Jim Laskey
d1154860a4
Flag to control exception handling.
...
llvm-svn: 33628
2007-01-29 20:48:32 +00:00
Devang Patel
5a4a315aed
Measure timings.
...
llvm-svn: 33627
2007-01-29 20:08:03 +00:00
Devang Patel
55bcb50840
Move TimingInfo into PassManagers.h so that other libs can use it.
...
llvm-svn: 33626
2007-01-29 20:06:26 +00:00
Jim Laskey
18c3b5267d
Disable zero landing pads for now.
...
llvm-svn: 33625
2007-01-29 20:01:41 +00:00
Reid Spencer
bae85637c7
Regenerate.
...
llvm-svn: 33624
2007-01-29 19:08:46 +00:00
Reid Spencer
e87c917a69
For PR1142:
...
When an unresolved definition is found, check to see if it is only unresolved
because the csretcc was upgraded to the sret param attribute. Such changes
change the function type and lead to unresolved definitions. In such cases, just
cast the function to the type expected by the CallInst. That is, cast to the
version of the function that has the sret param attribute.
llvm-svn: 33623
2007-01-29 19:07:18 +00:00
Jim Laskey
b4a2f05d1c
Landing pad-less eh for PPC.
...
llvm-svn: 33622
2007-01-29 18:51:14 +00:00
Jim Laskey
c8397b9214
Update project
...
llvm-svn: 33621
2007-01-29 18:45:08 +00:00
Reid Spencer
42b2c08e3a
Remove tabs.
...
llvm-svn: 33620
2007-01-29 17:55:50 +00:00
Reid Spencer
1e960cd4fd
Implement use of new IntrinsicLowering interface.
...
llvm-svn: 33619
2007-01-29 17:51:02 +00:00
Reid Spencer
d7035b654b
Use TargetData to obtain the correct size of the "size_t" argument for
...
functions like memcpy, memmove and memset. Ensure only one prototype is
used for these functions and that it matches the system definition by
using the appropriate type for the size argument.
llvm-svn: 33618
2007-01-29 17:42:06 +00:00
Reid Spencer
34dbbca483
IntrinsicLowering now requires TargetData.
...
llvm-svn: 33617
2007-01-29 17:39:50 +00:00
Jim Laskey
d33e5a822b
Update project.
...
llvm-svn: 33616
2007-01-29 15:09:35 +00:00
Reid Spencer
c3eba3fc93
Regenerate.
...
llvm-svn: 33615
2007-01-29 05:41:34 +00:00
Reid Spencer
8714f0025c
Upgrade old csret calling convention into sret parameter attribute.
...
llvm-svn: 33614
2007-01-29 05:41:09 +00:00
Reid Spencer
ccef5a35bf
Update this test case to look for sret parameter attribute not csret cc.
...
llvm-svn: 33613
2007-01-29 05:40:02 +00:00
Nick Lewycky
56639800c9
Simplify names of lattice values. SGTUNE becomes SGT, for example.
...
Fix initializeConstant, now initializeInt. Fixes major performance
bottleneck.
X == Y || X->DominatedBy(Y) is redundant. Remove the X == Y part.
Fix crasher in makeEqual where getOrInsertNode would add a new constant,
producing an NE relationship between the two members we're trying to make
equal. This now allows us to mark more BBs as unreachable.
llvm-svn: 33612
2007-01-29 02:56:54 +00:00
Chris Lattner
78bddc388c
Read from the right place.
...
llvm-svn: 33611
2007-01-29 02:18:13 +00:00
Chris Lattner
7f3bd82ab9
Fix PR1139
...
llvm-svn: 33610
2007-01-29 00:21:34 +00:00
Anton Korobeynikov
6843149863
Make doxygen happy
...
llvm-svn: 33609
2007-01-29 00:09:00 +00:00
Reid Spencer
c7765617d2
For PR1138:
...
Force memcpy to be the 32-bit variant. Since this is only used with
CBE and lli which both target 32-bit machines, this should be okay.
llvm-svn: 33608
2007-01-28 22:28:00 +00:00
Reid Spencer
326bf785a2
Adjust a comment to reflect reality.
...
llvm-svn: 33607
2007-01-28 22:26:42 +00:00
Anton Korobeynikov
06f7d4bec7
Arguments are counting from 1. not from 0. Maybe we should change
...
numbering somehow? E.g. make return argument the last?
llvm-svn: 33606
2007-01-28 18:01:49 +00:00
Anton Korobeynikov
9fa3839d29
More cleanup
...
llvm-svn: 33605
2007-01-28 16:04:40 +00:00
Nick Lewycky
eba26e463a
Drop CSRET from here too.
...
llvm-svn: 33604
2007-01-28 15:51:15 +00:00
Nick Lewycky
0c49722b36
Fix compile error "jump to case label crosses initialization".
...
What compiler are people using that accepts this code?
llvm-svn: 33603
2007-01-28 15:39:16 +00:00
Anton Korobeynikov
e93c6e8dca
Grammar fix
...
llvm-svn: 33602
2007-01-28 15:27:21 +00:00
Anton Korobeynikov
15f3028ba1
Merge error at my side. Fixed.
...
llvm-svn: 33601
2007-01-28 15:25:24 +00:00
Anton Korobeynikov
e816685bd5
Document 'inreg' & 'sret'
...
llvm-svn: 33600
2007-01-28 14:30:45 +00:00
Anton Korobeynikov
75e8a144d4
Regenerate
...
llvm-svn: 33599
2007-01-28 13:37:39 +00:00
Anton Korobeynikov
4bca4d157f
Drop CSRET CC
...
llvm-svn: 33598
2007-01-28 13:36:18 +00:00
Anton Korobeynikov
037c867b54
Propagate changes from my local tree. This patch includes:
...
1. New parameter attribute called 'inreg'. It has meaning "place this
parameter in registers, if possible". This is some generalization of
gcc's regparm(n) attribute. It's currently used only in X86-32 backend.
2. Completely rewritten CC handling/lowering code inside X86 backend.
Merged stdcall + c CCs and fastcall + fast CC.
3. Dropped CSRET CC. We cannot add struct return variant for each
target-specific CC (e.g. stdcall + csretcc and so on).
4. Instead of CSRET CC introduced 'sret' parameter attribute. Setting in
on first attribute has meaning 'This is hidden pointer to structure
return. Handle it gently'.
5. Fixed small bug in llvm-extract + add new feature to
FunctionExtraction pass, which relinks all internal-linkaged callees
from deleted function to external linkage. This will allow further
linking everything together.
NOTEs: 1. Documentation will be updated soon.
2. llvm-upgrade should be improved to translate csret => sret.
Before this, there will be some unexpected test fails.
llvm-svn: 33597
2007-01-28 13:31:35 +00:00
Reid Spencer
262068d2da
This file has been dead for a long time. Remove it.
...
llvm-svn: 33596
2007-01-28 08:04:14 +00:00
Reid Spencer
07af391927
Regenerate.
...
llvm-svn: 33595
2007-01-28 00:52:05 +00:00
Reid Spencer
dfa78fba8e
For PR1137:
...
When a value is found to have the same name as another, try harder to
disambiguate when its a type plane collapse issue and when it isn't. We
traverse the type to see if it contains an integer. If it does not then
we issue the error because it can't be resulting from integer type planes
collapsing. Otherwise we just rename it, even if that's a bit of overkill.
llvm-svn: 33594
2007-01-28 00:51:40 +00:00
Reid Spencer
4be2853bfb
Test case for PR1137. This makes sure that we don't get erroneous
...
"redefinition" errors that cause the upgrade to fail.
llvm-svn: 33593
2007-01-28 00:45:28 +00:00
Chris Lattner
c56fd7fe0f
provide a definition for uintptr_t
...
llvm-svn: 33592
2007-01-27 23:52:33 +00:00
Chris Lattner
c8fb6de78c
Fix test/Transforms/InstCombine/2007-01-27-AndICmp.ll, a miscompilation of
...
Mozilla that Anton tracked down.
llvm-svn: 33591
2007-01-27 23:08:34 +00:00
Chris Lattner
d50698107e
Testcase for an instcombine miscompilation reduced by Anton.
...
llvm-svn: 33590
2007-01-27 23:07:12 +00:00
Reid Spencer
f422607990
Use -f option so test is repeatable.
...
llvm-svn: 33589
2007-01-27 21:10:35 +00:00
Reid Spencer
5dd5d4b09e
Add a test case for PR411.
...
llvm-svn: 33588
2007-01-27 21:09:03 +00:00
Reid Spencer
e1e8a58cd3
Make this really do nothing.
...
llvm-svn: 33587
2007-01-27 21:08:29 +00:00
Owen Anderson
8ce4b1b9cd
Describe the recent changes to the bytecode format for PR761.
...
llvm-svn: 33586
2007-01-27 19:23:25 +00:00
Bill Wendling
fa663eec17
Make d'tor out-of-line.
...
llvm-svn: 33585
2007-01-27 11:40:32 +00:00
Chris Lattner
107cba6102
Make SmallSet<whatever*, N> faster by transparently implementing it with
...
SmallPtrSet. Some clients will need to use SmallPtrSet directly though if
they need to iterate over the set.
llvm-svn: 33584
2007-01-27 08:20:15 +00:00
Chris Lattner
c4f9d11c32
add some missing API
...
llvm-svn: 33583
2007-01-27 08:19:03 +00:00
Chris Lattner
084a169d49
Give SmallSet a reasonable fallback if it gets large: use an std::set.
...
llvm-svn: 33582
2007-01-27 08:14:53 +00:00
Chris Lattner
39ab70cf80
implement SmallPtrSet::erase
...
llvm-svn: 33581
2007-01-27 07:59:10 +00:00
Chris Lattner
030a2dcc1e
Fix a limitation of SmallPtrSet. Before it would assert if the smallsize
...
was not a power of two. Now it rounds up to the next power of two internally.
llvm-svn: 33580
2007-01-27 07:52:27 +00:00
Chris Lattner
498f00a26a
add some comments on the algorithm
...
llvm-svn: 33579
2007-01-27 07:24:51 +00:00
Chris Lattner
ab5d0ba168
add a note
...
llvm-svn: 33578
2007-01-27 07:18:32 +00:00
Chris Lattner
74102df857
Add a new SmallSet ADT specialized for pointers.
...
llvm-svn: 33577
2007-01-27 07:10:46 +00:00
Reid Spencer
679004e719
Add some comments, fix an 80 cols violation.
...
llvm-svn: 33576
2007-01-27 04:42:50 +00:00
Bill Wendling
c1f1035518
Return an X86ELFWriterInfo object.
...
llvm-svn: 33574
2007-01-27 02:56:16 +00:00
Bill Wendling
3814e72ed1
Use TargetELFWriterInfo class.
...
llvm-svn: 33573
2007-01-27 02:55:44 +00:00
Bill Wendling
a9167da9bb
Accessor for the TargetELFWriterInfo class object.
...
llvm-svn: 33572
2007-01-27 02:55:04 +00:00
Bill Wendling
2bab162501
X86 implementation of the TargetELFWriterInfo class.
...
llvm-svn: 33571
2007-01-27 02:54:30 +00:00
Bill Wendling
2ee13a0881
The TargetELFWriterInfo class holds target-specific information for the ELF writer.
...
llvm-svn: 33570
2007-01-27 02:53:50 +00:00
Evan Cheng
0cd49bc8a2
New entry.
...
llvm-svn: 33569
2007-01-27 02:33:22 +00:00
Evan Cheng
0701c5a074
Thumb jumptable support.
...
llvm-svn: 33568
2007-01-27 02:29:45 +00:00
Chris Lattner
672a31c835
simplify insert interface
...
llvm-svn: 33567
2007-01-27 02:13:58 +00:00
Chris Lattner
33aba834e5
clean up comment
...
llvm-svn: 33566
2007-01-27 01:14:20 +00:00
Chris Lattner
a8026568b5
add an explanatory comment.
...
llvm-svn: 33565
2007-01-27 00:23:45 +00:00
Reid Spencer
514399daf1
Apparently the last commit is wrong. Reverted.
...
llvm-svn: 33564
2007-01-27 00:21:01 +00:00
Reid Spencer
5274612e1a
Remove a double negative.
...
llvm-svn: 33563
2007-01-27 00:16:07 +00:00
Evan Cheng
f40b9006a8
Thumb add / sub with carry.
...
llvm-svn: 33562
2007-01-27 00:07:15 +00:00
Evan Cheng
9f82ccb01f
Thumb tests.
...
llvm-svn: 33561
2007-01-27 00:05:14 +00:00
Evan Cheng
df446c6f72
Merge tests.
...
llvm-svn: 33560
2007-01-27 00:04:57 +00:00
Lauro Ramos Venancio
7d47719af0
Some asm directives fixes for ELF.
...
Now we can compile llvm-gcc on arm-linux-gnueabi!
llvm-svn: 33558
2007-01-26 23:24:43 +00:00
Jim Laskey
73e79b5a43
Make the constant honest.
...
llvm-svn: 33557
2007-01-26 23:00:54 +00:00
Nate Begeman
debcb5530c
Fix a spelling error
...
llvm-svn: 33556
2007-01-26 22:40:50 +00:00
Nate Begeman
f209495e93
Handle multiple functions, properly mangle symbols, and fix support for
...
scattered relocations.
llvm-svn: 33555
2007-01-26 22:39:48 +00:00
Chris Lattner
1ac3256c22
fit in 80 cols
...
llvm-svn: 33553
2007-01-26 21:48:40 +00:00
Jim Laskey
5a1df9748b
rename files
...
llvm-svn: 33552
2007-01-26 21:38:26 +00:00
Evan Cheng
add7f164a1
Represent tADDspi and tSUBspi as two-address instructions.
...
llvm-svn: 33551
2007-01-26 21:33:19 +00:00
Jim Laskey
c56315c2b5
Change the MachineDebugInfo to MachineModuleInfo to better reflect usage
...
for debugging and exception handling.
llvm-svn: 33550
2007-01-26 21:22:28 +00:00
Lauro Ramos Venancio
d45cd5eb81
Fix Data16bitsDirective for ELF.
...
llvm-svn: 33549
2007-01-26 21:20:45 +00:00
Evan Cheng
3c9dc6bd46
Conditional branch being fixed up is not the last MI in the BB, there is a
...
unconditional branch following it. Simply invert the condition and swap
destinations if the conditional branch can reach the destination of the
unconditional branch:
beq L1
b L2
=>
bne L2
b L1
llvm-svn: 33548
2007-01-26 20:38:26 +00:00
Reid Spencer
9f4cdd5d18
Regenerate.
...
llvm-svn: 33547
2007-01-26 20:31:18 +00:00
Reid Spencer
62b741dc4c
Make sure that an upgraded index is also inserted into the VIndices
...
otherwise it gets ignored.
This fixes test/CodeGen/X86/2006-05-11-InstrSched.ll
Thanks to Evan Cheng for noticing this.
llvm-svn: 33546
2007-01-26 20:29:52 +00:00
Reid Spencer
41210fb2dc
Regenerate.
...
llvm-svn: 33545
2007-01-26 19:59:25 +00:00
Reid Spencer
0bad131b17
Ensure that gep_upgrade zext instructions we insert have unique names.
...
llvm-svn: 33544
2007-01-26 19:58:59 +00:00
Lauro Ramos Venancio
aa26c1ab9d
If the constant pool value is a extern weak symbol, emit the weak reference.
...
llvm-svn: 33543
2007-01-26 19:51:32 +00:00
Evan Cheng
d02d75c295
extload -> zextload
...
llvm-svn: 33542
2007-01-26 19:13:16 +00:00
Reid Spencer
aecf935dc9
Remove extraneous ; to make some versions of bison happy.
...
llvm-svn: 33541
2007-01-26 18:26:23 +00:00
Devang Patel
a426fcd681
Order createSimplifyLibCallsPass() after a set of function level passes
...
so that these function passes are managed by CallGraphPassManager.
llvm-svn: 33540
2007-01-26 18:17:59 +00:00
Jim Laskey
214c582002
Files missing from LABEL check in.
...
llvm-svn: 33539
2007-01-26 17:29:20 +00:00
Reid Spencer
697ba1a507
Remove the SignedType class and other dead code. Improve comments.
...
llvm-svn: 33538
2007-01-26 17:13:53 +00:00
Jim Laskey
f9e5445ed4
Make LABEL a builtin opcode.
...
llvm-svn: 33537
2007-01-26 14:34:52 +00:00
Jim Laskey
f773e14547
Clarify some constants.
...
llvm-svn: 33536
2007-01-26 14:19:17 +00:00
Andrew Lenharth
0ad67b0e43
Work around broken binutils on alpha
...
llvm-svn: 33535
2007-01-26 13:34:50 +00:00
Reid Spencer
23f1272d37
For PR1122:
...
Test the upgradability of nested type definitions.
llvm-svn: 33534
2007-01-26 08:44:14 +00:00
Reid Spencer
ce380568b5
For PR761:
...
Remove "target endian/pointersize" or add "target datalayout" to make
the test parse properly or set the datalayout because defaults changes.
For PR645:
Make global names use the @ prefix.
For llvm-upgrade changes:
Fix test cases or completely remove use of llvm-upgrade for test cases
that cannot survive the new renaming or upgrade capabilities.
llvm-svn: 33533
2007-01-26 08:25:06 +00:00
Reid Spencer
4f95f1ab08
Regenerate.
...
llvm-svn: 33532
2007-01-26 08:19:09 +00:00
Reid Spencer
00a7c7f85a
For All These Bugs:
...
PR645
PR761
PR1082
PR1122
Completely rewrite llvm-upgrade. This should be its final design. Any future
changes will use this same design. The changes involve the following:
1. Make this work very much like the 1.9 AsmParser
2. Retain old upgrades dating back to release 1.2 time frame.
3. Merge in some of the upgrades between 1.9 and 2.0 (e.g. icmp/fcmp).
4. Attach a Signedness value (Signless, Unsigned, Signed) to every type,
Value, Constant, Instruction, and list of those things in the Parser.
Use these to make signedness decisions for instruction upgrades.
5. Implement unique name upgrade for function values and global values.
6. Identify rename cases that might cause problems and warn about them.
For example: renaming a global variable with external linkage.
7. Generate a 2.0 IR using VMCore. This is necessary for numerous
reasons and has the advantage that it never goes out of date.
8. Use the AsmPrinter to make the output nice.
9. Clean up error and warning messages from 1.9 form.
llvm-svn: 33531
2007-01-26 08:18:34 +00:00
Reid Spencer
3ac38e99b9
For PR761:
...
The Module::setEndianness and Module::setPointerSize methods have been
removed. Instead you can get/set the DataLayout. Adjust thise accordingly.
llvm-svn: 33530
2007-01-26 08:11:39 +00:00
Reid Spencer
675fb2301f
For PR761:
...
Remove the Endianness and PointerSize fields from the ModuleHeader and
replace it with the DataLayout field.
llvm-svn: 33529
2007-01-26 08:10:24 +00:00
Reid Spencer
6a8d4eab6a
For PR761:
...
BCReader no longer has a header that contains the endinanness and
pointer size. It's been replaced by datalayout field.
llvm-svn: 33528
2007-01-26 08:09:01 +00:00
Reid Spencer
93b2d78121
For PR761:
...
Remove the setEndianess and setPointerSize methods. These are now
handled via the setDataLayout method.
llvm-svn: 33527
2007-01-26 08:07:57 +00:00
Reid Spencer
1743debcf2
For PR761:
...
Remove the setEndiannes and setPointerSize methods. These are now set
through the setDataLayout method.
llvm-svn: 33526
2007-01-26 08:07:01 +00:00
Reid Spencer
8d6d4b8e36
Regenerate for PR645 and PR761
...
llvm-svn: 33525
2007-01-26 08:05:27 +00:00
Reid Spencer
791b8ef1b6
For PR645:
...
Implement separation of local and global symbols. Local symbols and types
now use % prefix. Global variables and functions now use @ prefix.
For PR761:
Replace:
target endian =
target pointersize =
With:
target datalayout =
llvm-svn: 33524
2007-01-26 08:04:51 +00:00
Reid Spencer
788e317cd7
For PR645:
...
Implement new syntax for local and global symbols. Types and local
symbols use the % prefix. Global variables and functions use the @ prefix.
llvm-svn: 33523
2007-01-26 08:02:52 +00:00
Reid Spencer
c4fbcb370b
For PR645:
...
Remove the Function::renameLocalSymbols function as it is no longer
needed.
llvm-svn: 33522
2007-01-26 08:01:30 +00:00
Reid Spencer
a760b7e1d3
IntegerType is a sized DerivedType too.
...
llvm-svn: 33521
2007-01-26 07:51:36 +00:00
Reid Spencer
2546b76054
Clean up comments and assert messages that still refer to the old type names.
...
llvm-svn: 33520
2007-01-26 07:37:34 +00:00
Reid Spencer
7e16e23df8
Fix an assertion message.
...
llvm-svn: 33519
2007-01-26 06:30:34 +00:00
Evan Cheng
1e270b639d
SplitBlockBeforeInstr() insert a unconditional branch to the next BB. This
...
is unnecessary when we are fixing up a conditional branch since we will be
adding a unconditional branch to the destination of the original branch.
llvm-svn: 33517
2007-01-26 02:02:39 +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
Evan Cheng
db7f0591f3
Need to scan the function for branches even if there aren't any constants.
...
llvm-svn: 33515
2007-01-26 01:04:44 +00:00
Devang Patel
13058a5ae9
Inherit CallGraphSCCPass directly from Pass.
...
llvm-svn: 33514
2007-01-26 00:47:38 +00:00
Devang Patel
08731903d0
Inherit FunctionPass directly from Pass.
...
llvm-svn: 33513
2007-01-26 00:23:00 +00:00
Evan Cheng
1d138989f4
Forgot to update this.
...
llvm-svn: 33512
2007-01-25 23:31:04 +00:00
Devang Patel
5292e65791
Inherit BasicBlockPass directly from Pass.
...
llvm-svn: 33511
2007-01-25 23:23:25 +00:00
Evan Cheng
010ae386b8
Add comment, fix typo, reduce memory usage, etc.
...
llvm-svn: 33510
2007-01-25 23:18:59 +00:00
Evan Cheng
fa824b9f73
I am an idiot.
...
llvm-svn: 33509
2007-01-25 23:18:16 +00:00
Evan Cheng
313c2937f0
Fix comment.
...
llvm-svn: 33508
2007-01-25 22:48:25 +00:00
Evan Cheng
b03e9118be
Fix test case.
...
llvm-svn: 33507
2007-01-25 22:28:32 +00:00
Devang Patel
98095bf795
Remove dead code.
...
llvm-svn: 33506
2007-01-25 22:27:00 +00:00
Evan Cheng
5acf2fbb43
- Tell PEI that PPC will handle stack frame rounding itself.
...
- Do not round up to max. alignment of stack object if it is > stack alignment.
It will have to be handled with dynamic aligning code.
llvm-svn: 33505
2007-01-25 22:25:04 +00:00
Evan Cheng
ae4ea45eaf
Added a MRegisterInfo hook that tells PEI the target is responsible for
...
rounding the stack frame to a multiple of stack alignment.
llvm-svn: 33504
2007-01-25 22:12:41 +00:00
Lauro Ramos Venancio
b5c595c568
fix fcopysign test
...
llvm-svn: 33503
2007-01-25 22:11:02 +00:00
Lauro Ramos Venancio
4f7d37fe04
Fix elf object definition.
...
llvm-svn: 33502
2007-01-25 20:11:04 +00:00
Evan Cheng
417260dc11
Doh. Skip JT branches.
...
llvm-svn: 33501
2007-01-25 19:43:52 +00:00
Chris Lattner
79f08506f1
Make llvm-extract preserve the callingconv of prototypes in the extracted
...
code.
llvm-svn: 33500
2007-01-25 17:38:26 +00:00
Jim Laskey
ee132b5fce
1. Remove dwarf-verbose option (now asm-verbose.)
...
2. Clean up end of lines.
llvm-svn: 33499
2007-01-25 15:45:58 +00:00
Jim Laskey
1c055e8d14
Migrate print routines to asm to be shared by exception handling.
...
llvm-svn: 33498
2007-01-25 15:12:02 +00:00
Evan Cheng
22c7cf504e
Added (preliminary) branch shortening capability to constantpool island pass.
...
llvm-svn: 33497
2007-01-25 03:12:46 +00:00
Evan Cheng
c1a1bd18e3
Getting rid uses of evil std::set<>
...
llvm-svn: 33496
2007-01-25 03:07:27 +00:00
Chris Lattner
e4bf50c451
Fix test/CFrontend/2007-01-24-InlineAsmCModifier.c on X86. The %c modifier
...
says that no $ prefix should be emitted on X86.
llvm-svn: 33495
2007-01-25 02:53:24 +00:00
Chris Lattner
48518548bd
Fix test/CFrontend/2007-01-24-InlineAsmCModifier.c on PPC
...
llvm-svn: 33494
2007-01-25 02:52:50 +00:00
Chris Lattner
789ba302cc
new testcase
...
llvm-svn: 33493
2007-01-25 02:52:33 +00:00
Andrew Lenharth
c4bdea012b
FTOIT and ITOFT are bit converts, and if we drop 21264s, are always available
...
llvm-svn: 33492
2007-01-24 21:09:16 +00:00
Jim Laskey
7ad04830b1
Call frames for intel.
...
llvm-svn: 33490
2007-01-24 19:15:24 +00:00
Jim Laskey
5f24d10381
80 columns
...
llvm-svn: 33489
2007-01-24 18:50:57 +00:00
Jim Laskey
f6c63fec92
Repair debug frames as a prelude to eh_frames. Switched to using MachineMoves
...
by value so that clean up is less confusing (these vectors tend to be small.)
llvm-svn: 33488
2007-01-24 18:45:13 +00:00
Andrew Lenharth
8a75518f0b
Fix unordered fp on alpha
...
llvm-svn: 33487
2007-01-24 18:43:14 +00:00
Chris Lattner
197aa9634e
Fix a misencoding of CBW and CWD. This fixes PR1030.
...
llvm-svn: 33486
2007-01-24 18:31:00 +00:00
Jim Laskey
f6487ec894
Use asm printer to emit alignment
...
llvm-svn: 33485
2007-01-24 13:12:32 +00:00
Evan Cheng
1526ba50d9
Use PC relative ldr to load from a constantpool in Thumb mode.
...
llvm-svn: 33484
2007-01-24 08:53:17 +00:00
Bill Wendling
06a03210af
Make ivars private and use getters. Have the MachOWriter return "Mach-O
...
Writer" for the pass name.
llvm-svn: 33483
2007-01-24 07:13:56 +00:00
Evan Cheng
f5c96fabf9
Renamed getTypeAlignmentShift() to getPreferredTypeAlignmentShift().
...
llvm-svn: 33482
2007-01-24 07:03:39 +00:00
Bill Wendling
ef91e76726
Added new files.
...
llvm-svn: 33481
2007-01-24 03:42:03 +00:00
Bill Wendling
40cb811cf8
Add a field for and construction of the PPCMachOWriterInfo object.
...
llvm-svn: 33480
2007-01-24 03:41:36 +00:00
Bill Wendling
56f1058309
Move the getJTRelocation method out of here.
...
llvm-svn: 33479
2007-01-24 03:40:33 +00:00
Bill Wendling
4905a473e8
Use the TargetMachOWriterInfo class to get this information.
...
llvm-svn: 33478
2007-01-24 03:38:47 +00:00
Bill Wendling
0dea65b477
A virtual method to return the TargetMachOWriterInfo object. This returns
...
a real value in derived classes, of course.
llvm-svn: 33477
2007-01-24 03:38:14 +00:00
Bill Wendling
87d008c63b
Moved target-specific information to the TargetMachOWriterInfo obj.
...
llvm-svn: 33476
2007-01-24 03:37:18 +00:00
Bill Wendling
a1b7b8a485
New "TargetMachOWriterInfo" class. It holds target-specific information
...
that the MachOWriter needs in order to do its writing stuff 'n things.
llvm-svn: 33475
2007-01-24 03:36:05 +00:00
Evan Cheng
8942551dee
Allow [ fi#c, imm ] as ARM load / store addresses.
...
llvm-svn: 33474
2007-01-24 02:45:25 +00:00
Evan Cheng
dda311a784
Added some load from stack frames test cases.
...
llvm-svn: 33473
2007-01-24 02:27:03 +00:00
Evan Cheng
139edae4a2
Various Thumb mode load / store isel bug fixes.
...
llvm-svn: 33472
2007-01-24 02:21:22 +00:00
Evan Cheng
029a72b9fa
Thumb test cases.
...
llvm-svn: 33471
2007-01-23 23:28:50 +00:00
Evan Cheng
c0b7366cf9
- Reorg Thumb load / store instructions. Combine each rr and ri pair of
...
instructions into one (e.g. tLDRrr, tLDRri -> tLDR).
- Thumb ldrsb and ldrsh only have the [reg, reg] address format. If the
address is not an add, materialize a 0 immediate into a register and use
it as the offset field.
llvm-svn: 33470
2007-01-23 22:59:13 +00:00
Devang Patel
40ec08095b
Fix cut-n-pasto.
...
llvm-svn: 33469
2007-01-23 22:56:28 +00:00
Evan Cheng
36b74471c8
Thumb test cases.
...
llvm-svn: 33468
2007-01-23 22:47:58 +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
Evan Cheng
2cfbcce102
Darwin HiddenDirective is .private_extern.
...
llvm-svn: 33465
2007-01-23 19:06:03 +00:00
Evan Cheng
c42dd6a5e4
Fix test case.
...
llvm-svn: 33464
2007-01-23 17:49:33 +00:00
Anton Korobeynikov
725ad649b9
One more small fix to documentation
...
llvm-svn: 33463
2007-01-23 12:43:53 +00:00
Anton Korobeynikov
c7f9f3df24
Updating documentation:
...
- Document visibility stuff
- Fix gcc' supported attributes list
- Document udis86 configure option
llvm-svn: 33462
2007-01-23 12:35:46 +00:00
Anton Korobeynikov
a41d9eca96
Moved disassembler to libSystem
...
llvm-svn: 33461
2007-01-23 10:26:08 +00:00
Evan Cheng
6730e12ae4
PEI is now responsible for adding MaxCallFrameSize to frame size and align the stack. Each target can further adjust the frame size if necessary.
...
llvm-svn: 33460
2007-01-23 09:38:11 +00:00
Chris Lattner
c4d201ea9a
fix typo
...
llvm-svn: 33459
2007-01-23 04:59:58 +00:00
Chris Lattner
d9522bc2d0
make the SmallSet interface more std::set-like
...
llvm-svn: 33458
2007-01-23 01:16:19 +00:00
Chris Lattner
199818475b
Switch this to use SmallSet to avoid mallocs in the common case.
...
llvm-svn: 33457
2007-01-23 00:59:48 +00:00
Chris Lattner
d51b3ca3ad
add a trivial SmallSet class, which operates on a similar principle to
...
SmallVector.
llvm-svn: 33456
2007-01-23 00:59:15 +00:00
Evan Cheng
16e58be1bc
hasFP() is now a virtual method of MRegisterInfo.
...
llvm-svn: 33455
2007-01-23 00:57:47 +00:00
Chris Lattner
d39e38848b
Fix a bunch of inline asm failures
...
llvm-svn: 33454
2007-01-23 00:36:17 +00:00
Evan Cheng
76231aad45
Make it work for both Linux and Mac OS.
...
llvm-svn: 33451
2007-01-22 23:18:10 +00:00
Evan Cheng
6ba3c9d08a
Update comment.
...
llvm-svn: 33450
2007-01-22 23:14:52 +00:00
Evan Cheng
be48a47d9d
Remove the DoubleTy special case.
...
llvm-svn: 33449
2007-01-22 23:13:55 +00:00
Evan Cheng
107015e2fa
ARM AAPCS abi (Linux, etc.) requires 8-byte double / long alignment; Mac
...
requires 4-bytes alignment.
llvm-svn: 33448
2007-01-22 23:13:01 +00:00
Evan Cheng
9f3a7eb9b2
Double and long preferred alignment set to 8 bytes.
...
llvm-svn: 33447
2007-01-22 23:11:06 +00:00
Evan Cheng
ca5fb6e4fc
Double and long preferred alignment is 8 byte.
...
llvm-svn: 33446
2007-01-22 23:09:50 +00:00
Evan Cheng
1efe904cd7
- getTypeAlignmentShift() should be returning preferred alignment, not ABI
...
alignment.
- getPreferredAlignmentLog(): remove Double special case.
llvm-svn: 33445
2007-01-22 23:08:19 +00:00
Evan Cheng
136cf76a27
Pasto
...
llvm-svn: 33444
2007-01-22 23:01:22 +00:00
Evan Cheng
1281dc32ef
Linux GOT indirect reference is only necessary in PIC mode.
...
llvm-svn: 33441
2007-01-22 21:34:25 +00:00
Evan Cheng
4abf2e7bcc
Double and Long preferred alignment is 4 for Darwin, 8 for Linux.
...
llvm-svn: 33440
2007-01-22 21:24:13 +00:00
Evan Cheng
52189b5805
Use bl to call Thumb fuctions directly.
...
llvm-svn: 33433
2007-01-22 19:40:10 +00:00
Evan Cheng
527faab942
Fix test case.
...
llvm-svn: 33432
2007-01-22 18:57:39 +00:00
Jim Laskey
7739f3f7c3
Bring up to date.
...
llvm-svn: 33428
2007-01-22 14:13:45 +00:00
Reid Spencer
31a4ef4dc1
Cleanup checks in the load and store of casted pointer transforms. Two
...
changes: (1) don't special case for i1 any more, (2) use the new
TargetData::getTypeSizeInBits method to ensure source and dest are the
same bit width.
llvm-svn: 33427
2007-01-22 05:51:25 +00:00
Jeff Cohen
e977757ca9
Fix a bunch of missing semicolon parse errors from bison.
...
llvm-svn: 33426
2007-01-21 19:30:52 +00:00
Jeff Cohen
5d956e4234
Fix this error:
...
llvm[2]: Compiling llvmAsmParser.cpp for Debug build
/usr/home/jeffc/llvm/lib/AsmParser/llvmAsmParser.y: In function 'int llvmAsmparse()':
/usr/home/jeffc/llvm/lib/AsmParser/llvmAsmParser.y:1846: error: expected `;' before '}' token
llvm-svn: 33425
2007-01-21 19:19:31 +00:00
Reid Spencer
fd3085bc3f
Run GenLibDeps.pl with the configured PERL path to handle different install
...
locations for Perl on different systems.
llvm-svn: 33424
2007-01-21 15:53:18 +00:00
Chris Lattner
71e123229c
add a note
...
llvm-svn: 33423
2007-01-21 07:03:37 +00:00
Reid Spencer
b508b459ca
Regenerate.
...
llvm-svn: 33422
2007-01-21 06:42:03 +00:00
Reid Spencer
75062bcd80
Fix the TARGET_HAS_JIT settings. Sparc doesn't, x86_64 does, ARM doesn't.
...
llvm-svn: 33421
2007-01-21 06:41:11 +00:00
Chris Lattner
19bb6b996b
default to emiting an uncompressed .bc file
...
llvm-svn: 33420
2007-01-21 06:34:18 +00:00
Reid Spencer
d7c8b3c105
For PR1128:
...
Regenerate for ARM support.
llvm-svn: 33419
2007-01-21 06:32:59 +00:00
Reid Spencer
f7defa1c5f
Add support for the ARM target in the target configuration processing.
...
llvm-svn: 33418
2007-01-21 06:31:55 +00:00
Reid Spencer
6598ca8ab1
Whoops, fix typo in last commit.
...
llvm-svn: 33417
2007-01-21 02:29:10 +00:00
Chris Lattner
16e255834d
new testcase
...
llvm-svn: 33416
2007-01-21 00:56:42 +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
9a4bed06dd
Revise the store V, (cast P) -> store (cast V) -> P transform.
...
We only want to do this if the src and destination types have the same
bit width. This patch uses TargetData::getTypeSizeInBits() instead of
making a special case for integer types and avoiding the transform if
they don't match.
llvm-svn: 33414
2007-01-20 23:35:48 +00:00
Reid Spencer
2239163496
Implement a getTypeSizeInBits method. This helps in transforms that want
...
to ensure the bit size of a type is identical before proceeding.
llvm-svn: 33413
2007-01-20 23:32:04 +00:00
Reid Spencer
ba66c52037
Initial template for the 2.0 Bitcode format that will replace the 1.x
...
Bytecode format.
llvm-svn: 33412
2007-01-20 23:21:08 +00:00
Owen Anderson
e52a235e99
TargetData assumes (and some regression tests depend on it) that the size of
...
an unspecified datatype in the datalayout is capped by the size of a pointer.
llvm-svn: 33411
2007-01-20 23:07:13 +00:00
Chris Lattner
6e38094235
trivial cleanup
...
llvm-svn: 33410
2007-01-20 22:39:15 +00:00
Chris Lattner
50ee0e40e5
Teach TargetData to handle 'preferred' alignment for each target, and use
...
these alignment amounts to align scalars when we can. Patch by Scott Michel!
llvm-svn: 33409
2007-01-20 22:35:55 +00:00
Chris Lattner
7476fa4456
DOUT still evaluates side effects, even though it doesn't print. This means
...
that disassembleBuffer will be called even if NDEBUG, but the result will
be ignored.
llvm-svn: 33408
2007-01-20 20:51:43 +00:00
Reid Spencer
dca38eec0d
For PR808:
...
Regenerate to include NetBSD.
llvm-svn: 33407
2007-01-20 20:45:39 +00:00
Reid Spencer
181fe4ad09
For PR808:
...
NetBSD also doesn't have pthread_mutexattr_setpshared
llvm-svn: 33406
2007-01-20 20:44:38 +00:00
Reid Spencer
78adb9d16f
For PR808:
...
Add support for NetBSD.
llvm-svn: 33405
2007-01-20 20:43:35 +00:00
Reid Spencer
19531ac014
Try a negative number with ashr.
...
llvm-svn: 33404
2007-01-20 20:30:13 +00:00
Reid Spencer
fff2797349
Implement the signed icmp instructions properly. To do this we introduce
...
a small inline function to sign extend a uint64_t value based on its
type's bitwidth. This function is then used in both executeSExtInst and
the various executeICMP_S** functions.
llvm-svn: 33403
2007-01-20 20:12:29 +00:00
Evan Cheng
e3d8e42e27
Round up stack to multiple of alignment only if it's a leaf function without alloca.
...
llvm-svn: 33401
2007-01-20 10:22:33 +00:00