oota-llvm.git
20 years agoThis debugging hook is no longer needed.
Chris Lattner [Mon, 9 Feb 2004 17:20:52 +0000 (17:20 +0000)]
This debugging hook is no longer needed.

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

20 years agoCode cleanup in preparation for later changes. Now that ContainedTy's are
Chris Lattner [Mon, 9 Feb 2004 16:35:14 +0000 (16:35 +0000)]
Code cleanup in preparation for later changes.  Now that ContainedTy's are
consistent across the various type classes, we can factor out a LOT more
almost-identical code.  Also, add a couple of temporary statistics.

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

20 years agoNow that all of the derived types have disciplined interfaces, we can eliminate
Chris Lattner [Mon, 9 Feb 2004 05:40:24 +0000 (05:40 +0000)]
Now that all of the derived types have disciplined interfaces, we can eliminate
all of the ad-hoc storage of contained types.  This allows getContainedType to
not be virtual, and allows us to entirely delete the TypeIterator class.

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

20 years agoDon't depend on auto data conversion
Chris Lattner [Mon, 9 Feb 2004 05:16:30 +0000 (05:16 +0000)]
Don't depend on auto data conversion

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

20 years agoAdjust to the changed StructType interface. In particular, getElementTypes() is...
Chris Lattner [Mon, 9 Feb 2004 04:37:31 +0000 (04:37 +0000)]
Adjust to the changed StructType interface.  In particular, getElementTypes() is gone.

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

20 years agoIncrease encapsulation of the StructType class, eliminating the getElementTypes(...
Chris Lattner [Mon, 9 Feb 2004 04:36:50 +0000 (04:36 +0000)]
Increase encapsulation of the StructType class, eliminating the getElementTypes() member

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

20 years agoMethod is gone
Chris Lattner [Mon, 9 Feb 2004 04:14:46 +0000 (04:14 +0000)]
Method is gone

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

20 years agoStart using the new and improve interface to FunctionType arguments
Chris Lattner [Mon, 9 Feb 2004 04:14:01 +0000 (04:14 +0000)]
Start using the new and improve interface to FunctionType arguments

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

20 years agoImprove encapsulation in the FunctionType class, by adding param_(iterator/begin...
Chris Lattner [Mon, 9 Feb 2004 04:12:57 +0000 (04:12 +0000)]
Improve encapsulation in the FunctionType class, by adding param_(iterator/begin/end)
members, and eliminating the getParamTypes() method, and the associated typedef.

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

20 years agoThis #include is not needed, it should have been removed with the last patch
Chris Lattner [Mon, 9 Feb 2004 03:22:32 +0000 (03:22 +0000)]
This #include is not needed, it should have been removed with the last patch

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

20 years agoInstead of searching the entire type graph for a type to determine if it
Chris Lattner [Mon, 9 Feb 2004 03:19:29 +0000 (03:19 +0000)]
Instead of searching the entire type graph for a type to determine if it
contains the type we are looking for, just search the immediately used types.
We can only do this because we keep the "current" type in the nesting level
as we decrement upreferences.

This change speeds up the testcase in PR224 from 50.4s to 22.08s, not
too shabby.

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

20 years agoUpreferences are always OpaqueTypes, meaning that it is impossible for a non-abstract
Chris Lattner [Mon, 9 Feb 2004 03:03:10 +0000 (03:03 +0000)]
Upreferences are always OpaqueTypes, meaning that it is impossible for a non-abstract
type from containing one.  This speeds up the asmparser on the testcase in PR224 from
61->50s.

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

20 years agoAnother nice speedup for the register allocator. This time, we replace
Chris Lattner [Mon, 9 Feb 2004 02:12:04 +0000 (02:12 +0000)]
Another nice speedup for the register allocator.  This time, we replace
the Virt2PhysRegMap std::map with an std::vector.  This speeds up the
register allocator another (almost) 40%, from .72->.45s in a release build
of LLC on 253.perlbmk.

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

20 years agoAdd a new (hidden) option that is useful for profiling.
Chris Lattner [Mon, 9 Feb 2004 01:47:10 +0000 (01:47 +0000)]
Add a new (hidden) option that is useful for profiling.

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

20 years agoUgh, perform an optimization that GCC should be able to do itself. This
Chris Lattner [Mon, 9 Feb 2004 01:43:23 +0000 (01:43 +0000)]
Ugh, perform an optimization that GCC should be able to do itself.  This
speeds up livevar from .48/.32s -> .45/.31s in LLC on perlbmk

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

20 years agoOnly do stuff for the REAL number of physical registers we have, not 1024.
Chris Lattner [Mon, 9 Feb 2004 01:35:21 +0000 (01:35 +0000)]
Only do stuff for the REAL number of physical registers we have, not 1024.
This speeds up live variables a lot, from .60/.39s -> .47/.26s in LLC, for
the first/second pass respectively.

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

20 years agoChange the PhysRegsUsed map into a dense array. Seeing that this is a mapping
Chris Lattner [Mon, 9 Feb 2004 01:26:13 +0000 (01:26 +0000)]
Change the PhysRegsUsed map into a dense array.  Seeing that this is a mapping
from physical registers, and they are always dense, it makes sense to not have
a ton of RBtree overhead.  This change speeds up regalloclocal about ~30% on
253.perlbmk, from .35s -> .27s in the JIT (in LLC, it goes from .74 -> .55).

Now live variable analysis is the slowest codegen pass.  Of course it doesn't
help that we have to run it twice, because regalloclocal doesn't update it,
but even if it did it would be the slowest pass (now it's just the 2x slowest
pass :(

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

20 years agoTwo problems with these lines of code:
Chris Lattner [Mon, 9 Feb 2004 00:59:07 +0000 (00:59 +0000)]
Two problems with these lines of code:
 1. The "work" was not in the assert, so it was punishing the optimized release
 2. getNamedFunction is _very_ expensive in large programs.  It is not designed
    to be used like this, and was taking 7% of the execution time of the code
    generator on perlbmk.

Since the assert "can never fail", I'm just killing it.

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

20 years agoThe ConstantExpr::getCast call can cause a CPR to be generated. If so,
Chris Lattner [Mon, 9 Feb 2004 00:20:55 +0000 (00:20 +0000)]
The ConstantExpr::getCast call can cause a CPR to be generated.  If so,
strip it off.

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

20 years agoFix PR215: [bcwriter] Problem compactifying ConstantPointerRefs
Chris Lattner [Mon, 9 Feb 2004 00:15:41 +0000 (00:15 +0000)]
Fix PR215: [bcwriter] Problem compactifying ConstantPointerRefs

Have I ever mentioned how much I _hate_ constantpointerrefs?

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

20 years agoFix grammar-o.
Misha Brukman [Sun, 8 Feb 2004 22:27:33 +0000 (22:27 +0000)]
Fix grammar-o.

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

20 years agoAll of spec, including 253.perlbmk should now work. There is still the 254.gap
Chris Lattner [Sun, 8 Feb 2004 22:23:33 +0000 (22:23 +0000)]
All of spec, including 253.perlbmk should now work.  There is still the 254.gap
regression, but that will definitely be fixed by 1.2

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

20 years agoImprove compatibility with programs that already have a prototype for 'write',
Chris Lattner [Sun, 8 Feb 2004 22:14:44 +0000 (22:14 +0000)]
Improve compatibility with programs that already have a prototype for 'write',
even if it is wierd in some way.

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

20 years agovi failed me again. :)
Chris Lattner [Sun, 8 Feb 2004 21:52:30 +0000 (21:52 +0000)]
vi failed me again.  :)

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

20 years agoRename the invoke 'except' destination to the 'unwind' destination
Chris Lattner [Sun, 8 Feb 2004 21:52:04 +0000 (21:52 +0000)]
Rename the invoke 'except' destination to the 'unwind' destination

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

20 years agoChange the 'exception' destination to the 'unwind' destination. We will always
Chris Lattner [Sun, 8 Feb 2004 21:48:25 +0000 (21:48 +0000)]
Change the 'exception' destination to the 'unwind' destination.  We will always
allow 'except' instead of 'unwind' here though.

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

20 years agorename the "exceptional" destination of an invoke instruction to the 'unwind' dest
Chris Lattner [Sun, 8 Feb 2004 21:44:31 +0000 (21:44 +0000)]
rename the "exceptional" destination of an invoke instruction to the 'unwind' dest

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

20 years agoAdd new bug, add note about llvm-db
Chris Lattner [Sun, 8 Feb 2004 21:20:42 +0000 (21:20 +0000)]
Add new bug, add note about llvm-db

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

20 years agoFix PR225: [pruneeh] -pruneeh pass removes invoke instructions it shouldn't
Chris Lattner [Sun, 8 Feb 2004 21:15:59 +0000 (21:15 +0000)]
Fix PR225: [pruneeh] -pruneeh pass removes invoke instructions it shouldn't

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

20 years agosplitBasicBlock "does the right thing" now, no reason to reposition it.
Chris Lattner [Sun, 8 Feb 2004 20:49:07 +0000 (20:49 +0000)]
splitBasicBlock "does the right thing" now, no reason to reposition it.

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

20 years agoBug fixed
Chris Lattner [Sun, 8 Feb 2004 19:59:05 +0000 (19:59 +0000)]
Bug fixed

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

20 years agoImplement proper invoke/unwind lowering.
Chris Lattner [Sun, 8 Feb 2004 19:53:56 +0000 (19:53 +0000)]
Implement proper invoke/unwind lowering.
This fixed PR16 "[lowerinvoke] The -lowerinvoke pass does not insert calls to setjmp/longjmp"

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

20 years agoNew testcase, code generators should support invoke/unwind
Chris Lattner [Sun, 8 Feb 2004 19:40:58 +0000 (19:40 +0000)]
New testcase, code generators should support invoke/unwind

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

20 years agoPrint out all globals as they are emitted, not just those emitted from
Chris Lattner [Sun, 8 Feb 2004 19:33:23 +0000 (19:33 +0000)]
Print out all globals as they are emitted, not just those emitted from
emitGlobals

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

20 years agoThere is no reason to #define fd
Chris Lattner [Sun, 8 Feb 2004 19:33:07 +0000 (19:33 +0000)]
There is no reason to #define fd

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

20 years agoadd pr105
Brian Gaeke [Sun, 8 Feb 2004 18:49:13 +0000 (18:49 +0000)]
add pr105

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

20 years agoFix unterminated-quote typo in echo command
Brian Gaeke [Sun, 8 Feb 2004 08:01:00 +0000 (08:01 +0000)]
Fix unterminated-quote typo in echo command

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

20 years agoDocument automake as a build dependency because we use aclocal
Brian Gaeke [Sun, 8 Feb 2004 07:49:04 +0000 (07:49 +0000)]
Document automake as a build dependency because we use aclocal

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

20 years agoMove rules for regenerating autoconf files into this shell script.
Brian Gaeke [Sun, 8 Feb 2004 07:44:48 +0000 (07:44 +0000)]
Move rules for regenerating autoconf files into this shell script.

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

20 years agoRemove rules for autoconf'ing files from top-level Makefile
Brian Gaeke [Sun, 8 Feb 2004 07:44:30 +0000 (07:44 +0000)]
Remove rules for autoconf'ing files from top-level Makefile

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

20 years agoAdd a call to 'write' right before the call to abort() in the unwind path.
Chris Lattner [Sun, 8 Feb 2004 07:30:29 +0000 (07:30 +0000)]
Add a call to 'write' right before the call to abort() in the unwind path.
This causes the JIT, or LLC'd program to print out a nice message, explaining
WHY the program aborted.

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

20 years agoFix indentation of selectiondag.
Brian Gaeke [Sun, 8 Feb 2004 05:49:29 +0000 (05:49 +0000)]
Fix indentation of selectiondag.

I don't know why its indentation has been bugging me, but it has.

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

20 years agoAdd one that I missed
Chris Lattner [Sun, 8 Feb 2004 01:53:10 +0000 (01:53 +0000)]
Add one that I missed

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

20 years agoInstead of callign removeTriviallyDeadNodes on the global graph every time
Chris Lattner [Sun, 8 Feb 2004 01:51:48 +0000 (01:51 +0000)]
Instead of callign removeTriviallyDeadNodes on the global graph every time
removeDeadNodes is called, only call it at the end of the pass being run.
This saves 1.3 seconds running DSA on 177.mesa (5.3->4.0s), which is
pretty big.  This is only possible because of the automatic garbage
collection done on forwarding nodes.

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

20 years agoRemove another unneeded call.
Chris Lattner [Sun, 8 Feb 2004 01:40:40 +0000 (01:40 +0000)]
Remove another unneeded call.

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

20 years agoThis call is no longer needed now that merging does not produce garbage
Chris Lattner [Sun, 8 Feb 2004 01:38:34 +0000 (01:38 +0000)]
This call is no longer needed now that merging does not produce garbage

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

20 years agoSubstantially improve the DSA code by removing 'forwarding' nodes from
Chris Lattner [Sun, 8 Feb 2004 01:27:18 +0000 (01:27 +0000)]
Substantially improve the DSA code by removing 'forwarding' nodes from
DSGraphs while they are forwarding.  When the last reference to the forwarding
node is dropped, the forwarding node is autodeleted.  This should simplify
removeTriviallyDead nodes, and is only (efficiently) possible because we are
using an ilist of dsnodes now.

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

20 years agoBugfix for ilist conversion. The ilist wants to make an 'end' node which has
Chris Lattner [Sun, 8 Feb 2004 01:05:37 +0000 (01:05 +0000)]
Bugfix for ilist conversion.  The ilist wants to make an 'end' node which has
G == 0

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

20 years agoSwitch the Nodes list from being an std::vector<DSNode*> to an ilist<DSNode>
Chris Lattner [Sun, 8 Feb 2004 00:53:26 +0000 (00:53 +0000)]
Switch the Nodes list from being an std::vector<DSNode*> to an ilist<DSNode>

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

20 years agoOne of the 'annoying' things about ilists is that the iterators don't behave
Chris Lattner [Sun, 8 Feb 2004 00:51:31 +0000 (00:51 +0000)]
One of the 'annoying' things about ilists is that the iterators don't behave
quite the same as for non-intrusive lists of pointers to nodes.  To support
transitioning code bases, add a new 'compatibility' iterator.

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

20 years agoChange to use node_iterators instead of direct access to Nodes
Chris Lattner [Sun, 8 Feb 2004 00:23:16 +0000 (00:23 +0000)]
Change to use node_iterators instead of direct access to Nodes

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

20 years agoChange to use iterators instead of direct access
Chris Lattner [Sun, 8 Feb 2004 00:22:41 +0000 (00:22 +0000)]
Change to use iterators instead of direct access

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

20 years agoMinor change to breakpoint (lack of) support
Chris Lattner [Sun, 8 Feb 2004 00:06:20 +0000 (00:06 +0000)]
Minor change to breakpoint (lack of) support

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

20 years agogetNodes() is gone, use node_begin/end instead
Chris Lattner [Sat, 7 Feb 2004 23:58:05 +0000 (23:58 +0000)]
getNodes() is gone, use node_begin/end instead
Rename stats from dsnode -> dsa
Add a new stat

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

20 years agogetNodes() is gone
Chris Lattner [Sat, 7 Feb 2004 23:57:26 +0000 (23:57 +0000)]
getNodes() is gone

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

20 years agoAbstract out the Nodes collection. Instead of providing a getNodes() method,
Chris Lattner [Sat, 7 Feb 2004 23:57:09 +0000 (23:57 +0000)]
Abstract out the Nodes collection.  Instead of providing a getNodes() method,
provide node_begin/end iterators, which are only guaranteed to be
bidirectional, not random access.

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

20 years agoActually USE isForwarding method
Chris Lattner [Sat, 7 Feb 2004 23:02:32 +0000 (23:02 +0000)]
Actually USE isForwarding method

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

20 years agoAs Alkis pointed out to me, I forgot to commit this... :(
Chris Lattner [Sat, 7 Feb 2004 22:54:19 +0000 (22:54 +0000)]
As Alkis pointed out to me, I forgot to commit this... :(

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

20 years agoThere is no need to clone over nodes that are going to be dead anyway
Chris Lattner [Sat, 7 Feb 2004 22:00:03 +0000 (22:00 +0000)]
There is no need to clone over nodes that are going to be dead anyway

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

20 years agoUse autoconf answers from config.h (FIXME, should autoconf this file
Brian Gaeke [Fri, 6 Feb 2004 22:33:17 +0000 (22:33 +0000)]
Use autoconf answers from config.h (FIXME, should autoconf this file
directly instead).

Fix LockHolder/MutexLocker typo.

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

20 years agoAdd a missing link
Chris Lattner [Fri, 6 Feb 2004 20:27:41 +0000 (20:27 +0000)]
Add a missing link

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

20 years agoFix grammar.
Misha Brukman [Fri, 6 Feb 2004 18:40:35 +0000 (18:40 +0000)]
Fix grammar.

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

20 years agoIncrease code clarity.
Alkis Evlogimenos [Fri, 6 Feb 2004 18:08:18 +0000 (18:08 +0000)]
Increase code clarity.

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

20 years agoInitial checking of the libpng library.
John Criswell [Fri, 6 Feb 2004 16:37:53 +0000 (16:37 +0000)]
Initial checking of the libpng library.

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

20 years agoInitial checking of the zlib library.
John Criswell [Fri, 6 Feb 2004 16:36:42 +0000 (16:36 +0000)]
Initial checking of the zlib library.

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

20 years agoAdd information about the piece I forgot to write: parameterized tablegen classes
Chris Lattner [Fri, 6 Feb 2004 06:37:00 +0000 (06:37 +0000)]
Add information about the piece I forgot to write: parameterized tablegen classes

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

20 years agoSyntax hilight examples and add note about emacs/vim mode files
Chris Lattner [Fri, 6 Feb 2004 06:04:25 +0000 (06:04 +0000)]
Syntax hilight examples and add note about emacs/vim mode files

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

20 years agoAdd a new document describing TableGen
Chris Lattner [Fri, 6 Feb 2004 05:42:53 +0000 (05:42 +0000)]
Add a new document describing TableGen

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

20 years agoPrint the record NAME not the record ADDRESS
Chris Lattner [Fri, 6 Feb 2004 03:19:17 +0000 (03:19 +0000)]
Print the record NAME not the record ADDRESS

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

20 years agoEliminate uneeded lookups by passing a Virt2PhysMap::iterator instead
Alkis Evlogimenos [Fri, 6 Feb 2004 03:15:40 +0000 (03:15 +0000)]
Eliminate uneeded lookups by passing a Virt2PhysMap::iterator instead
of the virtual register to certain functions.

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

20 years agoFix another dominator update bug. These bugs keep getting exposed because GCSE
Chris Lattner [Thu, 5 Feb 2004 23:20:59 +0000 (23:20 +0000)]
Fix another dominator update bug.  These bugs keep getting exposed because GCSE
keeps finding more code motion opportunities now that the dominators are correct!

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

20 years agoChange live interval representation. Machine instructions now have two
Alkis Evlogimenos [Thu, 5 Feb 2004 22:55:25 +0000 (22:55 +0000)]
Change live interval representation. Machine instructions now have two
slots each. As a concequence they get numbered as 0, 2, 4 and so
on. The first slot is used for operand uses and the second for
defs. Here's an example:

0: A = ...
2: B = ...
4: C = A + B ;; last use of A

The live intervals should look like:

A = [1, 5)
B = [3, x)
C = [5, y)

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

20 years agoFix bug updating dominators
Chris Lattner [Thu, 5 Feb 2004 22:33:26 +0000 (22:33 +0000)]
Fix bug updating dominators

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

20 years agoAdd debug output
Chris Lattner [Thu, 5 Feb 2004 22:33:19 +0000 (22:33 +0000)]
Add debug output

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

20 years agoBug fixed
Chris Lattner [Thu, 5 Feb 2004 21:16:42 +0000 (21:16 +0000)]
Bug fixed

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

20 years agoFix PR223: Loopsimplify incorrectly updates dominator information
Chris Lattner [Thu, 5 Feb 2004 21:12:24 +0000 (21:12 +0000)]
Fix PR223: Loopsimplify incorrectly updates dominator information

The problem is that the dominator update code didn't "realize" that it's
possible for the newly inserted basic block to dominate anything.  Because
it IS possible, stuff was getting updated wrong.

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

20 years agoNew testcase for PR223: Loopsimplify incorrectly updates dominator information
Chris Lattner [Thu, 5 Feb 2004 21:11:38 +0000 (21:11 +0000)]
New testcase for PR223: Loopsimplify incorrectly updates dominator information

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

20 years agoWe don't need to scan the blocks that we are live-in on every
Alkis Evlogimenos [Thu, 5 Feb 2004 20:45:40 +0000 (20:45 +0000)]
We don't need to scan the blocks that we are live-in on every
access. Rather we only have to do it on the creation of the interval.

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

20 years agos/gcse/scalarrepl
Chris Lattner [Thu, 5 Feb 2004 17:31:37 +0000 (17:31 +0000)]
s/gcse/scalarrepl

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

20 years agoIn a "seeing the forest through the trees" kinda situation, I realized that a
Chris Lattner [Thu, 5 Feb 2004 17:20:00 +0000 (17:20 +0000)]
In a "seeing the forest through the trees" kinda situation, I realized that a
complete rewrite of load-vn will make it a bit faster.  This changes speeds up
the gcse pass (which uses load-vn) from 25.45s to 0.42s on the testcase in
PR209.

I've also verified that this gives the exact same results as the old one.

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

20 years agoThis is a big diff with no functionality change. We just reorder some code,
Chris Lattner [Thu, 5 Feb 2004 05:56:23 +0000 (05:56 +0000)]
This is a big diff with no functionality change.  We just reorder some code,
which causes big reindentation.  While I'm at it, I fix the fixme by removing
some dead code.

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

20 years agofinegrainify namespacification
Chris Lattner [Thu, 5 Feb 2004 05:51:40 +0000 (05:51 +0000)]
finegrainify namespacification

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

20 years agoAdded missing include.
Tanya Lattner [Thu, 5 Feb 2004 05:04:39 +0000 (05:04 +0000)]
Added missing include.

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

20 years agoFixed Chris' typo.
Tanya Lattner [Thu, 5 Feb 2004 04:45:21 +0000 (04:45 +0000)]
Fixed Chris' typo.

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

20 years agoqoi bug fixed
Chris Lattner [Thu, 5 Feb 2004 00:48:41 +0000 (00:48 +0000)]
qoi bug fixed

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

20 years agoImplement optimizations for handling large basic blocks.
Chris Lattner [Thu, 5 Feb 2004 00:36:43 +0000 (00:36 +0000)]
Implement optimizations for handling large basic blocks.

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

20 years agoModify the two address instruction pass to remove the duplicate
Alkis Evlogimenos [Wed, 4 Feb 2004 22:17:40 +0000 (22:17 +0000)]
Modify the two address instruction pass to remove the duplicate
operand of the instruction and thus simplify the register allocation.

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

20 years agoMinor speedup, don't query ValueMap each time through the loop
Chris Lattner [Wed, 4 Feb 2004 21:44:26 +0000 (21:44 +0000)]
Minor speedup, don't query ValueMap each time through the loop

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

20 years agoAlways replace instead of appending when creating archive files. It may be
Brian Gaeke [Wed, 4 Feb 2004 21:41:23 +0000 (21:41 +0000)]
Always replace instead of appending when creating archive files. It may be
slightly slower, but I think we can handle it, especially if it means
BytecodeLibs are correctly regenerated.

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

20 years agoInclude <iosfwd> and <string> instead of <iostream>.
Brian Gaeke [Wed, 4 Feb 2004 21:41:10 +0000 (21:41 +0000)]
Include <iosfwd> and <string> instead of <iostream>.
Take away the default iostream argument of createMachineFunctionPrinterPass(),
at Chris's request.

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

20 years agoTake away the default iostream argument of createMachineFunctionPrinterPass(),
Brian Gaeke [Wed, 4 Feb 2004 21:41:01 +0000 (21:41 +0000)]
Take away the default iostream argument of createMachineFunctionPrinterPass(),
at Chris's request.

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

20 years agoClean out DESTLIBBYTECODE when making clean in runtime.
Brian Gaeke [Wed, 4 Feb 2004 21:40:49 +0000 (21:40 +0000)]
Clean out DESTLIBBYTECODE when making clean in runtime.

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

20 years agoTwo changes:
Chris Lattner [Wed, 4 Feb 2004 21:33:42 +0000 (21:33 +0000)]
Two changes:
  1. Don't scan to the end of alloca instructions in the caller function to
     insert inlined allocas, just insert at the top.  This saves a lot of
     time inlining into functions with a lot of allocas.
  2. Use splice to move the alloca instructions over, instead of remove/insert.
     This allows us to transfer a block at a time, and eliminates a bunch of
     silly symbol table manipulations.

This speeds up the inliner on the testcase in PR209 from 1.73s -> 1.04s (67%)

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

20 years agoIMULri* instructions do not require their first two registers operands
Alkis Evlogimenos [Wed, 4 Feb 2004 17:21:04 +0000 (17:21 +0000)]
IMULri* instructions do not require their first two registers operands
to be the same (IOW they are not two address instructions).

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

20 years agoOptimize the case where we are inlining a function that contains only one basic block,
Chris Lattner [Wed, 4 Feb 2004 04:17:06 +0000 (04:17 +0000)]
Optimize the case where we are inlining a function that contains only one basic block,
and that basic block ends with a return instruction.  In this case, we can just splice
the cloned "body" of the function directly into the source basic block, avoiding a lot
of rearrangement and splitBasicBlock's linear scan over the split block.  This speeds up
the inliner on the testcase in PR209 from 2.3s to 1.7s, a 35% reduction.

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

20 years agoCheck in header file I forgot before.
Chris Lattner [Wed, 4 Feb 2004 03:59:08 +0000 (03:59 +0000)]
Check in header file I forgot before.

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

20 years agoAdjust to the new BasicBlock ctor, which requires a function parameter
Chris Lattner [Wed, 4 Feb 2004 03:58:28 +0000 (03:58 +0000)]
Adjust to the new BasicBlock ctor, which requires a function parameter

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

20 years agoAdjust to the new BB ctor
Chris Lattner [Wed, 4 Feb 2004 03:57:50 +0000 (03:57 +0000)]
Adjust to the new BB ctor

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

20 years agoDelete the BasicBlock ctor that only takes a BasicBlock to insert before. This
Chris Lattner [Wed, 4 Feb 2004 03:57:34 +0000 (03:57 +0000)]
Delete the BasicBlock ctor that only takes a BasicBlock to insert before.  This
fails when the basic block points to the function->end.  Instead, require that
the client pass in the function AND the basicblock to insert into.

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

20 years agoRemove unneeded code now that splitBasicBlock does the "right thing"
Chris Lattner [Wed, 4 Feb 2004 03:21:51 +0000 (03:21 +0000)]
Remove unneeded code now that splitBasicBlock does the "right thing"

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