summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/AsmWriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* make this more efficient in release builds (time and space)Chris Lattner2007-01-151-6/+2
| | | | llvm-svn: 33239
* rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.Chris Lattner2007-01-151-3/+3
| | | | | | | | | rename Type::getIntegralTypeMask to Type::getIntegerTypeMask. This makes naming much more consistent. For example, there are now no longer any instances of IntegerType that are not considered isInteger! :) llvm-svn: 33225
* * PIC codegen for X86/Linux has been implementedAnton Korobeynikov2007-01-121-3/+17
| | | | | | | | * PIC-aware internal structures in X86 Codegen have been refactored * Visibility (default/weak) has been added * Docs fixes (external weak linkage, visibility, formatting) llvm-svn: 33136
* Always write 1 bit integers as i1 not "bool".Reid Spencer2007-01-121-5/+1
| | | | llvm-svn: 33115
* For PR1064:Reid Spencer2007-01-121-3/+15
| | | | | | | | | | | | | | | | | | | | | | | Implement the arbitrary bit-width integer feature. The feature allows integers of any bitwidth (up to 64) to be defined instead of just 1, 8, 16, 32, and 64 bit integers. This change does several things: 1. Introduces a new Derived Type, IntegerType, to represent the number of bits in an integer. The Type classes SubclassData field is used to store the number of bits. This allows 2^23 bits in an integer type. 2. Removes the five integer Type::TypeID values for the 1, 8, 16, 32 and 64-bit integers. These are replaced with just IntegerType which is not a primitive any more. 3. Adjust the rest of LLVM to account for this change. Note that while this incremental change lays the foundation for arbitrary bit-width integers, LLVM has not yet been converted to actually deal with them in any significant way. Most optimization passes, for example, will still only deal with the byte-width integer types. Future increments will rectify this situation. llvm-svn: 33113
* Implement review feedback for the ConstantBool->ConstantInt merge. ChrisReid Spencer2007-01-121-2/+3
| | | | | | | | recommended that getBoolValue be replaced with getZExtValue and that get(bool) be replaced by get(const Type*, uint64_t). This implements those changes. llvm-svn: 33110
* Rename BoolTy as Int1Ty. Patch by Sheng Zhou.Reid Spencer2007-01-111-1/+1
| | | | llvm-svn: 33076
* For PR1043:Zhou Sheng2007-01-111-4/+4
| | | | | | | Merge ConstantIntegral and ConstantBool into ConstantInt. Remove ConstantIntegral and ConstantBool from LLVM. llvm-svn: 33073
* Shut up a warning about signed/unsigned.Reid Spencer2007-01-111-1/+1
| | | | llvm-svn: 33071
* simplify some logic furtherChris Lattner2007-01-111-11/+2
| | | | llvm-svn: 33069
* Recommit my previous patch with a bugfix: printInfoComment works on bothChris Lattner2007-01-111-63/+67
| | | | | | local and global values. llvm-svn: 33068
* Back out the last patch which is a nightly test killer. The assertionReid Spencer2007-01-101-63/+63
| | | | | | | | in getLocalSlot fires on many, many values. It broke nearly all of the dejagnu tests. Simple changes to the assertion did not fix the problem. llvm-svn: 33054
* Last refactoring before PR645: split up getSlot into getLocalSlot and ↵Chris Lattner2007-01-101-63/+63
| | | | | | | | getGlobalSlot. No functionality change. llvm-svn: 33053
* eliminate some iterator gymnastics.Chris Lattner2007-01-101-8/+4
| | | | llvm-svn: 33052
* Inline insertValue into CreateModuleSlot/CreateFunctionSlotChris Lattner2007-01-091-35/+24
| | | | llvm-svn: 33038
* Remove a bunch of complex logic that is completely dead: duplicates canChris Lattner2007-01-091-57/+1
| | | | | | never be inserted! llvm-svn: 33037
* Split CreateSlot into two versions, one for globals and one for function-localChris Lattner2007-01-091-61/+68
| | | | | | values llvm-svn: 33036
* Remove extraneous return value from insertValue and getOrCreateSlot. SinceChris Lattner2007-01-091-53/+34
| | | | | | getOrCreateSlot no longer gets the slot, rename it to CreateSlot. llvm-svn: 33035
* And asm writing for packed struct initializersAndrew Lenharth2007-01-081-0/+4
| | | | llvm-svn: 33016
* For PR411:Reid Spencer2007-01-061-12/+16
| | | | | | | | | 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
* Change the syntax for parameter attributes:Reid Spencer2007-01-051-14/+14
| | | | | | | | | | | | | | | | | | | 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
* Fix a cut-and-paste bug for processing of InvokeInst parameter attributes.Reid Spencer2006-12-311-2/+2
| | | | | | | The lookup of parameter attributes was offset by two because of the additional operands in an invoke instruction. llvm-svn: 32801
* For PR950:Reid Spencer2006-12-311-16/+49
| | | | | | | * Change integer type name from signed to signless * Implement printing of FunctionType parameter attributes. llvm-svn: 32778
* For PR950:Reid Spencer2006-12-291-1/+3
| | | | | | | | | | | | | | | | | | | | | | | 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
* Now that ConstantInt::isValueValidForType can handle signed and unsignedReid Spencer2006-12-191-4/+1
| | | | | | | | 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
* Packed StructuresAndrew Lenharth2006-12-081-0/+8
| | | | llvm-svn: 32361
* Removing even more <iostream> includes.Bill Wendling2006-12-071-3/+2
| | | | llvm-svn: 32320
* Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, areBill Wendling2006-12-071-5/+5
| | | | | | now cerr, cout, and NullStream resp. llvm-svn: 32298
* Remove the dead CachedWriter class.Chris Lattner2006-12-061-57/+11
| | | | llvm-svn: 32271
* printName is almost always true. In the cases that mattered where it was false,Chris Lattner2006-12-061-35/+25
| | | | | | | | | | | it was effectively set to true by this: - if ((PrintName || isa<GlobalValue>(V)) && V->hasName()) + if (V->hasName()) Delete printname entirely. llvm-svn: 32265
* The hasSlot methods are gone.Chris Lattner2006-12-061-25/+20
| | | | | | | Remove the 'PrintName' argument to WriteAsOperand, as it is always true. Only call getOrCreateSlot on things that are valid. llvm-svn: 32263
* remove unused api, simplify some codeChris Lattner2006-12-061-20/+2
| | | | llvm-svn: 32260
* remove more code that was only used by the bc writerChris Lattner2006-12-061-90/+2
| | | | llvm-svn: 32259
* remove dead code left over from when this functionality was shared with theChris Lattner2006-12-061-68/+5
| | | | | | bcwriter. llvm-svn: 32258
* rename createSlot -> getOrCreateSlot.Chris Lattner2006-12-061-21/+19
| | | | llvm-svn: 32256
* clean up some sloppy and inconsistent spacingChris Lattner2006-12-061-46/+46
| | | | llvm-svn: 32255
* wrap long linesChris Lattner2006-12-061-4/+6
| | | | llvm-svn: 32254
* For PR950: Implement ICmp/FCmp predicate printing for constant expressionsReid Spencer2006-12-041-35/+39
| | | | llvm-svn: 32168
* Shorten the FCmp predicate mnemonics.Reid Spencer2006-12-031-12/+12
| | | | llvm-svn: 32150
* Allow the ICmp and FCmp instructions to be written by the AsmWriterReid Spencer2006-12-031-0/+39
| | | | llvm-svn: 32148
* Changed to using LLVM streams.Bill Wendling2006-11-281-6/+7
| | | | llvm-svn: 31955
* For PR950:Reid Spencer2006-11-271-1/+2
| | | | | | | | | | 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
* For PR786:Reid Spencer2006-11-021-1/+1
| | | | | | | | | | 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
* Make the Value and Type methods print a newline so it prints nicely in gdbReid Spencer2006-10-271-2/+2
| | | | llvm-svn: 31221
* Change keyword to datalayoutChris Lattner2006-10-221-1/+1
| | | | llvm-svn: 31107
* For PR950:Reid Spencer2006-10-201-4/+5
| | | | | | | | 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
* Add support for the new "target data" information in .ll files. This providesOwen Anderson2006-10-181-0/+3
| | | | | | | a better encoding of the targets data layout, rather than trying to guess it from the endianness and pointersize like before. llvm-svn: 31030
* simplify codeChris Lattner2006-09-281-1/+1
| | | | llvm-svn: 30655
* Adding codegeneration for StdCall & FastCall calling conventionsAnton Korobeynikov2006-09-201-3/+9
| | | | llvm-svn: 30549
* Adding dllimport, dllexport and external weak linkage types.Anton Korobeynikov2006-09-141-11/+25
| | | | | | | | | 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
OpenPOWER on IntegriCloud