Commit Graph

636 Commits

Author SHA1 Message Date
Chris Lattner 8d22b4e18a update these
llvm-svn: 41565
2007-08-29 16:15:23 +00:00
David Greene 703623d571 Update InvokeInst to work like CallInst
llvm-svn: 41506
2007-08-27 19:04:21 +00:00
Chris Lattner f72a2db072 regenerate
llvm-svn: 40875
2007-08-06 21:00:46 +00:00
Chris Lattner 6a5a2620ba Fix PR1577, a crash on invalid bug.
llvm-svn: 40874
2007-08-06 21:00:37 +00:00
Chandler Carruth 450f95c857 Regenerating.
llvm-svn: 40808
2007-08-04 01:56:21 +00:00
Chandler Carruth 7132e00de7 This is the patch to provide clean intrinsic function overloading support in LLVM. It cleans up the intrinsic definitions and generally smooths the process for more complicated intrinsic writing. It will be used by the upcoming atomic intrinsics as well as vector and float intrinsics in the future.
This also changes the syntax for llvm.bswap, llvm.part.set, llvm.part.select, and llvm.ct* intrinsics. They are automatically upgraded by both the LLVM ASM reader and the bitcode reader. The test cases have been updated, with special tests added to ensure the automatic upgrading is supported.

llvm-svn: 40807
2007-08-04 01:51:18 +00:00
Dale Johannesen ff4c3be741 Long double, part 1 of N. Support in IR.
llvm-svn: 40774
2007-08-03 01:03:46 +00:00
David Greene c8e6508572 Update generated files.
llvm-svn: 40663
2007-08-01 03:59:32 +00:00
David Greene 17a5dfe6f7 New CallInst interface to address GLIBCXX_DEBUG errors caused by
indexing an empty std::vector.

Updates to all clients.

llvm-svn: 40660
2007-08-01 03:43:44 +00:00
Reid Spencer 41aa656635 Regenerate.
llvm-svn: 40634
2007-07-31 14:41:17 +00:00
Reid Spencer b6508349a7 After a discussion with Anton, it turns out that the InReg attribute is not
permitted on function results. So, revert the last patch to make it illegal.

llvm-svn: 40632
2007-07-31 14:39:10 +00:00
Reid Spencer 861245172c Regenerate.
llvm-svn: 40621
2007-07-31 06:37:43 +00:00
Reid Spencer 4f178405ad Allow the INREG parameter attribute to be added to functions. This permits the
function result to be passed in a register. This implements the GCC regparm
function attribute for llvm by translation to the InReg parameter attribute 
and fixes test/CFrontend/2002-07-30-SubregSetAssertion.c

llvm-svn: 40619
2007-07-31 06:37:27 +00:00
Reid Spencer 66eb88bf48 Regenerate (again).
llvm-svn: 40613
2007-07-31 03:55:56 +00:00
Reid Spencer 36ded45e5d Don't include newlines in the whitespace before newline (WSNL) rule.
Fix the comment for WSNL to describe its actual function.

llvm-svn: 40612
2007-07-31 03:55:43 +00:00
Reid Spencer 22910a08a0 Regenerate.
llvm-svn: 40611
2007-07-31 03:50:36 +00:00
Reid Spencer d45d07ac72 For PR1553:
Make the AsmParser auto-upgrade the old zext and sext
keywords for parameter attributes and handle the 
end-of-line ambiguity.

llvm-svn: 40610
2007-07-31 02:57:37 +00:00
Duncan Sands 644f917358 Support for trampolines, except for X86 codegen which is
still under discussion.

llvm-svn: 40549
2007-07-27 12:58:54 +00:00
Reid Spencer 314e1cb7ee For PR1553:
Change the keywords for the zext and sext parameter attributes to be 
zeroext and signext so they don't conflict with the keywords for the
instructions of the same name. This gets around the ambiguity.

llvm-svn: 40069
2007-07-19 23:13:04 +00:00
Rafael Espindola b567e3ffb0 Add the byval attribute
llvm-svn: 37940
2007-07-06 10:57:03 +00:00
Chris Lattner f997e37fbb update the .cvs files
llvm-svn: 37918
2007-07-05 17:26:49 +00:00
John Criswell 2660cef6d7 Convert .cvsignore files
llvm-svn: 37801
2007-06-29 16:35:07 +00:00
Zhou Sheng 2444a9adeb Commit first round work of PR1373. "noalias" is now fully supported in
VMCore, BitCode, and Assembly. Documentation and test case paramattrs.ll
updated also.

llvm-svn: 37432
2007-06-05 05:28:26 +00:00
Reid Spencer c5cec2a4e8 Regenerate.
llvm-svn: 37294
2007-05-22 19:08:16 +00:00
Reid Spencer 0f656c39e1 Don't allow the UnEscape code to read or write beyond the end of yytext.
Make sure we convert \\ into \.

llvm-svn: 37293
2007-05-22 19:07:45 +00:00
Reid Spencer acfe667eab Regenerate.
llvm-svn: 37292
2007-05-22 18:52:55 +00:00
Reid Spencer 3b208cca84 Implement full unescaping of escaped hex characters in all quoted identifiers
and strings.

llvm-svn: 37291
2007-05-22 18:52:21 +00:00
Chris Lattner 77119f43af update comment
llvm-svn: 37282
2007-05-22 06:56:32 +00:00
Chris Lattner 31ab0ed37f regenerate
llvm-svn: 37281
2007-05-22 06:47:55 +00:00
Chris Lattner 9111cd6b8a simplify code
llvm-svn: 37280
2007-05-22 06:47:11 +00:00
Reid Spencer 21526d6b56 Regenerate
llvm-svn: 37258
2007-05-19 07:22:10 +00:00
Reid Spencer aba0cc7173 Make the %"..." syntax legal for local name. This just makes it symmetric
with global names which can already be @"..."

llvm-svn: 37257
2007-05-19 07:21:26 +00:00
Chris Lattner 5c455c3fe9 regenerate
llvm-svn: 36740
2007-05-04 04:01:37 +00:00
Chris Lattner cf40d5097b fix a bug where llvm-as couldn't assemble the .ll file for 252.eon.
llvm-svn: 36739
2007-05-04 04:01:07 +00:00
Anton Korobeynikov 6058a35624 Regenerate
llvm-svn: 36566
2007-04-29 18:38:24 +00:00
Anton Korobeynikov 39f3cffbe3 Implement protected visibility. This partly implements PR1363. Linker
should be taught to deal with protected symbols.

llvm-svn: 36565
2007-04-29 18:35:00 +00:00
Jeff Cohen 990a58f242 Fix MemoryBuffer breakage correctly.
llvm-svn: 36561
2007-04-29 14:43:31 +00:00
Reid Spencer 25d797b7ca Regenerate.
llvm-svn: 36543
2007-04-28 16:07:31 +00:00
Reid Spencer 7851765b0a Revert the premature portion of the last commit.
llvm-svn: 36542
2007-04-28 16:06:50 +00:00
Reid Spencer b19636e4af Fix a compilation error (jump to case label).
llvm-svn: 36539
2007-04-28 14:13:42 +00:00
Anton Korobeynikov 511d54f61b Regenerate
llvm-svn: 36538
2007-04-28 13:48:45 +00:00
Anton Korobeynikov b18f8f85e9 Implement review feedback. Aliasees can be either GlobalValue's or
bitcasts of them.

llvm-svn: 36537
2007-04-28 13:45:00 +00:00
Chris Lattner 720367c5f0 regen
llvm-svn: 36470
2007-04-26 05:31:05 +00:00
Chris Lattner eee35bfc8a wrap long lines
Fix PR1358 and test/Assembler/2007-04-25-AssemblerFoldExternWeak.ll, by
creating forward decl globals with linkage extern_weak to defeat implicit
constant folding.

llvm-svn: 36469
2007-04-26 05:30:35 +00:00
Bill Wendling 0be6fc5fd7 Quiet a compiler warning about assignment in an if-then conditional.
llvm-svn: 36454
2007-04-25 23:52:02 +00:00
Anton Korobeynikov 5e4e8f5e09 Add missed semicolon. Resotre compatibility with older bisons
llvm-svn: 36443
2007-04-25 18:07:40 +00:00
Anton Korobeynikov e9fcbefa9a Regenerate
llvm-svn: 36437
2007-04-25 14:29:12 +00:00
Anton Korobeynikov a97b694c82 Implement aliases. This fixes PR1017 and it's dependent bugs. CFE part
will follow.

llvm-svn: 36435
2007-04-25 14:27:10 +00:00
Christopher Lamb 3f706f22ab Regenerated
llvm-svn: 36350
2007-04-22 20:09:11 +00:00
Christopher Lamb 8448570beb PR400 work phase 1. Add attributed load/store instructions for volatile/align to LLVM.
llvm-svn: 36349
2007-04-22 19:24:39 +00:00
Reid Spencer 4388f0b4fa For PR1146:
Make ParamAttrsList objects unique. You can no longer directly create or
destroy them but instead must go through the ParamAttrsList::get()
interface.

llvm-svn: 36327
2007-04-22 05:46:44 +00:00
Reid Spencer 0c1349e6bc Revert Christopher Lamb's load/store alignment changes.
llvm-svn: 36309
2007-04-21 18:36:27 +00:00
Christopher Lamb bff50208c8 add support for alignment attributes on load/store instructions
llvm-svn: 36301
2007-04-21 08:16:25 +00:00
Reid Spencer 0ff60618d5 Regenerate
llvm-svn: 36179
2007-04-16 22:02:23 +00:00
Reid Spencer 9c9741e864 Okay, yes there *is* a getKeyLength method on ValueName. And, it should be
used because we *do* want to allow nulls in names.

llvm-svn: 36178
2007-04-16 22:01:57 +00:00
Reid Spencer 660fa7b6b7 Regenerate.
llvm-svn: 36156
2007-04-16 20:35:38 +00:00
Reid Spencer 4339f7d78f Check length of string before we walk off the end of it.
Thanks, Chris.

llvm-svn: 36155
2007-04-16 20:31:06 +00:00
Reid Spencer f8a586d22a Regenerate.
llvm-svn: 36144
2007-04-16 17:47:06 +00:00
Reid Spencer 0fc73b6aee Use a more optimal way to get the name of a function. Thanks, Chris.
llvm-svn: 36143
2007-04-16 17:45:50 +00:00
Reid Spencer e6a50a1e27 Regenerate.
llvm-svn: 36122
2007-04-16 06:56:07 +00:00
Reid Spencer 94bae69764 For PR1328:
Use the new parameter on Function::getIntrinsicID to identify cases where
a function is being called with an "llvm." name but it isn't actually an
intrinsic. In such cases generate an error.

llvm-svn: 36121
2007-04-16 06:55:42 +00:00
Lauro Ramos Venancio 749e4668e7 Implement the "thread_local" keyword.
llvm-svn: 35950
2007-04-12 18:32:50 +00:00
Reid Spencer a472f66dd0 For PR1146:
Put the parameter attributes in their own ParamAttr name space. Adjust the
rest of llvm as a result.

llvm-svn: 35877
2007-04-11 02:44:20 +00:00
Reid Spencer 71b79e3d99 For PR1146:
Adapt handling of parameter attributes to use the new ParamAttrsList class.

llvm-svn: 35814
2007-04-09 06:17:21 +00:00
Reid Spencer f51a7050dd Regenerate
llvm-svn: 35813
2007-04-09 06:16:21 +00:00
Reid Spencer 7ae03fc5fb Regenerate
llvm-svn: 35795
2007-04-09 01:56:05 +00:00
Reid Spencer bef90fe7a7 Drop the implementation keyword.
llvm-svn: 35794
2007-04-09 01:55:42 +00:00
Reid Spencer ef01c47512 For PR1289: Regenerate
llvm-svn: 35500
2007-03-30 01:37:39 +00:00
Reid Spencer cf2ccbff1a For PR1289:
Check at the end of the parse that there are no unresolved types and no
undefined values. Issue errors if there are. This gets rid of the need
for implementation or checkpoint by ensuring you can't finish a parse with
undefined things.

llvm-svn: 35499
2007-03-30 01:37:13 +00:00
Reid Spencer 0833b81248 Regenerate.
llvm-svn: 35473
2007-03-29 18:50:01 +00:00
Reid Spencer 01a599a202 Give users a grace period on the implementation keyword. This *will* get
removed in a few days.

llvm-svn: 35472
2007-03-29 18:49:28 +00:00
Reid Spencer b7e45e705a Regenerate.
llvm-svn: 35411
2007-03-28 02:37:40 +00:00
Reid Spencer 2e35a58838 Replace the "implementation" keyword with "checkpoint". This more accurately
describes its function as check against unresolved types and definitions.
This is handy for forcing error messages in assembly test cases or otherwise
ensuring that everything is resolved at that point in the assembly.

llvm-svn: 35410
2007-03-28 02:36:42 +00:00
Reid Spencer 32096786f1 Regenerate.
llvm-svn: 35259
2007-03-22 02:14:08 +00:00
Reid Spencer a483577d21 Add support for the noreturn and nounwind function attributes.
llvm-svn: 35258
2007-03-22 02:13:23 +00:00
Reid Spencer 8d364d0e17 Regenerate.
llvm-svn: 35215
2007-03-20 17:19:31 +00:00
Reid Spencer 0ad5cebb09 Don't delete things before their last use (avoids bad reads).
llvm-svn: 35214
2007-03-20 17:18:33 +00:00
Reid Spencer 6fb989c5cd Regenerate.
llvm-svn: 35199
2007-03-20 01:13:36 +00:00
Reid Spencer d05bc52fec Plug some PATypeHolder memory leaks.
llvm-svn: 35198
2007-03-20 01:13:00 +00:00
Reid Spencer a7bed60ab3 Regenerate.
llvm-svn: 35183
2007-03-19 20:40:51 +00:00
Reid Spencer 363fd46199 Fix test/Assembler/2007-03-19-NegValue.ll by using the new "isSigned"
parameter on ConstantInt::get to indicate the signedness of the intended
value.

llvm-svn: 35182
2007-03-19 20:40:22 +00:00
Reid Spencer d0e8d382db Regenerate.
llvm-svn: 35174
2007-03-19 18:40:50 +00:00
Reid Spencer fe65ae88fe For PR1248:
Eliminate support for type planes in numbered values. This simplifies the
data structures involved in managing forward definitions, etc. Instead of
requiring maps from type to value, we can now just use a vector of values.
These changes also required rewrites of some support functions such as
InsertValue, getBBVal, and ResolveDefinitions. Some other cosmetic changes
were made as well.

llvm-svn: 35173
2007-03-19 18:39:36 +00:00
Reid Spencer 49bd921f08 Add and Operator== method to ValID so equality can be done properly for
named or numbered ValIDs.

llvm-svn: 35172
2007-03-19 18:34:28 +00:00
Reid Spencer ad3618a33d Regenerate.
llvm-svn: 35050
2007-03-09 21:19:09 +00:00
Reid Spencer 3fcf0c24a9 For PR1245:
Account for the sign bit when computing the number of bits required for
a negative integer literal constant.

llvm-svn: 35046
2007-03-09 19:26:52 +00:00
Reid Spencer 8ad254df8c Regenerate.
llvm-svn: 34797
2007-03-01 19:41:47 +00:00
Reid Spencer 666ea0d046 Use a simpler constructor when constructing ConstantInt. Also, replace
verbose code to sext/trunc or zext/trunc and APInt with new methods on
that class.

llvm-svn: 34794
2007-03-01 19:32:01 +00:00
Reid Spencer c7a686b62d Regenerate.
llvm-svn: 34716
2007-02-28 02:24:54 +00:00
Reid Spencer 7957de7949 Implement arbitrary integer constants through the use of APInt values.
Positive, negative, and hexadecimal integer constants will now return an
APInt for values having > 64 bits of precision.

llvm-svn: 34715
2007-02-28 02:24:27 +00:00
Reid Spencer 9875fc1500 Implement support for aribrary precision integers by creating two new
tokens: ESAPINTVAL and EUAPINTVAL and adding an APInt* as a semantic value.
This allows us to extend the definition of an integer constant to allow
arbitrary precision integer constant values.

llvm-svn: 34714
2007-02-28 02:23:44 +00:00
Chris Lattner 4669b0bf54 remove dead methods
llvm-svn: 34419
2007-02-19 07:44:24 +00:00
Reid Spencer 09575bac2e For PR1195:
Change use of "packed" term to "vector" in comments, strings, variable
names, etc.

llvm-svn: 34300
2007-02-15 03:39:18 +00:00
Reid Spencer d84d35ba70 For PR1195:
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.

llvm-svn: 34293
2007-02-15 02:26:10 +00:00
Chris Lattner d80282427f eliminate use of vector ctors
llvm-svn: 34221
2007-02-13 05:53:56 +00:00
Chris Lattner f79508fb59 regenerate
llvm-svn: 34212
2007-02-13 00:58:01 +00:00
Chris Lattner 04a2d765a1 eliminate use of methods that take vectors as args
llvm-svn: 34211
2007-02-13 00:57:40 +00:00
Chris Lattner ac26f3853a regenerate
llvm-svn: 34188
2007-02-11 21:40:10 +00:00
Chris Lattner 988278c3c3 add #include
llvm-svn: 34187
2007-02-11 21:39:35 +00:00
Reid Spencer 3aaaa0b2bd For PR411:
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
2007-02-05 20:47:22 +00:00
Reid Spencer ac6bfc5221 Regenerate.
llvm-svn: 33912
2007-02-05 17:04:00 +00:00
Reid Spencer 9894d6cba5 ! removal was a little over zealous. Put the ! back in asserts.
llvm-svn: 33911
2007-02-05 17:01:20 +00:00
Reid Spencer a7bb3e9673 Regenerate.
llvm-svn: 33909
2007-02-05 10:18:06 +00:00
Reid Spencer de1d05f0f1 There is nothing exclamatory about an error message. No other compiler
or assembler uses ! at the end of every message. We shouldn't either.

llvm-svn: 33907
2007-02-05 10:16:10 +00:00
Reid Spencer 2341c22ec7 Changes to support making the shift instructions be true BinaryOperators.
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
2007-02-02 02:16:23 +00:00
Chris Lattner 55ce85c6f9 regenerate
llvm-svn: 33696
2007-01-31 04:44:08 +00:00
Chris Lattner 10aad380f9 eliminate a temporary vector
llvm-svn: 33695
2007-01-31 04:43:46 +00:00
Reid Spencer 5301e7c605 For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoid
confusion with external linkage types.

llvm-svn: 33663
2007-01-30 20:08:39 +00:00
Anton Korobeynikov 75e8a144d4 Regenerate
llvm-svn: 33599
2007-01-28 13:37:39 +00:00
Anton Korobeynikov 037c867b54 Propagate changes from my local tree. This patch includes:
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
2007-01-28 13:31:35 +00:00
Reid Spencer 8d6d4b8e36 Regenerate for PR645 and PR761
llvm-svn: 33525
2007-01-26 08:05:27 +00:00
Reid Spencer 791b8ef1b6 For PR645:
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
2007-01-26 08:04:51 +00:00
Jeff Cohen 5d956e4234 Fix this error:
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
2007-01-21 19:19:31 +00:00
Reid Spencer ceb8459f1d Regenerate.
llvm-svn: 33284
2007-01-17 02:48:45 +00:00
Reid Spencer 082a77f1c9 For PR1117:
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
2007-01-17 02:47:33 +00:00
Chris Lattner 03c4953cdd rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.
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
2007-01-15 02:27:26 +00:00
Chris Lattner c1be5ac420 regenerate
llvm-svn: 33224
2007-01-15 02:12:07 +00:00
Chris Lattner b02536cadf allow i1 to operators like shift and add.
llvm-svn: 33221
2007-01-15 02:00:29 +00:00
Reid Spencer 58a8db0a3f Regenerate.
llvm-svn: 33182
2007-01-13 05:00:46 +00:00
Reid Spencer 502d64e654 Bye bye bool. AsmWriter doesn't generate it any more so AsmParser shouldn't
read it any more. This is consistent with the new IR as well.

llvm-svn: 33181
2007-01-13 05:00:20 +00:00
Anton Korobeynikov 8ea9d3a687 Regenerate
llvm-svn: 33137
2007-01-12 19:22:51 +00:00
Anton Korobeynikov a0554d90e8 * PIC codegen for X86/Linux has been implemented
* 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
2007-01-12 19:20:47 +00:00
Chris Lattner 67598a8ccc regenerate
llvm-svn: 33131
2007-01-12 18:33:30 +00:00
Chris Lattner f2a4af8da3 This production is dead, the lexer can never return 'NOT'
llvm-svn: 33130
2007-01-12 18:32:39 +00:00
Reid Spencer b20ef92e42 Regenerate.
llvm-svn: 33117
2007-01-12 07:28:27 +00:00
Reid Spencer 0879a87a0d Integer type names need 1 or more digits, not zero or more.
llvm-svn: 33116
2007-01-12 07:27:59 +00:00
Reid Spencer 7a9c62baa6 For PR1064:
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
2007-01-12 07:05:14 +00:00
Reid Spencer 542964f55b Rename BoolTy as Int1Ty. Patch by Sheng Zhou.
llvm-svn: 33076
2007-01-11 18:21:29 +00:00
Zhou Sheng 75b871fb1e For PR1043:
Merge ConstantIntegral and ConstantBool into ConstantInt.
Remove ConstantIntegral and ConstantBool from LLVM.

llvm-svn: 33073
2007-01-11 12:24:14 +00:00
Andrew Lenharth e3c5a4cfed Make packed structs use packed initialiers for consistency
llvm-svn: 33015
2007-01-08 18:16:47 +00:00
Reid Spencer 32af9e8cc5 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 3325908643 Regenerate.
llvm-svn: 32934
2007-01-05 21:51:07 +00:00
Reid Spencer 6c435f0fa0 For PR1077:
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
2007-01-05 21:50:38 +00:00
Reid Spencer bf48e3c87d Regenerate.
llvm-svn: 32905
2007-01-05 17:07:23 +00:00
Reid Spencer 136a91c4e7 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 494289f70e Regenerate.
llvm-svn: 32862
2007-01-04 02:57:52 +00:00
Reid Spencer 8a1be97a9e Disallow packed types in icmp/fcmp instructions. The code generator is
not prepared to handle them yet.

llvm-svn: 32861
2007-01-04 02:57:22 +00:00
Reid Spencer ca3d1cb840 Regenerate.
llvm-svn: 32853
2007-01-04 00:06:14 +00:00
Reid Spencer 4eda71eec1 Permit icmp and fcmp to have packed operands.
Make an error message a little more useful.

llvm-svn: 32852
2007-01-04 00:05:48 +00:00
Reid Spencer 87622ae03d Regenerate.
llvm-svn: 32825
2007-01-02 21:54:12 +00:00
Reid Spencer 6130ae0000 Implement checking for unresolved types in the argument types and result
type of function definitions.
This fixes test/Regression/Assember/2007-01-02-Undefined-Arg-Type.ll

llvm-svn: 32824
2007-01-02 21:53:43 +00:00
Reid Spencer d0da3e200a Regenerate.
llvm-svn: 32800
2006-12-31 21:47:02 +00:00
Reid Spencer d6979030c1 Remove an extra semi-colon.
llvm-svn: 32799
2006-12-31 21:46:36 +00:00
Reid Spencer 6829c25a3c Add a missing colon. Noticed by Jeff Cohen.
llvm-svn: 32796
2006-12-31 21:25:25 +00:00
Reid Spencer 42f0cbe769 For PR950:
Regenerate

llvm-svn: 32782
2006-12-31 05:40:51 +00:00
Reid Spencer fa35bb3e20 For PR950:
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
2006-12-31 05:40:12 +00:00
Reid Spencer dc0a3a2fd2 Regenerate.
llvm-svn: 32772
2006-12-29 20:35:03 +00:00
Reid Spencer 7ce2d2a8fe 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 266e42b312 For PR950:
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
2006-12-23 06:05:41 +00:00
Reid Spencer 3f46fbaa00 Allow negative constants for unsigned integers and unsigned constants
greater than MAX_INT64 for signed integers. This is now valid and is just
waiting for the distinction between signed and unsigned to go away.

llvm-svn: 32716
2006-12-20 17:20:09 +00:00