Dan Gohman
525caf83e5
FastISel support for ConstantExprs.
...
llvm-svn: 55843
2008-09-05 18:18:20 +00:00
Dan Gohman
13d7484b4a
Revert r55817. It broke PIC. FastISel will need to find a different
...
approach here.
llvm-svn: 55842
2008-09-05 18:13:01 +00:00
Evan Cheng
10a350fa89
If SSE2 is available, x86 should pass first 3 f32/f64 arguments in XMM registers for fastcc calls.
...
llvm-svn: 55840
2008-09-05 17:24:07 +00:00
Evan Cheng
339a06f29e
Add a variant of AnalyzeCallOperands that can be used by fast isel.
...
llvm-svn: 55838
2008-09-05 16:59:26 +00:00
Duncan Sands
b63fde1edb
Use removeAllCalledFunctions rather than removing
...
edges one by one by hand.
llvm-svn: 55836
2008-09-05 14:56:53 +00:00
Duncan Sands
c568792f0a
Remove trailing whitespace.
...
llvm-svn: 55835
2008-09-05 12:37:12 +00:00
Duncan Sands
c069767456
Strip trailing whitespace.
...
llvm-svn: 55834
2008-09-05 12:31:56 +00:00
Duncan Sands
8de0cd8f10
Make this pass return that it made a change if
...
it modifies a functions attributes.
llvm-svn: 55831
2008-09-05 09:08:37 +00:00
Duncan Sands
566e0f1053
"Fix" PR2762. The testcase now crashes codegen
...
elsewhere due to a missing pattern for
v2f64 = sint_to_fp v2i32. That is PR2687.
llvm-svn: 55828
2008-09-05 08:13:35 +00:00
Dan Gohman
a3987ed4e2
Fix a search+replace-o.
...
llvm-svn: 55824
2008-09-05 01:58:21 +00:00
Dale Johannesen
ce63ed5b47
Add -flimit-float-precision to enable some faster,
...
but less accurate (non-IEEE) code sequences for
certain math library functions. Add the first of
several such expansions. Don't worry, if you don't
turn it on it won't affect you.
llvm-svn: 55823
2008-09-05 01:48:15 +00:00
Dan Gohman
29cba19a2a
Check a comparion's operand type for legality before
...
expanding its operands.
llvm-svn: 55820
2008-09-05 01:33:56 +00:00
Dan Gohman
121baa1723
Fix X86FastISel code for comparisons and conditional branches
...
to check the result of getRegForValue before using it, and
to check for illegal operand types.
llvm-svn: 55819
2008-09-05 01:15:35 +00:00
Dan Gohman
e64326ff34
FastISel support for unreachable.
...
llvm-svn: 55818
2008-09-05 01:08:41 +00:00
Dan Gohman
fcd2cbd985
In FastISel mode, the scheduler may be invoked multiple times
...
in the same block. Fix the entry-block handling to only run at
at the beginning of the entry block, and not any other times.
llvm-svn: 55817
2008-09-05 01:07:48 +00:00
Dan Gohman
783f38e056
X86FastISel support for conditional branches.
...
llvm-svn: 55816
2008-09-05 01:06:14 +00:00
Owen Anderson
6d5b72d45a
Add initial support for selecting constant materializations that require constant
...
pool loads on X86 in fast isel. This isn't actually used yet.
llvm-svn: 55814
2008-09-05 00:06:23 +00:00
Dan Gohman
88c3de638e
X86FastISel support for ICmpInst and FCmpInst.
...
llvm-svn: 55811
2008-09-04 23:26:51 +00:00
Devang Patel
b85cf5664d
update.
...
llvm-svn: 55809
2008-09-04 23:10:26 +00:00
Devang Patel
23d60ba4ed
Document function notes.
...
llvm-svn: 55808
2008-09-04 23:05:13 +00:00
Evan Cheng
bd15e330d0
For whatever the reason, x86 CallingConv::Fast (i.e. fastcc) was not passing scalar arguments in registers. This patch defines a new fastcc CC which is slightly different from the FastCall CC. In addition to passing integer arguments in ECX and EDX, it also specify doubles are passed in 8-byte slots which are 8-byte aligned (instead of 4-byte aligned). This avoids a potential performance hazard where doubles span cacheline boundaries.
...
llvm-svn: 55807
2008-09-04 22:59:58 +00:00
Devang Patel
3d42ac68df
A loop may be unswitched multiple times. Reconstruct dom info. at the end.
...
llvm-svn: 55806
2008-09-04 22:43:59 +00:00
Dale Johannesen
51f5f5dfd9
Adjust tests to expect new math intrinsics to be
...
emitted only when errno is not in use.
llvm-svn: 55797
2008-09-04 21:24:28 +00:00
Devang Patel
f3770334a9
If function notes say optimize for size, then adjust alignment.
...
llvm-svn: 55794
2008-09-04 21:03:41 +00:00
Dan Gohman
1ffb4ad3a8
Add an include of SmallSet.h.
...
llvm-svn: 55793
2008-09-04 20:49:27 +00:00
Devang Patel
25b88b66e8
Initialize loop data first.
...
llvm-svn: 55792
2008-09-04 20:36:36 +00:00
Duncan Sands
bbfa97b8b0
Neaten this up a bit. No functionality change.
...
llvm-svn: 55789
2008-09-04 19:16:20 +00:00
Devang Patel
c96f319a3c
Do not unswitch if the function notes say we're optimizing this function for size.
...
llvm-svn: 55786
2008-09-04 18:55:13 +00:00
Andrew Lenharth
4523deb38b
try to seperate the mechanism into something others can use
...
llvm-svn: 55785
2008-09-04 18:51:26 +00:00
Dale Johannesen
8a3d70fe55
Adjust libcalls tests to expect intrinsic for exp2
...
llvm-svn: 55784
2008-09-04 18:44:20 +00:00
Dale Johannesen
bbd799c544
Add intrinsic forms of pow and exp2. The non-intrinsic
...
forms remain to handle older IR files, but will go away soon.
llvm-svn: 55781
2008-09-04 18:30:46 +00:00
Dan Gohman
e1f9be27bc
Tidy up several unbeseeming casts from pointer to intptr_t.
...
llvm-svn: 55779
2008-09-04 17:05:41 +00:00
Owen Anderson
cd3ee9198d
Fix the ordering of operands to the store (inverted relative to LLVM IR), and fix the testcase.
...
llvm-svn: 55777
2008-09-04 16:48:33 +00:00
Dan Gohman
7ee14837e6
Clean up uses of TargetLowering::getTargetMachine.
...
llvm-svn: 55769
2008-09-04 15:39:15 +00:00
Andrew Lenharth
9e27a7b4b0
cleanup as per Duncan's review
...
llvm-svn: 55766
2008-09-04 14:34:22 +00:00
Owen Anderson
35485dbae3
Add a first attempt at implementing stores for X86 fast isel using target hooks.
...
Dan or Evan, please review.
llvm-svn: 55764
2008-09-04 07:08:58 +00:00
Evan Cheng
9c728a557d
Load from GV stub should be locally CSE'd.
...
llvm-svn: 55763
2008-09-04 06:18:33 +00:00
Evan Cheng
dcce925eb1
Fix an overly strict assertion. Source register of a copy may not be killed, it may be killed by an implicit super-register use.
...
llvm-svn: 55762
2008-09-04 05:43:55 +00:00
Evan Cheng
53ce5fa5ce
Remove code that pad number of bytes to pop for X86_FastCall CC. The code doesn't do the "aligning" for Cygwin, Mingw, and Windows. But aligning it on Darwin and Linux breaks gcc compatibility. That ruled out all the platforms we support!
...
llvm-svn: 55756
2008-09-04 01:04:15 +00:00
Dale Johannesen
9e4d101fab
Add intrinsics for log, log2, log10, exp, exp2.
...
No functional change (and no FE change to generate them).
llvm-svn: 55753
2008-09-04 00:47:13 +00:00
Dan Gohman
18f659d804
Do trivial local CSE for constants and other non-Instruction values
...
in FastISel.
llvm-svn: 55748
2008-09-03 23:32:19 +00:00
Dan Gohman
f86538dd3c
Put RegsForValue in the llvm namespace to avoid warnings about
...
classes in the llvm namespace having members with types from
anonymous namespaces.
llvm-svn: 55747
2008-09-03 23:18:39 +00:00
Dan Gohman
18cc2a26df
Create HandlePHINodesInSuccessorBlocksFast, a version of
...
HandlePHINodesInSuccessorBlocks that works FastISel-style. This
allows PHI nodes to be updated correctly while using FastISel.
This also involves some code reorganization; ValueMap and
MBBMap are now members of the FastISel class, so they needn't
be passed around explicitly anymore. Also, SelectInstructions
is changed to SelectInstruction, and only does one instruction
at a time.
llvm-svn: 55746
2008-09-03 23:12:08 +00:00
Devang Patel
49483d797e
Update inline threshold for current function if the notes say, optimize for size.
...
llvm-svn: 55745
2008-09-03 23:06:09 +00:00
Owen Anderson
94bd638e81
Fix a bug that prevented PRE from applying in some cases.
...
llvm-svn: 55744
2008-09-03 23:06:07 +00:00
Devang Patel
c0d6a60b65
Avoid extra comma.
...
llvm-svn: 55742
2008-09-03 22:55:40 +00:00
Devang Patel
f8c7bd2a05
Parse and print opt_size note.
...
llvm-svn: 55740
2008-09-03 22:10:21 +00:00
Andrew Lenharth
4a69775c64
Initial version of a Partial Specialization IPO pass. It triggers a couple hundred times on 176.gcc. I don't know the performance impact yet, the heuristic is quite simple still.
...
llvm-svn: 55734
2008-09-03 21:00:28 +00:00
Dale Johannesen
ca782fcba1
Do not emit a UsedDirective for things in the llvm.used
...
list that have internal linkage; the linker doesn't need
or want this. (These objects must still be preserved
at compile time, so just removing them from the llvm.used
list doesn't work.) Should affect only Darwin.
llvm-svn: 55722
2008-09-03 20:34:58 +00:00
Devang Patel
41331065dd
Fix typo in a comment.
...
llvm-svn: 55720
2008-09-03 20:25:40 +00:00