Commit Graph

17966 Commits

Author SHA1 Message Date
Chris Lattner dcb82f5d0a don't crash in some bad cases.
llvm-svn: 20776
2005-03-23 01:29:26 +00:00
Chris Lattner 310d1a3882 Several changes here:
1. Increase max node size from 64->256 to avoid collapsing an important
   structure in 181.mcf
2. If we have multiple calls to an indirect call node with an indirect
   callee, fold these call nodes together, to avoid DSA turning apoc into
   a flaming fireball of death when analyzing 176.gcc.
  With this change, 176.gcc now takes ~7s to analyze for loc+bu+td, with
  5.7s of that in the BU pass.

llvm-svn: 20775
2005-03-22 23:54:52 +00:00
Chris Lattner 5c971a0072 We might as well check the TD graphs as well, even though they are fine.
llvm-svn: 20774
2005-03-22 22:11:22 +00:00
Chris Lattner ca174306f0 Mark external globals incomplete in the BU Globals graph, fixing
Analysis/DSGraph/2005-03-22-IncompleteGlobal.ll

llvm-svn: 20773
2005-03-22 22:10:22 +00:00
Chris Lattner 537dcf017c New testcase, the BU pass is marking the global complete in the globals graph.
llvm-svn: 20772
2005-03-22 22:07:15 +00:00
Tanya Lattner 8b953a1c32 Updating my entry.
llvm-svn: 20771
2005-03-22 21:33:19 +00:00
Chris Lattner ecdc1ed631 Fix a serious bug where we didn't insert globals into the globalset when
cloning a graph.

llvm-svn: 20770
2005-03-22 19:44:11 +00:00
Andrew Lenharth 8180e87e51 hum, it is good to use real instructions
llvm-svn: 20769
2005-03-22 16:42:52 +00:00
Chris Lattner f00684079a Directly count the number of memory instructions.
llvm-svn: 20766
2005-03-22 03:55:10 +00:00
Chris Lattner 24922c7a2b Timers SHOULD NOT record the time taken to count the bytes allocated in the heap!
llvm-svn: 20765
2005-03-22 03:20:38 +00:00
Chris Lattner 495f00946e 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.

llvm-svn: 20764
2005-03-22 02:45:13 +00:00
Chris Lattner 250726ec25 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*.

llvm-svn: 20763
2005-03-22 01:50:42 +00:00
Chris Lattner e05c633099 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 :(

llvm-svn: 20762
2005-03-22 01:42:59 +00:00
Chris Lattner d0949a00be add a method
llvm-svn: 20761
2005-03-22 01:42:10 +00:00
Chris Lattner fcae88f280 Now that the dead ctor is gone, nothing uses the old node mapping exported by
cloneInto: make it an internally used mapping.

llvm-svn: 20760
2005-03-22 00:36:51 +00:00
Chris Lattner 8016c975c9 remove a dead ctor
llvm-svn: 20759
2005-03-22 00:33:35 +00:00
Chris Lattner ea2c02bcca now that the second argument is always this->ReturnNodes, don't bother passing it.
llvm-svn: 20758
2005-03-22 00:29:44 +00:00
Chris Lattner 571578143c instead of using a local RetValMap, just use the graph we are cloning into
for the return node map.

llvm-svn: 20757
2005-03-22 00:25:52 +00:00
Andrew Lenharth 6294dee913 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)
llvm-svn: 20756
2005-03-22 00:24:07 +00:00
Chris Lattner d05ab9cab4 now that the valuemapping is always the local scalar map, we can eliminate
this identity merge.

llvm-svn: 20755
2005-03-22 00:22:45 +00:00
Chris Lattner 19944fade3 remove the second argument to cloneInto
llvm-svn: 20754
2005-03-22 00:21:05 +00:00
Chris Lattner d22030f8db drop the second argument to cloneInto, which is always the local scalar map.
llvm-svn: 20753
2005-03-22 00:20:56 +00:00
Chris Lattner 03b7f99338 add some timers, don't clone aux nodes
llvm-svn: 20752
2005-03-22 00:12:00 +00:00
Chris Lattner 410da35a1f move this out of line
llvm-svn: 20751
2005-03-22 00:09:45 +00:00
Chris Lattner 7b5fe1bdb6 move this stuff out of line
llvm-svn: 20750
2005-03-22 00:09:36 +00:00
Chris Lattner 5f10e6dda1 don't generate temporary scalarmaps.
llvm-svn: 20749
2005-03-22 00:04:21 +00:00
Chris Lattner 848ef879c5 allow passing clone flags down to cloneInto
llvm-svn: 20748
2005-03-21 22:49:53 +00:00
Chris Lattner f9ef3f0bb4 allow passing clone flags into the ctor
llvm-svn: 20747
2005-03-21 22:49:43 +00:00
Chris Lattner c1439d539f 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.

llvm-svn: 20743
2005-03-21 20:31:29 +00:00
Chris Lattner 650cd59f28 add a new map
llvm-svn: 20742
2005-03-21 20:29:56 +00:00
Chris Lattner d90f5bab82 make this const correct
llvm-svn: 20741
2005-03-21 20:28:50 +00:00
Chris Lattner 040426aee0 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

llvm-svn: 20740
2005-03-21 20:20:49 +00:00
Chris Lattner 032b364fc4 New testcase, which is important to handle correctly.
llvm-svn: 20739
2005-03-21 20:18:51 +00:00
Misha Brukman 82ae9e1dda We may be adding functions to the Module during initialization, so
conservatively, it's modified

llvm-svn: 20735
2005-03-21 19:22:14 +00:00
Chris Lattner bad17144d0 This error message changed.
llvm-svn: 20734
2005-03-21 17:55:41 +00:00
Chris Lattner e8a43291cd Ugh, for some reason, I can't call this unless the reference is const!?!?!?
llvm-svn: 20732
2005-03-21 10:00:45 +00:00
Chris Lattner 13429dc5af The reachability cloner should add arguments to merged calls when the RHS of
the merge has more operands than the LHS.

llvm-svn: 20731
2005-03-21 09:39:51 +00:00
Chris Lattner aa32b37885 Make the first operand of this method be modifiable.
llvm-svn: 20730
2005-03-21 09:39:20 +00:00
Chris Lattner 8632462267 add a method
llvm-svn: 20729
2005-03-21 09:38:39 +00:00
Chris Lattner 5204115d09 If merging two calls like: foo(A) and bar(B, C), make sure the result has two
arguments, not one.

llvm-svn: 20728
2005-03-21 09:18:39 +00:00
Chris Lattner 7269f15e8f 'note to self'
llvm-svn: 20727
2005-03-21 08:43:32 +00:00
Chris Lattner a5f4b773d9 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.

llvm-svn: 20726
2005-03-21 06:27:42 +00:00
Chris Lattner a825b14278 New testcase that the assembler incorrectly accepts.
llvm-svn: 20725
2005-03-21 06:24:53 +00:00
Tanya Lattner 87ee2ba48d 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.

llvm-svn: 20724
2005-03-21 06:07:43 +00:00
Chris Lattner 98f7e1c370 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.

llvm-svn: 20723
2005-03-21 04:55:35 +00:00
Chris Lattner 6a67d4a804 rename a method add a data structure.
llvm-svn: 20722
2005-03-21 04:46:35 +00:00
Chris Lattner c8b4b7e314 Provide a guaranteed definition of intptr_t. Thansk to Evan Jones for
pointing this out!

llvm-svn: 20721
2005-03-21 01:36:35 +00:00
Chris Lattner c5cdc2260d Don't strip modref bits when inlining down the call graph. This fixes
the DSGraph/2003-06-30-TopDownResolve.ll regression from last night.

llvm-svn: 20717
2005-03-20 18:02:56 +00:00
Chris Lattner 21ef7678d6 Remove the ability to keep track of inlined globals, which is always dead.
llvm-svn: 20716
2005-03-20 04:30:30 +00:00
Chris Lattner 6abefe7639 Remove the InlinedGlobals set which is always empty.
llvm-svn: 20715
2005-03-20 04:30:16 +00:00