summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser
Commit message (Collapse)AuthorAgeFilesLines
...
* For PR411:Reid Spencer2007-02-055-552/+608
| | | | | | | | | | This patch replaces the SymbolTable class with ValueSymbolTable which does not support types planes. This means that all symbol names in LLVM must now be unique. The patch addresses the necessary changes to deal with this and removes code no longer needed as a result. This completes the bulk of the changes for this PR. Some cleanup patches will follow. llvm-svn: 33918
* Regenerate.Reid Spencer2007-02-052-18/+18
| | | | llvm-svn: 33912
* ! removal was a little over zealous. Put the ! back in asserts.Reid Spencer2007-02-051-9/+9
| | | | llvm-svn: 33911
* Regenerate.Reid Spencer2007-02-052-204/+204
| | | | llvm-svn: 33909
* There is nothing exclamatory about an error message. No other compilerReid Spencer2007-02-051-102/+102
| | | | | | or assembler uses ! at the end of every message. We shouldn't either. llvm-svn: 33907
* Changes to support making the shift instructions be true BinaryOperators.Reid Spencer2007-02-027-4444/+5296
| | | | | | | | | | | | This feature is needed in order to support shifts of more than 255 bits on large integer types. This changes the syntax for llvm assembly to make shl, ashr and lshr instructions look like a binary operator: shl i32 %X, 1 instead of shl i32 %X, i8 1 Additionally, this should help a few passes perform additional optimizations. llvm-svn: 33776
* regenerateChris Lattner2007-01-313-4305/+3217
| | | | llvm-svn: 33696
* eliminate a temporary vectorChris Lattner2007-01-311-2/+3
| | | | llvm-svn: 33695
* For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoidReid Spencer2007-01-304-1193/+1019
| | | | | | confusion with external linkage types. llvm-svn: 33663
* RegenerateAnton Korobeynikov2007-01-283-3599/+3980
| | | | llvm-svn: 33599
* Propagate changes from my local tree. This patch includes:Anton Korobeynikov2007-01-284-14/+16
| | | | | | | | | | | | | | | | | | | | | | 1. New parameter attribute called 'inreg'. It has meaning "place this parameter in registers, if possible". This is some generalization of gcc's regparm(n) attribute. It's currently used only in X86-32 backend. 2. Completely rewritten CC handling/lowering code inside X86 backend. Merged stdcall + c CCs and fastcall + fast CC. 3. Dropped CSRET CC. We cannot add struct return variant for each target-specific CC (e.g. stdcall + csretcc and so on). 4. Instead of CSRET CC introduced 'sret' parameter attribute. Setting in on first attribute has meaning 'This is hidden pointer to structure return. Handle it gently'. 5. Fixed small bug in llvm-extract + add new feature to FunctionExtraction pass, which relinks all internal-linkaged callees from deleted function to external linkage. This will allow further linking everything together. NOTEs: 1. Documentation will be updated soon. 2. llvm-upgrade should be improved to translate csret => sret. Before this, there will be some unexpected test fails. llvm-svn: 33597
* Regenerate for PR645 and PR761Reid Spencer2007-01-265-3581/+3787
| | | | llvm-svn: 33525
* For PR645:Reid Spencer2007-01-263-157/+173
| | | | | | | | | | | | | | Implement separation of local and global symbols. Local symbols and types now use % prefix. Global variables and functions now use @ prefix. For PR761: Replace: target endian = target pointersize = With: target datalayout = llvm-svn: 33524
* Fix this error:Jeff Cohen2007-01-214-1580/+1357
| | | | | | | | llvm[2]: Compiling llvmAsmParser.cpp for Debug build /usr/home/jeffc/llvm/lib/AsmParser/llvmAsmParser.y: In function 'int llvmAsmparse()': /usr/home/jeffc/llvm/lib/AsmParser/llvmAsmParser.y:1846: error: expected `;' before '}' token llvm-svn: 33425
* Regenerate.Reid Spencer2007-01-173-3228/+4298
| | | | llvm-svn: 33284
* For PR1117:Reid Spencer2007-01-171-15/+12
| | | | | | | | | Make the assembler generate a nice error message if a bad cast instruction is attempted instead of asserting out. This is made possible by the recently exposed method CastInst::castIsValid() which checks the validity of any cast instruction. llvm-svn: 33283
* rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.Chris Lattner2007-01-153-24/+24
| | | | | | | | | 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
* regenerateChris Lattner2007-01-153-4283/+3207
| | | | llvm-svn: 33224
* allow i1 to operators like shift and add.Chris Lattner2007-01-151-4/+4
| | | | llvm-svn: 33221
* Regenerate.Reid Spencer2007-01-135-4079/+3723
| | | | llvm-svn: 33182
* Bye bye bool. AsmWriter doesn't generate it any more so AsmParser shouldn'tReid Spencer2007-01-132-6/+8
| | | | | | read it any more. This is consistent with the new IR as well. llvm-svn: 33181
* RegenerateAnton Korobeynikov2007-01-123-4656/+6108
| | | | llvm-svn: 33137
* * PIC codegen for X86/Linux has been implementedAnton Korobeynikov2007-01-124-32/+74
| | | | | | | | * 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
* regenerateChris Lattner2007-01-123-4326/+3197
| | | | llvm-svn: 33131
* This production is dead, the lexer can never return 'NOT'Chris Lattner2007-01-121-14/+1
| | | | llvm-svn: 33130
* Regenerate.Reid Spencer2007-01-122-79/+79
| | | | llvm-svn: 33117
* Integer type names need 1 or more digits, not zero or more.Reid Spencer2007-01-121-1/+1
| | | | llvm-svn: 33116
* For PR1064:Reid Spencer2007-01-127-2456/+2418
| | | | | | | | | | | | | | | | | | | | | | | 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
* Rename BoolTy as Int1Ty. Patch by Sheng Zhou.Reid Spencer2007-01-117-395/+395
| | | | llvm-svn: 33076
* For PR1043:Zhou Sheng2007-01-115-921/+1077
| | | | | | | Merge ConstantIntegral and ConstantBool into ConstantInt. Remove ConstantIntegral and ConstantBool from LLVM. llvm-svn: 33073
* Make packed structs use packed initialiers for consistencyAndrew Lenharth2007-01-081-0/+52
| | | | llvm-svn: 33015
* For PR411:Reid Spencer2007-01-063-12/+12
| | | | | | | | | 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
* Regenerate.Reid Spencer2007-01-053-319/+281
| | | | llvm-svn: 32934
* For PR1077:Reid Spencer2007-01-051-26/+7
| | | | | | | | Disallow merging of dupliate global variables. It is now illegal to declare or define two global variables of the same name and same type. llvm-gcc3 is dead in 2.0 and llvm-gcc4 doesn't have that problem nor need the hack. llvm-svn: 32933
* Regenerate.Reid Spencer2007-01-053-1170/+1159
| | | | llvm-svn: 32905
* Change the syntax for parameter attributes:Reid Spencer2007-01-051-45/+52
| | | | | | | | | | | | | | | | | | | 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
* Regenerate.Reid Spencer2007-01-042-27/+35
| | | | llvm-svn: 32862
* Disallow packed types in icmp/fcmp instructions. The code generator isReid Spencer2007-01-041-0/+4
| | | | | | not prepared to handle them yet. llvm-svn: 32861
* Regenerate.Reid Spencer2007-01-042-155/+149
| | | | llvm-svn: 32853
* Permit icmp and fcmp to have packed operands.Reid Spencer2007-01-041-5/+2
| | | | | | Make an error message a little more useful. llvm-svn: 32852
* Regenerate.Reid Spencer2007-01-023-267/+385
| | | | llvm-svn: 32825
* Implement checking for unresolved types in the argument types and resultReid Spencer2007-01-021-0/+59
| | | | | | | type of function definitions. This fixes test/Regression/Assember/2007-01-02-Undefined-Arg-Type.ll llvm-svn: 32824
* Regenerate.Reid Spencer2006-12-312-32/+33
| | | | llvm-svn: 32800
* Remove an extra semi-colon.Reid Spencer2006-12-311-1/+1
| | | | llvm-svn: 32799
* Add a missing colon. Noticed by Jeff Cohen.Reid Spencer2006-12-311-0/+1
| | | | llvm-svn: 32796
* For PR950:Reid Spencer2006-12-316-2863/+3193
| | | | | | Regenerate llvm-svn: 32782
* For PR950:Reid Spencer2006-12-312-253/+413
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Major reorganization. This patch introduces the signedness changes for the new integer types (i8, i16, i32, i64) which replace the old signed versions (ubyte, sbyte, ushort, short, etc). This patch also implements the function type parameter attributes feature. Together these conspired to introduce new reduce/reduce errors into the grammar. Consequently, it was necessary to introduce a new keyword into the grammar in order to disambiguate. Without this, yacc would make incorrect shift/reduce and reduce/reduce decisions and fail to parse the intended assembly. Changes in assembly: 1. The "implementation" keyword is superfluous but still supported. You can use it as a sentry which will ensure there are no remaining up reference types. However, this is optional as those checks are also performed elsewhere. 2. Parameter attributes are now implemented using an at sign to indicate the attribute. The attributes are placed after the type in a function declaration or after the argument value in a function call. For example: i8 @sext %myfunc(i16 @zext) call i8 @sext %myfunc(i16 @zext %someVal) The facility is available for supporting additional attributes and they can be combined using the @(attr1,attr2,attr3) syntax. Right now the only two supported are @sext and @zext 3. Functions must now be defined with the "define" keyword which is analagous to the "declare" keyword for function declarations. The introduction of this keyword disambiguates situations where a named result type is confused with a new type or gvar definition. For example: %MyType = type i16 %MyType %func(%MyType) { ... } With the introduction of optional parameter attributes between the function name and the function result type, yacc will pick the wrong rule to reduce unless it is disambiguated with "define" before the function definition, as in: define %MyType @zext %func(%MyType %someArg) { ... } llvm-svn: 32781
* Regenerate.Reid Spencer2006-12-295-2370/+2394
| | | | llvm-svn: 32772
* For PR950:Reid Spencer2006-12-292-76/+79
| | | | | | | | | | | | | | | | | | | | | | | 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
* For PR950:Reid Spencer2006-12-237-2813/+2807
| | | | | | | | This patch removes the SetCC instructions and replaces them with the ICmp and FCmp instructions. The SetCondInst instruction has been removed and been replaced with ICmpInst and FCmpInst. llvm-svn: 32751
OpenPOWER on IntegriCloud