Commit Graph

371 Commits

Author SHA1 Message Date
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
Chris Lattner 6d817c5486 use splice instead of remove/insert for a minor speedup
llvm-svn: 21743
2005-05-06 19:58:35 +00:00
Chris Lattner 6409f3490a remove some ugly hacks that are no longer needed since andrew removed the
varargs munging code

llvm-svn: 21742
2005-05-06 19:49:51 +00:00
Chris Lattner ca4d4bd2db lex tail
llvm-svn: 21729
2005-05-06 06:20:33 +00:00
Chris Lattner 0603845a49 Add a 'tail' marker for call instructions, patch contributed by
Alexander Friedman.

llvm-svn: 21722
2005-05-06 05:51:46 +00:00
Andrew Lenharth f5d58d1bc3 Remove support for 1.0 style varargs
amusing of course, because we will have to go back to those semantics soon

llvm-svn: 21654
2005-05-02 19:07:27 +00:00
Misha Brukman 13f332cd3f * Remove trailing whitespace
* Convert tabs to spaces

llvm-svn: 21415
2005-04-21 21:10:11 +00:00
Chris Lattner 07ad98dbe2 fix PR549
llvm-svn: 21360
2005-04-19 15:27:29 +00:00
Chris Lattner dcb82f5d0a don't crash in some bad cases.
llvm-svn: 20776
2005-03-23 01:29:26 +00:00
Chris Lattner a5f4b773d9 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.

llvm-svn: 20726
2005-03-21 06:27:42 +00:00
Chris Lattner 531f9e92d4 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!

llvm-svn: 20597
2005-03-15 04:54:21 +00:00
Chris Lattner aa72c889a6 zap
llvm-svn: 20461
2005-03-05 19:04:07 +00:00
Chris Lattner fc824c1a7e add more checking
llvm-svn: 20296
2005-02-24 05:25:17 +00:00
Chris Lattner 5f0df0c1e6 Do not read free'd memory when printing an error message.
llvm-svn: 20295
2005-02-24 04:59:49 +00:00
Chris Lattner 06b6c4bbde C++ is not a functional programming language.
llvm-svn: 20274
2005-02-22 23:13:58 +00:00
Chris Lattner 085c981345 Fix test/Regression/Assembler/2005-01-31-CallingAggregateFunction.ll
llvm-svn: 19966
2005-02-01 01:47:42 +00:00
Chris Lattner 29b97d53c1 Apparently := confuses makellvm
llvm-svn: 19965
2005-02-01 01:47:12 +00:00
Chris Lattner 2c08949c62 Adjust to slight changes in instruction interfaces.
llvm-svn: 19893
2005-01-29 00:35:55 +00:00
Chris Lattner fa66dc7852 Silence VS warnings.
llvm-svn: 19390
2005-01-08 20:07:03 +00:00
Alkis Evlogimenos a93b4520a7 Do not allow empty label names.
llvm-svn: 18743
2004-12-10 05:40:19 +00:00
Chris Lattner fcec9d6dec Implement test/Feature/escaped_label.ll
llvm-svn: 18741
2004-12-10 05:27:29 +00:00
Chris Lattner 4270bcbab7 Add support for compilers with arg dependent name lookup, contributed by
Bjørn Wennberg

llvm-svn: 18628
2004-12-08 16:13:53 +00:00
Reid Spencer 95044d0071 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

llvm-svn: 18584
2004-12-06 22:18:25 +00:00
Chris Lattner aef74b55de Fix PR463
llvm-svn: 18303
2004-11-28 16:45:45 +00:00
Reid Spencer c9bbb35c6f 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

llvm-svn: 17289
2004-10-28 00:43:24 +00:00
Reid Spencer 57cbe39d1e Change Library Names Not To Conflict With Others When Installed
llvm-svn: 17286
2004-10-27 23:18:45 +00:00
Chris Lattner 6ee2c57128 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.

llvm-svn: 17262
2004-10-26 18:26:14 +00:00
Reid Spencer c1c320c335 We won't use automake
llvm-svn: 17155
2004-10-22 03:35:04 +00:00
Reid Spencer 6a11a75f31 Initial automake generated Makefile template
llvm-svn: 17136
2004-10-18 23:55:41 +00:00
Chris Lattner 4ff314968e Parse undef and unreachable
llvm-svn: 17053
2004-10-16 18:17:13 +00:00
Reid Spencer ace94df71f Update to reflect changes in Makefile rules.
llvm-svn: 16950
2004-10-13 11:46:52 +00:00
Reid Spencer b84cbf2725 Initial version of automake Makefile.am file.
llvm-svn: 16885
2004-10-10 20:43:57 +00:00
Chris Lattner 1f4739cd08 Add a check to avoid an assertion on malformed input
llvm-svn: 16861
2004-10-09 02:18:58 +00:00
Reid Spencer f27c4cde06 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.

llvm-svn: 16333
2004-09-14 05:43:23 +00:00
Reid Spencer b9e0877223 Add support for the link-time pass list to Modules.
llvm-svn: 16321
2004-09-13 23:44:23 +00:00
Reid Spencer 7c16caa336 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/.

llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Reid Spencer 04f4d52d9e 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.

llvm-svn: 15963
2004-08-21 16:11:02 +00:00
Chris Lattner d0713e7664 quish a warning
llvm-svn: 15954
2004-08-20 18:07:39 +00:00
Brian Gaeke 0220904e7a Packed types, brought to you by Brad Jones
llvm-svn: 15938
2004-08-20 06:00:58 +00:00
Chris Lattner fca2833838 Work around PR424 for old c/c++ frontends.
llvm-svn: 15882
2004-08-17 17:26:41 +00:00
Alkis Evlogimenos fd7a2d4477 Merge i*.h headers into Instructions.h as part of bug403.
llvm-svn: 15325
2004-07-29 12:17:34 +00:00
Chris Lattner 87dc093b10 Fix bug in previous patch :(
llvm-svn: 15226
2004-07-26 01:40:20 +00:00
Chris Lattner c2cb34ae61 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.

llvm-svn: 15225
2004-07-26 01:22:59 +00:00
Reid Spencer 62c6da9a64 Adjust to new Module.h interface for dependent libraries
Remove mem leaks resulting from not freeing parse strings.

llvm-svn: 15217
2004-07-25 21:30:51 +00:00
Reid Spencer a24de0d15d bug 263:
Provide parsing for the target triple and dependent libraries.

llvm-svn: 15209
2004-07-25 17:58:28 +00:00
Reid Spencer 4add91957c bug 263:
Provide new tokens for target triples and dependent libraries.

llvm-svn: 15208
2004-07-25 17:56:00 +00:00
Reid Spencer ce6adaff1c 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

llvm-svn: 14937
2004-07-18 00:08:11 +00:00
Chris Lattner fe05024b0f Fix the regressions handling unnamed global variables
llvm-svn: 14870
2004-07-16 01:18:09 +00:00
Chris Lattner 4babbe04e1 This is logically part of the last patch. Just more really horrible code
that is made unnecessary by it.

llvm-svn: 14831
2004-07-14 23:07:13 +00:00
Chris Lattner 8abe1a11b4 ** 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)...

llvm-svn: 14830
2004-07-14 23:03:46 +00:00
Chris Lattner 4c9210ed64 * 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.

llvm-svn: 14828
2004-07-14 21:44:00 +00:00
Chris Lattner e875d48a92 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...

llvm-svn: 14827
2004-07-14 20:42:57 +00:00
Chris Lattner 91393ee84f 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.

llvm-svn: 14823
2004-07-14 19:33:47 +00:00
Chris Lattner 42dd47437e 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.

llvm-svn: 14811
2004-07-14 08:23:52 +00:00