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
Dale Johannesen
46f19abcec
Fix some bugs in the code sequences for atomics.
...
llvm-svn: 55643
2008-09-02 20:30:23 +00:00
Dan Gohman
9969b223c7
Ensure that HandlePHINodesInSuccessorBlocks is run for all blocks,
...
even in FastISel mode in the case where FastISel successfully
selects all the instructions.
llvm-svn: 55641
2008-09-02 20:17:56 +00:00
Devang Patel
badf2b9315
Getter and setter for function notes.
...
llvm-svn: 55638
2008-09-02 18:33:55 +00:00
Daniel Dunbar
4929090fb1
Reapply majority of r55557 but with the changes to compilation flags
...
disabled until issues with gcc 4.1 on linux 32-bit are resolved.
llvm-svn: 55636
2008-09-02 17:35:16 +00:00
Nuno Lopes
8d481ade2f
plug memleak: destroy internal buffer
...
llvm-svn: 55632
2008-09-02 12:06:08 +00:00
Nuno Lopes
5c40eb8e05
plug a little memleak in verifyFunction()
...
# first commit to llvm, so whatch out :)
llvm-svn: 55631
2008-09-02 11:30:10 +00:00
Matthijs Kooijman
96700eceda
Revert r55557, it is causing linking failures on 32bit linux.
...
llvm-svn: 55628
2008-09-02 09:51:00 +00:00
Evan Cheng
15fd1af657
MMI may be null.
...
llvm-svn: 55626
2008-09-02 08:14:01 +00:00
Evan Cheng
126bd60288
Add Mac OS X compatible JIT callback routine.
...
llvm-svn: 55625
2008-09-02 07:49:03 +00:00