Brian Gaeke
8bcc86b6ae
Because I like being able to instantiate the cfgprinter from external projects,
...
this header file is born.
llvm-svn: 13176
2004-04-26 16:27:53 +00:00
Brian Gaeke
104341f31e
Add functions that return instances of these printer passes
...
llvm-svn: 13175
2004-04-26 16:27:08 +00:00
Brian Gaeke
1b07de4c2b
Fix a typo in a comment.
...
llvm-svn: 13174
2004-04-26 16:26:21 +00:00
Chris Lattner
f374b3f304
If an object is not in the scalar map then it must be a global from another
...
graph.
llvm-svn: 13173
2004-04-26 14:44:08 +00:00
Chris Lattner
e20c334e65
Instcombine X/-1 --> 0-X
...
llvm-svn: 13172
2004-04-26 14:01:59 +00:00
Chris Lattner
e24003a261
Add a new testcase for X/-1, fix bug that prevented tests from running right
...
llvm-svn: 13171
2004-04-26 14:01:47 +00:00
Brian Gaeke
03cac379bd
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.
llvm-svn: 13148
2004-04-25 07:04:49 +00:00
Brian Gaeke
42d321ab66
Add a getRegisterInfo() accessor just like on the X86 target.
...
llvm-svn: 13147
2004-04-25 06:32:28 +00:00
Brian Gaeke
4ec08db77c
Regularize file header comment and include guard.
...
Include SparcV9RegisterInfo.h.
Add a getRegisterInfo() accessor and SparcV9RegisterInfo instance, just like
on the X86 target.
llvm-svn: 13146
2004-04-25 06:32:16 +00:00
Brian Gaeke
f70544c583
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.
llvm-svn: 13145
2004-04-25 06:32:05 +00:00
Misha Brukman
7426c893f0
Standardize header comments of top-level Makefiles.
...
llvm-svn: 13143
2004-04-24 00:10:56 +00:00
Misha Brukman
fc993c39e7
Aggregating function arguments is now an option. Default is `no', as before.
...
llvm-svn: 13142
2004-04-23 23:54:34 +00:00
Misha Brukman
3596f0a180
* Allow aggregating extracted function arguments (controlled by flag)
...
* Commandline option (for now) controls that flag that is passed in
llvm-svn: 13141
2004-04-23 23:54:17 +00:00
Brian Gaeke
ced65e8792
Fix a typo.
...
llvm-svn: 13136
2004-04-23 21:45:02 +00:00
Chris Lattner
83cd87efcd
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.
llvm-svn: 13135
2004-04-23 21:29:48 +00:00
Chris Lattner
05ef97f994
Eliminate all of the SCEV Expansion code which is really part of the
...
IndVars pass, not part of SCEV *analysis*.
llvm-svn: 13134
2004-04-23 21:29:03 +00:00
Chris Lattner
0eab307e3c
Remove the SCEV::expandCodeFor method, add a new SCEVVisitor class.
...
llvm-svn: 13133
2004-04-23 21:28:25 +00:00
Chris Lattner
02cea4afd3
Teach bugpoint to be a little bit smarter and avoid repeating work
...
llvm-svn: 13132
2004-04-23 20:36:51 +00:00
Brian Gaeke
99e3e94012
Merged this file into the SparcV9 target.
...
llvm-svn: 13128
2004-04-23 18:17:03 +00:00
Brian Gaeke
0b65f8f582
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...
llvm-svn: 13127
2004-04-23 18:15:48 +00:00
Brian Gaeke
71509a98c5
Include SparcV9RegInfo.h instead of TargetRegInfo.h.
...
llvm-svn: 13126
2004-04-23 18:15:47 +00:00
Brian Gaeke
a411e07db0
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.
llvm-svn: 13125
2004-04-23 18:15:46 +00:00
Brian Gaeke
fbd43e43a7
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.
llvm-svn: 13124
2004-04-23 18:10:38 +00:00
Brian Gaeke
ad373c8576
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).
llvm-svn: 13122
2004-04-23 18:05:28 +00:00
Brian Gaeke
11550c1deb
mmap of a zero length file returns null on some platforms, so hack around it.
...
llvm-svn: 13121
2004-04-23 17:38:17 +00:00
Brian Gaeke
6e102a7edd
Use emitWordAt() to emit forward-branch fixups.
...
llvm-svn: 13120
2004-04-23 17:11:16 +00:00
Brian Gaeke
fe277c2809
Emit SPARC machine code a word at a time instead of a byte at a time.
...
Use emitWordAt() to emit forward-branch fixups.
llvm-svn: 13119
2004-04-23 17:11:15 +00:00
Brian Gaeke
0c4fb283f3
Implement emitWordAt() for the JIT emitter.
...
llvm-svn: 13118
2004-04-23 17:11:14 +00:00
Brian Gaeke
4aaa9c603a
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.)
llvm-svn: 13117
2004-04-23 17:11:13 +00:00
Brian Gaeke
1ed0cdbd04
Add emitWordAt() - a quick and dirty interface that the machine-dependent
...
emitters can use to emit "relocations".
llvm-svn: 13116
2004-04-23 17:11:12 +00:00
Misha Brukman
2ccac826e4
Add command-line option to select whether to isolate or delete function from
...
module. Default is `isolate' as before.
llvm-svn: 13113
2004-04-22 23:07:39 +00:00
Misha Brukman
98aa516a9c
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.
llvm-svn: 13112
2004-04-22 23:00:51 +00:00
Misha Brukman
e0682426f0
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.
llvm-svn: 13111
2004-04-22 22:52:22 +00:00
Misha Brukman
2de9ce4f51
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.
llvm-svn: 13110
2004-04-22 22:51:37 +00:00
Misha Brukman
324e9e06d8
Add a space before result for readability on the command line.
...
llvm-svn: 13109
2004-04-22 20:02:09 +00:00
Chris Lattner
c27302c79f
Disable a previous patch that was causing indvars to loop infinitely :(
...
llvm-svn: 13108
2004-04-22 15:12:36 +00:00
Chris Lattner
8f02e9c5f7
Add an ugly cast
...
llvm-svn: 13107
2004-04-22 15:00:36 +00:00
Chris Lattner
c1a682dda0
Fix an extremely serious thinko I made in revision 1.60 of this file.
...
llvm-svn: 13106
2004-04-22 14:59:40 +00:00
Chris Lattner
334bee87f4
Add a method
...
llvm-svn: 13105
2004-04-22 14:56:51 +00:00
Chris Lattner
af532f27e7
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. :)
llvm-svn: 13103
2004-04-21 23:36:08 +00:00
Chris Lattner
fb9a299f68
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. :)
llvm-svn: 13102
2004-04-21 22:29:37 +00:00
Chris Lattner
dc7cc35088
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.
llvm-svn: 13101
2004-04-21 22:22:01 +00:00
Chris Lattner
be8bb804c5
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.
llvm-svn: 13100
2004-04-21 20:44:33 +00:00
Chris Lattner
15572abd14
bug fixed
...
llvm-svn: 13099
2004-04-21 18:52:06 +00:00
Chris Lattner
ee80c45d46
new testcase for PR326
...
llvm-svn: 13098
2004-04-21 18:49:35 +00:00
Misha Brukman
0784a601c2
Add doxygenified comments to functions.
...
llvm-svn: 13097
2004-04-21 18:36:43 +00:00
Misha Brukman
3bcead7201
I'm allergic to the word `stuff'.
...
llvm-svn: 13096
2004-04-21 18:27:56 +00:00
Brian Gaeke
376ac1bed5
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.
llvm-svn: 13095
2004-04-21 17:53:58 +00:00
Alkis Evlogimenos
f68f40ea42
Include cerrno (gcc-3.4 fix)
...
llvm-svn: 13091
2004-04-21 16:11:40 +00:00
Alkis Evlogimenos
07f7574ba3
Declare iterator as public since it is defined as such (gcc-3.4 fix)
...
llvm-svn: 13090
2004-04-21 16:10:40 +00:00