Commit Graph

424 Commits

Author SHA1 Message Date
Reid Spencer 5ef0dbb5b4 Remove useless #include.
llvm-svn: 32155
2006-12-03 16:19:43 +00:00
Reid Spencer 1960ef32ac Regenerate.
llvm-svn: 32152
2006-12-03 06:59:29 +00:00
Reid Spencer cfc7f5dc82 Shorten the FCmp and ICmp mnemonics to 3 letters. Make the parser
disambiguate them.

llvm-svn: 32151
2006-12-03 06:58:07 +00:00
Reid Spencer e2c32da075 Regenerate.
llvm-svn: 32145
2006-12-03 05:46:11 +00:00
Reid Spencer 812724efa4 Remove backwards compatibility goop. Now implemented in llvm-upgrade.
llvm-svn: 32144
2006-12-03 05:45:44 +00:00
Reid Spencer d5e19444a7 Regenerate.
llvm-svn: 32053
2006-12-01 00:33:46 +00:00
Anton Korobeynikov 12c94949e0 Introducing external weak linkage. Darwin codegen should be added later.
llvm-svn: 32052
2006-12-01 00:25:12 +00:00
Bill Wendling 6c1740f31f Removed #include <iostream> and used llvm streams
llvm-svn: 31984
2006-11-28 22:47:12 +00:00
Reid Spencer 55f1fbee2e Regenerate.
llvm-svn: 31965
2006-11-28 07:29:44 +00:00
Reid Spencer d47017990b 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.

llvm-svn: 31964
2006-11-28 07:28:14 +00:00
Reid Spencer 6c38f0bb07 For PR950:
The long awaited CAST patch. This introduces 12 new instructions into LLVM
to replace the cast instruction. Corresponding changes throughout LLVM are
provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the
exception of 175.vpr which fails only on a slight floating point output
difference.

llvm-svn: 31931
2006-11-27 01:05:10 +00:00
Reid Spencer 9f4448a26e 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.

llvm-svn: 31866
2006-11-19 23:07:00 +00:00
Bill Wendling ad75361d42 Initialize some pointers to quiet the compiler (when doing build_gcc
builds).

llvm-svn: 31694
2006-11-12 11:10:39 +00:00
Reid Spencer fdff938a7e 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.

llvm-svn: 31542
2006-11-08 06:47:33 +00:00
Chris Lattner 6aee6f2a93 regenerate
llvm-svn: 31539
2006-11-08 05:58:47 +00:00
Chris Lattner 60f1f194f9 Fix a bug noticed by Emil Mikulic.
llvm-svn: 31538
2006-11-08 05:58:11 +00:00
Reid Spencer de46e48420 For PR786:
Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting
fall out by removing unused variables. Remaining warnings have to do with
unused functions (I didn't want to delete code without review) and unused
variables in generated code. Maintainers should clean up the remaining
issues when they see them. All changes pass DejaGnu tests and Olden.

llvm-svn: 31380
2006-11-02 20:25:50 +00:00
Reid Spencer 7eb55b395f For PR950:
Replace the REM instruction with UREM, SREM and FREM.

llvm-svn: 31369
2006-11-02 01:53:59 +00:00
Reid Spencer 7e80b0b31e 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.

llvm-svn: 31195
2006-10-26 06:15:43 +00:00
John Criswell 6af0b120b8 Removed extraneous semi-colon; this was prevening the grammar file from
bison'ing correctly.

llvm-svn: 31169
2006-10-24 19:09:48 +00:00
Reid Spencer c7212791a4 Regenerate.
llvm-svn: 31111
2006-10-22 07:03:43 +00:00
Reid Spencer 6309fa1438 Remove unneeded CHECK_FOR_ERROR invocations.
llvm-svn: 31110
2006-10-22 07:03:09 +00:00
Chris Lattner 7d1d03445e regenerate
llvm-svn: 31109
2006-10-22 06:08:13 +00:00
Chris Lattner fd3d29a978 change keyword to datalayout
llvm-svn: 31108
2006-10-22 06:07:41 +00:00
Reid Spencer e0fc4dfc22 For PR950:
This patch implements the first increment for the Signless Types feature.
All changes pertain to removing the ConstantSInt and ConstantUInt classes
in favor of just using ConstantInt.

llvm-svn: 31063
2006-10-20 07:07:24 +00:00
Owen Anderson 85690f3ba5 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.

llvm-svn: 31031
2006-10-18 02:21:48 +00:00
Owen Anderson e223754ff4 Add support for the new "target data" information in .ll files. This provides
a better encoding of the targets data layout, rather than trying to guess it
from the endianness and pointersize like before.

llvm-svn: 31030
2006-10-18 02:21:12 +00:00
Chris Lattner ff20ba3f51 regenerate
llvm-svn: 30971
2006-10-15 23:27:25 +00:00
Chris Lattner aad30b7804 Produce a useful error message for Regression/Verifier/2006-10-15-AddrLabel.ll
llvm-svn: 30970
2006-10-15 23:26:46 +00:00
Reid Spencer ff35900383 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.

llvm-svn: 30834
2006-10-09 17:36:59 +00:00
Chris Lattner 6ab03f6a08 Eliminate ConstantBool::True and ConstantBool::False. Instead, provide
ConstantBool::getTrue() and ConstantBool::getFalse().

llvm-svn: 30665
2006-09-28 23:35:22 +00:00
Reid Spencer 309080abbc 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.

llvm-svn: 30650
2006-09-28 19:28:24 +00:00
Anton Korobeynikov 6f7072c66a Added some eye-candy for Subtarget type checking
Added X86 StdCall & FastCall calling conventions. Codegen will follow.

llvm-svn: 30446
2006-09-17 20:25:45 +00:00
Anton Korobeynikov 0ab01ff6e2 Small fixes for supporting dll* linkage types
llvm-svn: 30441
2006-09-17 13:06:18 +00:00
Anton Korobeynikov 73441cd099 Adding generated files for the last commit
llvm-svn: 30375
2006-09-14 18:25:26 +00:00
Anton Korobeynikov d61d39ec53 Adding dllimport, dllexport and external weak linkage types.
DLL* linkages got full (I hope) codegeneration support in C & both x86
assembler backends.
External weak linkage added for future use, we don't provide any
codegeneration, etc. support for it.

llvm-svn: 30374
2006-09-14 18:23:27 +00:00
Chris Lattner 680aab652a regenerate
llvm-svn: 29771
2006-08-18 17:34:45 +00:00
Chris Lattner 682e17c128 trivial optimization
llvm-svn: 29770
2006-08-18 17:34:24 +00:00
Reid Spencer b50974ac75 Add a comment about the mechanisms used to rid AsmParser of exceptions.
llvm-svn: 29769
2006-08-18 17:32:55 +00:00
Reid Spencer 7c9ec5ff37 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.

llvm-svn: 29767
2006-08-18 09:30:03 +00:00
Reid Spencer 713eedc1fb 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.

llvm-svn: 29763
2006-08-18 08:43:06 +00:00
Chris Lattner 599ee8972d These libs use EH info
llvm-svn: 29043
2006-07-07 16:44:31 +00:00
Chris Lattner 7aa4590f67 fix typo
llvm-svn: 28897
2006-06-21 16:53:00 +00:00
Chris Lattner f42ccafe00 Fix build on systems with bad bison's
llvm-svn: 28657
2006-06-02 18:20:28 +00:00
Reid Spencer a647c7ff42 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.

llvm-svn: 28610
2006-06-01 01:30:27 +00:00
Reid Spencer edcf47ea45 Fix grammar in a comment.
llvm-svn: 28534
2006-05-29 02:34:34 +00:00
Chris Lattner 09c0e99dfb Regenerate
llvm-svn: 28407
2006-05-19 21:28:53 +00:00
Chris Lattner 21cffffbb0 Add support for parsing csret
llvm-svn: 28406
2006-05-19 21:28:34 +00:00
Reid Spencer 7c8fef2cd1 Make sure CVS versions of yacc and lex files get distributed.
llvm-svn: 27630
2006-04-12 20:57:05 +00:00
Chris Lattner 931565caf6 Regenerate
llvm-svn: 27526
2006-04-08 04:09:02 +00:00
Chris Lattner 80f554f209 Use isValidOperands instead of duplicating or eliding checks.
llvm-svn: 27525
2006-04-08 04:08:32 +00:00
Chris Lattner aebccf891a regenerate
llvm-svn: 27521
2006-04-08 03:55:17 +00:00
Chris Lattner 8c32ad0040 Add insertelement and shufflevector constantexpr support
llvm-svn: 27520
2006-04-08 03:53:34 +00:00
Chris Lattner 9ff96a70f2 regenerate
llvm-svn: 27512
2006-04-08 01:18:56 +00:00
Chris Lattner 8ec3c2e31f Parse shufflevector
llvm-svn: 27511
2006-04-08 01:18:35 +00:00
Reid Spencer 78eaa10f1a Add new generated files.
llvm-svn: 27013
2006-03-23 23:48:12 +00:00
Chris Lattner adf5ec6f96 Regenerate
llvm-svn: 26522
2006-03-04 07:53:41 +00:00
Chris Lattner a33bcff313 Don't use invalidated iterators!
llvm-svn: 26521
2006-03-04 07:53:16 +00:00
Chris Lattner f20e61f003 Convert this over to work with the new makefiles
llvm-svn: 26206
2006-02-15 07:22:58 +00:00
Chris Lattner 7edc87279c random lexer change to test the makefile updating stuff
llvm-svn: 26203
2006-02-15 07:02:59 +00:00
Chris Lattner 0242688ad8 adjust to new style of handling lexer changes
llvm-svn: 26162
2006-02-14 05:14:46 +00:00
Chris Lattner e0a4ee9db7 regenerate
llvm-svn: 25619
2006-01-25 22:27:16 +00:00
Chris Lattner a02d603c18 Parse inline asm objects
llvm-svn: 25618
2006-01-25 22:26:43 +00:00
Chris Lattner 8ebd2164eb Rename method
llvm-svn: 25571
2006-01-24 04:14:29 +00:00
Chris Lattner 3acaf5cb11 syntax change
llvm-svn: 25567
2006-01-24 00:40:17 +00:00
Chris Lattner edd9b0389b regenerate
llvm-svn: 25558
2006-01-23 23:05:42 +00:00
Chris Lattner f09741f441 Add support for parsing global asm blocks
llvm-svn: 25557
2006-01-23 23:05:15 +00:00
Reid Spencer c8a9fafcfc Make sure intrinsic auto-upgrade is invoked correctly.
llvm-svn: 25434
2006-01-19 01:21:04 +00:00
Robert Bocchino fdf9e41848 Lexer and parser support for the insertelement operation.
llvm-svn: 25403
2006-01-17 20:06:25 +00:00
Reid Spencer b4f9a6f110 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.

llvm-svn: 25366
2006-01-16 21:12:35 +00:00
Chris Lattner cefd38b2b5 Regenerate these files. FreeBSD apparently has issues with the version of
lex/bison Rob used.

llvm-svn: 25196
2006-01-11 02:07:51 +00:00
Robert Bocchino aa1cf5440e Added lexer and parser support for the extractelement operation.
llvm-svn: 25177
2006-01-10 19:04:32 +00:00
Chris Lattner 15f5a182e1 Regenerate
llvm-svn: 24908
2005-12-21 18:31:50 +00:00
Chris Lattner a5d70e9feb allow logical operators on packed integral types
llvm-svn: 24907
2005-12-21 18:31:29 +00:00
Chris Lattner a054d129ea regenerate
llvm-svn: 24904
2005-12-21 17:53:23 +00:00
Chris Lattner 8c7bda561c Implement Regression/Assembler/2005-12-21-ZeroInitVector.ll
llvm-svn: 24903
2005-12-21 17:53:02 +00:00
Chris Lattner 11ca4d636b regenerate
llvm-svn: 24328
2005-11-12 18:22:38 +00:00
Chris Lattner bce7ca8a73 refactor grammar to eliminate shift-reduce conflict. Move alignment checking
code out of all of the clients and into OptAlign/OptCAlign

llvm-svn: 24327
2005-11-12 18:21:21 +00:00
Chris Lattner a0c20b4f8b regenerate
llvm-svn: 24316
2005-11-12 00:11:49 +00:00
Chris Lattner 9da804d8e9 add a token
llvm-svn: 24315
2005-11-12 00:11:30 +00:00
Chris Lattner 71b936cab9 Parse section info
llvm-svn: 24314
2005-11-12 00:11:10 +00:00
Chris Lattner 625b9c8765 Force vectors to be a power of two in size
llvm-svn: 24265
2005-11-10 01:42:43 +00:00
Chris Lattner 840f789433 regenerate
llvm-svn: 24211
2005-11-06 06:46:53 +00:00
Chris Lattner d57ed893e1 Allow globals to have an alignment specified. Switch to using isPowerOf2_32
at Jim's request for the checking code.

llvm-svn: 24210
2005-11-06 06:46:28 +00:00
Chris Lattner 86c352b782 regenerate
llvm-svn: 24208
2005-11-06 06:34:34 +00:00
Chris Lattner c7de836a77 factor optional alignment
llvm-svn: 24207
2005-11-06 06:34:12 +00:00
Chris Lattner b467a4fb29 regenerate
llvm-svn: 24199
2005-11-05 21:54:23 +00:00
Chris Lattner 6318dc5691 Verify that alignment amounts are a power of 2
llvm-svn: 24198
2005-11-05 21:54:03 +00:00
Nate Begeman 848622f87f Add support alignment of allocation instructions.
Add support for specifying alignment and size of setjmp jmpbufs.

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

llvm-svn: 24196
2005-11-05 09:21:28 +00:00
Jeff Cohen 11e26b52b2 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.

llvm-svn: 23888
2005-10-23 04:37:20 +00:00
Reid Spencer dfb3fb4a25 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.

llvm-svn: 23115
2005-08-27 18:50:39 +00:00
Chris Lattner 805ecf0c79 Fix grammar
llvm-svn: 22279
2005-06-24 18:00:40 +00:00
Andrew Lenharth 253145299b 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.

llvm-svn: 22273
2005-06-22 21:04:42 +00:00
Andrew Lenharth d6bee05fc4 because some functions just use va_start and pass things to vfprintf
llvm-svn: 22269
2005-06-20 15:41:37 +00:00
Andrew Lenharth 717f1610f0 va_end fix
llvm-svn: 22262
2005-06-19 14:04:55 +00:00
Andrew Lenharth aa1d999682 add a check for the mixing of vaarg and vanext with va_arg
llvm-svn: 22260
2005-06-19 03:53:56 +00:00
Andrew Lenharth 9144ec4764 core changes for varargs
llvm-svn: 22254
2005-06-18 18:34:52 +00:00
Chris Lattner 416a0d4c18 Give the asmparser the ability to parse strings. Patch contributed by
Alexander Friedman

llvm-svn: 22146
2005-05-20 03:25:47 +00:00
Misha Brukman 8b47707b5c * Convert tabs to spaces, fix code alignment
* Remove trailing whitespace
* Wrap long lines

llvm-svn: 21844
2005-05-10 22:02:28 +00:00
Chris Lattner 53bdd31211 parse new calling conv specifiers
llvm-svn: 21748
2005-05-06 20:27:19 +00:00