oota-llvm.git
19 years agohum, it is good to use real instructions
Andrew Lenharth [Tue, 22 Mar 2005 16:42:52 +0000 (16:42 +0000)]
hum, it is good to use real instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20769 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoDirectly count the number of memory instructions.
Chris Lattner [Tue, 22 Mar 2005 03:55:10 +0000 (03:55 +0000)]
Directly count the number of memory instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20766 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoTimers SHOULD NOT record the time taken to count the bytes allocated in the heap!
Chris Lattner [Tue, 22 Mar 2005 03:20:38 +0000 (03:20 +0000)]
Timers SHOULD NOT record the time taken to count the bytes allocated in the heap!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20765 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoRemove an iteration pass over the entire scalarmap for each function created
Chris Lattner [Tue, 22 Mar 2005 02:45:13 +0000 (02:45 +0000)]
Remove an iteration pass over the entire scalarmap for each function created
by not allowing integer constants to get into the scalar map in the first
place.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20764 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoWhen making a clone of a DSGraph from the BU pass, make sure to remember that
Chris Lattner [Tue, 22 Mar 2005 01:50:42 +0000 (01:50 +0000)]
When making a clone of a DSGraph from the BU pass, make sure to remember that
this clone is supposed to be used for *ALL* of the functions in the SCC.

This fixes the memory explosion problem the TD pass was having, reducing the
memory growth from 24MB -> 3.5MB on povray and 270MB ->8.3MB on perlbmk!
This obviously also speeds up the TD pass *a lot*.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20763 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoDon't use operator[], use the new method instead, which is faster. This speeds
Chris Lattner [Tue, 22 Mar 2005 01:42:59 +0000 (01:42 +0000)]
Don't use operator[], use the new method instead, which is faster.  This speeds
up the TD pass about 30% for povray and perlbmk.  It's still not clear why
copying a 5MB set of graphs turns into a 25MB set of graphs though :(

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20762 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoadd a method
Chris Lattner [Tue, 22 Mar 2005 01:42:10 +0000 (01:42 +0000)]
add a method

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20761 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoNow that the dead ctor is gone, nothing uses the old node mapping exported by
Chris Lattner [Tue, 22 Mar 2005 00:36:51 +0000 (00:36 +0000)]
Now that the dead ctor is gone, nothing uses the old node mapping exported by
cloneInto: make it an internally used mapping.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20760 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoremove a dead ctor
Chris Lattner [Tue, 22 Mar 2005 00:33:35 +0000 (00:33 +0000)]
remove a dead ctor

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20759 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agonow that the second argument is always this->ReturnNodes, don't bother passing it.
Chris Lattner [Tue, 22 Mar 2005 00:29:44 +0000 (00:29 +0000)]
now that the second argument is always this->ReturnNodes, don't bother passing it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20758 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoinstead of using a local RetValMap, just use the graph we are cloning into
Chris Lattner [Tue, 22 Mar 2005 00:25:52 +0000 (00:25 +0000)]
instead of using a local RetValMap, just use the graph we are cloning into
for the return node map.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20757 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agotwo things: 1)evilness reduction patch, reduces the number of instructions hiding...
Andrew Lenharth [Tue, 22 Mar 2005 00:24:07 +0000 (00:24 +0000)]
two things:  1)evilness reduction patch, reduces the number of instructions hiding in the small jump CC moving code.  2)implement div of small data types by FP DIV (also reduces evilness and should speed things up)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20756 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agonow that the valuemapping is always the local scalar map, we can eliminate
Chris Lattner [Tue, 22 Mar 2005 00:22:45 +0000 (00:22 +0000)]
now that the valuemapping is always the local scalar map, we can eliminate
this identity merge.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20755 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoremove the second argument to cloneInto
Chris Lattner [Tue, 22 Mar 2005 00:21:05 +0000 (00:21 +0000)]
remove the second argument to cloneInto

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20754 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agodrop the second argument to cloneInto, which is always the local scalar map.
Chris Lattner [Tue, 22 Mar 2005 00:20:56 +0000 (00:20 +0000)]
drop the second argument to cloneInto, which is always the local scalar map.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20753 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoadd some timers, don't clone aux nodes
Chris Lattner [Tue, 22 Mar 2005 00:12:00 +0000 (00:12 +0000)]
add some timers, don't clone aux nodes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20752 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agomove this out of line
Chris Lattner [Tue, 22 Mar 2005 00:09:45 +0000 (00:09 +0000)]
move this out of line

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20751 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agomove this stuff out of line
Chris Lattner [Tue, 22 Mar 2005 00:09:36 +0000 (00:09 +0000)]
move this stuff out of line

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20750 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agodon't generate temporary scalarmaps.
Chris Lattner [Tue, 22 Mar 2005 00:04:21 +0000 (00:04 +0000)]
don't generate temporary scalarmaps.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20749 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoallow passing clone flags down to cloneInto
Chris Lattner [Mon, 21 Mar 2005 22:49:53 +0000 (22:49 +0000)]
allow passing clone flags down to cloneInto

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20748 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoallow passing clone flags into the ctor
Chris Lattner [Mon, 21 Mar 2005 22:49:43 +0000 (22:49 +0000)]
allow passing clone flags into the ctor

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20747 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoEnhance the TD pass to build composite graphs when we have indirect call
Chris Lattner [Mon, 21 Mar 2005 20:31:29 +0000 (20:31 +0000)]
Enhance the TD pass to build composite graphs when we have indirect call
sites that target multiple callees.  If we have a function table, for
example, with N callees, and M callers call through it, we used to have
to perform O(M*N) graph inlinings.  Now we perform O(M+N) inlinings.

This speeds up the td pass on perlbmk from 36.26s to 25.75s.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20743 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoadd a new map
Chris Lattner [Mon, 21 Mar 2005 20:29:56 +0000 (20:29 +0000)]
add a new map

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20742 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agomake this const correct
Chris Lattner [Mon, 21 Mar 2005 20:28:50 +0000 (20:28 +0000)]
make this const correct

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20741 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoFix a major problem where we didn't add call graph edges for call sites with
Chris Lattner [Mon, 21 Mar 2005 20:20:49 +0000 (20:20 +0000)]
Fix a major problem where we didn't add call graph edges for call sites with
more than 1 callee.  This fixes Analysis/DSGraph/FunctionPointerTable-const.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20740 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoNew testcase, which is important to handle correctly.
Chris Lattner [Mon, 21 Mar 2005 20:18:51 +0000 (20:18 +0000)]
New testcase, which is important to handle correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20739 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoWe may be adding functions to the Module during initialization, so
Misha Brukman [Mon, 21 Mar 2005 19:22:14 +0000 (19:22 +0000)]
We may be adding functions to the Module during initialization, so
conservatively, it's modified

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20735 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoThis error message changed.
Chris Lattner [Mon, 21 Mar 2005 17:55:41 +0000 (17:55 +0000)]
This error message changed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20734 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoUgh, for some reason, I can't call this unless the reference is const!?!?!?
Chris Lattner [Mon, 21 Mar 2005 10:00:45 +0000 (10:00 +0000)]
Ugh, for some reason, I can't call this unless the reference is const!?!?!?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20732 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoThe reachability cloner should add arguments to merged calls when the RHS of
Chris Lattner [Mon, 21 Mar 2005 09:39:51 +0000 (09:39 +0000)]
The reachability cloner should add arguments to merged calls when the RHS of
the merge has more operands than the LHS.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20731 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoMake the first operand of this method be modifiable.
Chris Lattner [Mon, 21 Mar 2005 09:39:20 +0000 (09:39 +0000)]
Make the first operand of this method be modifiable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20730 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoadd a method
Chris Lattner [Mon, 21 Mar 2005 09:38:39 +0000 (09:38 +0000)]
add a method

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20729 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoIf merging two calls like: foo(A) and bar(B, C), make sure the result has two
Chris Lattner [Mon, 21 Mar 2005 09:18:39 +0000 (09:18 +0000)]
If merging two calls like: foo(A) and bar(B, C), make sure the result has two
arguments, not one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20728 91177308-0d34-0410-b5e6-96231b3b80d8

19 years ago'note to self'
Chris Lattner [Mon, 21 Mar 2005 08:43:32 +0000 (08:43 +0000)]
'note to self'

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20727 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoRemove a bunch of cruft and dead code for handling the case when types were
Chris Lattner [Mon, 21 Mar 2005 06:27:42 +0000 (06:27 +0000)]
Remove a bunch of cruft and dead code for handling the case when types were
defined in function constant pools.  The assembler grammar has long
disallowed functions from having constant pools, so all of this stuff is
dead.

This makes it an immediate error for functions to refer to nonexisting
types, fixing Regression/Verifier/2005-03-21-UndefinedTypeReference.ll.

Before, references to non-existing types in functions would only be
detected when the subsequent function was parsed, due to the call to
"ResolveTypes".  "ResolveTypes" has not resolved any types for a long time,
instead it emitted an error message if no resolved types are left.  Since
the only caller of this method is in the module code, just inline it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20726 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoNew testcase that the assembler incorrectly accepts.
Chris Lattner [Mon, 21 Mar 2005 06:24:53 +0000 (06:24 +0000)]
New testcase that the assembler incorrectly accepts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20725 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoMake this method non-const. Making it const causes the const version of
Tanya Lattner [Mon, 21 Mar 2005 06:07:43 +0000 (06:07 +0000)]
Make this method non-const.  Making it const causes the const version of
getIGroup to be called instead of the non-const one.  These two methods
have (??) different behavior, so this change fixes bugs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20724 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoChange the way that the TD pass inlines graphs. Instead of inlining each
Chris Lattner [Mon, 21 Mar 2005 04:55:35 +0000 (04:55 +0000)]
Change the way that the TD pass inlines graphs.  Instead of inlining each
graph into all of the functions it calls when we visit a graph, change it so
that the graph visitor inlines all of the callers of a graph into the current
graph when it visits it.

While we're at it, inline global information from the GG instead of from each
of the callers.  The GG contains a superset of the info that the callers do
anyway, and this way we only need to do it one time (not one for each caller).

This speeds up the TD pass substantially on several programs, and there is
still room for improvement.  For example, the TD pass used to take 147s
on perlbmk, it now takes 36s.  On povray, we went from about 5s to 1.97s.
134.perl is down from ~1s for Loc+BU+TD to .6s.

The TD pass needs a lot of improvement though, which will occur with later
patches.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20723 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agorename a method add a data structure.
Chris Lattner [Mon, 21 Mar 2005 04:46:35 +0000 (04:46 +0000)]
rename a method add a data structure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20722 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoProvide a guaranteed definition of intptr_t. Thansk to Evan Jones for
Chris Lattner [Mon, 21 Mar 2005 01:36:35 +0000 (01:36 +0000)]
Provide a guaranteed definition of intptr_t.  Thansk to Evan Jones for
pointing this out!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20721 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoDon't strip modref bits when inlining down the call graph. This fixes
Chris Lattner [Sun, 20 Mar 2005 18:02:56 +0000 (18:02 +0000)]
Don't strip modref bits when inlining down the call graph.  This fixes
the DSGraph/2003-06-30-TopDownResolve.ll regression from last night.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20717 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoRemove the ability to keep track of inlined globals, which is always dead.
Chris Lattner [Sun, 20 Mar 2005 04:30:30 +0000 (04:30 +0000)]
Remove the ability to keep track of inlined globals, which is always dead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20716 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoRemove the InlinedGlobals set which is always empty.
Chris Lattner [Sun, 20 Mar 2005 04:30:16 +0000 (04:30 +0000)]
Remove the InlinedGlobals set which is always empty.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20715 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoThis call is always a noop, remove it.
Chris Lattner [Sun, 20 Mar 2005 04:29:54 +0000 (04:29 +0000)]
This call is always a noop, remove it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20714 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoremove some pointless asserts
Chris Lattner [Sun, 20 Mar 2005 04:29:39 +0000 (04:29 +0000)]
remove some pointless asserts

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20713 91177308-0d34-0410-b5e6-96231b3b80d8

19 years ago-steens doesn't use the inlined globals facility.
Chris Lattner [Sun, 20 Mar 2005 04:23:57 +0000 (04:23 +0000)]
-steens doesn't use the inlined globals facility.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20712 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoBuild EC's for globals twice. The first is after constructing the initial
Chris Lattner [Sun, 20 Mar 2005 03:32:35 +0000 (03:32 +0000)]
Build EC's for globals twice.  The first is after constructing the initial
Globals Graph for the local pass, the second is after all of the locals
graphs have been constructed.  This allows for many additional global EC's
to be recognized that weren't before.  This speeds up analysis of programs
like 177.mesa, where it changes DSA from taking 0.712s to 0.4018s.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20711 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoAdd a new DSNode::removeGlobal method.
Chris Lattner [Sun, 20 Mar 2005 03:29:54 +0000 (03:29 +0000)]
Add a new DSNode::removeGlobal method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20710 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoadd a method
Chris Lattner [Sun, 20 Mar 2005 03:29:39 +0000 (03:29 +0000)]
add a method

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20709 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoTransform BU pass to not use the horrible DSCallSiteIterator class.
Chris Lattner [Sun, 20 Mar 2005 02:42:07 +0000 (02:42 +0000)]
Transform BU pass to not use the horrible DSCallSiteIterator class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20708 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoImplement new methods for dealing with DSNode global lists, rename uses of
Chris Lattner [Sun, 20 Mar 2005 02:41:38 +0000 (02:41 +0000)]
Implement new methods for dealing with DSNode global lists, rename uses of
old methods.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20707 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agouse simpler methods.
Chris Lattner [Sun, 20 Mar 2005 02:41:16 +0000 (02:41 +0000)]
use simpler methods.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20706 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agomethod was renamed.
Chris Lattner [Sun, 20 Mar 2005 02:40:27 +0000 (02:40 +0000)]
method was renamed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20705 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoprint out equiv class info.
Chris Lattner [Sun, 20 Mar 2005 02:40:11 +0000 (02:40 +0000)]
print out equiv class info.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20704 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agosome methods got renamed
Chris Lattner [Sun, 20 Mar 2005 02:40:04 +0000 (02:40 +0000)]
some methods got renamed

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20703 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoMake use of simpler DSNode methods.
Chris Lattner [Sun, 20 Mar 2005 02:39:49 +0000 (02:39 +0000)]
Make use of simpler DSNode methods.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20702 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agorename some methods and add some new methods for dealing with the globals list
Chris Lattner [Sun, 20 Mar 2005 02:38:39 +0000 (02:38 +0000)]
rename some methods and add some new methods for dealing with the globals list
in a DSNode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20701 91177308-0d34-0410-b5e6-96231b3b80d8

19 years ago#ifdef out a function only used by #ifdef'd code.
Chris Lattner [Sun, 20 Mar 2005 02:14:15 +0000 (02:14 +0000)]
#ifdef out a function only used by #ifdef'd code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20700 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agocomment cleanup
Chris Lattner [Sun, 20 Mar 2005 01:18:00 +0000 (01:18 +0000)]
comment cleanup

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20699 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoConstant-propagate the value of `isL' variable and eliminate it.
Misha Brukman [Sat, 19 Mar 2005 23:39:50 +0000 (23:39 +0000)]
Constant-propagate the value of `isL' variable and eliminate it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20698 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoSilence VC++ warning about mixing intptr_t and bool, and about unused variable isL.
Jeff Cohen [Sat, 19 Mar 2005 22:36:39 +0000 (22:36 +0000)]
Silence VC++ warning about mixing intptr_t and bool, and about unused variable isL.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20697 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoCreate an equivalence class of global variables that DSA will never be able
Chris Lattner [Sat, 19 Mar 2005 22:23:45 +0000 (22:23 +0000)]
Create an equivalence class of global variables that DSA will never be able
to tell apart anyway, and only track the leader for of these equivalence
classes in our graphs.

This dramatically reduces the number of GlobalValue*'s that appear in scalar
maps, which A) reduces memory usage, by eliminating many many scalarmap entries
and B) reduces time for operations that need to execute an operation for each
global in the scalar map.

As an example, this reduces the memory used to analyze 176.gcc from 1GB to
511MB, which (while it's still way too much) is better because it doesn't hit
swap anymore.  On eon, this shrinks the local graphs from 14MB to 6.8MB,
shrinks the bu+td graphs of povray from 50M to 40M, shrinks the TD graphs of
130.li from 8.8M to 3.6M, etc.

This change also speeds up DSA on large programs where this makes a big
difference.  For example, 130.li goes from 1.17s -> 0.56s, 134.perl goes
from 2.14 -> 0.93s, povray goes from 15.63s->7.99s (!!!).

This also apparently either fixes the problem that caused DSA to crash on
perlbmk and gcc, or it hides it, because DSA now works on these.  These
both take entirely too much time in the TD pass (147s for perl, 538s for
gcc, vs 7.67/5.9s in the bu pass for either one), but this is a known
problem that I'll deal with later.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20696 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoMake each scalar map contain a reference to an equivalence class of global
Chris Lattner [Sat, 19 Mar 2005 22:13:13 +0000 (22:13 +0000)]
Make each scalar map contain a reference to an equivalence class of global
variables.  Do not insert a global into the scalar map unless it is the
leader of its equivalence class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20695 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoEach DS collection now contains an equivalence class of globals values.
Chris Lattner [Sat, 19 Mar 2005 22:12:33 +0000 (22:12 +0000)]
Each DS collection now contains an equivalence class of globals values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20694 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoadd a method to clear globals from a node
Chris Lattner [Sat, 19 Mar 2005 22:12:03 +0000 (22:12 +0000)]
add a method to clear globals from a node

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20693 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoTwo fixes for the copy ctor/operator=:
Chris Lattner [Sat, 19 Mar 2005 21:02:12 +0000 (21:02 +0000)]
Two fixes for the copy ctor/operator=:
  1. Make sure to clear() 'this' before adding elements to it
  2. Make sure that the leaders of the RHS EC are the leaders of the LHS EC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20692 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoadd some methods, fix a major bug in getLeader() that was causing things to
Chris Lattner [Sat, 19 Mar 2005 20:42:43 +0000 (20:42 +0000)]
add some methods, fix a major bug in getLeader() that was causing things to
not be unified correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20691 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoimplement a proper copy ctor, operator= and add a helper method.
Chris Lattner [Sat, 19 Mar 2005 19:26:14 +0000 (19:26 +0000)]
implement a proper copy ctor, operator= and add a helper method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20690 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoFix the 3 regressions last night, due to my buggy patch from yesterday.
Chris Lattner [Sat, 19 Mar 2005 17:35:11 +0000 (17:35 +0000)]
Fix the 3 regressions last night, due to my buggy patch from yesterday.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20689 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoAdd new function getPtrPtrFromArrayPtr().
Alkis Evlogimenos [Sat, 19 Mar 2005 11:40:31 +0000 (11:40 +0000)]
Add new function getPtrPtrFromArrayPtr().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20684 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoStop using deprecated interface.
Alkis Evlogimenos [Sat, 19 Mar 2005 09:22:17 +0000 (09:22 +0000)]
Stop using deprecated interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20679 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoSwitch to use the new interface for the EquivalenceClasses class, and fix
Chris Lattner [Sat, 19 Mar 2005 05:15:27 +0000 (05:15 +0000)]
Switch to use the new interface for the EquivalenceClasses class, and fix
a bug involving SCC's who have multiple members that are part of an EC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20678 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoRewrite this class, making the following improvements:
Chris Lattner [Sat, 19 Mar 2005 05:14:29 +0000 (05:14 +0000)]
Rewrite this class, making the following improvements:

  1. It now actually uses tarjan's algorithm, so it is a efficient inverse
     ackerman's function for union operations, not linear time.
  2. It now stores one copy of the data in the set instead of two.
  3. It now works for elements other than pointers.
  4. It now has a more STL-like interface that exposes iterators instead
     of internal implementation details.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20677 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agodo not bother inlining nullary functions without return values. The only
Chris Lattner [Fri, 18 Mar 2005 23:19:47 +0000 (23:19 +0000)]
do not bother inlining nullary functions without return values.  The only
effect these calls can have is due to global variables, and these passes
all use the globals graph to capture their effect anyway.  This speeds up
the BU pass very slightly on perlbmk, reducing the number of dsnodes
allocated from 98913 to 96423.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20676 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agofix a bogus assertion
Chris Lattner [Fri, 18 Mar 2005 23:18:30 +0000 (23:18 +0000)]
fix a bogus assertion

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20675 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoanother fastpath
Chris Lattner [Fri, 18 Mar 2005 23:18:20 +0000 (23:18 +0000)]
another fastpath

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20674 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoremove use of getPrev() and getNext() on ilist nodes.
Chris Lattner [Fri, 18 Mar 2005 16:12:37 +0000 (16:12 +0000)]
remove use of getPrev() and getNext() on ilist nodes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20673 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoexpose this pass to both opt and analyze
Chris Lattner [Fri, 18 Mar 2005 05:27:57 +0000 (05:27 +0000)]
expose this pass to both opt and analyze

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20672 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoWe shall have IA64 as a new experimental backend released with LLVM 1.5
Misha Brukman [Fri, 18 Mar 2005 00:48:56 +0000 (00:48 +0000)]
We shall have IA64 as a new experimental backend released with LLVM 1.5

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20671 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoremove a bogus optimization. This only works if there are no globals in the
Chris Lattner [Fri, 18 Mar 2005 00:23:59 +0000 (00:23 +0000)]
remove a bogus optimization.  This only works if there are no globals in the
graph, and the combination of a function that does not reference globals, takes
not arguments and returns no value is pretty rare.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20670 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoRewrite DSAA::getModRefInfo to compute the mapping between caller and callee
Chris Lattner [Fri, 18 Mar 2005 00:21:03 +0000 (00:21 +0000)]
Rewrite DSAA::getModRefInfo to compute the mapping between caller and callee
to determine mod/ref behavior, instead of creating a *copy* of the caller
graph and inlining the callee graph into the copy.

This speeds up aa-eval on Ptrdist/yacr2 from 109.13s to 3.98s, and gives
identical results.  The speedup is similar on other programs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20669 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoimplement a new method.
Chris Lattner [Thu, 17 Mar 2005 23:45:54 +0000 (23:45 +0000)]
implement a new method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20668 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoadd 3 methods
Chris Lattner [Thu, 17 Mar 2005 23:45:35 +0000 (23:45 +0000)]
add 3 methods

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20667 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoRecognize an IA64 when we see one
Misha Brukman [Thu, 17 Mar 2005 20:56:22 +0000 (20:56 +0000)]
Recognize an IA64 when we see one

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20666 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoadd some possibly bogus assertions.
Chris Lattner [Thu, 17 Mar 2005 20:33:27 +0000 (20:33 +0000)]
add some possibly bogus assertions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20665 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoDo not include the Function* for direct call/invoke instructions in the
Chris Lattner [Thu, 17 Mar 2005 20:25:04 +0000 (20:25 +0000)]
Do not include the Function* for direct call/invoke instructions in the
alias evaluation.  Clients really don't care.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20664 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agotypo/denial
Duraid Madina [Thu, 17 Mar 2005 20:23:27 +0000 (20:23 +0000)]
typo/denial

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20663 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agosimplify this function a bit, allow DS-AA to build on/improve the mod/ref
Chris Lattner [Thu, 17 Mar 2005 20:16:58 +0000 (20:16 +0000)]
simplify this function a bit, allow DS-AA to build on/improve the mod/ref
results returned by AA, not just use one or the other.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20662 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoClean up some code, handle null pointer specially to avoid an assertion
Chris Lattner [Thu, 17 Mar 2005 19:56:56 +0000 (19:56 +0000)]
Clean up some code, handle null pointer specially to avoid an assertion

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20660 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoTwo changes:
Chris Lattner [Thu, 17 Mar 2005 19:56:18 +0000 (19:56 +0000)]
Two changes:
  1. Chain to the parent implementation of M/R analysis if we can't find
     any information.  It has some heuristics that often do well.
  2. Do not clear all flags, this can make invalid nodes by turning nodes
     that used to be collapsed into non-collapsed nodes (fixing crashes)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20659 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoclean up warnings when building in release mode
Duraid Madina [Thu, 17 Mar 2005 19:00:40 +0000 (19:00 +0000)]
clean up warnings when building in release mode

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20658 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agonow the angry bug reports have somewhere to go!
Duraid Madina [Thu, 17 Mar 2005 18:57:02 +0000 (18:57 +0000)]
now the angry bug reports have somewhere to go!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20657 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agostatically link ia64 into llc
Chris Lattner [Thu, 17 Mar 2005 18:39:06 +0000 (18:39 +0000)]
statically link ia64 into llc

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20656 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoOK, IA64 is statically linked into llc
Duraid Madina [Thu, 17 Mar 2005 18:37:05 +0000 (18:37 +0000)]
OK, IA64 is statically linked into llc

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20655 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agobuild the IA64 target as a .so for now
Duraid Madina [Thu, 17 Mar 2005 18:29:04 +0000 (18:29 +0000)]
build the IA64 target as a .so for now

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20654 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agodainty
Duraid Madina [Thu, 17 Mar 2005 18:23:22 +0000 (18:23 +0000)]
dainty

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20653 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoand so it begins...
Duraid Madina [Thu, 17 Mar 2005 18:17:03 +0000 (18:17 +0000)]
and so it begins...

PHASE 1: write instruction selector
PHASE 2: ???
PHASE 3: profit!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20652 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoDon't emit two comparisons when comparing a FP value against zero!
Chris Lattner [Thu, 17 Mar 2005 16:29:26 +0000 (16:29 +0000)]
Don't emit two comparisons when comparing a FP value against zero!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20651 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agospiff up the nightly tester output one more notch
Chris Lattner [Thu, 17 Mar 2005 16:07:45 +0000 (16:07 +0000)]
spiff up the nightly tester output one more notch

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20650 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoFix the missing symbols problem Bill was hitting. Patch contributed by
Chris Lattner [Thu, 17 Mar 2005 15:38:16 +0000 (15:38 +0000)]
Fix the missing symbols problem Bill was hitting.  Patch contributed by
Bill Wendling!!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20649 91177308-0d34-0410-b5e6-96231b3b80d8