Andrew Lenharth
bc04a6c143
Since there was interest on the mailing list, this is a utility pass that
...
uses DSA to make find targets of calls. It provides a very convinient
interface to DSA results to do things with indirect calls, such as
write a devirtualizer (which I have and may commit one of these days).
llvm-svn: 28545
2006-05-29 22:58:38 +00:00
Vladimir Prus
08c8b74864
Reset DEBUG_SYMBOL_TABLE back to 0.
...
llvm-svn: 28538
2006-05-29 12:54:52 +00:00
Vladimir Prus
8a3a4fb0ba
Fix compile error when DEBUG_SYMBOL_TABLE is defined.
...
llvm-svn: 28537
2006-05-29 12:45:15 +00:00
Reid Spencer
ac33b75511
Fix grammar in a comment.
...
llvm-svn: 28534
2006-05-29 02:34:34 +00:00
Owen Anderson
d46a77c3c8
Add Use replacement. Assuming there is nothing horribly wrong with this, LCSSA
...
is now theoretically feature-complete. It has not, however, been thoroughly
test, and is still considered experimental.
llvm-svn: 28529
2006-05-29 01:00:00 +00:00
Owen Anderson
a857559867
Major think-o. Iterate over all live out-of-loop values, and perform the
...
other calculations on each individually, rather than trying to delay it and do
them all at the end.
llvm-svn: 28527
2006-05-28 19:33:28 +00:00
Owen Anderson
703f6baab0
Make LCSSA insert proper Phi nodes throughout the rest of the CFG by computing
...
the iterated Dominance Frontier of the loop-closure Phi's. This is the
second phase of the LCSSA pass. The third phase (coming soon) will be to
update all uses of loop variables to use the loop-closure Phi's instead.
llvm-svn: 28524
2006-05-27 18:47:11 +00:00
Chris Lattner
0189e09b89
Fix some regression from the inliner patch I committed last night. This fixes
...
ldecod, lencod, and SPASS.
llvm-svn: 28523
2006-05-27 17:28:13 +00:00
Chris Lattner
04d52ee9a2
Switch the inliner over to using CloneAndPruneFunctionInto. This effectively
...
makes it so that it constant folds instructions on the fly. This is good
for several reasons:
0. Many instructions are constant foldable after inlining, particularly if
inlining a call with constant arguments.
1. Without this, the inliner has to allocate memory for all of the instructions
that can be constant folded, then a subsequent pass has to delete them. This
gets the job done without this extra work.
2. This makes the inliner *pass* a bit more aggressive: in particular, it
partially solves a phase order issue where the inliner would inline lots
of code that folds away to nothing, but think that the resultant function
is big because of this code that will be gone. Now the code never exists.
This is the first part of a 2-step process. The second part will be smart
enough to see when this implicit constant folding propagates a constant into
a branch or switch instruction, making CFG edges dead.
This implements Transforms/Inline/inline_constprop.ll
llvm-svn: 28521
2006-05-27 01:28:04 +00:00
Chris Lattner
e1552475d3
Ignore generated files
...
llvm-svn: 28520
2006-05-27 01:23:30 +00:00
Chris Lattner
12c9d54f79
Implement a new method, CloneAndPruneFunctionInto, as documented.
...
llvm-svn: 28519
2006-05-27 01:22:24 +00:00
Chris Lattner
1835cfb302
Refactor some code to expose an interface to constant fold and instruction given it's opcode, typeand operands.
...
llvm-svn: 28517
2006-05-27 01:18:04 +00:00
Chris Lattner
d8bd52bfd2
Fix a nasty dag combiner bug that caused nondeterminstic crashes (MY FAVORITE!):
...
SimplifySelectOps would eliminate a Select, delete it, then return true.
The clients would see that it did something and return null.
The top level would see a null return, and decide that nothing happened,
proceeding to process the node in other ways: boom.
The fix is simple: clients of SimplifySelectOps should return the select
node itself.
In order to catch really obnoxious boogs like this in the future, add an
assert that nodes are not deleted. We do this by checking for a sentry node
type that the SDNode dtor sets when a node is destroyed.
llvm-svn: 28514
2006-05-27 00:43:02 +00:00
Owen Anderson
1843c1ee17
A few small clean-ups, and the addition of an LCSSA statistic.
...
llvm-svn: 28512
2006-05-27 00:31:37 +00:00
Evan Cheng
58bfb4e600
Make CALL node consistent with RET node. Signness of value has type MVT::i32
...
instead of MVT::i1. Either is fine except MVT::i32 is probably a legal type
for most (if not all) platforms while MVT::i1 is not.
llvm-svn: 28511
2006-05-26 23:13:20 +00:00
Evan Cheng
de0f25081a
Change RET node to include signness information of the return values. i.e.
...
RET chain, value1, sign1, value2, sign2, ...
llvm-svn: 28510
2006-05-26 23:10:12 +00:00
Evan Cheng
f53c4cc192
Change RET node to include signness information of the return values. e.g.
...
RET chain, value1, sign1, value2, sign2
llvm-svn: 28509
2006-05-26 23:09:09 +00:00
Owen Anderson
d706fc78b2
Fix a copy-and-paste-o that would break some compilers.
...
llvm-svn: 28507
2006-05-26 21:19:17 +00:00
Owen Anderson
2414055ac6
Clean up and refactor LCSSA a bunch. It should also run faster now, though
...
there's still a lot of work to be done on it.
llvm-svn: 28506
2006-05-26 21:11:53 +00:00
Evan Cheng
25db1a52d2
Vector argument must be passed in memory location aligned on 16-byte boundary.
...
llvm-svn: 28505
2006-05-26 20:37:47 +00:00
Evan Cheng
7f468901bb
Mac OS X ABI document lied. The first four XMM registers are used to pass
...
vector arguments, not three.
llvm-svn: 28504
2006-05-26 19:22:06 +00:00
Chris Lattner
0043931185
Implement Transforms/InstCombine/store.ll:test2.
...
llvm-svn: 28503
2006-05-26 19:19:20 +00:00
Chris Lattner
e3222507ee
Fix a bug in the bc reader/writer: we were not correctly encoding varargs
...
nonccc calls (we were dropping the CC and tail flag). This broke several
FORTRAN programs.
Testcase here: Regression/Assembler/2006-05-26-VarargsCallEncode.ll
llvm-svn: 28501
2006-05-26 18:42:34 +00:00
Evan Cheng
629df0afb2
Minor update to make the code more clear
...
llvm-svn: 28499
2006-05-26 18:39:59 +00:00
Evan Cheng
bde90b2732
Update more comments.
...
llvm-svn: 28498
2006-05-26 18:37:16 +00:00
Evan Cheng
414c909954
Fix some comments.
...
llvm-svn: 28497
2006-05-26 18:25:43 +00:00
Evan Cheng
a4b6f4749d
No need to handle illegal types.
...
llvm-svn: 28496
2006-05-26 18:22:49 +00:00
Owen Anderson
93098cfc4c
Skeletal LCSSA pass. This is currently non-functional. Expect functionality
...
and documentation updates soo.
llvm-svn: 28495
2006-05-26 13:58:26 +00:00
Rafael Espindola
f7c5af4863
On ARM, alignment is in bits
...
Add lr as a hard coded operand of bx
llvm-svn: 28494
2006-05-26 10:56:17 +00:00
Evan Cheng
c80154a36e
Remove a couple of bogus casts.
...
llvm-svn: 28493
2006-05-26 08:04:31 +00:00
Evan Cheng
328b47bc28
Remove a bogus cast.
...
llvm-svn: 28492
2006-05-26 08:00:14 +00:00
Evan Cheng
77b8eaf292
Minor bug caught by Ashwin Chandra
...
llvm-svn: 28491
2006-05-26 06:22:34 +00:00
Chris Lattner
c6c2770e08
Transform things like (splat(splat)) -> splat
...
llvm-svn: 28490
2006-05-26 00:29:06 +00:00
Chris Lattner
261299e3f5
Introduce a helper function that simplifies interpretation of shuffle masks.
...
No functionality change.
llvm-svn: 28489
2006-05-25 23:48:38 +00:00
Evan Cheng
f610c3e318
Consistency
...
llvm-svn: 28488
2006-05-25 23:31:23 +00:00
Chris Lattner
c678c720a7
Turn (cast (shuffle (cast)) -> shuffle (cast) if it reduces the # casts in
...
the program. This exposes more opportunities for the instcombiner, and implements
vec_shuffle.ll:test6
llvm-svn: 28487
2006-05-25 23:24:33 +00:00
Chris Lattner
5df88a112b
extract element from a shuffle vector can be trivially turned into an
...
extractelement from the SV's source. This implement vec_shuffle.ll:test[45]
llvm-svn: 28485
2006-05-25 22:53:38 +00:00
Evan Cheng
fb5e64ff9e
Some clean up.
...
llvm-svn: 28483
2006-05-25 22:38:31 +00:00
Chris Lattner
5e1d6724da
Add support for the missing FP condition codes
...
llvm-svn: 28482
2006-05-25 22:26:02 +00:00
Evan Cheng
ee280ac5d0
Remove some dead code.
...
llvm-svn: 28481
2006-05-25 22:25:52 +00:00
Evan Cheng
564c7ac8f6
X86 / Cygwin asm / alignment fixes.
...
Patch contributed by Anton Korobeynikov!
llvm-svn: 28480
2006-05-25 21:59:08 +00:00
Chris Lattner
d3eff919d8
Revert a patch that is unsafe, due to out of range array accesses in inner
...
array scopes possibly accessing valid memory in outer subscripts.
llvm-svn: 28478
2006-05-25 21:25:12 +00:00
Evan Cheng
abb909e3bb
Build breakage.
...
llvm-svn: 28475
2006-05-25 18:56:34 +00:00
Chris Lattner
cbcad040b3
Fix build failure of povray
...
llvm-svn: 28473
2006-05-25 18:06:16 +00:00
Chris Lattner
e3059fb8bd
Fix Benchmarks/MallocBench/cfrac
...
llvm-svn: 28471
2006-05-25 16:54:16 +00:00
Rafael Espindola
31b98f8e04
implement initial version of ARMAsmPrinter::printOperand
...
llvm-svn: 28470
2006-05-25 12:57:06 +00:00
Rafael Espindola
90eec6b0f7
port the ARM backend to use ISD::CALL instead of LowerCallTo
...
llvm-svn: 28469
2006-05-25 11:00:18 +00:00
Evan Cheng
6fdd4960aa
Turn on -sched-commute-nodes by default.
...
llvm-svn: 28465
2006-05-25 08:37:31 +00:00
Evan Cheng
bb17ad5ffa
Switch X86 over to a call-selection model where the lowering code creates
...
the copyto/fromregs instead of making the X86ISD::CALL selection code create
them.
llvm-svn: 28463
2006-05-25 00:59:30 +00:00
Evan Cheng
4a74dd0c51
CALL node change (arg / sign pairs instead of just arguments).
...
llvm-svn: 28462
2006-05-25 00:57:32 +00:00
Evan Cheng
920d9c86f1
CALL node change: now including signness of every argument.
...
llvm-svn: 28461
2006-05-25 00:55:32 +00:00
Evan Cheng
09942d3f8b
Assert if InflightSet is not cleared after instruction selecting a BB.
...
llvm-svn: 28459
2006-05-25 00:24:28 +00:00
Evan Cheng
b040dd86af
Clear HandleMap and ReplaceMap after instruction selection. Or it may cause
...
non-deterministic behavior.
llvm-svn: 28454
2006-05-24 20:46:25 +00:00
Reid Spencer
574d4e6992
For PR786:
...
Minor tweaks in public headers and a few .cpp files so that LLVM can build
successfully with -pedantic and projects using LLVM with -pedantic don't
get warnings from LLVM. There's still more -pedantic warnings to fix.
llvm-svn: 28453
2006-05-24 19:21:13 +00:00
Reid Spencer
e39b3b9bf0
For PR786:
...
Remove a spurious ;
llvm-svn: 28452
2006-05-24 19:05:21 +00:00
Chris Lattner
0b38bc2a99
Patch for a new instcombine xform, patch contributed by Nick Lewycky!
...
This implements Transforms/InstCombine/2006-05-10-InvalidIndexUndef.ll
llvm-svn: 28450
2006-05-24 17:34:30 +00:00
Chris Lattner
f604017e47
Patches to make the LLVM sources more -pedantic clean. Patch provided
...
by Anton Korobeynikov! This is a step towards closing PR786.
llvm-svn: 28447
2006-05-24 17:04:05 +00:00
Chris Lattner
bc3be2ff8a
Fix CodeGen/Generic/vector.ll:test_div with altivec.
...
llvm-svn: 28445
2006-05-24 00:15:25 +00:00
Chris Lattner
56862bbd53
Handle SETO* like we handle SET*, restoring behavior after Evan's setcc
...
change. This fixes PowerPC/fnegsel.ll.
llvm-svn: 28443
2006-05-24 00:06:44 +00:00
Chris Lattner
2ce3eb8210
Print struct return functions and calls as actually returning the hidden
...
argument struct pointer, enabling ABI compatibility for the CBE with
platforms with strange struct-return ABIs. This fixes 252.eon and
CoyoteBench/fftbench on Darwin/X86 among other things.
llvm-svn: 28442
2006-05-23 23:39:48 +00:00
Chris Lattner
ac9665d682
Fix file header comment
...
llvm-svn: 28441
2006-05-23 23:20:42 +00:00
Evan Cheng
3ef176507d
Better way to check for vararg.
...
llvm-svn: 28440
2006-05-23 21:08:24 +00:00
Evan Cheng
65c3f3f26b
Remove PreprocessCCCArguments and PreprocessFastCCArguments now that
...
FORMAL_ARGUMENTS nodes include a token operand.
llvm-svn: 28439
2006-05-23 21:06:34 +00:00
Chris Lattner
9aec97df10
Implement an annoying part of the Darwin/X86 abi: the callee of a struct
...
return argument pops the hidden struct pointer if present, not the caller.
For example, in this testcase:
struct X { int D, E, F, G; };
struct X bar() {
struct X a;
a.D = 0;
a.E = 1;
a.F = 2;
a.G = 3;
return a;
}
void foo(struct X *P) {
*P = bar();
}
We used to emit:
_foo:
subl $28, %esp
movl 32(%esp), %eax
movl %eax, (%esp)
call _bar
addl $28, %esp
ret
_bar:
movl 4(%esp), %eax
movl $0, (%eax)
movl $1, 4(%eax)
movl $2, 8(%eax)
movl $3, 12(%eax)
ret
This is correct on Linux/X86 but not Darwin/X86. With this patch, we now
emit:
_foo:
subl $28, %esp
movl 32(%esp), %eax
movl %eax, (%esp)
call _bar
*** addl $24, %esp
ret
_bar:
movl 4(%esp), %eax
movl $0, (%eax)
movl $1, 4(%eax)
movl $2, 8(%eax)
movl $3, 12(%eax)
*** ret $4
For the record, GCC emits (which is functionally equivalent to our new code):
_bar:
movl 4(%esp), %eax
movl $3, 12(%eax)
movl $2, 8(%eax)
movl $1, 4(%eax)
movl $0, (%eax)
ret $4
_foo:
pushl %esi
subl $40, %esp
movl 48(%esp), %esi
leal 16(%esp), %eax
movl %eax, (%esp)
call _bar
subl $4, %esp
movl 16(%esp), %eax
movl %eax, (%esi)
movl 20(%esp), %eax
movl %eax, 4(%esi)
movl 24(%esp), %eax
movl %eax, 8(%esi)
movl 28(%esp), %eax
movl %eax, 12(%esi)
addl $40, %esp
popl %esi
ret
This fixes SingleSource/Benchmarks/CoyoteBench/fftbench with LLC and the
JIT, and fixes the X86-backend portion of PR729. The CBE still needs to
be updated.
llvm-svn: 28438
2006-05-23 18:50:38 +00:00
Evan Cheng
6909147763
-enable-unsafe-fp-math implies -enable-finite-only-fp-math
...
llvm-svn: 28437
2006-05-23 18:18:46 +00:00
Vladimir Prus
125917432a
Fix missing include
...
llvm-svn: 28435
2006-05-23 13:43:15 +00:00
Evan Cheng
19e9e63dcd
Incorrect SETCC CondCode used for FP comparisons.
...
llvm-svn: 28433
2006-05-23 06:40:47 +00:00
Evan Cheng
86e56c1066
Added option -enable-finite-only-fp-math. When on, the codegen can assume that
...
FP arithmetic arguments and results are never NaNs or +=Infs. This includes
ignoring parity flag (PF) when checking for FP equality.
llvm-svn: 28432
2006-05-23 06:39:12 +00:00
Rafael Espindola
bb1e2e2c52
implement minimal versions of
...
ARMAsmPrinter::runOnMachineFunction
LowerFORMAL_ARGUMENTS
ARMInstrInfo::isMoveInstr
llvm-svn: 28431
2006-05-23 02:48:20 +00:00
Evan Cheng
c25e986c9f
A isel deficiency.
...
llvm-svn: 28427
2006-05-22 05:54:49 +00:00
Evan Cheng
52fde7f5ce
Back out indirect branch load folding hack. It broke some tests.
...
llvm-svn: 28425
2006-05-21 06:28:50 +00:00
Chris Lattner
9d6103087a
Add a note
...
llvm-svn: 28424
2006-05-21 03:57:07 +00:00
Owen Anderson
4a78af08aa
Make TargetData strings less redundant.
...
llvm-svn: 28423
2006-05-20 23:28:54 +00:00
Chris Lattner
1ddd46999b
Silence a bogus gcc warning
...
llvm-svn: 28422
2006-05-20 23:14:03 +00:00
Chris Lattner
c7de368bda
Fix a parsing bug that caused 7 llvm-test regressions on PPC last night.
...
I'm suprised it didn't cause more!
llvm-svn: 28421
2006-05-20 21:16:59 +00:00
Evan Cheng
a0bbbba168
- Use of load's chain result should be redirected to load's chain operand.
...
If it reads the chain result of the call, then the use, callseq_start,
and call would form a cycle!
- Don't forget handle node replacement!
- There could also be a TokenFactor between the load and the callseq_start.
llvm-svn: 28420
2006-05-20 09:21:39 +00:00
Evan Cheng
bb6733743e
A new entry
...
llvm-svn: 28419
2006-05-20 07:44:53 +00:00
Evan Cheng
95259a0f68
Missing break statements.
...
llvm-svn: 28418
2006-05-20 07:44:28 +00:00
Evan Cheng
550e73a900
Remove unused patterns.
...
llvm-svn: 28417
2006-05-20 01:40:16 +00:00
Evan Cheng
c68ea538e7
Handle indirect call which folds a load manually. This never matches by
...
the TableGen generated code since the load's chain result is read by
the callseq_start node.
llvm-svn: 28416
2006-05-20 01:36:52 +00:00
Owen Anderson
b2ac706286
Sparc is big-endian.
...
llvm-svn: 28415
2006-05-20 00:49:30 +00:00
Owen Anderson
c6947bf2ce
Make all of the TargetMachine subclasses use the new string TargetData methods.
...
This is part of the on-going work on PR 761.
llvm-svn: 28414
2006-05-20 00:24:56 +00:00
Chris Lattner
7a3f5267c0
Print csretcc calls like this:
...
call csretcc void %structret( { sbyte }* %P )
instead of this:
callcsretcc void %structret( { sbyte }* %P )
llvm-svn: 28412
2006-05-19 21:58:52 +00:00
Chris Lattner
91a82b1152
Fix misencoding of calling conventions
...
llvm-svn: 28411
2006-05-19 21:57:37 +00:00
Chris Lattner
b0af1b89ac
pretty print csretcc for calls
...
llvm-svn: 28410
2006-05-19 21:54:03 +00:00
Chris Lattner
6d6a4d0e49
CSRet allows varargs
...
llvm-svn: 28409
2006-05-19 21:34:04 +00:00
Chris Lattner
bb961fb9d8
Asmprint csret nicely
...
llvm-svn: 28408
2006-05-19 21:29:57 +00:00
Chris Lattner
c4de187e4d
Regenerate
...
llvm-svn: 28407
2006-05-19 21:28:53 +00:00
Chris Lattner
eb18e81992
Add support for parsing csret
...
llvm-svn: 28406
2006-05-19 21:28:34 +00:00
Chris Lattner
cf73ab6b7c
csret functions can be varargs (as can target cc's). Verify restrictions on
...
csret functions.
llvm-svn: 28405
2006-05-19 21:25:17 +00:00
Chris Lattner
ec58aa014f
Add a note
...
llvm-svn: 28402
2006-05-19 21:01:38 +00:00
Chris Lattner
6ab04ce0cd
Add a note
...
llvm-svn: 28401
2006-05-19 20:55:31 +00:00
Chris Lattner
49a93a0ec9
Split the SSE readme items out into their own README.
...
llvm-svn: 28400
2006-05-19 20:51:43 +00:00
Chris Lattner
95b6519d62
Split FP-stack notes out of the main readme. Next up: splitting out SSE.
...
llvm-svn: 28399
2006-05-19 20:45:52 +00:00
Chris Lattner
9c8f608215
Move a target-independent note out of the X86 readme.
...
llvm-svn: 28398
2006-05-19 20:45:08 +00:00
Chris Lattner
c29ff5f8b1
Particularly ugly code.
...
llvm-svn: 28397
2006-05-19 19:41:33 +00:00
Reid Spencer
8d035f492c
Fix a doxygen problem and break lines at 80 columns
...
llvm-svn: 28395
2006-05-19 19:09:46 +00:00
Evan Cheng
fb2038985a
These can be transformed into lea as well. Not that we use this feature
...
currently...
llvm-svn: 28393
2006-05-19 18:43:41 +00:00
Evan Cheng
3a90665f14
- Use exact-width integer types, e.g. int32_t, to avoid confusion.
...
- Fix a couple of minor bugs in i16immSExt8 and i16immZExt8.
- Added loadiPTR fragment used for indirect jumps and calls.
llvm-svn: 28392
2006-05-19 18:40:54 +00:00
Evan Cheng
ff19d6478e
Explicitly specify MOV32mi can only be used store 32-bit GV, etc.
...
llvm-svn: 28390
2006-05-19 07:30:36 +00:00
Rafael Espindola
a0e82ff9be
implement movri
...
add a stub LowerFORMAL_ARGUMENTS
llvm-svn: 28388
2006-05-18 21:45:49 +00:00
Evan Cheng
4bbd1c455f
Added a Flags field to TargetOperandInfo. Currently the only flag is
...
M_LOOK_UP_PTR_REG_CLASS which allows the register class of the operand to be
resolved via a callback at runtime.
llvm-svn: 28387
2006-05-18 20:44:26 +00:00
Evan Cheng
00c1318055
lib/Target/Target.td
...
llvm-svn: 28386
2006-05-18 20:42:07 +00:00
Chris Lattner
9c7cab7478
add a note
...
llvm-svn: 28384
2006-05-18 18:26:13 +00:00
Chris Lattner
c0653d237a
add a note
...
llvm-svn: 28383
2006-05-18 17:38:16 +00:00
Andrew Lenharth
3ae8eaba1a
Fix a bogus gcc warning
...
llvm-svn: 28382
2006-05-18 17:29:34 +00:00
Evan Cheng
d49a6d7065
ImmMask should be 3 for a two-bit field; Compact X86II
...
llvm-svn: 28381
2006-05-18 06:27:15 +00:00
Owen Anderson
5651df758a
Fix some think-o's in my last commit. Thanks to Chris for pointing them out.
...
llvm-svn: 28380
2006-05-18 05:46:08 +00:00
Owen Anderson
89fd16ffc8
Change Module to use TargetData-compatible strings internally.
...
This is part of the on-going work on PR 761.
llvm-svn: 28379
2006-05-18 02:10:31 +00:00
Evan Cheng
667b133ab9
getCalleeSaveRegs and getCalleeSaveRegClasses are no long TableGen'd.
...
llvm-svn: 28378
2006-05-18 00:12:58 +00:00
Evan Cheng
89187d589f
Remove CalleeSavedRegisters from class Target.
...
llvm-svn: 28377
2006-05-18 00:09:53 +00:00
Reid Spencer
8dbff8efda
Make some changes suggested by Chris:
...
1. Remove the LLVM_DO_NOT_BUILD feature (not needed any more)
2. Ensure that lib/VMCore gets built first. This needs to be done because
VMCore now uses tblgen to generate the Intrinsics header which are
needed in other libraries. In parallel builds, this can cause problems.
llvm-svn: 28374
2006-05-17 22:55:35 +00:00
Owen Anderson
ab4cc2c9a5
Fix a stupid bug when parsing TargetData strings.
...
llvm-svn: 28373
2006-05-17 21:56:02 +00:00
Chris Lattner
94297e068f
Use DIRS here instead of PARALLEL_DIRS, as VMCore has to be built before the
...
other dirs (for Intrinsics.gen). :(
llvm-svn: 28372
2006-05-17 21:54:48 +00:00
Evan Cheng
070813257a
Use generic iPTR instead i32 to represent pointer type.
...
llvm-svn: 28371
2006-05-17 21:21:41 +00:00
Evan Cheng
3034b633f6
Another entry
...
llvm-svn: 28370
2006-05-17 21:20:51 +00:00
Evan Cheng
ea24815aa3
Remove PointerType from class Target
...
llvm-svn: 28368
2006-05-17 21:20:27 +00:00
Chris Lattner
cc9a99f371
Declare that lowerinvoke doesn't interact with other lowering passes.
...
Patch written by Domagoj Babic!
llvm-svn: 28367
2006-05-17 21:05:27 +00:00
Chris Lattner
b2ecc1b1e7
Fix the result of the call to use a correct vbitconvert. There is no need to
...
use getPackedTypeBreakdown at all here.
llvm-svn: 28365
2006-05-17 20:49:36 +00:00
Chris Lattner
924f3fed13
Correct a previous patch which broke CodeGen/PowerPC/vec_call.ll
...
llvm-svn: 28364
2006-05-17 20:43:21 +00:00
Andrew Lenharth
595187964b
Fix call_adj.ll
...
llvm-svn: 28360
2006-05-17 19:24:49 +00:00
Andrew Lenharth
1b6c7f28f7
Added sanity check for obviously bogus immediates
...
llvm-svn: 28359
2006-05-17 19:24:31 +00:00
Evan Cheng
d282cb8542
Should pass by reference.
...
llvm-svn: 28357
2006-05-17 19:07:40 +00:00
Evan Cheng
b84a79a336
Another entry
...
llvm-svn: 28356
2006-05-17 19:05:31 +00:00
Chris Lattner
477732bab9
Add a note about a note
...
llvm-svn: 28355
2006-05-17 19:02:25 +00:00
Chris Lattner
2208c3214c
Make PPC call lowering more aggressive, making the isel matching code simple
...
enough to be autogenerated.
llvm-svn: 28354
2006-05-17 19:00:46 +00:00
Evan Cheng
89f7ea0382
Another typo. Pointed out by Nate Begeman.
...
llvm-svn: 28353
2006-05-17 18:22:14 +00:00
Evan Cheng
00f391f87b
Fixed a LowerCallTo and LowerArguments bug. They were introducing illegal
...
VBIT_VECTOR nodes. There were some confusion about the semantics of
getPackedTypeBreakdown(). e.g. for <4 x f32> it returns 1 and v4f32, not 4,
and f32.
llvm-svn: 28352
2006-05-17 18:16:39 +00:00
Evan Cheng
1d570d9be1
Fix an obvious bug in getPackedTypeBreakdown. Return 1 if type is legal.
...
llvm-svn: 28351
2006-05-17 18:10:06 +00:00
Chris Lattner
9a0d02f8f7
Add a CloneModule call that exposes the mapping of values from the old module
...
to the new module. Patch provided by Nick Lewycky!
llvm-svn: 28349
2006-05-17 18:05:35 +00:00
Chris Lattner
4252704561
When we legalize target nodes, do not use getNode to create a new node,
...
use UpdateNodeOperands to just update the operands! This is important because
getNode will allocate a new node if the node returns a flag and this breaks
assumptions in the legalizer that you can legalize some things multiple times
and get exactly the same results.
This latent bug was exposed by my ppc patch last night, and this fixes
gsm/toast.
llvm-svn: 28348
2006-05-17 18:00:08 +00:00
Chris Lattner
d3ff015877
Add an assertion, avoid some unneeded work for each call. No functionality
...
change.
llvm-svn: 28347
2006-05-17 17:55:45 +00:00
Chris Lattner
03c70b7f27
Switch PPC over to a call-selection model where the lowering code creates
...
the copyto/fromregs instead of making the PPCISD::CALL selection code create
them. This vastly simplifies the selection code, and moves the ABI handling
parts into one place.
llvm-svn: 28346
2006-05-17 06:01:33 +00:00
Chris Lattner
348883611c
3 changes, 2 of which are cleanup one of which changes codegen:
...
1. Rearrange code a bit so that the special case doesn't require indenting lots
of code.
2. Add comments describing PPC calling convention.
3. Only round up to 56-bytes of stack space for an outgoing call if the callee
is varargs. This saves a bit of stack space.
llvm-svn: 28342
2006-05-17 00:15:40 +00:00
Chris Lattner
a36579803f
implement passing/returning vector regs to calls, at least non-varargs calls.
...
llvm-svn: 28341
2006-05-16 23:54:25 +00:00
Chris Lattner
30f61c8bb1
Add support for calls that pass and return legal vectors.
...
llvm-svn: 28340
2006-05-16 23:39:44 +00:00
Chris Lattner
b5271a0f4c
Instead of implementing LowerCallTo directly, let the default impl produce an
...
ISD::CALL node, then custom lower that. This means that we only have to handle
LEGAL call operands/results, not every possible type. This allows us to
simplify the call code, shrinking it by about 1/3.
llvm-svn: 28339
2006-05-16 22:56:08 +00:00
Chris Lattner
01f4f28837
Add a new ISD::CALL node, make the default impl of TargetLowering::LowerCallTo
...
produce it.
llvm-svn: 28338
2006-05-16 22:53:20 +00:00
Chris Lattner
40d1eaad0a
Simplify the argument counting logic by only incrementing the index.
...
llvm-svn: 28335
2006-05-16 18:58:15 +00:00
Chris Lattner
0ae068ed8f
Simplify the dead argument handling code.
...
llvm-svn: 28334
2006-05-16 18:54:32 +00:00
Chris Lattner
fbbe542235
Vector args passed in registers don't reserve stack space.
...
llvm-svn: 28333
2006-05-16 18:51:52 +00:00
Chris Lattner
0a12e343e2
Switch the PPC backend over to using FORMAL_ARGUMENTS for formal argument
...
handling. This makes the lower argument code significantly simpler (we
only need to handle legal argument types).
Incidentally, this also implements support for vector argument registers,
so long as they are not on the stack.
llvm-svn: 28331
2006-05-16 18:18:50 +00:00
Andrew Lenharth
bfb68e47ca
this should be 128 I think
...
llvm-svn: 28330
2006-05-16 17:45:23 +00:00
Andrew Lenharth
14504c85ed
Move this code to a common place
...
llvm-svn: 28329
2006-05-16 17:42:15 +00:00
Chris Lattner
c04371da56
Implement the custom lowering hook right, returning values for all of the
...
arguments at once.
llvm-svn: 28327
2006-05-16 17:14:26 +00:00
Chris Lattner
f501a979ec
Fix a bug I introduced yesterday, which broke functions with *no* arguments.
...
llvm-svn: 28326
2006-05-16 17:08:35 +00:00
Evan Cheng
dc9b5f5fc0
X86 integer register classes naming changes. Make them consistent with FP, vector classes.
...
llvm-svn: 28324
2006-05-16 07:21:53 +00:00
Chris Lattner
1024577552
Make this print the right start pointer
...
llvm-svn: 28321
2006-05-16 06:45:50 +00:00
Chris Lattner
ba1dfc1da7
Add a chain to FORMAL_ARGUMENTS. This is a minimal port of the X86 backend,
...
it doesn't currently use/maintain the chain properly. Also, make the
X86ISelLowering.cpp file 80-col clean.
llvm-svn: 28320
2006-05-16 06:45:34 +00:00
Vladimir Prus
15fdb12773
Replace "../whatever.td" with "whatever.td", so that out-of-tree backends
...
can just add lib/Target to TableGen includes.
llvm-svn: 28318
2006-05-16 06:39:36 +00:00