Duncan Sands
0fcef7437c
Update the callgraph correctly.
...
llvm-svn: 55896
2008-09-08 11:08:09 +00:00
Duncan Sands
62431a29a5
Update the callgraph correctly in ArgumentPromotion.
...
llvm-svn: 55895
2008-09-08 11:07:35 +00:00
Duncan Sands
58d434d3e8
Reapply 55859. This doesn't change anything as
...
long as the callgraph is correct. It checks
for wrong callgraphs more strictly.
llvm-svn: 55894
2008-09-08 11:05:51 +00:00
Evan Cheng
8cb490d2f3
Add fast isel physical register definition support.
...
llvm-svn: 55892
2008-09-08 08:38:20 +00:00
Evan Cheng
66ef6517ad
Add support to extend call operands when needed. Enable x86 fastisel call support.
...
llvm-svn: 55891
2008-09-08 06:35:17 +00:00
Bill Wendling
2239de4290
Revert my previous change -- the subtraction of two constants was a no-op
...
before. This is taken care of in the selection DAG pass. In my opinion, this
should be in one place or the other. I.e., it should probably be removed from
the DAG combiner (along with the other arithmetic transformations on constants
that are essentially no-ops).
llvm-svn: 55889
2008-09-08 01:56:32 +00:00
Bill Wendling
91e9abe370
Convert
...
// fold (sub c1, c2) -> c1-c2
from a no-op into an actual transformation.
llvm-svn: 55886
2008-09-07 11:34:47 +00:00
Duncan Sands
ae32389a41
Correct a comment and strip trailing whitespace.
...
llvm-svn: 55883
2008-09-07 09:54:09 +00:00
Evan Cheng
f016785579
Initial fastisel call support for C, Fast, and X86_FastCall calling conventions. It's meant to handle "simple" calls, i.e. no byval, structret, etc. It doesn't support multi-result returns either.
...
Not yet turned on, it needs to support sext / zext of arguments and result.
llvm-svn: 55882
2008-09-07 09:09:33 +00:00
Evan Cheng
ad262ec3a7
Some code clean up.
...
llvm-svn: 55881
2008-09-07 09:07:23 +00:00
Evan Cheng
396c744dfa
Indentation.
...
llvm-svn: 55880
2008-09-07 09:04:52 +00:00
Evan Cheng
285350703c
- Doh. Pass vector by value is bad.
...
- Add a AnalyzeCallResult specialized for calls which produce a single value. This is used by fastisel.
llvm-svn: 55879
2008-09-07 09:02:18 +00:00
Evan Cheng
6690ccd573
Handle x86 truncate to i8 with target hook for now.
...
llvm-svn: 55877
2008-09-07 08:47:42 +00:00
Nuno Lopes
a03bc9ce10
fix crash when the malloc/free function is defined or is a declaration with 0 parameters.
...
this pass doesnt seem to be used, but still it's now a little more correct
llvm-svn: 55873
2008-09-06 17:44:06 +00:00
Duncan Sands
c4ec7871bf
When PruneEH turned an invoke into an ordinary
...
call (thus changing the call site) it didn't
inform the callgraph about this. But the
call site does matter - as shown by the testcase,
the callgraph become invalid after the inliner
ran (with an edge between two functions simply
missing), resulting in wrong deductions by
GlobalsModRef.
llvm-svn: 55872
2008-09-06 17:19:29 +00:00
Owen Anderson
ef6d356c39
Fix constant pool loads, and remove broken versions of addConstantPoolReference.
...
llvm-svn: 55868
2008-09-06 01:11:01 +00:00
Owen Anderson
4d5723c58f
Fix the X86 addConstantPoolReference, which had the operands in the wrong order.
...
llvm-svn: 55867
2008-09-06 00:50:00 +00:00
Dale Johannesen
3be45974bb
Next limited float precision expansion (log2 12 bits)
...
llvm-svn: 55866
2008-09-05 23:49:37 +00:00
Owen Anderson
453bcfcf8d
Revert r55859. This is breaking the build in the abscence of its companion commit.
...
llvm-svn: 55865
2008-09-05 23:36:01 +00:00
Eli Friedman
fecea4b498
Fix for PR2687: Add patterns to match sint_to_fp and fp_to_sint for <2 x
...
i32>. This is a little messy, but it works.
We should really get rid of the intrinsics, though, since they map
perfectly well to standard LLVM instructions.
llvm-svn: 55864
2008-09-05 23:07:03 +00:00
Dan Gohman
85d35b92df
Move the code that inserts copies for function livein registers
...
out of ScheduleDAGEmit.cpp and into SelectionDAGISel.cpp. This
allows it to be run exactly once per function, even if multiple
SelectionDAG iterations happen in the entry block, as may happen
with FastISel.
llvm-svn: 55863
2008-09-05 22:59:21 +00:00
Devang Patel
4148488e49
Remove unused map.
...
llvm-svn: 55861
2008-09-05 21:55:33 +00:00
Duncan Sands
fdfa2d24fe
Delete the removeCallEdgeTo callgraph method,
...
because it does not maintain a correct list
of callsites. I discovered (see following
commit) that the inliner will create a wrong
callgraph if it is fed a callgraph with
correct edges but incorrect callsites. These
were created by Prune-EH, and while it wasn't
done via removeCallEdgeTo, it could have been
done via removeCallEdgeTo, which is an accident
waiting to happen. Use removeCallEdgeFor
instead.
llvm-svn: 55859
2008-09-05 21:43:04 +00:00
Dan Gohman
930d0be24c
Fix X86FastISel's shift and select code to reject illegal types.
...
llvm-svn: 55857
2008-09-05 21:27:34 +00:00
Dale Johannesen
6b48790d88
Add the next limited-precision expansion.
...
llvm-svn: 55856
2008-09-05 21:27:19 +00:00
Dan Gohman
28e33e92e4
Fix the opcodes used by X86FastISel for shifts and conditional moves.
...
llvm-svn: 55855
2008-09-05 21:13:04 +00:00
Evan Cheng
5fd19547f4
Factor out code that emits load and store instructions.
...
llvm-svn: 55854
2008-09-05 21:00:03 +00:00
Owen Anderson
7866b1c4c3
Rename method.
...
llvm-svn: 55853
2008-09-05 20:49:33 +00:00
Dan Gohman
b22e9b050f
FastISel support for AND and OR with type i1.
...
llvm-svn: 55846
2008-09-05 18:44:22 +00:00
Dale Johannesen
116163ab21
Add hooks for other intrinsics to get low-precision expansions.
...
llvm-svn: 55845
2008-09-05 18:38:42 +00:00
Dan Gohman
0be4bca4b6
X86FastISel support for shifts and conditional moves.
...
llvm-svn: 55844
2008-09-05 18:30:08 +00:00
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
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
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