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
Chris Lattner
a9691fe70d
Fix typeo
...
llvm-svn: 13089
2004-04-21 14:23:18 +00:00
Chris Lattner
c87784f1fc
REALLY fix PR324: don't delete linkonce functions until after the SCC traversal
...
is done, which avoids invalidating iterators in the SCC traversal routines
llvm-svn: 13088
2004-04-20 22:06:53 +00:00
Chris Lattner
99504890b7
Pass the callgraph not the module
...
llvm-svn: 13087
2004-04-20 21:52:26 +00:00
Chris Lattner
a45086a45e
Allow getting the module from a call graph
...
llvm-svn: 13086
2004-04-20 21:52:12 +00:00
Chris Lattner
0a985ac82c
Change it to take a callgraph, from which we can get a module
...
llvm-svn: 13085
2004-04-20 21:52:07 +00:00
Chris Lattner
8d0838130c
Add the ability for SCC passes to initialize and finalize themselves
...
llvm-svn: 13084
2004-04-20 21:30:06 +00:00
Chris Lattner
c1aa21f5a7
Fix PR325
...
llvm-svn: 13081
2004-04-20 20:26:03 +00:00
Chris Lattner
514934051a
Fix PR324 and testcase: Inline/2004-04-20-InlineLinkOnce.llx
...
llvm-svn: 13080
2004-04-20 20:20:59 +00:00
Chris Lattner
40123bff5b
New testcase, distilled from PR324
...
llvm-svn: 13079
2004-04-20 20:15:01 +00:00
Brian Gaeke
a2f66db6c4
Make it legal to ask for the type of a specialreg
...
llvm-svn: 13078
2004-04-20 20:12:57 +00:00
Brian Gaeke
86a6c75a7e
Add some PRs which were fixed, but not previously mentioned in the rel. notes.
...
llvm-svn: 13077
2004-04-20 18:18:46 +00:00
Chris Lattner
2b2d7a99be
Add support for the select instruction
...
llvm-svn: 13076
2004-04-20 16:43:21 +00:00
Brian Gaeke
6c272a93bb
Make it legal to request a load or store of %fsr.
...
llvm-svn: 13073
2004-04-19 19:12:12 +00:00
Brian Gaeke
627abf14bb
Fix typo.
...
llvm-svn: 13072
2004-04-19 19:09:24 +00:00
Brian Gaeke
755651df27
Regularize include guards and remove some excess whitespace.
...
llvm-svn: 13071
2004-04-19 18:53:44 +00:00
Brian Gaeke
2fd2536ea8
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.
llvm-svn: 13070
2004-04-19 18:53:43 +00:00
Brian Gaeke
85cb77737c
Regularize include guards, remove some excess whitespace and fix some comments.
...
Remove the extra %fsr register from SparcV9FloatCCRegClass.
llvm-svn: 13069
2004-04-19 18:53:42 +00:00
Chris Lattner
f48f777d4c
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.
llvm-svn: 13068
2004-04-19 18:07:02 +00:00
Chris Lattner
ceea37590f
New testcase
...
llvm-svn: 13067
2004-04-19 18:06:34 +00:00
Chris Lattner
1c9fb0007e
Add accessor for a Loop Unswitching pass
...
llvm-svn: 13066
2004-04-19 06:28:37 +00:00
Chris Lattner
46f888dd80
Eliminate a poorly conceived method
...
llvm-svn: 13065
2004-04-19 06:26:46 +00:00
Chris Lattner
663ebc3ec6
It's not just a printer, it's actually an analysis too
...
llvm-svn: 13064
2004-04-19 03:42:32 +00:00
Misha Brukman
ce89b392c6
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.
llvm-svn: 13063
2004-04-19 03:36:47 +00:00
Misha Brukman
d2493e1565
* Remove note about "UNSUPPORTED: " feature that just became supported
...
* Fix usage of <p> tag and some grammar
llvm-svn: 13062
2004-04-19 03:28:39 +00:00
Misha Brukman
8a32c6d91b
* Reorder #includes
...
* Wrap a long line
llvm-svn: 13061
2004-04-19 03:12:35 +00:00
Misha Brukman
4825e215c0
Display sample bugpoint output with the `code' stylesheet class.
...
llvm-svn: 13060
2004-04-19 03:07:29 +00:00