1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 11:33:24 +02:00
Commit Graph

336 Commits

Author SHA1 Message Date
Andrew Lenharth
31e7a82bea And asm writing for packed struct initializers
llvm-svn: 33016
2007-01-08 18:21:30 +00:00
Reid Spencer
cdaf88ff9d For PR411:
Take an incremental step towards type plane elimination. This change
separates types from values in the symbol tables by finally making use
of the TypeSymbolTable class. This yields more natural interfaces for
dealing with types and unclutters the SymbolTable class.

llvm-svn: 32956
2007-01-06 07:24:44 +00:00
Reid Spencer
4f14887126 Change the syntax for parameter attributes:
1. The @ sign is no longer necessary.
2. We now support "function attributes" as parameter attribute 0.
3. Instead of locating the return type attributes after the type of a
   function result, they are now located after the function header's
   closing paranthesis and before any alignment or section options.
4. The way has been prepared for a new "noreturn" function attribute but
   there is no support for recognizing it in the lexer nor doing anything
   with it if it does get set.
5. The FunctionType::getParamAttrsText method now has support for
   returning multiple attributes. This required a change in its interface.

I'm unhappy that this change leads to 6 new shift/reduce conflicts, but
in each case bison's decision to choose the shift is correct so there
shouldn't be any damage from these conflicts.

llvm-svn: 32904
2007-01-05 17:06:19 +00:00
Reid Spencer
45bed286fa Fix a cut-and-paste bug for processing of InvokeInst parameter attributes.
The lookup of parameter attributes was offset by two because of the
additional operands in an invoke instruction.

llvm-svn: 32801
2006-12-31 22:17:01 +00:00
Reid Spencer
ba137437bf For PR950:
* Change integer type name from signed to signless
* Implement printing of FunctionType parameter attributes.

llvm-svn: 32778
2006-12-31 05:24:50 +00:00
Reid Spencer
38002bb037 For PR950:
Remove all grammar conflicts from assembly parsing.  This change involves:
1. Making the "type" keyword not a primitive type (removes several
   reduce/reduce conflicts)
2. Being more specific about which linkage types are allowed for functions
   and global variables. In particular "appending" can no longer be
   specified for a function. A differentiation was made between the various
   internal and external linkage types.
3. Introduced the "define" keyword which is now required when defining a
   function. This disambiguates several cases where a named function return
   type could get confused with the definition of a new type. Using the
   keyword eliminates all shift/reduce conflicts and the remaining
   reduce/reduce conflicts.

These changes are necessary to implement the function parameter attributes
that will be introduced soon. Adding the function parameter attributes in
the presence of the shift/reduce and reduce/reduce conflicts led to severe
ambiguities that caused the parser to report syntax errors that needed to
be resolved. This patch resolves them.

llvm-svn: 32770
2006-12-29 20:29:48 +00:00
Reid Spencer
812cc9c807 Now that ConstantInt::isValueValidForType can handle signed and unsigned
values regardless of the signedness of the constant's type, it is okay to
always make the AsmWriter.cpp print constant ints as signed values. The
AsmParser will automatically handle things like: uint -1 as a result.

llvm-svn: 32686
2006-12-19 21:16:35 +00:00
Andrew Lenharth
d115fe7ce3 Packed Structures
llvm-svn: 32361
2006-12-08 18:06:16 +00:00
Bill Wendling
23b8b13c9d Removing even more <iostream> includes.
llvm-svn: 32320
2006-12-07 20:04:42 +00:00
Bill Wendling
a3246c4272 Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
now cerr, cout, and NullStream resp.

llvm-svn: 32298
2006-12-07 01:30:32 +00:00
Chris Lattner
f92de9a3d2 Remove the dead CachedWriter class.
llvm-svn: 32271
2006-12-06 06:40:49 +00:00
Chris Lattner
a428b29cdb printName is almost always true. In the cases that mattered where it was false,
it was effectively set to true by this:

-  if ((PrintName || isa<GlobalValue>(V)) && V->hasName())
+  if (V->hasName())

Delete printname entirely.

llvm-svn: 32265
2006-12-06 06:24:27 +00:00
Chris Lattner
c73d71336d The hasSlot methods are gone.
Remove the 'PrintName' argument to WriteAsOperand, as it is always true.
Only call getOrCreateSlot on things that are valid.

llvm-svn: 32263
2006-12-06 06:15:43 +00:00
Chris Lattner
cc4a08f45b remove unused api, simplify some code
llvm-svn: 32260
2006-12-06 05:55:41 +00:00
Chris Lattner
04357677e5 remove more code that was only used by the bc writer
llvm-svn: 32259
2006-12-06 05:50:41 +00:00
Chris Lattner
9a36bc328e remove dead code left over from when this functionality was shared with the
bcwriter.

llvm-svn: 32258
2006-12-06 05:42:32 +00:00
Chris Lattner
7ee127edad rename createSlot -> getOrCreateSlot.
llvm-svn: 32256
2006-12-06 05:27:40 +00:00
Chris Lattner
8f97b3e24b clean up some sloppy and inconsistent spacing
llvm-svn: 32255
2006-12-06 05:12:21 +00:00
Chris Lattner
74b8045bc5 wrap long lines
llvm-svn: 32254
2006-12-06 04:41:52 +00:00
Reid Spencer
ca27d66971 For PR950: Implement ICmp/FCmp predicate printing for constant expressions
llvm-svn: 32168
2006-12-04 05:19:18 +00:00
Reid Spencer
f78fe29ca8 Shorten the FCmp predicate mnemonics.
llvm-svn: 32150
2006-12-03 06:35:48 +00:00
Reid Spencer
904e41f87e Allow the ICmp and FCmp instructions to be written by the AsmWriter
llvm-svn: 32148
2006-12-03 06:27:29 +00:00
Bill Wendling
aa02717a76 Changed to using LLVM streams.
llvm-svn: 31955
2006-11-28 02:09:03 +00:00
Reid Spencer
992d9788b3 For PR950:
The long awaited CAST patch. This introduces 12 new instructions into LLVM
to replace the cast instruction. Corresponding changes throughout LLVM are
provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the
exception of 175.vpr which fails only on a slight floating point output
difference.

llvm-svn: 31931
2006-11-27 01:05:10 +00:00
Reid Spencer
4bafa71dc1 For PR786:
Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting
fall out by removing unused variables. Remaining warnings have to do with
unused functions (I didn't want to delete code without review) and unused
variables in generated code. Maintainers should clean up the remaining
issues when they see them. All changes pass DejaGnu tests and Olden.

llvm-svn: 31380
2006-11-02 20:25:50 +00:00
Reid Spencer
dd294b507f Make the Value and Type methods print a newline so it prints nicely in gdb
llvm-svn: 31221
2006-10-27 18:58:54 +00:00
Chris Lattner
9e59066602 Change keyword to datalayout
llvm-svn: 31107
2006-10-22 06:06:56 +00:00
Reid Spencer
d414793dbc For PR950:
This patch implements the first increment for the Signless Types feature.
All changes pertain to removing the ConstantSInt and ConstantUInt classes
in favor of just using ConstantInt.

llvm-svn: 31063
2006-10-20 07:07:24 +00:00
Owen Anderson
12374f766b Add support for the new "target data" information in .ll files. This provides
a better encoding of the targets data layout, rather than trying to guess it
from the endianness and pointersize like before.

llvm-svn: 31030
2006-10-18 02:21:12 +00:00
Chris Lattner
3b8cae29c7 simplify code
llvm-svn: 30655
2006-09-28 22:50:29 +00:00
Anton Korobeynikov
59ef7e94eb Adding codegeneration for StdCall & FastCall calling conventions
llvm-svn: 30549
2006-09-20 22:03:51 +00:00
Anton Korobeynikov
6e19f80688 Adding dllimport, dllexport and external weak linkage types.
DLL* linkages got full (I hope) codegeneration support in C & both x86
assembler backends.
External weak linkage added for future use, we don't provide any
codegeneration, etc. support for it.

llvm-svn: 30374
2006-09-14 18:23:27 +00:00
Reid Spencer
2567610703 For PR387:
Close out this long standing bug by removing the remaining overloaded
virtual functions in LLVM. The -Woverloaded-virtual option is now turned on.

llvm-svn: 29934
2006-08-28 01:02:49 +00:00
Chris Lattner
a39dcb5377 eliminate RegisterOpt. It does the same thing as RegisterPass.
llvm-svn: 29925
2006-08-27 22:42:52 +00:00
Chris Lattner
0ad370eeb7 Fix PR885
llvm-svn: 29794
2006-08-21 17:20:01 +00:00
Chris Lattner
7a3f5267c0 Print csretcc calls like this:
call csretcc void %structret( { sbyte }* %P )

instead of this:

        callcsretcc  void %structret( { sbyte }* %P )

llvm-svn: 28412
2006-05-19 21:58:52 +00:00
Chris Lattner
b0af1b89ac pretty print csretcc for calls
llvm-svn: 28410
2006-05-19 21:54:03 +00:00
Chris Lattner
bb961fb9d8 Asmprint csret nicely
llvm-svn: 28408
2006-05-19 21:29:57 +00:00
Chris Lattner
872e3ecaa1 inverted logic, caught by coverity
llvm-svn: 28290
2006-05-14 18:46:52 +00:00
Chris Lattner
14b19acd56 Add shufflevector support, todo, implement better constant folding.
llvm-svn: 27510
2006-04-08 01:18:18 +00:00
Evan Cheng
dd066eac71 Back out my last check-in. Wrong place to fix it.
llvm-svn: 26462
2006-03-01 22:17:00 +00:00
Evan Cheng
25ecfb9411 AsmWriter should not print LLVM constant in comment. Assembler won't like
multi-line comments.

llvm-svn: 26461
2006-03-01 22:00:59 +00:00
Jim Laskey
64fdd3498f Pretty print large struct constants.
llvm-svn: 26400
2006-02-27 10:33:53 +00:00
Jim Laskey
0ba89a0a4c Reverting. Didn't realize some developers were embedding constants in their
target assembler code gen.

llvm-svn: 26383
2006-02-26 10:16:05 +00:00
Jim Laskey
8ad04a557b Format large struct constants for readability.
llvm-svn: 26379
2006-02-25 12:27:03 +00:00
Chris Lattner
b31becf499 Print InlineAsm objects
llvm-svn: 25617
2006-01-25 22:26:05 +00:00
Chris Lattner
d36993d81d Change inline asms to be uniqued like constants, not embedded in a Module.
llvm-svn: 25610
2006-01-25 18:57:27 +00:00
Chris Lattner
50ba79e71b Initial checkin of the InlineAsm class
llvm-svn: 25570
2006-01-24 04:13:11 +00:00
Chris Lattner
c53f8ef744 Pretty print file-scope asm blocks.
llvm-svn: 25568
2006-01-24 00:45:30 +00:00
Chris Lattner
239ebe1535 syntax change
llvm-svn: 25567
2006-01-24 00:40:17 +00:00
Chris Lattner
597ab252ea Print out inline asm strings
llvm-svn: 25556
2006-01-23 23:03:36 +00:00
Chris Lattner
5b42a5ea1a print section info
llvm-svn: 24313
2005-11-12 00:10:19 +00:00
Chris Lattner
6991a6f23f print alignment info for globals and functions
llvm-svn: 24212
2005-11-06 06:48:53 +00:00
Chris Lattner
8eee9a6234 fix printing the alignment directive
llvm-svn: 24197
2005-11-05 21:20:34 +00:00
Nate Begeman
f299b9fb03 Add support alignment of allocation instructions.
Add support for specifying alignment and size of setjmp jmpbufs.

No targets currently do anything with this information, nor is it presrved
in the bytecode representation.  That's coming up next.

llvm-svn: 24196
2005-11-05 09:21:28 +00:00
Jim Laskey
61e3d7bca5 Culling out use of unions for converting FP to bits and vice versa.
llvm-svn: 22838
2005-08-17 19:34:49 +00:00
Andrew Lenharth
a9214fec08 core changes for varargs
llvm-svn: 22254
2005-06-18 18:34:52 +00:00
Reid Spencer
ba222e3e99 Some cleanups for compilation with GCC 4.0.0 to remove warnings:
* Use C++ style casts, not C style casts
* Abstract base classes should have virtual destructor.

llvm-svn: 22057
2005-05-15 16:13:11 +00:00
Chris Lattner
26a44493ef add support for explicit calling conventions
llvm-svn: 21746
2005-05-06 20:26:43 +00:00
Chris Lattner
72ffd7e7d5 Add a 'tail' marker for call instructions, patch contributed by
Alexander Friedman.

llvm-svn: 21722
2005-05-06 05:51:46 +00:00
Misha Brukman
53e199440e Remove trailing whitespace
llvm-svn: 21427
2005-04-21 23:48:37 +00:00
Chris Lattner
7a9186cb47 stop using arg_front
llvm-svn: 20599
2005-03-15 05:03:36 +00:00
Chris Lattner
4b688a1c70 This mega patch converts us from using Function::a{iterator|begin|end} to
using Function::arg_{iterator|begin|end}.  Likewise Module::g* -> Module::global_*.

This patch is contributed by Gabor Greif, thanks!

llvm-svn: 20597
2005-03-15 04:54:21 +00:00
Misha Brukman
5b587350ee Fix the spelling of the word `the'
llvm-svn: 20412
2005-03-02 23:17:31 +00:00
Chris Lattner
f9597dc689 Print the module ID as a comment.
llvm-svn: 20411
2005-03-02 23:12:40 +00:00
Chris Lattner
af54bd6050 Fix some problems where the verifier would crash on invalid input instead of
reporting the problem and exiting.

llvm-svn: 20302
2005-02-24 16:58:29 +00:00
Chris Lattner
343a831bab Fix test/Regression/Assembler/2005-02-09-AsmWriterStoreBug.ll
llvm-svn: 20089
2005-02-09 17:45:03 +00:00
Chris Lattner
1cbca58b87 Update for API change.
llvm-svn: 19960
2005-02-01 01:24:01 +00:00
Chris Lattner
6446c6fb34 To not break TBAA rules, use a union.
llvm-svn: 19280
2005-01-04 01:56:57 +00:00
Alkis Evlogimenos
9b02192468 Fix writer to properly quote label names when they don't contain
simple characters.

llvm-svn: 18744
2004-12-10 05:41:10 +00:00
Chris Lattner
9c390fa13f When printing out a function, make sure that local and global symbols
don't conflict.  This fixes Assembler/2004-12-05-LocalGlobalSymtabConflict.ll

llvm-svn: 18532
2004-12-05 06:44:09 +00:00
Misha Brukman
a3b5e5f569 Remove extra space char
llvm-svn: 17834
2004-11-15 19:30:05 +00:00
Misha Brukman
8d4e1d62dd GhostLinkage not allowed in LLVM AsmWriter, either
llvm-svn: 17751
2004-11-14 21:04:34 +00:00
Chris Lattner
93bf5a8066 Add support for undef and unreachable
llvm-svn: 17041
2004-10-16 18:08:06 +00:00
Reid Spencer
7bd9d86b65 Okay, the list of link-time passes wasn't such a hot idea. Its prone to
error. We'll strategize on this when we have multiple front ends to deal
with. For now llvm-ld just runs a standard set of transforms.

llvm-svn: 16333
2004-09-14 05:43:23 +00:00
Chris Lattner
99d5ceac0d Don't print newlines between passes in the pass list.
Note to self: sentences end with ".", not "...".
Note to reid: sentences end with ".", not "".   :)

llvm-svn: 16332
2004-09-14 05:06:58 +00:00
Chris Lattner
c131f05ebb Don't print newlines between each library in the deplibs list.
llvm-svn: 16331
2004-09-14 04:51:44 +00:00
Reid Spencer
4a1593ebd2 Add support for the link-time pass list to Modules.
llvm-svn: 16321
2004-09-13 23:44:23 +00:00
Reid Spencer
c4abcbefb1 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.

llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Reid Spencer
0c3bada696 Add an assert to cature null Operands. It is better to catch it here than
to SIGSEGV in the bowels of isa<...> later.

llvm-svn: 16098
2004-08-29 19:37:59 +00:00
Reid Spencer
448910c216 Fix a bug found exposed by: Regression/Other/2004-08-20-PackedControlFlow.ll
Packed types need to be allowed in type statements too.

Patch provided by Brad Jones.

llvm-svn: 15953
2004-08-20 15:37:30 +00:00
Brian Gaeke
01636f4e0f Packed types, brought to you by Brad Jones
llvm-svn: 15938
2004-08-20 06:00:58 +00:00
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
Chris Lattner
a2fcab56e3 Make sure to print opaque types names if they are available.
llvm-svn: 9597
2003-10-30 00:12:51 +00:00
John Criswell
b402729b30 Added LLVM project notice to the top of every C++ source file.
Header files will be on the way.

llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Chris Lattner
29825508f0 Add support for the new varargs intrinsics and instructions
llvm-svn: 9226
2003-10-18 05:57:43 +00:00
Alkis Evlogimenos
5a1f705c88 Eliminate some extraneous code in SlotCalculator::insertVal().
Rename SlotCalculator::getValSlot() to SlotCalculator::getSlot(),
       SlotCalculator::insertValue() to SlotCalculator::getOrCreateSlot(),
       SlotCalculator::insertVal() to SlotCalculator::insertValue(), and
       SlotCalculator::doInsertVal() to SlotCalculator::doInsertValue().

llvm-svn: 9190
2003-10-17 02:02:40 +00:00
Chris Lattner
f46c45682a Add support for 'weak' linkage.
llvm-svn: 9171
2003-10-16 18:29:00 +00:00
Misha Brukman
c59161ff84 Fix spelling/grammar.
llvm-svn: 9023
2003-10-10 17:54:14 +00:00
Chris Lattner
2916eafa42 Add support for volatile loads/stores
llvm-svn: 8393
2003-09-08 17:45:59 +00:00
Chris Lattner
2fe8fac4e0 Fix bug where we couldn't print a function without a name
llvm-svn: 8341
2003-09-03 17:56:43 +00:00
Chris Lattner
91cdd5dbc9 Support new 'any' support for pointer size and endianness
llvm-svn: 8119
2003-08-24 13:48:48 +00:00
Chris Lattner
7cdcd38942 If an "LLVM name" has wierd characters in it, print it out in double quotes instead of prefixing it with %
llvm-svn: 8049
2003-08-22 05:40:38 +00:00
Chris Lattner
b44a9376d1 Implement TODO: print out short form of Invoke if possible
llvm-svn: 7595
2003-08-05 15:34:45 +00:00
Chris Lattner
1351c304dc Remove redundant const qualifiers from cast<> expressions
llvm-svn: 7253
2003-07-23 15:30:06 +00:00
Chris Lattner
6ad460b336 Simplify code by using ConstantInt::getRawValue instead of checking to see
whether the constant is signed or unsigned, then casting

llvm-svn: 7252
2003-07-23 15:22:26 +00:00
Misha Brukman
5de3e14206 The word separate' only has one e'.
llvm-svn: 7173
2003-07-14 17:20:40 +00:00
Chris Lattner
b94fc3e392 Avoid printing out huge structures or arrays if they are just filled with zeros
llvm-svn: 6938
2003-06-28 20:08:24 +00:00
Brian Gaeke
d51afb3000 lib/CWriter/Writer.cpp: Copy AsmWriter's ConstantFP checking code here
into a new function FPCSafeToPrint(), and use it in printConstant()
and printFunction() to decide whether we should output ConstantFPs as
floating-point constants or as references to stack-allocated variables.

lib/VMCore/AsmWriter.cpp: Fix an apparent typo in the code mentioned above.

llvm-svn: 6762
2003-06-17 23:55:35 +00:00
Chris Lattner
a108915211 Don't print out unique identifier for opaque types
llvm-svn: 6511
2003-06-01 03:45:51 +00:00
Chris Lattner
cb3df29c52 Print opaque types
llvm-svn: 6200
2003-05-14 17:50:47 +00:00