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

660 Commits

Author SHA1 Message Date
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