1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00
Commit Graph

778 Commits

Author SHA1 Message Date
Chris Lattner
5400cc3907 Fix PR2060 by rejecting invalid types for integer constants.
llvm-svn: 47311
2008-02-19 04:36:07 +00:00
Scott Michel
4a4f50da13 Back out mods to llvmAsmParser, incorrectly committed
llvm-svn: 46545
2008-01-30 03:10:00 +00:00
Scott Michel
ab3702fba9 More cleanups for CellSPU:
- Expand tabs... (poss 80-col violations, will get them later...)
- Consolidate logic for SelectDFormAddr and SelectDForm2Addr into a single
  function, simplifying maintenance. Also reduced custom instruction
  generation for SPUvecinsert/INSERT_MASK.

llvm-svn: 46544
2008-01-30 02:55:46 +00:00
Duncan Sands
d99973b822 If there are attributes on the varargs part of a
call, don't discard them.

llvm-svn: 45884
2008-01-11 21:23:39 +00:00
Chris Lattner
ad9a6ccb83 Remove attribution from file headers, per discussion on llvmdev.
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Chris Lattner
8193d4af33 remove attribution from lib Makefiles.
llvm-svn: 45415
2007-12-29 20:09:26 +00:00
Christopher Lamb
2087584f25 regenerate.
llvm-svn: 45085
2007-12-17 01:17:35 +00:00
Christopher Lamb
a608afb52e Change the PointerType api for creating pointer types. The old functionality of PointerType::get() has become PointerType::getUnqual(), which returns a pointer in the generic address space. The new prototype of PointerType::get() requires both a type and an address space.
llvm-svn: 45082
2007-12-17 01:12:55 +00:00
Bill Wendling
cc0088ff41 Remove spurious warnings from GCC:
warning: suggest a space before ';' or explicit braces around empty  
body in 'for' statement

Patch by Mike Stump (modified slightly by yours truly).

llvm-svn: 45071
2007-12-16 09:16:12 +00:00
Christopher Lamb
8187d5cde7 Regenerate.
llvm-svn: 44934
2007-12-12 08:45:45 +00:00
Christopher Lamb
6d12d7c0fe Implement part of review feedback for address spaces.
llvm-svn: 44933
2007-12-12 08:44:39 +00:00
Christopher Lamb
71a996a387 Regenerate.
llvm-svn: 44859
2007-12-11 09:02:08 +00:00
Christopher Lamb
7368604860 Implement address space attribute for LLVM pointer types. Address spaces are
regions of memory that have a target specific relationship, as described in the 
Embedded C Technical Report. 

This also implements the 2007-12-11-AddressSpaces test, 
which demonstrates how address space attributes can be used in LLVM IR.

In addition, this patch changes the bitcode signature for stores (in a backwards 
compatible manner), such that the pointer type, rather than the pointee type, is 
encoded. This permits type information in the pointer (e.g. address space) to be 
preserved for stores.

LangRef updates are forthcoming.

llvm-svn: 44858
2007-12-11 08:59:05 +00:00
Gordon Henriksen
5d201e0bcc Adding a collector name attribute to Function in the IR. These
methods are new to Function:

  bool hasCollector() const;
  const std::string &getCollector() const;
  void setCollector(const std::string &);
  void clearCollector();

The assembly representation is as such:

  define void @f() gc "shadow-stack" { ...

The implementation uses an on-the-side table to map Functions to 
collector names, such that there is no overhead. A StringPool is 
further used to unique collector names, which are extremely
likely to be unique per process.

llvm-svn: 44769
2007-12-10 03:18:06 +00:00
Chris Lattner
df7a006f45 add #include
llvm-svn: 44710
2007-12-08 19:03:30 +00:00
Anton Korobeynikov
75a3208bb0 Regenerate
llvm-svn: 44546
2007-12-03 21:01:29 +00:00
Anton Korobeynikov
dcec56301a Fix fallout from my last patch: don't reject varargs functions :)
llvm-svn: 44545
2007-12-03 21:00:45 +00:00
Anton Korobeynikov
3f14aef8e9 Regenerate
llvm-svn: 44541
2007-12-03 19:17:47 +00:00
Anton Korobeynikov
a19d61c50e More sanity checks for function types.
Thanks goes to PyPy folks for generating broken stuff :)

llvm-svn: 44538
2007-12-03 19:16:54 +00:00
Duncan Sands
94d751995e Add a convenience method for modifying parameter
attributes.  While there, I noticed that not all
attribute methods returned a pointer-to-constant,
so I fixed that.

llvm-svn: 44457
2007-11-30 18:19:18 +00:00
Duncan Sands
1b0feb42e2 Add some convenience methods for querying attributes, and
use them.

llvm-svn: 44403
2007-11-28 17:07:01 +00:00
Duncan Sands
3602011bec Fix PR1146: parameter attributes are longer part of
the function type, instead they belong to functions
and function calls.  This is an updated and slightly
corrected version of Reid Spencer's original patch.
The only known problem is that auto-upgrading of
bitcode files doesn't seem to work properly (see
test/Bitcode/AutoUpgradeIntrinsics.ll).  Hopefully
a bitcode guru (who might that be? :) ) will fix it.

llvm-svn: 44359
2007-11-27 13:23:08 +00:00
Duncan Sands
d05a55f03f Rename the 'const' parameter attribute to 'readnone',
and the 'pure' parameter attribute to 'readonly'.
Names suggested by DannyB.

llvm-svn: 44273
2007-11-22 20:23:04 +00:00
Chris Lattner
7f2b9b27b3 autoupgrade files that use callfoo as call foo.
llvm-svn: 44218
2007-11-18 18:43:24 +00:00
Chris Lattner
88f47f2798 Bugfix, this fixes CodeGen/X86/ldzero.ll and CodeGen/X86/2007-10-16-fp80_select.ll
llvm-svn: 44215
2007-11-18 18:25:18 +00:00
Chris Lattner
54284cf34a Replace the original flex lexer with a hand writen one. This
drops a dependency on flex and lets us make future progress more 
easily.  Yay for 2 fewer .cvs files to make silly conflicts with.

llvm-svn: 44213
2007-11-18 08:46:26 +00:00
Nate Begeman
a42e2c2272 Basic non-power-of-2 vector support
llvm-svn: 44181
2007-11-15 21:15:26 +00:00
Anton Korobeynikov
b1e6079350 Regenerate
llvm-svn: 44110
2007-11-14 09:53:48 +00:00
Anton Korobeynikov
00f3ace7e9 Add pure/const attributes. Documentation will follow.
llvm-svn: 44109
2007-11-14 09:52:30 +00:00
Dan Gohman
6255ce9f5d Add support for vector remainder operations.
llvm-svn: 43744
2007-11-05 23:35:22 +00:00
Dale Johannesen
1f70f86c7a Make labels work in asm blocks; allow labels as
parameters.  Rename ValueRefList to ParamList
in AsmParser, since its only use is for parameters.

llvm-svn: 43734
2007-11-05 21:20:28 +00:00
Dale Johannesen
0ee2a2fb59 Next PPC long double bits. First cut at constants.
No compile-time support for constant operations yet,
just format transformations.  Make readers and
writers work.  Split constants into 2 doubles in
Legalize.

llvm-svn: 42865
2007-10-11 18:07:22 +00:00
Dale Johannesen
967ee09f04 Generated files for previous patch.
llvm-svn: 41876
2007-09-12 03:31:28 +00:00
Dale Johannesen
4784ee3431 Revise previous patch per review comments.
Next round of x87 long double stuff.
Getting close now, basically works.

llvm-svn: 41875
2007-09-12 03:30:33 +00:00
Dale Johannesen
4ee2a51844 Generated files for previous patch.
llvm-svn: 41859
2007-09-11 18:33:39 +00:00
Dale Johannesen
7bc3969cea Add APInt interfaces to APFloat (allows directly
access to bits).  Use them in place of float and
double interfaces where appropriate.
First bits of x86 long double constants handling 
(untested, probably does not work).

llvm-svn: 41858
2007-09-11 18:32:33 +00:00
Chris Lattner
9f93ab3579 regenerate
llvm-svn: 41816
2007-09-10 23:24:14 +00:00
Chris Lattner
c94e3e9361 Fix PR1645 by resolving forward alias references.
llvm-svn: 41815
2007-09-10 23:23:53 +00:00
Dale Johannesen
783215c630 Apply feedback from previous patch.
llvm-svn: 41774
2007-09-07 21:07:57 +00:00
Dale Johannesen
86f367a6b7 Next round of APFloat changes.
Use APFloat in UpgradeParser and AsmParser.
Change all references to ConstantFP to use the
APFloat interface rather than double.  Remove
the ConstantFP double interfaces.
Use APFloat functions for constant folding arithmetic
and comparisons.
(There are still way too many places APFloat is
just a wrapper around host float/double, but we're
getting there.)

llvm-svn: 41747
2007-09-06 18:13:44 +00:00
David Greene
34e8027ee3 Update generated files.
llvm-svn: 41706
2007-09-04 18:46:50 +00:00
David Greene
8cda5af2e7 Update GEP constructors to use an iterator interface to fix
GLIBCXX_DEBUG issues.

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

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

Updates to all clients.

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

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

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

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

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

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

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

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

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

llvm-svn: 37291
2007-05-22 18:52:21 +00:00
Chris Lattner
d645a38841 update comment
llvm-svn: 37282
2007-05-22 06:56:32 +00:00
Chris Lattner
87cf325aad regenerate
llvm-svn: 37281
2007-05-22 06:47:55 +00:00
Chris Lattner
27741f22d9 simplify code
llvm-svn: 37280
2007-05-22 06:47:11 +00:00
Reid Spencer
b95962309d Regenerate
llvm-svn: 37258
2007-05-19 07:22:10 +00:00
Reid Spencer
b3bb24667a Make the %"..." syntax legal for local name. This just makes it symmetric
with global names which can already be @"..."

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

llvm-svn: 36565
2007-04-29 18:35:00 +00:00
Jeff Cohen
7cfc4b404f Fix MemoryBuffer breakage correctly.
llvm-svn: 36561
2007-04-29 14:43:31 +00:00
Reid Spencer
2e8cb6e797 Regenerate.
llvm-svn: 36543
2007-04-28 16:07:31 +00:00
Reid Spencer
2ba9c4d36d Revert the premature portion of the last commit.
llvm-svn: 36542
2007-04-28 16:06:50 +00:00
Reid Spencer
349097160e Fix a compilation error (jump to case label).
llvm-svn: 36539
2007-04-28 14:13:42 +00:00
Anton Korobeynikov
f59f5a254c Regenerate
llvm-svn: 36538
2007-04-28 13:48:45 +00:00
Anton Korobeynikov
45162c6dad Implement review feedback. Aliasees can be either GlobalValue's or
bitcasts of them.

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

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

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

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

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

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

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

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

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

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

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

llvm-svn: 35410
2007-03-28 02:36:42 +00:00
Reid Spencer
620297a20c Regenerate.
llvm-svn: 35259
2007-03-22 02:14:08 +00:00
Reid Spencer
6890147648 Add support for the noreturn and nounwind function attributes.
llvm-svn: 35258
2007-03-22 02:13:23 +00:00
Reid Spencer
d37f0f007d Regenerate.
llvm-svn: 35215
2007-03-20 17:19:31 +00:00
Reid Spencer
3cc307f4d7 Don't delete things before their last use (avoids bad reads).
llvm-svn: 35214
2007-03-20 17:18:33 +00:00
Reid Spencer
81602be7e3 Regenerate.
llvm-svn: 35199
2007-03-20 01:13:36 +00:00
Reid Spencer
4a8b426ab2 Plug some PATypeHolder memory leaks.
llvm-svn: 35198
2007-03-20 01:13:00 +00:00
Reid Spencer
ea5bcde3c8 Regenerate.
llvm-svn: 35183
2007-03-19 20:40:51 +00:00
Reid Spencer
7f92fc05cd Fix test/Assembler/2007-03-19-NegValue.ll by using the new "isSigned"
parameter on ConstantInt::get to indicate the signedness of the intended
value.

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

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

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

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

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

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

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

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

llvm-svn: 34293
2007-02-15 02:26:10 +00:00
Chris Lattner
2ad52d5242 eliminate use of vector ctors
llvm-svn: 34221
2007-02-13 05:53:56 +00:00
Chris Lattner
c30715d6b4 regenerate
llvm-svn: 34212
2007-02-13 00:58:01 +00:00
Chris Lattner
b1a1662fc6 eliminate use of methods that take vectors as args
llvm-svn: 34211
2007-02-13 00:57:40 +00:00
Chris Lattner
88ba48fcec regenerate
llvm-svn: 34188
2007-02-11 21:40:10 +00:00
Chris Lattner
26a13f469e add #include
llvm-svn: 34187
2007-02-11 21:39:35 +00:00
Reid Spencer
6af21b3029 For PR411:
This patch replaces the SymbolTable class with ValueSymbolTable which does
not support types planes. This means that all symbol names in LLVM must now
be unique. The patch addresses the necessary changes to deal with this and
removes code no longer needed as a result. This completes the bulk of the
changes for this PR. Some cleanup patches will follow.

llvm-svn: 33918
2007-02-05 20:47:22 +00:00
Reid Spencer
aabb0ec479 Regenerate.
llvm-svn: 33912
2007-02-05 17:04:00 +00:00
Reid Spencer
c48637fa58 ! removal was a little over zealous. Put the ! back in asserts.
llvm-svn: 33911
2007-02-05 17:01:20 +00:00
Reid Spencer
28005c25b4 Regenerate.
llvm-svn: 33909
2007-02-05 10:18:06 +00:00
Reid Spencer
1479edf229 There is nothing exclamatory about an error message. No other compiler
or assembler uses ! at the end of every message. We shouldn't either.

llvm-svn: 33907
2007-02-05 10:16:10 +00:00
Reid Spencer
591bfa1e0b Changes to support making the shift instructions be true BinaryOperators.
This feature is needed in order to support shifts of more than 255 bits
on large integer types.  This changes the syntax for llvm assembly to
make shl, ashr and lshr instructions look like a binary operator:
   shl i32 %X, 1
instead of
   shl i32 %X, i8 1
Additionally, this should help a few passes perform additional optimizations.

llvm-svn: 33776
2007-02-02 02:16:23 +00:00
Chris Lattner
0deac2a51d regenerate
llvm-svn: 33696
2007-01-31 04:44:08 +00:00
Chris Lattner
b0a0d4f999 eliminate a temporary vector
llvm-svn: 33695
2007-01-31 04:43:46 +00:00
Reid Spencer
19af04a142 For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoid
confusion with external linkage types.

llvm-svn: 33663
2007-01-30 20:08:39 +00:00
Anton Korobeynikov
2b64d8a83f Regenerate
llvm-svn: 33599
2007-01-28 13:37:39 +00:00
Anton Korobeynikov
611d5e2eda Propagate changes from my local tree. This patch includes:
1. New parameter attribute called 'inreg'. It has meaning "place this
parameter in registers, if possible". This is some generalization of
gcc's regparm(n) attribute. It's currently used only in X86-32 backend.
2. Completely rewritten CC handling/lowering code inside X86 backend.
Merged stdcall + c CCs and fastcall + fast CC.
3. Dropped CSRET CC. We cannot add struct return variant for each
target-specific CC (e.g. stdcall + csretcc and so on).
4. Instead of CSRET CC introduced 'sret' parameter attribute. Setting in
on first attribute has meaning 'This is hidden pointer to structure
return. Handle it gently'.
5. Fixed small bug in llvm-extract + add new feature to
FunctionExtraction pass, which relinks all internal-linkaged callees
from deleted function to external linkage. This will allow further
linking everything together.

NOTEs: 1. Documentation will be updated soon.
       2. llvm-upgrade should be improved to translate csret => sret.
          Before this, there will be some unexpected test fails.
llvm-svn: 33597
2007-01-28 13:31:35 +00:00
Reid Spencer
8949da79b5 Regenerate for PR645 and PR761
llvm-svn: 33525
2007-01-26 08:05:27 +00:00
Reid Spencer
1d28dc402d For PR645:
Implement separation of local and global symbols. Local symbols and types
now use % prefix. Global variables and functions now use @ prefix.

For PR761:
Replace:
  target endian =
  target pointersize =
With:
  target datalayout =

llvm-svn: 33524
2007-01-26 08:04:51 +00:00
Jeff Cohen
e1e3a83b49 Fix this error:
llvm[2]: Compiling llvmAsmParser.cpp for Debug build
/usr/home/jeffc/llvm/lib/AsmParser/llvmAsmParser.y: In function 'int llvmAsmparse()':
/usr/home/jeffc/llvm/lib/AsmParser/llvmAsmParser.y:1846: error: expected `;' before '}' token

llvm-svn: 33425
2007-01-21 19:19:31 +00:00
Reid Spencer
0ef35f9e8f Regenerate.
llvm-svn: 33284
2007-01-17 02:48:45 +00:00
Reid Spencer
9dc290a59b For PR1117:
Make the assembler generate a nice error message if a bad cast instruction
is attempted instead of asserting out. This is made possible by the
recently exposed method CastInst::castIsValid() which checks the validity
of any cast instruction.

llvm-svn: 33283
2007-01-17 02:47:33 +00:00
Chris Lattner
c5e1611848 rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.
rename Type::getIntegralTypeMask to Type::getIntegerTypeMask.

This makes naming much more consistent.  For example, there are now no longer any
instances of IntegerType that are not considered isInteger! :)

llvm-svn: 33225
2007-01-15 02:27:26 +00:00
Chris Lattner
ad283250fa regenerate
llvm-svn: 33224
2007-01-15 02:12:07 +00:00
Chris Lattner
0903f7f832 allow i1 to operators like shift and add.
llvm-svn: 33221
2007-01-15 02:00:29 +00:00
Reid Spencer
ff6664c461 Regenerate.
llvm-svn: 33182
2007-01-13 05:00:46 +00:00
Reid Spencer
99b79bdde3 Bye bye bool. AsmWriter doesn't generate it any more so AsmParser shouldn't
read it any more. This is consistent with the new IR as well.

llvm-svn: 33181
2007-01-13 05:00:20 +00:00
Anton Korobeynikov
ea90b2409f Regenerate
llvm-svn: 33137
2007-01-12 19:22:51 +00:00
Anton Korobeynikov
548b9af9c2 * PIC codegen for X86/Linux has been implemented
* PIC-aware internal structures in X86 Codegen have been refactored
* Visibility (default/weak) has been added
* Docs fixes (external weak linkage, visibility, formatting)

llvm-svn: 33136
2007-01-12 19:20:47 +00:00
Chris Lattner
cee2f2e618 regenerate
llvm-svn: 33131
2007-01-12 18:33:30 +00:00
Chris Lattner
b2fb78205f This production is dead, the lexer can never return 'NOT'
llvm-svn: 33130
2007-01-12 18:32:39 +00:00
Reid Spencer
6a286c69bd Regenerate.
llvm-svn: 33117
2007-01-12 07:28:27 +00:00
Reid Spencer
93f4aedbbb Integer type names need 1 or more digits, not zero or more.
llvm-svn: 33116
2007-01-12 07:27:59 +00:00
Reid Spencer
373d2bccea For PR1064:
Implement the arbitrary bit-width integer feature. The feature allows
integers of any bitwidth (up to 64) to be defined instead of just 1, 8,
16, 32, and 64 bit integers.

This change does several things:
1. Introduces a new Derived Type, IntegerType, to represent the number of
   bits in an integer. The Type classes SubclassData field is used to
   store the number of bits. This allows 2^23 bits in an integer type.
2. Removes the five integer Type::TypeID values for the 1, 8, 16, 32 and
   64-bit integers. These are replaced with just IntegerType which is not
   a primitive any more.
3. Adjust the rest of LLVM to account for this change.

Note that while this incremental change lays the foundation for arbitrary
bit-width integers, LLVM has not yet been converted to actually deal with
them in any significant way. Most optimization passes, for example, will
still only deal with the byte-width integer types.  Future increments
will rectify this situation.

llvm-svn: 33113
2007-01-12 07:05:14 +00:00
Reid Spencer
f3265181e2 Rename BoolTy as Int1Ty. Patch by Sheng Zhou.
llvm-svn: 33076
2007-01-11 18:21:29 +00:00
Zhou Sheng
23d24526b2 For PR1043:
Merge ConstantIntegral and ConstantBool into ConstantInt.
Remove ConstantIntegral and ConstantBool from LLVM.

llvm-svn: 33073
2007-01-11 12:24:14 +00:00
Andrew Lenharth
55be52f117 Make packed structs use packed initialiers for consistency
llvm-svn: 33015
2007-01-08 18:16:47 +00:00
Reid Spencer
cdaf88ff9d For PR411:
Take an incremental step towards type plane elimination. This change
separates types from values in the symbol tables by finally making use
of the TypeSymbolTable class. This yields more natural interfaces for
dealing with types and unclutters the SymbolTable class.

llvm-svn: 32956
2007-01-06 07:24:44 +00:00
Reid Spencer
3e9aba042b Regenerate.
llvm-svn: 32934
2007-01-05 21:51:07 +00:00
Reid Spencer
6cec5bdd1c For PR1077:
Disallow merging of dupliate global variables. It is now illegal to declare
or define two global variables of the same name and same type. llvm-gcc3 is
dead in 2.0 and llvm-gcc4 doesn't have that problem nor need the hack.

llvm-svn: 32933
2007-01-05 21:50:38 +00:00
Reid Spencer
a6f1f11d07 Regenerate.
llvm-svn: 32905
2007-01-05 17:07:23 +00:00
Reid Spencer
4f14887126 Change the syntax for parameter attributes:
1. The @ sign is no longer necessary.
2. We now support "function attributes" as parameter attribute 0.
3. Instead of locating the return type attributes after the type of a
   function result, they are now located after the function header's
   closing paranthesis and before any alignment or section options.
4. The way has been prepared for a new "noreturn" function attribute but
   there is no support for recognizing it in the lexer nor doing anything
   with it if it does get set.
5. The FunctionType::getParamAttrsText method now has support for
   returning multiple attributes. This required a change in its interface.

I'm unhappy that this change leads to 6 new shift/reduce conflicts, but
in each case bison's decision to choose the shift is correct so there
shouldn't be any damage from these conflicts.

llvm-svn: 32904
2007-01-05 17:06:19 +00:00
Reid Spencer
d74df01f8b Regenerate.
llvm-svn: 32862
2007-01-04 02:57:52 +00:00
Reid Spencer
6d0c49f6bd Disallow packed types in icmp/fcmp instructions. The code generator is
not prepared to handle them yet.

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

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

llvm-svn: 32824
2007-01-02 21:53:43 +00:00
Reid Spencer
4d8fdf20cc Regenerate.
llvm-svn: 32800
2006-12-31 21:47:02 +00:00
Reid Spencer
0579e58c4b Remove an extra semi-colon.
llvm-svn: 32799
2006-12-31 21:46:36 +00:00
Reid Spencer
067487a8f8 Add a missing colon. Noticed by Jeff Cohen.
llvm-svn: 32796
2006-12-31 21:25:25 +00:00
Reid Spencer
55be342ed9 For PR950:
Regenerate

llvm-svn: 32782
2006-12-31 05:40:51 +00:00
Reid Spencer
220b9a99f3 For PR950:
Major reorganization. This patch introduces the signedness changes for
the new integer types (i8, i16, i32, i64) which replace the old signed
versions (ubyte, sbyte, ushort, short, etc). This patch also implements
the function type parameter attributes feature. Together these conspired
to introduce new reduce/reduce errors into the grammar. Consequently, it
was necessary to introduce a new keyword into the grammar in order to
disambiguate. Without this, yacc would make incorrect shift/reduce and
reduce/reduce decisions and fail to parse the intended assembly.

Changes in assembly:

1. The "implementation" keyword is superfluous but still supported. You
   can use it as a sentry which will ensure there are no remaining up
   reference types. However, this is optional as those checks are also
   performed elsewhere.

2. Parameter attributes are now implemented using an at sign to
   indicate the attribute. The attributes are placed after the type
   in a function declaration or after the argument value in a function
   call. For example:
      i8 @sext %myfunc(i16 @zext)
      call i8 @sext %myfunc(i16 @zext %someVal)
   The facility is available for supporting additional attributes and
   they can be combined using the @(attr1,attr2,attr3) syntax. Right
   now  the only two supported are @sext and @zext

3. Functions must now be defined with the "define" keyword which is
   analagous to the "declare" keyword for function declarations. The
   introduction of this keyword disambiguates situations where a
   named result type is confused with a new type or gvar definition.
   For example:
      %MyType = type i16
      %MyType %func(%MyType) { ... }
   With the introduction of optional parameter attributes between
   the function name and the function result type, yacc will pick
   the wrong rule to reduce unless it is disambiguated with "define"
   before the function definition, as in:
      define %MyType @zext %func(%MyType %someArg) { ... }

llvm-svn: 32781
2006-12-31 05:40:12 +00:00
Reid Spencer
0c70732d9d Regenerate.
llvm-svn: 32772
2006-12-29 20:35:03 +00:00
Reid Spencer
38002bb037 For PR950:
Remove all grammar conflicts from assembly parsing.  This change involves:
1. Making the "type" keyword not a primitive type (removes several
   reduce/reduce conflicts)
2. Being more specific about which linkage types are allowed for functions
   and global variables. In particular "appending" can no longer be
   specified for a function. A differentiation was made between the various
   internal and external linkage types.
3. Introduced the "define" keyword which is now required when defining a
   function. This disambiguates several cases where a named function return
   type could get confused with the definition of a new type. Using the
   keyword eliminates all shift/reduce conflicts and the remaining
   reduce/reduce conflicts.

These changes are necessary to implement the function parameter attributes
that will be introduced soon. Adding the function parameter attributes in
the presence of the shift/reduce and reduce/reduce conflicts led to severe
ambiguities that caused the parser to report syntax errors that needed to
be resolved. This patch resolves them.

llvm-svn: 32770
2006-12-29 20:29:48 +00:00
Reid Spencer
4428c3483b For PR950:
This patch removes the SetCC instructions and replaces them with the ICmp
and FCmp instructions. The SetCondInst instruction has been removed and
been replaced with ICmpInst and FCmpInst.

llvm-svn: 32751
2006-12-23 06:05:41 +00:00
Reid Spencer
1bb72cf36e Allow negative constants for unsigned integers and unsigned constants
greater than MAX_INT64 for signed integers. This is now valid and is just
waiting for the distinction between signed and unsigned to go away.

llvm-svn: 32716
2006-12-20 17:20:09 +00:00
Andrew Lenharth
36e3fe118f Hopefully these are the regenerated files
llvm-svn: 32362
2006-12-08 18:07:09 +00:00
Andrew Lenharth
d115fe7ce3 Packed Structures
llvm-svn: 32361
2006-12-08 18:06:16 +00:00
Bill Wendling
a3246c4272 Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
now cerr, cout, and NullStream resp.

llvm-svn: 32298
2006-12-07 01:30:32 +00:00
Reid Spencer
a5b4e1c136 Regenerate.
llvm-svn: 32246
2006-12-05 23:50:48 +00:00
Reid Spencer
15979b2dc3 Remove dead var NewVarArgs.
llvm-svn: 32245
2006-12-05 23:46:41 +00:00
Reid Spencer
ecfe285ee4 Regenerate.
llvm-svn: 32242
2006-12-05 23:29:42 +00:00
Reid Spencer
cd773b0d10 Dump the old va_arg and va_next upgrade support. No need to keep track of
the current basic block any more either.

llvm-svn: 32241
2006-12-05 23:28:06 +00:00
Reid Spencer
f024dd475f Regenerate.
llvm-svn: 32233
2006-12-05 19:16:11 +00:00
Reid Spencer
7b292216d6 Remove various old upgrade hacks that are no longer needed.
llvm-svn: 32232
2006-12-05 19:15:41 +00:00
Reid Spencer
8921f36bbd Regenerate.
llvm-svn: 32173
2006-12-04 05:24:24 +00:00
Reid Spencer
807b56d92b For PR950: For ICmp and FCmp constant expressions, put the predicate outiside the parentheses to match what llvm-upgrade generates.
llvm-svn: 32171
2006-12-04 05:20:06 +00:00
Reid Spencer
2d9ef9ff2d Regenerate.
llvm-svn: 32156
2006-12-03 16:20:14 +00:00
Reid Spencer
178ca8ccb7 Remove useless #include.
llvm-svn: 32155
2006-12-03 16:19:43 +00:00
Reid Spencer
45af0be5e4 Regenerate.
llvm-svn: 32152
2006-12-03 06:59:29 +00:00
Reid Spencer
1f0ce9daae 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
c7ef78e5be Regenerate.
llvm-svn: 32145
2006-12-03 05:46:11 +00:00
Reid Spencer
e7083039e5 Remove backwards compatibility goop. Now implemented in llvm-upgrade.
llvm-svn: 32144
2006-12-03 05:45:44 +00:00
Reid Spencer
f13a49f6aa Regenerate.
llvm-svn: 32053
2006-12-01 00:33:46 +00:00
Anton Korobeynikov
f627d28d9c Introducing external weak linkage. Darwin codegen should be added later.
llvm-svn: 32052
2006-12-01 00:25:12 +00:00
Bill Wendling
35041c7c45 Removed #include <iostream> and used llvm streams
llvm-svn: 31984
2006-11-28 22:47:12 +00:00
Reid Spencer
2e6a2775db Regenerate.
llvm-svn: 31965
2006-11-28 07:29:44 +00:00
Reid Spencer
05a440d447 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
992d9788b3 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
5487228419 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
839551a7c1 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
da1f5b882a 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
d2ebf186dc regenerate
llvm-svn: 31539
2006-11-08 05:58:47 +00:00
Chris Lattner
6147da248c Fix a bug noticed by Emil Mikulic.
llvm-svn: 31538
2006-11-08 05:58:11 +00:00
Reid Spencer
4bafa71dc1 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
1abf69e923 For PR950:
Replace the REM instruction with UREM, SREM and FREM.

llvm-svn: 31369
2006-11-02 01:53:59 +00:00
Reid Spencer
6833ffe8b8 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
b62dc05d41 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
9ca9ec40f1 Regenerate.
llvm-svn: 31111
2006-10-22 07:03:43 +00:00
Reid Spencer
9caeb2165b Remove unneeded CHECK_FOR_ERROR invocations.
llvm-svn: 31110
2006-10-22 07:03:09 +00:00
Chris Lattner
25fd3d8b99 regenerate
llvm-svn: 31109
2006-10-22 06:08:13 +00:00
Chris Lattner
0bf0490e0c change keyword to datalayout
llvm-svn: 31108
2006-10-22 06:07:41 +00:00
Reid Spencer
d414793dbc 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
de03eb21c2 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
12374f766b 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
9ecd9bcde4 regenerate
llvm-svn: 30971
2006-10-15 23:27:25 +00:00
Chris Lattner
2ac6ca0f82 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
2e9ba7166f 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
168061f13d 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
0d237ceba1 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
7c2118575c 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
b2b7c2f8b9 Small fixes for supporting dll* linkage types
llvm-svn: 30441
2006-09-17 13:06:18 +00:00
Anton Korobeynikov
24c070f50d Adding generated files for the last commit
llvm-svn: 30375
2006-09-14 18:25:26 +00:00
Anton Korobeynikov
6e19f80688 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
6c5b7d24c2 regenerate
llvm-svn: 29771
2006-08-18 17:34:45 +00:00
Chris Lattner
b3b620030f trivial optimization
llvm-svn: 29770
2006-08-18 17:34:24 +00:00
Reid Spencer
32bc5710a6 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
10758a6ae5 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
c7c0e6c6ef 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
f898cccc07 These libs use EH info
llvm-svn: 29043
2006-07-07 16:44:31 +00:00
Chris Lattner
0a12a0f38b fix typo
llvm-svn: 28897
2006-06-21 16:53:00 +00:00
Chris Lattner
5cba9093c8 Fix build on systems with bad bison's
llvm-svn: 28657
2006-06-02 18:20:28 +00:00
Reid Spencer
94a443bb29 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
ac33b75511 Fix grammar in a comment.
llvm-svn: 28534
2006-05-29 02:34:34 +00:00