1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

154 Commits

Author SHA1 Message Date
Reid Spencer
b9ab0ef60d Fix PR422.
Ouch! Changes in the lazy initialization code caused each incorporated
function to reprocess the entire function on every lookup of a value's
slot number. This caused a horrible slowdown in all functions. This
fix made llvm-dis go from "longer than I care to wait" (minutes) on a large
test case to 0.53 seconds.

llvm-svn: 15818
2004-08-16 07:46:33 +00:00
Misha Brukman
8346db7afe Fix #includes of i*.h files => Instructions.h as per PR403
llvm-svn: 15327
2004-07-29 16:53:53 +00:00
Reid Spencer
a23e595275 Avoid use of size(), which counts, in favor of other mechanisms.
llvm-svn: 15221
2004-07-25 21:44:54 +00:00
Reid Spencer
07e3e1c29b Adjust to new Module.h interface for dependent libraries
Only write the target triple and deplibs if they are non-empty.

llvm-svn: 15216
2004-07-25 21:29:43 +00:00
Reid Spencer
9077f12bb0 bug 263:
Add ability to write target triple and dependent libraries information.

llvm-svn: 15211
2004-07-25 18:08:18 +00:00
Reid Spencer
78477eb62b Shrink some code.
llvm-svn: 14956
2004-07-18 01:04:19 +00:00
Reid Spencer
bc38cd572f bug 122:
- Replace ConstantPointerRef usage with GlobalValue usage
- Minimize redundant isa<GlobalValue> usage
- Correct isa<Constant> for GlobalValue subclass

llvm-svn: 14927
2004-07-17 23:47:01 +00:00
Chris Lattner
94212f7102 Fixes for PR341
llvm-svn: 14847
2004-07-15 02:51:31 +00:00
Chris Lattner
183766f21e Make Argument::print more resilient to non-verifiable IR
llvm-svn: 14801
2004-07-13 23:14:34 +00:00
Reid Spencer
93c3d80eb4 Adjust the slot machine to handle Types separately from Values. This was
done by doubling up the data structures so that Type based equivalents are
used. A consequence of this is overloading of function members that take a
Type* instead of a Value*. Various other cleanups related to Type != Value
(bug 122) were also implemented.

llvm-svn: 14613
2004-07-04 11:50:43 +00:00
Chris Lattner
ed76ea9025 Don't call getValueType directly. the LLVM optimizer will turn it into the same code anyway :)
llvm-svn: 14426
2004-06-26 19:40:40 +00:00
Misha Brukman
f12181a902 Use a reference instead of a pointer for the ostream. The pointer was only
there to assist in the development of llvm-tv, and it no longer has a need to
modify the AsmWriter output stream.

llvm-svn: 14304
2004-06-21 21:53:56 +00:00
Chris Lattner
3c61b2dd70 Fix printing of Argument objects, problem found by Patrick Meredith
llvm-svn: 14215
2004-06-18 04:07:20 +00:00
Chris Lattner
0cd29ae2cd Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()
llvm-svn: 14201
2004-06-17 18:19:28 +00:00
Chris Lattner
8ca8002f88 Do not dereference end iterators. It's really bad for the asmwriter's health.
This possibly fixes PR370

llvm-svn: 14181
2004-06-15 21:07:32 +00:00
Chris Lattner
75e5aa4d22 Tolerate more errors
llvm-svn: 14104
2004-06-09 22:22:10 +00:00
Chris Lattner
3aa77d0e5e Make the asmwriter much more tolerant of errors (which are common when working
on new front-ends and stuff).  Also get rid of some tabs that snuck in.

llvm-svn: 14100
2004-06-09 19:41:19 +00:00
Reid Spencer
a07033fecd Made it possible for the printInfoComment method to invoke getSlot in
such a way that if the Value being printed is standalone that we don't
assert and abort but just print ":??" for the slot number instead.

llvm-svn: 14097
2004-06-09 15:26:53 +00:00
Chris Lattner
f609ec6329 Squelch a warning
llvm-svn: 14032
2004-06-04 23:53:20 +00:00
Misha Brukman
99137fd27a * No more CachedWriter::setStream()
* ostream is back to being a reference instead of a pointer
* Output single characters as chars, not as length-1 strings

llvm-svn: 14030
2004-06-04 21:11:51 +00:00
John Criswell
1a6863e08b Modified calcTypeName() so that it does not allocate a std::string for
every recursive call.
This makes it more robust for deeply nested, unnamed types.

llvm-svn: 13915
2004-06-01 14:54:08 +00:00
Reid Spencer
0030dfe486 Clean up a comment.
llvm-svn: 13860
2004-05-27 22:04:46 +00:00
Reid Spencer
b7b1b9d4b2 Several clean ups suggested by Chris: remove tabs, make SlotMachine do lazy
initialization so we don't scan large Modules/Functions needlessly, tighten
up restrictions on what can be put in SlotMachine (no Constants that aren't
GlobalValues).

llvm-svn: 13796
2004-05-26 21:56:09 +00:00
Reid Spencer
58bad426cc Part of bug 122. Removed dependency of AsmWriter on SlotCalculator by
incorporating a significantly simpler "SlotMachine" into this file. The
SlotMachine is tailored for use by only the AsmWriter whose requirements
for slot numbers are vastly different than from the Bytecode/Writer. Code
change passes all Feature and Regression tests.

llvm-svn: 13784
2004-05-26 07:18:52 +00:00
Reid Spencer
756f392365 Document a couple functions.
llvm-svn: 13761
2004-05-25 18:14:38 +00:00
Reid Spencer
fec48b0d9d Convert to SymbolTable's new iteration interface.
llvm-svn: 13754
2004-05-25 08:53:40 +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
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
Chris Lattner
aa815619b4 Print select instructions correctly
llvm-svn: 12320
2004-03-12 05:53:14 +00:00
Chris Lattner
94d2b3a524 Adjust to new interface
llvm-svn: 12231
2004-03-08 18:51:45 +00:00
Misha Brukman
754f11778f Doxygenify comments.
llvm-svn: 12071
2004-03-02 00:22:19 +00:00
Misha Brukman
d9ed820702 * If a badref has a name, print it out for ease of debugging
* Doxygenify (some) comments

llvm-svn: 12057
2004-03-01 19:48:13 +00:00
Chris Lattner
28131460da Adjustments to support the new ConstantAggregateZero class
llvm-svn: 11474
2004-02-15 05:55:15 +00:00
Chris Lattner
16690fad3d Adjust to the changed StructType interface. In particular, getElementTypes() is gone.
llvm-svn: 11228
2004-02-09 04:37:31 +00:00
Chris Lattner
a1757d1d91 Start using the new and improve interface to FunctionType arguments
llvm-svn: 11224
2004-02-09 04:14:01 +00:00
Chris Lattner
a9a34f9d82 vi failed me again. :)
llvm-svn: 11206
2004-02-08 21:52:30 +00:00
Chris Lattner
2878b11cfc Rename the invoke 'except' destination to the 'unwind' destination
llvm-svn: 11205
2004-02-08 21:52:04 +00:00
Chris Lattner
68fdb35576 rename the "exceptional" destination of an invoke instruction to the 'unwind' dest
llvm-svn: 11202
2004-02-08 21:44:31 +00:00
Chris Lattner
781ed02fce SlotCalculator.h moved
llvm-svn: 10931
2004-01-20 19:50:34 +00:00
Chris Lattner
95c8aa8570 Eliminate special case handling for CPR's
Fix some problem cases where I was building the slot calculator in bytecode
writer mode instead of asmwriter mode.

llvm-svn: 10911
2004-01-18 21:03:06 +00:00
Chris Lattner
bcd7372d19 The only clients of the slot calculator are now the asmwriter and bcwriter.
Since this really only makes sense for these two, change hte instance variable
to reflect whether we are writing a bytecode file or not.  This makes it
reasonable to add bcwriter specific stuff to it as necessary.

llvm-svn: 10837
2004-01-14 02:49:34 +00:00
Chris Lattner
a1da49a55c Finegrainify namespacification
llvm-svn: 10131
2003-11-21 20:23:48 +00:00
Chris Lattner
5ac68ed1bf Don't crash if we are printing an orphaned basic block!
llvm-svn: 10100
2003-11-20 00:09:43 +00:00
Chris Lattner
31a03e3207 Be a bit more tolerant of broken code
llvm-svn: 10050
2003-11-17 01:17:04 +00:00
Brian Gaeke
675cab8d52 When you hand WriteAsOperand a type, it now prints out its symbolic name.
llvm-svn: 10042
2003-11-16 23:08:27 +00:00
Chris Lattner
21c40d8641 Don't print 'No predecessors!' on the entry block
llvm-svn: 10038
2003-11-16 22:59:57 +00:00
Brian Gaeke
d25f86d683 Put all LLVM code into the llvm namespace, as per bug 109.
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
Chris Lattner
95e79d0097 Add an assertion
llvm-svn: 9831
2003-11-09 15:51:07 +00:00
Chris Lattner
c49a7fd37d Make use of the new AssemblyAnnotationWriter interface
llvm-svn: 9619
2003-10-30 23:41:03 +00:00
Chris Lattner
f24ae5a0ed Print the names of more opaque types
llvm-svn: 9598
2003-10-30 00:22:33 +00:00