Commit Graph

669 Commits

Author SHA1 Message Date
Reid Spencer
0d60b5a543 For PR1289: Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35500 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-30 01:37:39 +00:00
Reid Spencer
cd5bd90a7b 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35499 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-30 01:37:13 +00:00
Reid Spencer
3025dfd5b5 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35473 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 18:50:01 +00:00
Reid Spencer
a5005c077b Give users a grace period on the implementation keyword. This *will* get
removed in a few days.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35472 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 18:49:28 +00:00
Reid Spencer
83145c3f19 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35411 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-28 02:37:40 +00:00
Reid Spencer
66a82155b4 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35410 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-28 02:36:42 +00:00
Reid Spencer
67d8ed9e60 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35259 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-22 02:14:08 +00:00
Reid Spencer
a39dfd39e4 Add support for the noreturn and nounwind function attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35258 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-22 02:13:23 +00:00
Reid Spencer
9eba7a2cb5 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35215 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-20 17:19:31 +00:00
Reid Spencer
810cce8434 Don't delete things before their last use (avoids bad reads).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35214 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-20 17:18:33 +00:00
Reid Spencer
66728ef3d2 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35199 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-20 01:13:36 +00:00
Reid Spencer
2c9df214c7 Plug some PATypeHolder memory leaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35198 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-20 01:13:00 +00:00
Reid Spencer
49d273e168 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35183 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-19 20:40:51 +00:00
Reid Spencer
eac65746d7 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35182 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-19 20:40:22 +00:00
Reid Spencer
93c40036c8 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35174 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-19 18:40:50 +00:00
Reid Spencer
186a43f1ad 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35173 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-19 18:39:36 +00:00
Reid Spencer
4e0422c7e6 Add and Operator== method to ValID so equality can be done properly for
named or numbered ValIDs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35172 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-19 18:34:28 +00:00
Reid Spencer
afc378201d Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35050 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-09 21:19:09 +00:00
Reid Spencer
87707b90b1 For PR1245:
Account for the sign bit when computing the number of bits required for
a negative integer literal constant.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35046 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-09 19:26:52 +00:00
Reid Spencer
10794272f1 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34797 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-01 19:41:47 +00:00
Reid Spencer
af1aacd91a 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34794 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-01 19:32:01 +00:00
Reid Spencer
38c91a9927 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34716 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 02:24:54 +00:00
Reid Spencer
c34ebfbcfd 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34715 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 02:24:27 +00:00
Reid Spencer
f231004a1c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34714 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 02:23:44 +00:00
Chris Lattner
32980699c0 remove dead methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34419 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-19 07:44:24 +00:00
Reid Spencer
ac9dcb94dd For PR1195:
Change use of "packed" term to "vector" in comments, strings, variable
names, etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34300 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 03:39:18 +00:00
Reid Spencer
9d6565a5b1 For PR1195:
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34293 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 02:26:10 +00:00
Chris Lattner
9d2fda6883 eliminate use of vector ctors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34221 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 05:53:56 +00:00
Chris Lattner
7d9801dc88 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34212 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 00:58:01 +00:00
Chris Lattner
c856c7aea6 eliminate use of methods that take vectors as args
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34211 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 00:57:40 +00:00
Chris Lattner
8adde28039 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34188 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-11 21:40:10 +00:00
Chris Lattner
c02659f675 add #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34187 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-11 21:39:35 +00:00
Reid Spencer
ef9b9a7939 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33918 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-05 20:47:22 +00:00
Reid Spencer
a9720f5051 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33912 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-05 17:04:00 +00:00
Reid Spencer
1755a9a7b1 ! removal was a little over zealous. Put the ! back in asserts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33911 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-05 17:01:20 +00:00
Reid Spencer
b5334b0db3 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33909 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-05 10:18:06 +00:00
Reid Spencer
f4fa590293 There is nothing exclamatory about an error message. No other compiler
or assembler uses ! at the end of every message. We shouldn't either.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33907 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-05 10:16:10 +00:00
Reid Spencer
832254e1c2 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33776 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-02 02:16:23 +00:00
Chris Lattner
f7469af5a2 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33696 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-31 04:44:08 +00:00
Chris Lattner
e013540654 eliminate a temporary vector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33695 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-31 04:43:46 +00:00
Reid Spencer
5cbf985dcb For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoid
confusion with external linkage types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33663 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-30 20:08:39 +00:00
Anton Korobeynikov
9adeaa2f59 Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33599 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-28 13:37:39 +00:00
Anton Korobeynikov
b10308e440 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33597 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-28 13:31:35 +00:00
Reid Spencer
41dff5e4f7 Regenerate for PR645 and PR761
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33525 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 08:05:27 +00:00
Reid Spencer
b2d1786090 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 =


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33524 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 08:04:51 +00:00
Jeff Cohen
361c3efd9a 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33425 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-21 19:19:31 +00:00
Reid Spencer
b0fcf8fe8f Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33284 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 02:48:45 +00:00
Reid Spencer
93947c3985 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33283 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 02:47:33 +00:00
Chris Lattner
42a7551725 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! :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33225 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-15 02:27:26 +00:00
Chris Lattner
b25c4ca9d8 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33224 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-15 02:12:07 +00:00
Chris Lattner
3fa0ba7b32 allow i1 to operators like shift and add.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33221 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-15 02:00:29 +00:00
Reid Spencer
6f40790252 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33182 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-13 05:00:46 +00:00
Reid Spencer
8088e9dfb4 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33181 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-13 05:00:20 +00:00
Anton Korobeynikov
178a352079 Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33137 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 19:22:51 +00:00
Anton Korobeynikov
7f70559bc4 * 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)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33136 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 19:20:47 +00:00
Chris Lattner
0fab59c7af regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33131 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 18:33:30 +00:00
Chris Lattner
89282b8fe7 This production is dead, the lexer can never return 'NOT'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33130 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 18:32:39 +00:00
Reid Spencer
4db2063eee Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33117 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 07:28:27 +00:00
Reid Spencer
c25a9b9102 Integer type names need 1 or more digits, not zero or more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33116 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 07:27:59 +00:00
Reid Spencer
a54b7cbd45 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33113 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 07:05:14 +00:00
Reid Spencer
4fe16d607d Rename BoolTy as Int1Ty. Patch by Sheng Zhou.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33076 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11 18:21:29 +00:00
Zhou Sheng
6b6b6ef167 For PR1043:
Merge ConstantIntegral and ConstantBool into ConstantInt.
Remove ConstantIntegral and ConstantBool from LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33073 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11 12:24:14 +00:00
Andrew Lenharth
1acc5a4e87 Make packed structs use packed initialiers for consistency
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33015 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-08 18:16:47 +00:00
Reid Spencer
78d033e086 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32956 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-06 07:24:44 +00:00
Reid Spencer
63c3445cfe Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32934 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 21:51:07 +00:00
Reid Spencer
90e2f63151 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32933 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 21:50:38 +00:00
Reid Spencer
218ded2fc9 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32905 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 17:07:23 +00:00
Reid Spencer
2c261789d3 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32904 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 17:06:19 +00:00
Reid Spencer
ac4a1dd7fa Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32862 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-04 02:57:52 +00:00
Reid Spencer
539b471a33 Disallow packed types in icmp/fcmp instructions. The code generator is
not prepared to handle them yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32861 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-04 02:57:22 +00:00
Reid Spencer
e68853be66 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32853 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-04 00:06:14 +00:00
Reid Spencer
b4fdfdb882 Permit icmp and fcmp to have packed operands.
Make an error message a little more useful.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32852 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-04 00:05:48 +00:00
Reid Spencer
8c8a2dc467 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32825 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-02 21:54:12 +00:00
Reid Spencer
98b3c5c2c0 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32824 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-02 21:53:43 +00:00
Reid Spencer
c6c59fd89f Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32800 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 21:47:02 +00:00
Reid Spencer
e03969f816 Remove an extra semi-colon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32799 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 21:46:36 +00:00
Reid Spencer
71305d760e Add a missing colon. Noticed by Jeff Cohen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32796 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 21:25:25 +00:00
Reid Spencer
1431061ebb For PR950:
Regenerate


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32782 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 05:40:51 +00:00
Reid Spencer
e1553cc956 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) { ... }


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32781 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 05:40:12 +00:00
Reid Spencer
6fd36abf5e Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32772 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-29 20:35:03 +00:00
Reid Spencer
b951bc0283 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32770 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-29 20:29:48 +00:00
Reid Spencer
e4d87aa2de 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32751 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-23 06:05:41 +00:00
Reid Spencer
9ffad0a43f 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32716 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-20 17:20:09 +00:00
Andrew Lenharth
6353e05f4f Hopefully these are the regenerated files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32362 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-08 18:07:09 +00:00
Andrew Lenharth
38ecbf18eb Packed Structures
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32361 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-08 18:06:16 +00:00
Bill Wendling
e81561909d Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
now cerr, cout, and NullStream resp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32298 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 01:30:32 +00:00
Reid Spencer
b25389c67d Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32246 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-05 23:50:48 +00:00
Reid Spencer
af861f1151 Remove dead var NewVarArgs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32245 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-05 23:46:41 +00:00
Reid Spencer
cd42c58548 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32242 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-05 23:29:42 +00:00
Reid Spencer
b775bbc121 Dump the old va_arg and va_next upgrade support. No need to keep track of
the current basic block any more either.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32241 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-05 23:28:06 +00:00
Reid Spencer
9eef56f532 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32233 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-05 19:16:11 +00:00
Reid Spencer
c6e956e972 Remove various old upgrade hacks that are no longer needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32232 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-05 19:15:41 +00:00
Reid Spencer
4012e833fd Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32173 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-04 05:24:24 +00:00
Reid Spencer
763ed5e4ac For PR950: For ICmp and FCmp constant expressions, put the predicate outiside the parentheses to match what llvm-upgrade generates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32171 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-04 05:20:06 +00:00
Reid Spencer
13cf7b61c5 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32156 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-03 16:20:14 +00:00
Reid Spencer
9b1630382e Remove useless #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32155 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-03 16:19:43 +00:00
Reid Spencer
6e18b7d3d9 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32152 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-03 06:59:29 +00:00
Reid Spencer
9f746f415e Shorten the FCmp and ICmp mnemonics to 3 letters. Make the parser
disambiguate them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32151 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-03 06:58:07 +00:00
Reid Spencer
a132e04b66 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32145 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-03 05:46:11 +00:00
Reid Spencer
08de34b229 Remove backwards compatibility goop. Now implemented in llvm-upgrade.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32144 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-03 05:45:44 +00:00
Reid Spencer
481169e701 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32053 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 00:33:46 +00:00
Anton Korobeynikov
78ee7b78c3 Introducing external weak linkage. Darwin codegen should be added later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32052 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 00:25:12 +00:00
Bill Wendling
3e3bcbf3a0 Removed #include <iostream> and used llvm streams
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31984 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 22:47:12 +00:00
Reid Spencer
861d9d6863 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31965 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 07:29:44 +00:00
Reid Spencer
b78b908d4a Implement signedness caching for values, value lists, constants and
constant lists. This is just an internal change to the parser in
preparation for some backwards compatibility code that is to follow.
This will allow things like "uint 4000000000" to retain the unsignedness
of the integer constant as the value moves through the parser. In the
future, all integer types will be signless but parsing "uint" and friends
will be retained for backwards compatibility.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31964 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 07:28:14 +00:00
Reid Spencer
3da59db637 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31931 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-27 01:05:10 +00:00
Reid Spencer
36699cabc5 For PR950:
Retain the signedness of the old integer types in a new TypeInfo structure
so that it can be used in the grammar to implement auto-upgrade of things
that depended on signedness of types. This doesn't implement any new
functionality in the AsmParser, its just plumbing for future changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31866 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-19 23:07:00 +00:00
Bill Wendling
b39a55a2e7 Initialize some pointers to quiet the compiler (when doing build_gcc
builds).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31694 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-12 11:10:39 +00:00
Reid Spencer
3822ff5c71 For PR950:
This patch converts the old SHR instruction into two instructions,
AShr (Arithmetic) and LShr (Logical). The Shr instructions now are not
dependent on the sign of their operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31542 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-08 06:47:33 +00:00
Chris Lattner
f49c1766e5 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31539 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-08 05:58:47 +00:00
Chris Lattner
39033699d2 Fix a bug noticed by Emil Mikulic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31538 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-08 05:58:11 +00:00
Reid Spencer
3ed469ccd7 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31380 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-02 20:25:50 +00:00
Reid Spencer
0a783f783c For PR950:
Replace the REM instruction with UREM, SREM and FREM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31369 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-02 01:53:59 +00:00
Reid Spencer
1628cec4d7 For PR950:
Make necessary changes to support DIV -> [SUF]Div. This changes llvm to
have three division instructions: signed, unsigned, floating point. The
bytecode and assembler are bacwards compatible, however.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31195 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-26 06:15:43 +00:00
John Criswell
2f6a8b15ef Removed extraneous semi-colon; this was prevening the grammar file from
bison'ing correctly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31169 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-24 19:09:48 +00:00
Reid Spencer
21be86535b Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31111 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-22 07:03:43 +00:00
Reid Spencer
fd6131b5a8 Remove unneeded CHECK_FOR_ERROR invocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31110 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-22 07:03:09 +00:00
Chris Lattner
1ae022f647 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31109 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-22 06:08:13 +00:00
Chris Lattner
10b271152a change keyword to datalayout
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31108 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-22 06:07:41 +00:00
Reid Spencer
b83eb6447b 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31063 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-20 07:07:24 +00:00
Owen Anderson
1dc6969f48 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.

Update the generated files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31031 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-18 02:21:48 +00:00
Owen Anderson
cf7ff2b4c8 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31030 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-18 02:21:12 +00:00
Chris Lattner
59c85e96de regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30971 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-15 23:27:25 +00:00
Chris Lattner
9e76ce97b8 Produce a useful error message for Regression/Verifier/2006-10-15-AddrLabel.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30970 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-15 23:26:46 +00:00
Reid Spencer
f63697de04 Fix PR886:
The result of yyparse() was not being checked. When YYERROR or YYABORT is
called it causes yyparse() to return 1 to indicate the error. The code was
silently ignoring this situation because it previously expected either an
exception or a null ParserResult to indicate an error. The patch corrects
this situation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30834 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-09 17:36:59 +00:00
Chris Lattner
47811b76ca Eliminate ConstantBool::True and ConstantBool::False. Instead, provide
ConstantBool::getTrue() and ConstantBool::getFalse().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30665 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 23:35:22 +00:00
Reid Spencer
5b7e753d95 Fix PR902:
Errors are generated with the YYERROR macro which can only be called from
a production (inside yyparse) because of the goto statement in the macro.
This lead to several situations where GEN_ERROR was not called but
GenerateError was used instead (because it doesn't use YYERROR). However,
in such situations, catching the error much later (e.g. at the end of
the production) is not sufficient because LLVM can assert on invalid data
before the end of the production is reached. The solution is to ensure that
the CHECK_FOR_ERROR macro (which invokes YYERROR if there's an error) is
used as soon as possible after a call to GenerateError has been made.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30650 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 19:28:24 +00:00
Anton Korobeynikov
bcb9770efe Added some eye-candy for Subtarget type checking
Added X86 StdCall & FastCall calling conventions. Codegen will follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30446 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-17 20:25:45 +00:00
Anton Korobeynikov
93c2b37340 Small fixes for supporting dll* linkage types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30441 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-17 13:06:18 +00:00
Anton Korobeynikov
43e3aad6af Adding generated files for the last commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30375 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 18:25:26 +00:00
Anton Korobeynikov
b74ed07bfd 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30374 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 18:23:27 +00:00
Chris Lattner
224f84f20b regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29771 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-18 17:34:45 +00:00
Chris Lattner
703e92fa1b trivial optimization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29770 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-18 17:34:24 +00:00
Reid Spencer
e4f4759857 Add a comment about the mechanisms used to rid AsmParser of exceptions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29769 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-18 17:32:55 +00:00
Reid Spencer
f0646768be For PR797:
1. Actually turn on -fno-exceptions in libraries that do not have the
   REQUIRES_EH option in their Makefile. The following library file size
   savings were made (DEBUG):
      libLLVMDataStructure.a  525K
      libLLVMCore.a           380K
      libLLVMCodeGen.a        350K
      libLLVMTransformUtils.a 305K
      libLLVMScalarOpts.a     270K
      libLLVMAnalysis.a       247K
      libLLVMSelectionDAG.a   233K
      libLLVMipo.a            175K
      LLVMX86.o               123K
      LLVMPPC.o                81K
      libLLVMipa.a             17K
                 TOTAL      2,706K
      Note that the savings is actually a little larger than this because
      I didn't count any of the libraries that had small changes.

2. Remove REQUIRES_EH from the AsmParser library as it is now exception
   free. This resulted in a nearly 78K drop in the size of the debug
   library for AsmParser.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29767 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-18 09:30:03 +00:00
Reid Spencer
61c83e023f For PR797:
Rid the Assembly Parser of exceptions. This is a really gross hack but it
will do until the Assembly Parser is re-written as a recursive descent.
The basic premise is that wherever the old "ThrowException" function was
called (new name: GenerateError) we set a flag (TriggerError). Every
production checks that flag and calls YYERROR if it is set. Additionally,
each call to ThrowException in the grammar is replaced with GEN_ERROR
which calls GenerateError and then YYERROR immediately. This prevents
the remaining production from continuing after an error condition.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29763 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-18 08:43:06 +00:00
Chris Lattner
7c339b8ca2 These libs use EH info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29043 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 16:44:31 +00:00
Chris Lattner
0ad19703ae fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28897 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-21 16:53:00 +00:00
Chris Lattner
57de7a4542 Fix build on systems with bad bison's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28657 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 18:20:28 +00:00
Reid Spencer
18c8b49e7d Use archive libraries instead of object files for VMCore, BCReader,
BCWriter, and bzip2 libraries. Adjust the various makefiles to accommodate
these changes. This was done to speed up link times.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28610 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 01:30:27 +00:00
Reid Spencer
fd20c0ab00 Fix grammar in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28534 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-29 02:34:34 +00:00
Chris Lattner
7546619743 Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28407 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-19 21:28:53 +00:00
Chris Lattner
515906d106 Add support for parsing csret
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28406 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-19 21:28:34 +00:00
Reid Spencer
536c006249 Make sure CVS versions of yacc and lex files get distributed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27630 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-12 20:57:05 +00:00
Chris Lattner
f4bd7d8151 Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27526 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-08 04:09:02 +00:00
Chris Lattner
2d7349a62d Use isValidOperands instead of duplicating or eliding checks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27525 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-08 04:08:32 +00:00
Chris Lattner
d25db20f1a regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27521 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-08 03:55:17 +00:00
Chris Lattner
ca73cd8830 Add insertelement and shufflevector constantexpr support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27520 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-08 03:53:34 +00:00
Chris Lattner
d5efe84646 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27512 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-08 01:18:56 +00:00
Chris Lattner
4c94908b64 Parse shufflevector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27511 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-08 01:18:35 +00:00
Reid Spencer
7a10277fa3 Add new generated files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27013 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 23:48:12 +00:00
Chris Lattner
c2c6038913 Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26522 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-04 07:53:41 +00:00
Chris Lattner
7d5c1e1ed1 Don't use invalidated iterators!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26521 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-04 07:53:16 +00:00
Chris Lattner
58af2a1c5f Convert this over to work with the new makefiles
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26206 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-15 07:22:58 +00:00
Chris Lattner
2fecc0f9e2 random lexer change to test the makefile updating stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26203 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-15 07:02:59 +00:00
Chris Lattner
32eecb09a2 adjust to new style of handling lexer changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26162 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-14 05:14:46 +00:00
Chris Lattner
0e9c376761 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25619 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-25 22:27:16 +00:00
Chris Lattner
aa2c853766 Parse inline asm objects
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25618 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-25 22:26:43 +00:00
Chris Lattner
6631601eed Rename method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25571 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-24 04:14:29 +00:00
Chris Lattner
71cdba3177 syntax change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25567 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-24 00:40:17 +00:00
Chris Lattner
8335e84a4b regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25558 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-23 23:05:42 +00:00
Chris Lattner
ee45477a48 Add support for parsing global asm blocks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25557 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-23 23:05:15 +00:00
Reid Spencer
e812fb230a Make sure intrinsic auto-upgrade is invoked correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25434 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-19 01:21:04 +00:00
Robert Bocchino
2def1b3e73 Lexer and parser support for the insertelement operation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25403 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 20:06:25 +00:00
Reid Spencer
0b118206bf For PR411:
This patch is an incremental step towards supporting a flat symbol table.
It de-overloads the intrinsic functions by providing type-specific intrinsics
and arranging for automatically upgrading from the old overloaded name to
the new non-overloaded name. Specifically:
  llvm.isunordered -> llvm.isunordered.f32, llvm.isunordered.f64
  llvm.sqrt -> llvm.sqrt.f32, llvm.sqrt.f64
  llvm.ctpop -> llvm.ctpop.i8, llvm.ctpop.i16, llvm.ctpop.i32, llvm.ctpop.i64
  llvm.ctlz -> llvm.ctlz.i8, llvm.ctlz.i16, llvm.ctlz.i32, llvm.ctlz.i64
  llvm.cttz -> llvm.cttz.i8, llvm.cttz.i16, llvm.cttz.i32, llvm.cttz.i64
New code should not use the overloaded intrinsic names. Warnings will be
emitted if they are used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25366 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-16 21:12:35 +00:00
Chris Lattner
fe442be5a4 Regenerate these files. FreeBSD apparently has issues with the version of
lex/bison Rob used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25196 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-11 02:07:51 +00:00
Robert Bocchino
9c62b5630c Added lexer and parser support for the extractelement operation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25177 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-10 19:04:32 +00:00
Chris Lattner
524a1313da Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24908 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 18:31:50 +00:00
Chris Lattner
0a01783d7c allow logical operators on packed integral types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24907 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 18:31:29 +00:00
Chris Lattner
7aa6189629 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24904 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 17:53:23 +00:00
Chris Lattner
f1f03dfc66 Implement Regression/Assembler/2005-12-21-ZeroInitVector.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24903 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 17:53:02 +00:00
Chris Lattner
b475c42314 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24328 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-12 18:22:38 +00:00
Chris Lattner
b2b96679d1 refactor grammar to eliminate shift-reduce conflict. Move alignment checking
code out of all of the clients and into OptAlign/OptCAlign


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24327 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-12 18:21:21 +00:00
Chris Lattner
e869eef7d3 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24316 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-12 00:11:49 +00:00
Chris Lattner
b7d08a50f5 add a token
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24315 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-12 00:11:30 +00:00
Chris Lattner
164c378047 Parse section info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24314 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-12 00:11:10 +00:00
Chris Lattner
9547d7fe33 Force vectors to be a power of two in size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24265 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 01:42:43 +00:00
Chris Lattner
0019bbe198 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24211 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-06 06:46:53 +00:00
Chris Lattner
87ac972709 Allow globals to have an alignment specified. Switch to using isPowerOf2_32
at Jim's request for the checking code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24210 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-06 06:46:28 +00:00
Chris Lattner
7d09ab6b88 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24208 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-06 06:34:34 +00:00
Chris Lattner
66db8e4aab factor optional alignment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24207 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-06 06:34:12 +00:00
Chris Lattner
d91c32110a regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24199 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-05 21:54:23 +00:00
Chris Lattner
ac6e5c10db Verify that alignment amounts are a power of 2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24198 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-05 21:54:03 +00:00
Nate Begeman
14b0529532 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24196 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-05 09:21:28 +00:00
Jeff Cohen
66c5fd6c53 When a function takes a variable number of pointer arguments, with a zero
pointer marking the end of the list, the zero *must* be cast to the pointer
type.  An un-cast zero is a 32-bit int, and at least on x86_64, gcc will
not extend the zero to 64 bits, thus allowing the upper 32 bits to be
random junk.

The new END_WITH_NULL macro may be used to annotate a such a function
so that GCC (version 4 or newer) will detect the use of un-casted zero
at compile time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23888 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-23 04:37:20 +00:00
Reid Spencer
68a24bdba4 Implement PR614:
These changes modify the makefiles so that the output of flex and bison are
placed in the SRC directory, not the OBJ directory. It is intended that they
be checked in as any other LLVM source so that platforms without convenient
access to flex/bison can be compiled. From now on, if you change a .y or
.l file you *must* also commit the generated .cpp and .h files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23115 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-27 18:50:39 +00:00
Chris Lattner
548021f411 Fix grammar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22279 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-24 18:00:40 +00:00
Andrew Lenharth
213e557cef If we support structs as va_list, we must pass pointers to them to va_copy
See last commit for LangRef, this implements it on all targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22273 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-22 21:04:42 +00:00
Andrew Lenharth
31c98bfb85 because some functions just use va_start and pass things to vfprintf
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22269 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-20 15:41:37 +00:00
Andrew Lenharth
017fba9d0f va_end fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22262 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-19 14:04:55 +00:00
Andrew Lenharth
e78f50deea add a check for the mixing of vaarg and vanext with va_arg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22260 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-19 03:53:56 +00:00
Andrew Lenharth
558bc88a00 core changes for varargs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22254 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-18 18:34:52 +00:00
Chris Lattner
6184febcda Give the asmparser the ability to parse strings. Patch contributed by
Alexander Friedman


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22146 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-20 03:25:47 +00:00
Misha Brukman
5a2a3826ef * Convert tabs to spaces, fix code alignment
* Remove trailing whitespace
* Wrap long lines


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21844 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-10 22:02:28 +00:00
Chris Lattner
a8e8f16714 parse new calling conv specifiers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21748 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-06 20:27:19 +00:00
Chris Lattner
f924a4c21f use splice instead of remove/insert for a minor speedup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21743 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-06 19:58:35 +00:00
Chris Lattner
1f64025d88 remove some ugly hacks that are no longer needed since andrew removed the
varargs munging code


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21742 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-06 19:49:51 +00:00
Chris Lattner
c28ade4266 lex tail
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21729 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-06 06:20:33 +00:00
Chris Lattner
ddb6db4fa1 Add a 'tail' marker for call instructions, patch contributed by
Alexander Friedman.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21722 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-06 05:51:46 +00:00
Andrew Lenharth
abc73b3e5d Remove support for 1.0 style varargs
amusing of course, because we will have to go back to those semantics soon


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21654 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-02 19:07:27 +00:00
Misha Brukman
019b63931b * Remove trailing whitespace
* Convert tabs to spaces


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21415 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 21:10:11 +00:00
Chris Lattner
20b463629b fix PR549
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21360 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-19 15:27:29 +00:00
Chris Lattner
60cd9558ba don't crash in some bad cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20776 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 01:29:26 +00:00
Chris Lattner
355ad1f3af Remove a bunch of cruft and dead code for handling the case when types were
defined in function constant pools.  The assembler grammar has long
disallowed functions from having constant pools, so all of this stuff is
dead.

This makes it an immediate error for functions to refer to nonexisting
types, fixing Regression/Verifier/2005-03-21-UndefinedTypeReference.ll.

Before, references to non-existing types in functions would only be
detected when the subsequent function was parsed, due to the call to
"ResolveTypes".  "ResolveTypes" has not resolved any types for a long time,
instead it emitted an error message if no resolved types are left.  Since
the only caller of this method is in the module code, just inline it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20726 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-21 06:27:42 +00:00
Chris Lattner
e4d5c441e0 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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20597 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 04:54:21 +00:00
Chris Lattner
262bb9ae5e zap
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20461 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-05 19:04:07 +00:00
Chris Lattner
69331f5726 add more checking
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20296 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-24 05:25:17 +00:00
Chris Lattner
83beacddc9 Do not read free'd memory when printing an error message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20295 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-24 04:59:49 +00:00
Chris Lattner
a08976b092 C++ is not a functional programming language.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20274 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-22 23:13:58 +00:00
Chris Lattner
595f06c6da Fix test/Regression/Assembler/2005-01-31-CallingAggregateFunction.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19966 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-01 01:47:42 +00:00
Chris Lattner
4047a49cdc Apparently := confuses makellvm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19965 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-01 01:47:12 +00:00
Chris Lattner
ce1df9e9e8 Adjust to slight changes in instruction interfaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19893 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-29 00:35:55 +00:00
Chris Lattner
a8101c163d Silence VS warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19390 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 20:07:03 +00:00
Alkis Evlogimenos
d82ef51187 Do not allow empty label names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18743 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-10 05:40:19 +00:00
Chris Lattner
c6c9772823 Implement test/Feature/escaped_label.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18741 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-10 05:27:29 +00:00
Chris Lattner
6d8dbecff2 Add support for compilers with arg dependent name lookup, contributed by
Bjørn Wennberg


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18628 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-08 16:13:53 +00:00
Reid Spencer
9f9b3acfce For PR409: \
Make sure to check isValueValidForType on floating point constants and give \
an error if the value is not valid, otherwise it would assert in the VMCore


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18584 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-06 22:18:25 +00:00
Chris Lattner
7891593359 Fix PR463
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18303 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-28 16:45:45 +00:00
Reid Spencer
5d6ca51ded Make sure that the yacc and lex output are specified as BUILT_SOURCES.
Correct the dependency of the Lexer.o file on the constructed
llvmAsmParser.h header file. It is not the Lexer.cpp file that depends on
the header, its the output of compiling Lexer.cpp, Lexer.o


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17289 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-28 00:43:24 +00:00
Reid Spencer
6cb21d443e Change Library Names Not To Conflict With Others When Installed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17286 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-27 23:18:45 +00:00
Chris Lattner
e8343a5fbb Plug a memory leak in the asmparser. It turns out that we were leaking
the strings for basic block labels in some cases.  This amounted to about
120K of memory for namd, a medium sized program.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17262 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-26 18:26:14 +00:00
Reid Spencer
cac731ecbe We won't use automake
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17155 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-22 03:35:04 +00:00
Reid Spencer
86d341b204 Initial automake generated Makefile template
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17136 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-18 23:55:41 +00:00
Chris Lattner
16710e9574 Parse undef and unreachable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17053 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-16 18:17:13 +00:00
Reid Spencer
d96cb6eaa0 Update to reflect changes in Makefile rules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16950 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-13 11:46:52 +00:00
Reid Spencer
9f41a5fe85 Initial version of automake Makefile.am file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16885 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-10 20:43:57 +00:00
Chris Lattner
1c1bb33534 Add a check to avoid an assertion on malformed input
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16861 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-09 02:18:58 +00:00
Reid Spencer
1c7b907325 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16333 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-14 05:43:23 +00:00
Reid Spencer
e59eaf407a Add support for the link-time pass list to Modules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16321 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-13 23:44:23 +00:00
Reid Spencer
551ccae044 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/.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-01 22:55:40 +00:00
Reid Spencer
57b6eec5e6 Examine the type code in the setcc class of instructions and if it
is a PackedType, throw an error. Temporary solution.

Patch contributed by Brad Jones.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15963 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-21 16:11:02 +00:00
Chris Lattner
42db1a04ef quish a warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15954 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-20 18:07:39 +00:00
Brian Gaeke
715c90ba52 Packed types, brought to you by Brad Jones
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15938 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-20 06:00:58 +00:00
Chris Lattner
c6d2f15037 Work around PR424 for old c/c++ frontends.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15882 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-17 17:26:41 +00:00
Alkis Evlogimenos
eb62bc77b6 Merge i*.h headers into Instructions.h as part of bug403.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15325 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-29 12:17:34 +00:00
Chris Lattner
8d65a06a3e Fix bug in previous patch :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15226 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-26 01:40:20 +00:00
Chris Lattner
badf091b47 Fix an extremely serious regression that was causing LLVM basic blocks to be
scrambled around almost at random, having really bad effects on icache locality.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15225 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-26 01:22:59 +00:00
Reid Spencer
feaf10e571 Adjust to new Module.h interface for dependent libraries
Remove mem leaks resulting from not freeing parse strings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15217 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-25 21:30:51 +00:00
Reid Spencer
0be13e7f14 bug 263:
Provide parsing for the target triple and dependent libraries.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15209 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-25 17:58:28 +00:00
Reid Spencer
3cd2fe3d2f bug 263:
Provide new tokens for target triples and dependent libraries.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15208 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-25 17:56:00 +00:00
Reid Spencer
3271ed554a bug 122:
- Replace ConstantPointerRef usage with GlobalValue usage
- Minimize redundant isa<GlobalValue> usage
- Correct isa<Constant> for GlobalValue subclass
- Remove tabs
- Fix coments refering to ConstantPointerRef


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14937 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-18 00:08:11 +00:00
Chris Lattner
a2d4b3cfeb Fix the regressions handling unnamed global variables
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14870 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16 01:18:09 +00:00
Chris Lattner
0f01bbc3b2 This is logically part of the last patch. Just more really horrible code
that is made unnecessary by it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14831 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-14 23:07:13 +00:00
Chris Lattner
a09000db75 ** Finally DeclareNewGlobalValue is dead!
* Simplify a lot of code because type's cannot be in function symbol tables
* Fix memory leaks in handling of redefined function prototypes
* Don't use SymbolTable directly for stuff that we can go through the Module
  for.
* Fix some minor bugs on obscure testcases like:
      test/Feature/globalredefinition.ll
* Do not create GlobalVariable objects for forward referenced Functions!
* When forward referencing a function in a constant expression, do not create
  a placeholder, add a bunch of references to it, then turn around and
  replaceAllUsesOfWith on it with a new global, deleting the placeholder.
  Instead, when we find the real definition of the global, just use the
  placeholder instead of creating a new object.

This substantially simplifies the asmwriter and should even speed it up on
cases heavy in constantexprs (like C++, Java, MSIL)...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14830 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-14 23:03:46 +00:00
Chris Lattner
8a32784ad4 * Fairly substantial change. Instead of creating new globalvariables, then
replaceAllUsesWith'ing any forward references, just use the forward
  reference if it exists.

This introduces GetForwardRefForGlobal, which will eventually completely
replace the horrible DeclareNewGlobalValue function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14828 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-14 21:44:00 +00:00
Chris Lattner
cb9d6a8f73 Fold setValueNameMergingDuplicates into ParseGlobalVariable, allowing us
to substantially simplify the result.  In particular, we no longer create
GlobalVariables and then immediately destroy them when they are duplciate
definitions.

The real point of this patch though is that it gets us closer to the
DeclareNewGlobalValue calls...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14827 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-14 20:42:57 +00:00
Chris Lattner
d9ce6adfcc Fix a regression from last night. Apparently the CFE is broken and outputs
functions multiple times, expecting them to be merged.  This should be fixed
in the CFE, then here.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14823 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-14 19:33:47 +00:00
Chris Lattner
d88998db01 Pull out code shared between GV forward-decl and definition processing.
This gives us only a single call site for setValueNameMergingDuplicates.
The next stage is the start merging them together.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14811 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-14 08:23:52 +00:00
Chris Lattner
66028f208e Simplify code. Do not allow functions to be redefined more than once.
Since the stupid '%X = const int 4' thing is gone, we can now simplify
setValueNameMergingDuplicates a bit more.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14810 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-14 07:12:48 +00:00
Chris Lattner
e002694ce2 Remove a gross and crufty "feature" that was never documented and doesn't work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14809 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-14 06:44:56 +00:00