Brian Gaeke [Mon, 26 Apr 2004 16:26:21 +0000 (16:26 +0000)]
Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13174
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 26 Apr 2004 14:44:08 +0000 (14:44 +0000)]
If an object is not in the scalar map then it must be a global from another
graph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13173
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 26 Apr 2004 14:01:59 +0000 (14:01 +0000)]
Instcombine X/-1 --> 0-X
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13172
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 26 Apr 2004 14:01:47 +0000 (14:01 +0000)]
Add a new testcase for X/-1, fix bug that prevented tests from running right
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13171
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Sun, 25 Apr 2004 07:04:49 +0000 (07:04 +0000)]
Fix file header comments and include guards -- many files have been moved or
renamed since they were last spiffed up, or they just never had proper comments
in the first place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13148
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Sun, 25 Apr 2004 06:32:28 +0000 (06:32 +0000)]
Add a getRegisterInfo() accessor just like on the X86 target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13147
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Sun, 25 Apr 2004 06:32:16 +0000 (06:32 +0000)]
Regularize file header comment and include guard.
Include SparcV9RegisterInfo.h.
Add a getRegisterInfo() accessor and SparcV9RegisterInfo instance, just like
on the X86 target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13146
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Sun, 25 Apr 2004 06:32:05 +0000 (06:32 +0000)]
Add MRegisterInfo subclass for the SparcV9 target (containing only stub
functions for now). This automatically turns on the printing of machine
registers using their own real names, instead of goofy things like %mreg(42),
and allows us to migrate code incrementally to the new interface as we see fit.
The register file description it uses is hand-written, so that the register
numbers will match the ones that the SparcV9 target already uses.
Perhaps someday we'll tablegen it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13145
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Sat, 24 Apr 2004 00:10:56 +0000 (00:10 +0000)]
Standardize header comments of top-level Makefiles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13143
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Fri, 23 Apr 2004 23:54:34 +0000 (23:54 +0000)]
Aggregating function arguments is now an option. Default is `no', as before.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13142
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Fri, 23 Apr 2004 23:54:17 +0000 (23:54 +0000)]
* Allow aggregating extracted function arguments (controlled by flag)
* Commandline option (for now) controls that flag that is passed in
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13141
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Fri, 23 Apr 2004 21:45:02 +0000 (21:45 +0000)]
Fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13136
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 23 Apr 2004 21:29:48 +0000 (21:29 +0000)]
Move the scev expansion code into this pass, where it belongs. There is
still room for cleanup, but at least the code modification is out of the
analysis now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13135
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 23 Apr 2004 21:29:03 +0000 (21:29 +0000)]
Eliminate all of the SCEV Expansion code which is really part of the
IndVars pass, not part of SCEV *analysis*.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13134
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 23 Apr 2004 21:28:25 +0000 (21:28 +0000)]
Remove the SCEV::expandCodeFor method, add a new SCEVVisitor class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13133
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 23 Apr 2004 20:36:51 +0000 (20:36 +0000)]
Teach bugpoint to be a little bit smarter and avoid repeating work
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13132
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Fri, 23 Apr 2004 18:17:03 +0000 (18:17 +0000)]
Merged this file into the SparcV9 target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13128
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Fri, 23 Apr 2004 18:15:48 +0000 (18:15 +0000)]
Merge TargetRegInfo.h into SparcV9RegInfo.h, which is its only subclass.
This prepares us to be able to de-virtualize and de-abstract it, and
take the register allocator bits out and move them into the register allocator
proper...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13127
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Fri, 23 Apr 2004 18:15:47 +0000 (18:15 +0000)]
Include SparcV9RegInfo.h instead of TargetRegInfo.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13126
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Fri, 23 Apr 2004 18:15:46 +0000 (18:15 +0000)]
Include SparcV9RegInfo.h instead of TargetRegInfo.h. This serves as a bit of
documentation that this module needs to be made independent of the
register file description of the current target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13125
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Fri, 23 Apr 2004 18:10:38 +0000 (18:10 +0000)]
Get rid of the old byte-at-a-time emission code used when the Sparc JIT was
being tested on X86, as per Chris's request.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13124
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Fri, 23 Apr 2004 18:05:28 +0000 (18:05 +0000)]
Go back to the interpreter main loop after performing intrinsic lowering,
because 1) the first instruction might not be a call site, and
2) CS and SF.Caller were not getting set to point to the new call site
anyway (resulting in a crash on e.g. call %llvm.memset).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13122
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Fri, 23 Apr 2004 17:38:17 +0000 (17:38 +0000)]
mmap of a zero length file returns null on some platforms, so hack around it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13121
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Fri, 23 Apr 2004 17:11:16 +0000 (17:11 +0000)]
Use emitWordAt() to emit forward-branch fixups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13120
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Fri, 23 Apr 2004 17:11:15 +0000 (17:11 +0000)]
Emit SPARC machine code a word at a time instead of a byte at a time.
Use emitWordAt() to emit forward-branch fixups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13119
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Fri, 23 Apr 2004 17:11:14 +0000 (17:11 +0000)]
Implement emitWordAt() for the JIT emitter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13118
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Fri, 23 Apr 2004 17:11:13 +0000 (17:11 +0000)]
Implement emitWordAt() for the debug emitter and the file printer emitter. (I
am not so sure about the file printer emitter, but the debug emitter change
should be harmless.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13117
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Fri, 23 Apr 2004 17:11:12 +0000 (17:11 +0000)]
Add emitWordAt() - a quick and dirty interface that the machine-dependent
emitters can use to emit "relocations".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13116
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Thu, 22 Apr 2004 23:07:39 +0000 (23:07 +0000)]
Add command-line option to select whether to isolate or delete function from
module. Default is `isolate' as before.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13113
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Thu, 22 Apr 2004 23:00:51 +0000 (23:00 +0000)]
Clarify the logic: the flag is renamed to `deleteFn' to signify it will delete
the function instead of isolating it. This also means the condition is reversed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13112
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Thu, 22 Apr 2004 22:52:22 +0000 (22:52 +0000)]
Add a flag to choose between isolating a function or deleting the function from
the Module. The default behavior keeps functionality as before: the chosen
function is the one that remains.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13111
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Thu, 22 Apr 2004 22:51:37 +0000 (22:51 +0000)]
Add a boolean flag to delete this function from module, leaving the rest behind.
Useful in manual debugging when bugpoint isn't quite up to snuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13110
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Thu, 22 Apr 2004 20:02:09 +0000 (20:02 +0000)]
Add a space before result for readability on the command line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13109
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 22 Apr 2004 15:12:36 +0000 (15:12 +0000)]
Disable a previous patch that was causing indvars to loop infinitely :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13108
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 22 Apr 2004 15:00:36 +0000 (15:00 +0000)]
Add an ugly cast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13107
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 22 Apr 2004 14:59:40 +0000 (14:59 +0000)]
Fix an extremely serious thinko I made in revision 1.60 of this file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13106
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 22 Apr 2004 14:56:51 +0000 (14:56 +0000)]
Add a method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13105
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 21 Apr 2004 23:36:08 +0000 (23:36 +0000)]
Implement a todo, rewriting all possible scev expressions inside of the
loop. This eliminates the extra add from the previous case, but it's
not clear that this will be a performance win overall. Tommorows test
results will tell. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13103
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 21 Apr 2004 22:29:37 +0000 (22:29 +0000)]
This code really wants to iterate over the OPERANDS of an instruction, not
over its USES. If it's dead it doesn't have any uses! :)
Thanks to the fabulous and mysterious Bill Wendling for pointing this out. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13102
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 21 Apr 2004 22:22:01 +0000 (22:22 +0000)]
Implement a fixme. The helps loops that have induction variables of different
types in them. Instead of creating an induction variable for all types, it
creates a single induction variable and casts to the other sizes. This generates
this code:
no_exit: ; preds = %entry, %no_exit
%indvar = phi uint [ %indvar.next, %no_exit ], [ 0, %entry ] ; <uint> [#uses=4]
*** %j.0.0 = cast uint %indvar to short ; <short> [#uses=1]
%indvar = cast uint %indvar to int ; <int> [#uses=1]
%tmp.7 = getelementptr short* %P, uint %indvar ; <short*> [#uses=1]
store short %j.0.0, short* %tmp.7
%inc.0 = add int %indvar, 1 ; <int> [#uses=2]
%tmp.2 = setlt int %inc.0, %N ; <bool> [#uses=1]
%indvar.next = add uint %indvar, 1 ; <uint> [#uses=1]
br bool %tmp.2, label %no_exit, label %loopexit
instead of:
no_exit: ; preds = %entry, %no_exit
%indvar = phi ushort [ %indvar.next, %no_exit ], [ 0, %entry ] ; <ushort> [#uses=2]
*** %indvar = phi uint [ %indvar.next, %no_exit ], [ 0, %entry ] ; <uint> [#uses=3]
%indvar = cast uint %indvar to int ; <int> [#uses=1]
%indvar = cast ushort %indvar to short ; <short> [#uses=1]
%tmp.7 = getelementptr short* %P, uint %indvar ; <short*> [#uses=1]
store short %indvar, short* %tmp.7
%inc.0 = add int %indvar, 1 ; <int> [#uses=2]
%tmp.2 = setlt int %inc.0, %N ; <bool> [#uses=1]
%indvar.next = add uint %indvar, 1
*** %indvar.next = add ushort %indvar, 1
br bool %tmp.2, label %no_exit, label %loopexit
This is an improvement in register pressure, but probably doesn't happen that
often.
The more important fix will be to get rid of the redundant add.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13101
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 21 Apr 2004 20:44:33 +0000 (20:44 +0000)]
Fix an incredibly nasty iterator invalidation problem. I am too spoiled by ilists :)
Eventually it would be nice if CallGraph maintained an ilist of CallGraphNode's instead
of a vector of pointers to them, but today is not that day.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13100
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 21 Apr 2004 18:52:06 +0000 (18:52 +0000)]
bug fixed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13099
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 21 Apr 2004 18:49:35 +0000 (18:49 +0000)]
new testcase for PR326
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13098
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Wed, 21 Apr 2004 18:36:43 +0000 (18:36 +0000)]
Add doxygenified comments to functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13097
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Wed, 21 Apr 2004 18:27:56 +0000 (18:27 +0000)]
I'm allergic to the word `stuff'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13096
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Wed, 21 Apr 2004 17:53:58 +0000 (17:53 +0000)]
Make SparcV9RegInfo::getRegType() return the right answer for registers
of IntCC, FloatCC, and Special types.
Make SparcV9RegInfo::getRegClassIDOfRegType() return the right answer
if you ask for the class corresponding to SpecialRegType.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13095
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Wed, 21 Apr 2004 16:11:40 +0000 (16:11 +0000)]
Include cerrno (gcc-3.4 fix)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13091
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Wed, 21 Apr 2004 16:10:40 +0000 (16:10 +0000)]
Declare iterator as public since it is defined as such (gcc-3.4 fix)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13090
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 21 Apr 2004 14:23:18 +0000 (14:23 +0000)]
Fix typeo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13089
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Apr 2004 22:06:53 +0000 (22:06 +0000)]
REALLY fix PR324: don't delete linkonce functions until after the SCC traversal
is done, which avoids invalidating iterators in the SCC traversal routines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13088
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Apr 2004 21:52:26 +0000 (21:52 +0000)]
Pass the callgraph not the module
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13087
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Apr 2004 21:52:12 +0000 (21:52 +0000)]
Allow getting the module from a call graph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13086
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Apr 2004 21:52:07 +0000 (21:52 +0000)]
Change it to take a callgraph, from which we can get a module
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13085
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Apr 2004 21:30:06 +0000 (21:30 +0000)]
Add the ability for SCC passes to initialize and finalize themselves
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13084
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Apr 2004 20:26:03 +0000 (20:26 +0000)]
Fix PR325
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13081
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Apr 2004 20:20:59 +0000 (20:20 +0000)]
Fix PR324 and testcase: Inline/2004-04-20-InlineLinkOnce.llx
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13080
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Apr 2004 20:15:01 +0000 (20:15 +0000)]
New testcase, distilled from PR324
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13079
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Tue, 20 Apr 2004 20:12:57 +0000 (20:12 +0000)]
Make it legal to ask for the type of a specialreg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13078
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Tue, 20 Apr 2004 18:18:46 +0000 (18:18 +0000)]
Add some PRs which were fixed, but not previously mentioned in the rel. notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13077
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Apr 2004 16:43:21 +0000 (16:43 +0000)]
Add support for the select instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13076
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Mon, 19 Apr 2004 19:12:12 +0000 (19:12 +0000)]
Make it legal to request a load or store of %fsr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13073
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Mon, 19 Apr 2004 19:09:24 +0000 (19:09 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13072
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Mon, 19 Apr 2004 18:53:44 +0000 (18:53 +0000)]
Regularize include guards and remove some excess whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13071
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Mon, 19 Apr 2004 18:53:43 +0000 (18:53 +0000)]
Tighten up SparcV9FloatCCRegClass::getRegName()'s assertion - if you ask it for
the name of %fsr (as the comment in SparcV9RegClassInfo.h used to suggest)
you would walk off the end of the FloatCCRegName array.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13070
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Mon, 19 Apr 2004 18:53:42 +0000 (18:53 +0000)]
Regularize include guards, remove some excess whitespace and fix some comments.
Remove the extra %fsr register from SparcV9FloatCCRegClass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13069
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Apr 2004 18:07:02 +0000 (18:07 +0000)]
Initial checkin of a simple loop unswitching pass. It still needs work,
but it's a start, and seems to do it's basic job.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13068
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Apr 2004 18:06:34 +0000 (18:06 +0000)]
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13067
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Apr 2004 06:28:37 +0000 (06:28 +0000)]
Add accessor for a Loop Unswitching pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13066
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Apr 2004 06:26:46 +0000 (06:26 +0000)]
Eliminate a poorly conceived method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13065
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Apr 2004 03:42:32 +0000 (03:42 +0000)]
It's not just a printer, it's actually an analysis too
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13064
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Mon, 19 Apr 2004 03:36:47 +0000 (03:36 +0000)]
As per Chris, greatly simplify handling of external functions by using the
wrapper idea uniformly: we can use Value::replaceAllUsesWith() instead of
special-casing by class of user.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13063
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Mon, 19 Apr 2004 03:28:39 +0000 (03:28 +0000)]
* Remove note about "UNSUPPORTED: " feature that just became supported
* Fix usage of <p> tag and some grammar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13062
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Mon, 19 Apr 2004 03:12:35 +0000 (03:12 +0000)]
* Reorder #includes
* Wrap a long line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13061
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Mon, 19 Apr 2004 03:07:29 +0000 (03:07 +0000)]
Display sample bugpoint output with the `code' stylesheet class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13060
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Apr 2004 03:03:19 +0000 (03:03 +0000)]
* Improve file header comment
* Remove #include
* Add some methods to update loop/loopinfo
* Stop explicitly holding the loop depth in the Loop class. Instead, just
dynamically calculate it. This makes it easier to update LoopInfo as a
result of transformations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13059
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Apr 2004 03:02:09 +0000 (03:02 +0000)]
Remove code to update loop depths
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13058
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Apr 2004 03:01:23 +0000 (03:01 +0000)]
Add #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13057
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Mon, 19 Apr 2004 03:01:01 +0000 (03:01 +0000)]
Add notes about PRs 38 and 290 being fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13056
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Mon, 19 Apr 2004 02:56:49 +0000 (02:56 +0000)]
Wrap (some) lines to 80 cols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13055
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Mon, 19 Apr 2004 01:12:01 +0000 (01:12 +0000)]
Finally implement rewriting global initializers which use external functions
by creating an internal wrapper function with same signature as the external
function, and use it instead of the "real" function.
The wrapper then calls the external function using the same JIT function
resolution API that has been used before for rewriting instructions, since the
wrapper has an explicit call instruction which we can rewrite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13054
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Apr 2004 23:37:03 +0000 (23:37 +0000)]
Provide an interface that is more convenient for iterating over the blocks
in a loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13052
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Apr 2004 22:46:08 +0000 (22:46 +0000)]
Move isLoopInvariant to the Loop class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13051
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Apr 2004 22:45:27 +0000 (22:45 +0000)]
Add new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13050
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Apr 2004 22:45:16 +0000 (22:45 +0000)]
Add new method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13049
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Apr 2004 22:27:10 +0000 (22:27 +0000)]
Correct rewriting of exit blocks after my last patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13048
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Apr 2004 22:21:41 +0000 (22:21 +0000)]
Fix computation of exit blocks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13047
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Apr 2004 22:15:13 +0000 (22:15 +0000)]
Loop exit sets are no longer explicitly held, they are dynamically computed on demand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13046
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Apr 2004 22:14:10 +0000 (22:14 +0000)]
Change the ExitBlocks list from being explicitly contained in the Loop
structure to being dynamically computed on demand. This makes updating
loop information MUCH easier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13045
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Apr 2004 18:26:38 +0000 (18:26 +0000)]
Spiff is no longer in our tree
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13041
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Apr 2004 18:06:14 +0000 (18:06 +0000)]
Reduce the unrolling limit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13040
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Apr 2004 17:38:42 +0000 (17:38 +0000)]
If the preheader of the loop was the entry block of the function, make sure
that the exit block of the loop becomes the new entry block of the function.
This was causing a verifier assertion on 252.eon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13039
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Apr 2004 17:32:39 +0000 (17:32 +0000)]
Be much more careful about how we update instructions outside of the loop
using instructions inside of the loop. This should fix the MishaTest failure
from last night.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13038
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Apr 2004 06:55:57 +0000 (06:55 +0000)]
Another testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13037
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Apr 2004 06:54:48 +0000 (06:54 +0000)]
Implement method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13036
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Apr 2004 06:54:34 +0000 (06:54 +0000)]
Add a new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13035
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Apr 2004 06:27:43 +0000 (06:27 +0000)]
After unrolling our single basic block loop, fold it into the preheader and exit
block. The primary motivation for doing this is that we can now unroll nested loops.
This makes a pretty big difference in some cases. For example, in 183.equake,
we are now beating the native compiler with the CBE, and we are a lot closer
with LLC.
I'm now going to play around a bit with the unroll factor and see what effect
it really has.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13034
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Apr 2004 05:38:37 +0000 (05:38 +0000)]
Fix a bug: this does not preserve the CFG!
While we're at it, add support for updating loop information correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13033
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Apr 2004 05:38:05 +0000 (05:38 +0000)]
Add a new method, add a check missing that caused a segfault if a loop didn't
have a canonical indvar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13032
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Apr 2004 05:37:42 +0000 (05:37 +0000)]
Allow clients to delete loops, add a new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13031
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Apr 2004 05:21:01 +0000 (05:21 +0000)]
Move loop optimization passes up, add loop unroller
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13030
91177308-0d34-0410-b5e6-
96231b3b80d8