Chris Lattner
add9f29fdf
This file is obsolete
...
llvm-svn: 14005
2004-06-04 00:15:21 +00:00
Brian Gaeke
6973e85b16
Add new internal-global-symbol mapping info pass... may its life be short
...
and sweet.
llvm-svn: 13983
2004-06-03 05:03:37 +00:00
Brian Gaeke
0a48c0d913
Add new mapping info pass, when EmitMappingInfo is on.
...
llvm-svn: 13981
2004-06-03 05:03:01 +00:00
Brian Gaeke
25c6fa0e83
Fix big mistake in my last checkin... the big question is, how did I ever
...
get this to link before?
llvm-svn: 13980
2004-06-03 05:03:00 +00:00
Brian Gaeke
11cfb090b8
Add decl. for new mapping info pass factory method.
...
llvm-svn: 13979
2004-06-03 05:02:59 +00:00
Brian Gaeke
dca24ddfc7
Collapse together the abstract superclass TargetRegInfo and SparcV9RegInfo, its
...
only concrete implementation.
llvm-svn: 13977
2004-06-03 02:45:09 +00:00
Chris Lattner
4f816d2e38
<alloca.h> on cygwin pulls in a ton of stuff (macros and function protos)
...
that we REALLY don't want in the CBE code.
With this fix, the CBE passes all of the MultiSource tests on cygwin that
it does on linux. Yaay!
llvm-svn: 13975
2004-06-02 23:10:26 +00:00
Chris Lattner
562d15636e
Adjust to new TM interface
...
llvm-svn: 13954
2004-06-02 05:56:04 +00:00
Chris Lattner
c832e546d0
Method has been inlined into all callers
...
llvm-svn: 13953
2004-06-02 05:55:48 +00:00
Chris Lattner
82baa9c394
Convert to the new TargetMachine interface.
...
llvm-svn: 13952
2004-06-02 05:55:25 +00:00
Chris Lattner
535e8db0da
Stubs are no longer needed
...
llvm-svn: 13951
2004-06-02 05:53:52 +00:00
Chris Lattner
63c07bf246
Adjust to new TM interfaces
...
llvm-svn: 13949
2004-06-02 05:47:26 +00:00
Brian Gaeke
4cc9328b5d
There is no "mcff" here; delete the confusing comments that refer to it.
...
llvm-svn: 13911
2004-05-30 08:29:16 +00:00
Brian Gaeke
7a8734af7f
Transform an occurrence of if(...) { assert (0) }.
...
llvm-svn: 13908
2004-05-30 07:34:01 +00:00
Brian Gaeke
01c1f3279d
Reduce the amount of LLVM Values for which we save reg. allocator
...
state. Also, save the state for the incoming register of each phi
node.
llvm-svn: 13906
2004-05-30 07:08:43 +00:00
Brian Gaeke
9836668944
Rename verifySavedState to dumpSavedState. Give it a new comment.
...
Call it at a more appropriate point.
llvm-svn: 13905
2004-05-30 04:22:24 +00:00
Brian Gaeke
bc3d8652ec
Insert machine instructions generated for Phi nodes into their
...
corresponding MachineCodeForInstruction vectors.
I need to be able to get the register allocated for the thing which is
called PhiCpRes in this code; this should make that task easier, plus,
Phi nodes are no longer "special" in the sense that their
MachineCodeForInstruction is empty.
llvm-svn: 13904
2004-05-30 03:33:49 +00:00
Brian Gaeke
24c18879f0
Remove unused #include.
...
llvm-svn: 13899
2004-05-29 23:26:13 +00:00
Brian Gaeke
42112b4a09
Add comments.
...
llvm-svn: 13898
2004-05-29 23:10:20 +00:00
Brian Gaeke
2398b17a57
Trim whitespace.
...
llvm-svn: 13897
2004-05-29 22:49:51 +00:00
Brian Gaeke
7fa398d850
Give InsertCodeForPhis() a new documentation comment.
...
llvm-svn: 13896
2004-05-29 22:20:59 +00:00
Brian Gaeke
90dc744ac0
Give PhiCp nodes better names in many cases.
...
Simplify InsertPhiElimInstructions(), and give it a better doxygen comment.
llvm-svn: 13880
2004-05-28 19:34:00 +00:00
Brian Gaeke
26925ff857
Make debugging output with -print-machineinstrs more useful: always print out
...
the transformed LLVM code which is the input to the instruction selector.
llvm-svn: 13879
2004-05-28 19:33:59 +00:00
Chris Lattner
c53c2a3a62
Fix the big regression that has been killing the nightly tester these last
...
few days. Apparently the old symbol table used to auto rename collisions in
the type symbol table and the new one does not. It doesn't really make sense
for the new one to do so, so we just make the client do it.
llvm-svn: 13877
2004-05-28 05:47:27 +00:00
Chris Lattner
c7e2ff2980
Minor changes. Switch to a SymbolTable remove that does not take linear time
...
llvm-svn: 13874
2004-05-28 05:30:51 +00:00
Brian Gaeke
1c6f9b4304
Make comment lines stick out less.
...
llvm-svn: 13858
2004-05-27 21:41:48 +00:00
Chris Lattner
83d067a103
Fix PR344: the incorrect remove was being used.
...
llvm-svn: 13790
2004-05-26 17:20:52 +00:00
Brian Gaeke
230deea60f
Add a (not very meaningful) default constructor for AllocInfo objects.
...
llvm-svn: 13773
2004-05-25 20:43:47 +00:00
Reid Spencer
e7e9671cad
Convert to SymbolTable's new iteration interface.
...
llvm-svn: 13754
2004-05-25 08:53:40 +00:00
Reid Spencer
14428ac740
Remove use of Type::TypeTy from an assert. It will go away soon.
...
llvm-svn: 13748
2004-05-25 08:50:52 +00:00
Chris Lattner
6e4edd65ab
Add support for accurate garbage collection to the LLVM code generators
...
llvm-svn: 13696
2004-05-23 21:23:35 +00:00
Chris Lattner
3ef067ff33
Add some notes to myself, no functional changes
...
llvm-svn: 13695
2004-05-23 21:23:12 +00:00
Chris Lattner
66911019e7
minor wording change
...
llvm-svn: 13694
2004-05-23 21:22:55 +00:00
Brian Gaeke
d4889be5ca
Fix a typo in a comment.
...
llvm-svn: 13643
2004-05-23 05:10:06 +00:00
Chris Lattner
83c139d575
Fix to make the CBE always emit comparisons inline. Hopefully this will
...
fix the really bad code we're getting on PPC.
llvm-svn: 13609
2004-05-20 20:25:50 +00:00
Brian Gaeke
7b7a14d718
Fix a bug in outputting branches to constant PCs. Since the PC is supplied as
...
a full 64-bit address, it must be adjusted to fit in the branch instruction's
immediate field. (This is only used in the reoptimizer, for now.)
llvm-svn: 13608
2004-05-20 07:43:40 +00:00
Brian Gaeke
e8949b3083
Minor simplification: eliminate a dyn_cast.
...
Fix a typo in a debug message.
llvm-svn: 13607
2004-05-19 21:30:01 +00:00
Brian Gaeke
de5ccc18e3
Don't keep track of references to LLVM BasicBlocks while emitting; use
...
MachineBasicBlocks instead.
llvm-svn: 13568
2004-05-14 06:54:58 +00:00
Brian Gaeke
2b3a81cd33
Support MachineBasicBlock operands on RawFrm instructions.
...
Get rid of separate numbering for LLVM BasicBlocks; use the automatically
generated MachineBasicBlock numbering.
llvm-svn: 13567
2004-05-14 06:54:57 +00:00
Brian Gaeke
35e73e1ca4
Generate branch machine instructions with MachineBasicBlock operands instead of
...
LLVM BasicBlock operands.
llvm-svn: 13566
2004-05-14 06:54:56 +00:00
Chris Lattner
8e7aea026a
Two more improvements for null pointer handling: storing a null pointer
...
and passing a null pointer into a function.
For this testcase:
void %test(int** %X) {
store int* null, int** %X
call void %test(int** null)
ret void
}
we now generate this:
test:
sub %ESP, 12
mov %EAX, DWORD PTR [%ESP + 16]
mov DWORD PTR [%EAX], 0
mov DWORD PTR [%ESP], 0
call test
add %ESP, 12
ret
instead of this:
test:
sub %ESP, 12
mov %EAX, DWORD PTR [%ESP + 16]
mov %ECX, 0
mov DWORD PTR [%EAX], %ECX
mov %EAX, 0
mov DWORD PTR [%ESP], %EAX
call test
add %ESP, 12
ret
llvm-svn: 13558
2004-05-13 15:26:48 +00:00
Chris Lattner
593d22d666
Second half of my fixed-sized-alloca patch. This folds the LEA to compute
...
the alloca address into common operations like loads/stores.
In a simple testcase like this (which is just designed to excersize the
alloca A, nothing more):
int %test(int %X, bool %C) {
%A = alloca int
store int %X, int* %A
store int* %A, int** %G
br bool %C, label %T, label %F
T:
call int %test(int 1, bool false)
%V = load int* %A
ret int %V
F:
call int %test(int 123, bool true)
%V2 = load int* %A
ret int %V2
}
We now generate:
test:
sub %ESP, 12
mov %EAX, DWORD PTR [%ESP + 16]
mov %CL, BYTE PTR [%ESP + 20]
*** mov DWORD PTR [%ESP + 8], %EAX
mov %EAX, OFFSET G
lea %EDX, DWORD PTR [%ESP + 8]
mov DWORD PTR [%EAX], %EDX
test %CL, %CL
je .LBB2 # PC rel: F
.LBB1: # T
mov DWORD PTR [%ESP], 1
mov DWORD PTR [%ESP + 4], 0
call test
*** mov %EAX, DWORD PTR [%ESP + 8]
add %ESP, 12
ret
.LBB2: # F
mov DWORD PTR [%ESP], 123
mov DWORD PTR [%ESP + 4], 1
call test
*** mov %EAX, DWORD PTR [%ESP + 8]
add %ESP, 12
ret
Instead of:
test:
sub %ESP, 20
mov %EAX, DWORD PTR [%ESP + 24]
mov %CL, BYTE PTR [%ESP + 28]
*** lea %EDX, DWORD PTR [%ESP + 16]
*** mov DWORD PTR [%EDX], %EAX
mov %EAX, OFFSET G
mov DWORD PTR [%EAX], %EDX
test %CL, %CL
*** mov DWORD PTR [%ESP + 12], %EDX
je .LBB2 # PC rel: F
.LBB1: # T
mov DWORD PTR [%ESP], 1
mov %EAX, 0
mov DWORD PTR [%ESP + 4], %EAX
call test
*** mov %EAX, DWORD PTR [%ESP + 12]
*** mov %EAX, DWORD PTR [%EAX]
add %ESP, 20
ret
.LBB2: # F
mov DWORD PTR [%ESP], 123
mov %EAX, 1
mov DWORD PTR [%ESP + 4], %EAX
call test
*** mov %EAX, DWORD PTR [%ESP + 12]
*** mov %EAX, DWORD PTR [%EAX]
add %ESP, 20
ret
llvm-svn: 13557
2004-05-13 15:12:43 +00:00
Chris Lattner
2bb3325965
Substantially improve code generation for address exposed locals (aka fixed
...
sized allocas in the entry block). Instead of generating code like this:
entry:
reg1024 = ESP+1234
... (much later)
*reg1024 = 17
Generate code that looks like this:
entry:
(no code generated)
... (much later)
t = ESP+1234
*t = 17
The advantage being that we DRAMATICALLY reduce the register pressure for these
silly temporaries (they were all being spilled to the stack, resulting in very
silly code). This is actually a manual implementation of rematerialization :)
I have a patch to fold the alloca address computation into loads & stores, which
will make this much better still, but just getting this right took way too much time
and I'm sleepy.
llvm-svn: 13554
2004-05-13 07:40:27 +00:00
Chris Lattner
e2d382e1a4
Pass boolean constants into function calls more efficiently, generating:
...
mov DWORD PTR [%ESP + 4], 1
instead of:
mov %EAX, 1
mov DWORD PTR [%ESP + 4], %EAX
llvm-svn: 13494
2004-05-12 16:35:04 +00:00
Chris Lattner
72fb3256f8
Fix a fairly serious pessimizaion that was preventing us from efficiently
...
compiling things like 'add long %X, 1'. The problem is that we were switching
the order of the operands for longs even though we can't fold them yet.
llvm-svn: 13451
2004-05-10 15:15:55 +00:00
Chris Lattner
a367dd745b
Fix some comments, avoid sign extending booleans when zero extend works fine
...
llvm-svn: 13440
2004-05-09 23:16:33 +00:00
Chris Lattner
1542a98e7b
Generate more efficient code for casting booleans to integers (no sign extension required)
...
llvm-svn: 13439
2004-05-09 22:28:45 +00:00
Chris Lattner
f719a52088
syntactically loopify natural loops so that the GCC loop optimizer can find them. This should *dramatically* improve the performance of CBE compiled code on targets that depend on GCC's loop optimizations (like PPC)
...
llvm-svn: 13438
2004-05-09 20:41:32 +00:00
Chris Lattner
87d036caf2
Do not emit prototypes for setjmp/longjmp, as they are handled specially
...
llvm-svn: 13437
2004-05-09 16:03:29 +00:00
Chris Lattner
9c29991970
Make the floating point constant pools local to each function, split the
...
FindUsedTypes manipulation stuff out to be a seperate pass, and make the
main CWriter be a function pass now!
llvm-svn: 13435
2004-05-09 06:20:51 +00:00