Commit Graph

9625 Commits

Author SHA1 Message Date
Chris Lattner
0772e78789 Interchange this loop so that we test all pointers against one call site
before moving on to the next call site.  This will be a more efficient way
to compute the mod/ref set for AA implementations like DSA.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20866 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-26 22:16:44 +00:00
Nate Begeman
7532e2f555 Fix that pesky floats in integer regs problem by assigning the f32 type to
the correct register class.  Also remove the loading of float data into int
regs part of varargs; it will need to be implemented differently later.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20857 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-26 08:25:22 +00:00
Nate Begeman
f7e4338035 Get closer to having varargs working. There's still something strange
going on with copies between floating point and integer register files
being generated.  Once that is solved, varargs will be done.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20856 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-26 07:46:36 +00:00
Nate Begeman
f26226155e Make 64bit args and float args work correct with calls. Thanks to Chris
for explaining EXTRACT_ELEMENT to me.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20847 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-26 02:17:46 +00:00
Nate Begeman
8e21e71b24 Change interface to LowerCallTo to take a boolean isVarArg argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20842 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-26 01:29:23 +00:00
Nate Begeman
307e7443b8 Next round of pattern isel changes, mostly dealing with calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20841 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-26 01:28:53 +00:00
Nate Begeman
c13a7f0eb3 Correct a documention link
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20840 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-26 01:28:05 +00:00
Chris Lattner
cf9082589c no really, don't double count these nodes either!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20837 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-25 20:54:45 +00:00
Chris Lattner
0423e031d6 Don't count all of the nodes in the SCC once for each function in the SCC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20836 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-25 20:37:32 +00:00
Chris Lattner
33b4276053 Grow the EQ classes for globals at the end of the BU pass. This shrinks
memory usage in the TD pass for 254.gap from 31.3MB to 3.9MB.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20834 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-25 16:45:43 +00:00
Nate Begeman
c7b09f1f01 Support global addresses and fix call returns. Varargs still aren't
handled correctly for floating point arguments, or more than 8 arguemnts.
This does however, allow hello world to run.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20832 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-25 08:34:25 +00:00
Chris Lattner
cec5b8831d Enhance loopsimplify to preserve alias analysis instead of clobbering it.
This prevents crashes on some programs when using -ds-aa -licm.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20831 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-25 06:37:22 +00:00
Chris Lattner
2958eeabcf Treat free operations as volatile, since they cannot be moved. This fixes
Transforms/LICM/2005-03-24-LICM-Aggregate-Crash.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20830 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-25 05:49:37 +00:00
Chris Lattner
70ac2dcb84 Fix a bug where LICM was not updating AA information properly when sinking
a pointer value out of a loop causing it to be duplicated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20828 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-25 00:22:36 +00:00
Chris Lattner
20da24c4b9 remove a debugging timer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20827 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-25 00:06:09 +00:00
Chris Lattner
b2dbdc1301 Two changes here:
1. Instead of copying Local graphs to the BU graphs to start with, use
     spliceFrom to do the job (which is constant time in this case).  On
     176.gcc, this chops off .17s from the bu pass.
  2. When building SCC graphs, simplify the logic and use spliceFrom to
     do the heavy lifting, instead of cloneInto/delete.  This slices
     another .14s off 176.gcc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20826 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-25 00:05:04 +00:00
Chris Lattner
ce7068d378 Make the spliceFrom case where one graph is completely empty be constant time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20825 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-25 00:02:41 +00:00
Chris Lattner
5734e4331e add a new DSGraph::spliceFrom method, which violently takes the content of
one graph and plops it into another, without breaking a sweat.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20824 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-24 23:46:04 +00:00
Nate Begeman
9e3e1b5d44 Implement next round of Pattern ISel fixes
1. void returns
2. multiplies
3. calls


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20822 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-24 23:35:30 +00:00
Nate Begeman
7ca541b75a Fix an incorrect argument being passed to BuildMI for indirect calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20821 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-24 23:34:38 +00:00
Chris Lattner
4da120e5d6 This replaces the correct but slow code with a more aggressive scc-finder
based approach to find globals and call sites that need to be copied.  This
speeds up the BU pass on 176.gcc from 22s back up to 2.3s.  Not as good
as 1.5s, but at least it's correct :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20820 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-24 23:06:02 +00:00
Chris Lattner
09adbbc99e only look at successors of globals. This gets us down to "only" 22s in the
bu pass for 176.gcc


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20818 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-24 21:17:27 +00:00
Chris Lattner
d8642125e4 Unfortunately, a previous patch was not safe. Revert it, reimplement
something correct. Unfortunately this takes 176.gcc's BU phase back
up to 29s from 1.5.  This fixes DSGraph/2005-03-24-Global-Arg-Alias.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20817 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-24 21:07:47 +00:00
Nate Begeman
2daec45751 Commit Gabor Greif's patch to use iterators in lowering intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20816 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-24 20:07:16 +00:00
Chris Lattner
0d397bd437 don't bother |'ing in 0's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20815 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-24 18:42:51 +00:00
Chris Lattner
d94b4d5b9c be more aggressive about incompleteness marking
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20814 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-24 18:42:28 +00:00
Chris Lattner
1bcb9abb30 eliminate dead variables, patch contributed by Gabor Greif!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20812 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-24 17:32:20 +00:00
Nate Begeman
5e9666129a Implement more of the PPC32 Pattern ISel:
1) dynamic stack alloc
2) loads
3) shifts
4) subtract
5) immediate form of add, and, or, xor
6) change flag from -pattern-isel to -enable-ppc-pattern-isel

Remove dead arguments from getGlobalBaseReg in the simple ISel


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20810 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-24 06:28:42 +00:00
Chris Lattner
246fa6316d Fix silly "no newline at end of file" warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20809 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-24 06:16:18 +00:00
Chris Lattner
26bc78ed10 Fix compilation errors, patch contributed by the fabulous Bill Wendling!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20808 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-24 05:13:53 +00:00
Chris Lattner
3c61f70dc1 fix a compilation error, patch contributed by Bill Wendling!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20807 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-24 05:12:48 +00:00
Nate Begeman
a9795f81e9 Addition of the PPC32 Pattern ISel. While it is far from complete, it will
be brought up to parity with the current simple ISel in the coming days.
Currently, -pattern-isel is required to trigger it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20805 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-24 04:41:43 +00:00
Nate Begeman
85fdeb233e Remove comments that are now meaningless from the pattern ISels, at Chris's
request.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20804 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-24 04:39:54 +00:00
Chris Lattner
c5132e65a6 Fix a crash while promoting a value out of a loop from a global variable
when using ds-aa


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20802 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-24 04:22:04 +00:00
Chris Lattner
7d671b88e8 teach ds-aa about mod/ref for external function calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20801 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-24 03:04:50 +00:00
Chris Lattner
62da315c85 Simplify dead code into a fixme :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20800 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-24 02:41:19 +00:00
Chris Lattner
c4417f98e5 fix a compiler crash in runtime/libprofile
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20799 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-24 01:22:52 +00:00
Chris Lattner
f5eaf3c62c wrap a long line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20797 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 23:51:12 +00:00
Chris Lattner
ec6518ddc2 If we are calling an external function, chain to another AA to potentially
decide, don't just immediately give up.

This implements GlobalsModRef/chaining-analysis.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20796 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 23:49:47 +00:00
Chris Lattner
8cfd24df54 Make this more efficient by only making one virtual method call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20793 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 23:26:58 +00:00
Chris Lattner
d433bde071 Make this a bit more aggressive
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20792 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 22:06:41 +00:00
Chris Lattner
65512d2525 a hack to allow count-aa to work with ds-aa :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20791 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 21:59:34 +00:00
Chris Lattner
cf9f20189f Add two options to allow -count-aa to print queries either (1) all queries,
or (2) only queries that are not successful (e.g. return may alias)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20790 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 21:59:07 +00:00
Chris Lattner
1f309c1a4e enable -debug-only=licm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20788 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 21:00:12 +00:00
Chris Lattner
c14f59cb72 turn a dead conditional into an assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20787 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 20:12:08 +00:00
Chris Lattner
e3f1d8a525 Totally gut mergeInGraph. There is absolutely no reason to be merging
global roots in from callees to callers.  The BU graphs do not have accurate
globals information and all of the clients know it.  Instead, just make sure
the GG is up-to-date, and they will be perfectly satiated.

This speeds up the BU pass on 176.gcc from 5.5s to 1.5s, and Loc+BU+TD
from 7s to 2.7s.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20786 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 20:08:59 +00:00
Chris Lattner
eb39492deb wrap a long line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20785 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 16:43:11 +00:00
Andrew Lenharth
cc59ed5379 don't lie to the register allocator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20784 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 15:20:01 +00:00
Chris Lattner
943814bb01 Make -steens-aa more conservative (aka correct) by making sure to obey
incompleteness flags.

Make it more aggressive by taking field sensitive information into
account.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20781 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 01:48:09 +00:00
Tanya Lattner
9532ab9839 Added alias analysis.
Fixed many many bugs.
This now works on almost all Singlesource , and most of MultiSource.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20780 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 01:47:20 +00:00