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
Devang Patel
d2fbb7aa32
Add missing decls.
...
llvm-svn: 55719
2008-09-03 20:24:05 +00:00
Devang Patel
b25dcdea78
Add parentheses to make code more readable.
...
llvm-svn: 55717
2008-09-03 19:57:15 +00:00
Devang Patel
24618c5a6a
Fix comments.
...
llvm-svn: 55716
2008-09-03 19:52:17 +00:00
Duncan Sands
4a2e0c6591
Testcase for commits 55700 and 55714.
...
llvm-svn: 55715
2008-09-03 19:38:41 +00:00
Duncan Sands
e745635d61
If a SCC has a node without a function, then the SCC
...
analysis would bail out without removing function
records for other members of the SCC (which may exist
if those functions read or wrote global variables).
Since these are initialized to "readnone", this
resulted in incorrect alias analysis results.
llvm-svn: 55714
2008-09-03 19:37:16 +00:00
Devang Patel
c70392bfcd
Add custom inliner that handles only functions that are marked as always_inline.
...
llvm-svn: 55713
2008-09-03 18:50:53 +00:00
Devang Patel
42fe8ff6e8
Handle "always inline" note during inline cost analysis.
...
llvm-svn: 55712
2008-09-03 18:47:45 +00:00
Devang Patel
dae7f0b9d7
Check noinline note and ignore other notes.
...
llvm-svn: 55711
2008-09-03 18:46:35 +00:00
Devang Patel
653bcea20d
Handle "noinline" note inside the simple inliner.
...
llvm-svn: 55708
2008-09-03 18:10:21 +00:00
Owen Anderson
d08396955c
Oops, I accidentally broke the fallback case with my last commit.
...
llvm-svn: 55704
2008-09-03 17:51:57 +00:00
Owen Anderson
906c590bb8
Fix an issue where we were reusing materializations of constants in blocks not dominated by the materialization. This is
...
the simple fix, materializing the constant before every use. It might be better to either track domination of uses or
to materialize all constants and the beginning of the function and let remat sort when to do materialization at uses.
llvm-svn: 55703
2008-09-03 17:37:03 +00:00
Devang Patel
ce2b476d8e
Update test to check call instruction.
...
llvm-svn: 55702
2008-09-03 17:05:49 +00:00
Dan Gohman
3ee4edfe9c
Split the SelectionDAG-building code, including the FunctionLoweringInfo
...
and SelectionDAGLowering classes, out of SelectionDAGISel.cpp and put
it in a separate file, SelectionDAGBuild.cpp.
llvm-svn: 55701
2008-09-03 16:12:24 +00:00
Duncan Sands
e639585987
Fix maxo bado thinko.
...
llvm-svn: 55700
2008-09-03 16:10:55 +00:00
Dan Gohman
c58897359b
Separate MachineInstr-emitting routines from actual scheduling
...
routines and move them into a separate file, ScheduleDAGEmit.cpp.
llvm-svn: 55699
2008-09-03 16:01:59 +00:00
Dan Gohman
ec225915fa
Fix addRegisterDead and addRegisterKilled to be more thorough
...
when searching for redundant subregister dead/kill bits.
Previously it was common to see instructions marked like this:
"RET %EAX<imp-use,kill>, %AX<imp-use,kill>"
With this change, addRegisterKilled continues scanning after
finding the %EAX operand, so it proceeds to discover the
redundant %AX kill and eliminates it, producing this:
"RET %EAX<imp-use,kill>"
This currently has no effect on the generated code.
llvm-svn: 55698
2008-09-03 15:56:16 +00:00
Duncan Sands
06bd9f3885
Since onlyReadsMemory returns true if in fact
...
doesNotAccessMemory, check doesNotAccessMemory
first, since otherwise functions may be
marked readonly rather than readnone.
llvm-svn: 55697
2008-09-03 15:31:24 +00:00
Duncan Sands
0283a6c991
Cleanup GlobalsModRef a bit. When analysing the
...
callgraph, when one member of a SCC calls another
then the analysis would drop to mod-ref because
there is (usually) no function info for the callee
yet; fix this. Teach the analysis about function
attributes, in particular the readonly attribute
(which requires being careful about globals).
llvm-svn: 55696
2008-09-03 12:55:42 +00:00
Duncan Sands
823cf841d1
Testcase for PR1678.
...
llvm-svn: 55695
2008-09-03 07:52:01 +00:00
Nick Lewycky
8b8886c6b0
Try to fold each element of a vector. This is needed to maintain structural
...
equivalence.
llvm-svn: 55694
2008-09-03 06:48:55 +00:00
Evan Cheng
942d55dd92
Add X86 target hook to implement load (even from GlobalAddress).
...
llvm-svn: 55693
2008-09-03 06:44:39 +00:00
Evan Cheng
f993be4cc8
If TargetSelectInstruction returns true, move to next instruction.
...
llvm-svn: 55692
2008-09-03 06:43:41 +00:00
Evan Cheng
0c40be80aa
Make UpdateValueMap, createResultReg, etc. protected instead of private so they can used by target hooks.
...
llvm-svn: 55691
2008-09-03 06:43:10 +00:00
Nick Lewycky
3b35dcc455
Don't apply this transform to vectors. Fixes PR2756.
...
llvm-svn: 55690
2008-09-03 06:24:21 +00:00
Nick Lewycky
57cebeaeba
Don't crash when trying to constant fold a vector with some elements that can't
...
be folded. Instead, fail to fold the entire vector.
We could also return a vector with some elements folded and some not. If anyone
thinks that's a better approach, please speak up!
llvm-svn: 55689
2008-09-03 05:54:33 +00:00
Ted Kremenek
b7236d215b
Fix capitalization in #include of FastISel.h. This unbreaks the build on case-sensitive filesystems.
...
llvm-svn: 55687
2008-09-03 02:54:11 +00:00
Evan Cheng
4cef3f6ce1
Unbreak fast isel.
...
llvm-svn: 55685
2008-09-03 01:04:47 +00:00
Devang Patel
5fa8cc79ed
Add additional check to ensure that iv is canonicalized.
...
llvm-svn: 55682
2008-09-03 00:29:13 +00:00
Devang Patel
4dfecae8fe
Check iteration count.
...
llvm-svn: 55680
2008-09-03 00:10:56 +00:00
Evan Cheng
43c7084625
Let tblgen only generate fastisel routines, not the class definition. This makes it easier for targets to define its own fastisel class.
...
llvm-svn: 55679
2008-09-03 00:03:49 +00:00
Devang Patel
df5dce4aa8
While removing PHI, use basicblock to identify incoming value.
...
llvm-svn: 55678
2008-09-03 00:02:42 +00:00
Devang Patel
5659d2508e
s/FP_AlwaysInline/FN_NOTE_AlwaysInline/g
...
llvm-svn: 55676
2008-09-02 22:43:57 +00:00