Commit Graph

41070 Commits

Author SHA1 Message Date
Duncan Sands
faf600a9ed Testcase for commits 55700 and 55714.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55715 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 19:38:41 +00:00
Duncan Sands
34f2a0ca17 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55714 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 19:37:16 +00:00
Devang Patel
22ec199fa0 Add custom inliner that handles only functions that are marked as always_inline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55713 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 18:50:53 +00:00
Devang Patel
67243399dd Handle "always inline" note during inline cost analysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55712 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 18:47:45 +00:00
Devang Patel
5e06010462 Check noinline note and ignore other notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55711 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 18:46:35 +00:00
Devang Patel
910c120a7c Handle "noinline" note inside the simple inliner.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55708 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 18:10:21 +00:00
Owen Anderson
d5d81a457b Oops, I accidentally broke the fallback case with my last commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55704 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 17:51:57 +00:00
Owen Anderson
99aaf108cd 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55703 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 17:37:03 +00:00
Devang Patel
6bd8aa8399 Update test to check call instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55702 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 17:05:49 +00:00
Dan Gohman
f0cbcd4880 Split the SelectionDAG-building code, including the FunctionLoweringInfo
and SelectionDAGLowering classes, out of SelectionDAGISel.cpp and put
it in a separate file, SelectionDAGBuild.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55701 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 16:12:24 +00:00
Duncan Sands
b070beee77 Fix maxo bado thinko.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55700 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 16:10:55 +00:00
Dan Gohman
94b8d7ea63 Separate MachineInstr-emitting routines from actual scheduling
routines and move them into a separate file, ScheduleDAGEmit.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55699 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 16:01:59 +00:00
Dan Gohman
3f62940561 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55698 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 15:56:16 +00:00
Duncan Sands
d0ac373660 Since onlyReadsMemory returns true if in fact
doesNotAccessMemory, check doesNotAccessMemory
first, since otherwise functions may be
marked readonly rather than readnone.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55697 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 15:31:24 +00:00
Duncan Sands
9a036b945c 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55696 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 12:55:42 +00:00
Duncan Sands
dced0a3f53 Testcase for PR1678.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55695 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 07:52:01 +00:00
Nick Lewycky
8373d38afd Try to fold each element of a vector. This is needed to maintain structural
equivalence.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55694 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 06:48:55 +00:00
Evan Cheng
8b19e56051 Add X86 target hook to implement load (even from GlobalAddress).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55693 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 06:44:39 +00:00
Evan Cheng
f45261fb9b If TargetSelectInstruction returns true, move to next instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55692 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 06:43:41 +00:00
Evan Cheng
ea09f4f469 Make UpdateValueMap, createResultReg, etc. protected instead of private so they can used by target hooks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55691 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 06:43:10 +00:00
Nick Lewycky
23c04309fb Don't apply this transform to vectors. Fixes PR2756.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55690 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 06:24:21 +00:00
Nick Lewycky
83c05e5d30 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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55689 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 05:54:33 +00:00
Ted Kremenek
b388eb82fb Fix capitalization in #include of FastISel.h. This unbreaks the build on case-sensitive filesystems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55687 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 02:54:11 +00:00
Evan Cheng
88e3041ca6 Unbreak fast isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55685 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 01:04:47 +00:00
Devang Patel
e925ccc553 Add additional check to ensure that iv is canonicalized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55682 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 00:29:13 +00:00
Devang Patel
a9348dc7ac Check iteration count.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55680 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 00:10:56 +00:00
Evan Cheng
c3f44b0d63 Let tblgen only generate fastisel routines, not the class definition. This makes it easier for targets to define its own fastisel class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55679 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 00:03:49 +00:00
Devang Patel
c72139134c While removing PHI, use basicblock to identify incoming value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55678 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 00:02:42 +00:00
Devang Patel
cb7f483d8c s/FP_AlwaysInline/FN_NOTE_AlwaysInline/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55676 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-02 22:43:57 +00:00
Devang Patel
108f92e376 If all IV uses are extending integer IV then change the type of IV itself, if possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55674 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-02 22:18:08 +00:00
Devang Patel
691e52445e respect inline=never and inline=always notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55673 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-02 22:16:13 +00:00
Evan Cheng
36fd941fc0 80 col violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55668 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-02 21:59:13 +00:00
Devang Patel
7ad033c9e7 Read and write function notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55657 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-02 21:47:13 +00:00
Devang Patel
1b47e48a64 Use bitwise AND.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55656 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-02 21:46:44 +00:00
Dale Johannesen
09a2ffef0f New testcase for targets without 64-bit atomics;
xfail old test for ppc.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55651 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-02 21:19:30 +00:00
Devang Patel
9018f569be Function notes tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55648 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-02 20:58:16 +00:00
Devang Patel
94bdae14ba Print function notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55647 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-02 20:56:33 +00:00
Devang Patel
d49808184f Parse function notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55646 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-02 20:52:40 +00:00
Devang Patel
81b2ab8a24 Initialize function notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55645 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-02 20:51:15 +00:00
Dale Johannesen
a619d012c1 Fix some bugs in the code sequences for atomics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55643 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-02 20:30:23 +00:00
Dan Gohman
d2ff647964 Ensure that HandlePHINodesInSuccessorBlocks is run for all blocks,
even in FastISel mode in the case where FastISel successfully 
selects all the instructions. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55641 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-02 20:17:56 +00:00
Devang Patel
21dbb99964 Getter and setter for function notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55638 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-02 18:33:55 +00:00
Daniel Dunbar
ecfe67c217 Reapply majority of r55557 but with the changes to compilation flags
disabled until issues with gcc 4.1 on linux 32-bit are resolved.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55636 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-02 17:35:16 +00:00
Nuno Lopes
5b8dbf839b plug memleak: destroy internal buffer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55632 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-02 12:06:08 +00:00
Nuno Lopes
6e95d90b4c plug a little memleak in verifyFunction()
# first commit to llvm, so whatch out :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55631 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-02 11:30:10 +00:00
Matthijs Kooijman
0783f0d0a3 Revert r55557, it is causing linking failures on 32bit linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55628 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-02 09:51:00 +00:00
Evan Cheng
252ddfbdbc MMI may be null.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55626 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-02 08:14:01 +00:00
Evan Cheng
95ce1178e4 Add Mac OS X compatible JIT callback routine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55625 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-02 07:49:03 +00:00
Evan Cheng
7602e11c32 Revamp ARM JIT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55624 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-02 06:52:38 +00:00
Evan Cheng
acff339e39 Change getBinaryCodeForInstr prototype. First operand MachineInstr& should be const. Make corresponding changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55623 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-02 06:51:36 +00:00