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
Devang Patel
a1e2066b1d
If all IV uses are extending integer IV then change the type of IV itself, if possible.
...
llvm-svn: 55674
2008-09-02 22:18:08 +00:00
Devang Patel
cda9086d29
respect inline=never and inline=always notes.
...
llvm-svn: 55673
2008-09-02 22:16:13 +00:00
Evan Cheng
5e0e6dfc7f
80 col violations.
...
llvm-svn: 55668
2008-09-02 21:59:13 +00:00
Devang Patel
631122c84b
Read and write function notes.
...
llvm-svn: 55657
2008-09-02 21:47:13 +00:00
Devang Patel
d131eb6bfb
Use bitwise AND.
...
llvm-svn: 55656
2008-09-02 21:46:44 +00:00
Dale Johannesen
1962ef8546
New testcase for targets without 64-bit atomics;
...
xfail old test for ppc.
llvm-svn: 55651
2008-09-02 21:19:30 +00:00
Devang Patel
468829b883
Function notes tests.
...
llvm-svn: 55648
2008-09-02 20:58:16 +00:00
Devang Patel
4b52a398c3
Print function notes.
...
llvm-svn: 55647
2008-09-02 20:56:33 +00:00
Devang Patel
f06ad159e9
Parse function notes.
...
llvm-svn: 55646
2008-09-02 20:52:40 +00:00
Devang Patel
863655cd40
Initialize function notes.
...
llvm-svn: 55645
2008-09-02 20:51:15 +00:00