Misha Brukman
9f6428ea0e
Added `zeroinitializer' keyword.
...
llvm-svn: 13253
2004-04-28 19:36:08 +00:00
Misha Brukman
5f5f6ca775
class AssemblyWriter:
...
* Make contained ostream pointer, not reference
* Allow setting of that ostream via setStream()
class CachedWriter:
* setStream() in turn calls setStream() on the AssemblyWriter
llvm-svn: 13247
2004-04-28 19:24:28 +00:00
Misha Brukman
3673c653b5
* Make contained ostream not public.
...
* Remove various print methods that called the Value* method, just have one that
all subclasses of Value will use anyway.
* Remove template for printing constant references
* Add methods to print char* and strings
* setStream now sets the stream on the contained AssemblyWriter
llvm-svn: 13246
2004-04-28 19:22:58 +00:00
Misha Brukman
f8b734296e
Send text and numbers directly to CachedWriter's contained ostream.
...
llvm-svn: 13243
2004-04-28 18:52:43 +00:00
Misha Brukman
fad1a41fce
Squelch compile-time warning (profile build).
...
llvm-svn: 13228
2004-04-28 15:32:09 +00:00
Misha Brukman
d408a510b8
* Add ability to print out type as symbolic
...
* Add Module accessor to AssemblyWriter
llvm-svn: 13227
2004-04-28 15:31:21 +00:00
Misha Brukman
dd23f36ed6
* Add ability to get and set the output stream
...
* New feature: outputting a Type* as symbolic, controlled via the stream
similarly to sending std::hex to change number format
llvm-svn: 13226
2004-04-28 15:30:33 +00:00
Brian Gaeke
8e3668faca
Add pred./succ. list size methods.
...
llvm-svn: 13214
2004-04-28 04:46:35 +00:00
Brian Gaeke
bfb4fe5109
Make RequiresFPRegKill() take a MachineBasicBlock arg.
...
In InsertFPRegKills(), just check the MachineBasicBlock for successors
instead of its corresponding BasicBlock.
llvm-svn: 13213
2004-04-28 04:45:55 +00:00
Brian Gaeke
74ed24c9de
In InsertFPRegKills(), use the machine-CFG itself rather than the
...
LLVM CFG when trying to find the successors of BB.
llvm-svn: 13212
2004-04-28 04:34:16 +00:00
Brian Gaeke
6c03805717
Update the machine-CFG edges whenever we see a branch.
...
llvm-svn: 13211
2004-04-28 04:19:37 +00:00
Brian Gaeke
369fa0ed81
Move private methods to end of class decl at Chris's request
...
llvm-svn: 13210
2004-04-28 04:15:06 +00:00
Brian Gaeke
d63179c70b
Fix thinkos that Chris caught for me.
...
Make pred mutators private.
llvm-svn: 13209
2004-04-28 03:59:48 +00:00
Brian Gaeke
213538a039
Add machine-code CFG support: MachineBasicBlocks may now have their own
...
predecessors and successors
llvm-svn: 13208
2004-04-28 02:16:33 +00:00
Brian Gaeke
7ce5ef244a
Integrate the rest of my random sparcv9 scribblings into this file
...
llvm-svn: 13204
2004-04-27 22:04:03 +00:00
Chris Lattner
cc929742a1
Fix warning building in optimized mode
...
llvm-svn: 13190
2004-04-27 18:24:38 +00:00
Chris Lattner
adacba2678
Fix warning
...
llvm-svn: 13189
2004-04-27 18:21:56 +00:00
Chris Lattner
02c65b5395
Changes to fix up the inst_iterator to pass to boost iterator checks. This
...
patch was graciously contributed by Vladimir Prus.
llvm-svn: 13185
2004-04-27 15:13:33 +00:00
Brian Gaeke
9679a3b445
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
217515996f
Add functions that return instances of these printer passes
...
llvm-svn: 13175
2004-04-26 16:27:08 +00:00
Brian Gaeke
1aada2b128
Fix a typo in a comment.
...
llvm-svn: 13174
2004-04-26 16:26:21 +00:00
Chris Lattner
430a61e786
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
5bad19bde7
Instcombine X/-1 --> 0-X
...
llvm-svn: 13172
2004-04-26 14:01:59 +00:00
Chris Lattner
312eb88522
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
1e049bdc77
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
c3857275f9
Add a getRegisterInfo() accessor just like on the X86 target.
...
llvm-svn: 13147
2004-04-25 06:32:28 +00:00
Brian Gaeke
6e21a0858c
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
a36743c473
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
ebb3422358
Standardize header comments of top-level Makefiles.
...
llvm-svn: 13143
2004-04-24 00:10:56 +00:00
Misha Brukman
d41853bbe2
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
144b5572e1
* 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
6ed3b116bc
Fix a typo.
...
llvm-svn: 13136
2004-04-23 21:45:02 +00:00
Chris Lattner
b72fa5f541
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
f4eb9eb0f2
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
b2e1576e72
Remove the SCEV::expandCodeFor method, add a new SCEVVisitor class.
...
llvm-svn: 13133
2004-04-23 21:28:25 +00:00
Chris Lattner
7902d8fd02
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
071e2bce64
Merged this file into the SparcV9 target.
...
llvm-svn: 13128
2004-04-23 18:17:03 +00:00
Brian Gaeke
7fba37bb96
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
40c7e110a5
Include SparcV9RegInfo.h instead of TargetRegInfo.h.
...
llvm-svn: 13126
2004-04-23 18:15:47 +00:00
Brian Gaeke
1b07a2282a
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
07344c1367
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
96889991bb
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
80db51134d
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
0db103b4b3
Use emitWordAt() to emit forward-branch fixups.
...
llvm-svn: 13120
2004-04-23 17:11:16 +00:00
Brian Gaeke
255d0d9b26
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
3cde72d6e2
Implement emitWordAt() for the JIT emitter.
...
llvm-svn: 13118
2004-04-23 17:11:14 +00:00
Brian Gaeke
bc25b3b28a
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
2f5697a29f
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
2c7503786d
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
1dc8e19185
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