Commit Graph

378 Commits

Author SHA1 Message Date
Dan Gohman 08143e397d Add support for vector remainder operations.
llvm-svn: 43744
2007-11-05 23:35:22 +00:00
Dale Johannesen 4646aa3e33 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 028084efe5 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 245dceb06d 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 dae70d4d36 Fix PR1645 by resolving forward alias references.
llvm-svn: 41815
2007-09-10 23:23:53 +00:00
Dale Johannesen 9e70086c8f Apply feedback from previous patch.
llvm-svn: 41774
2007-09-07 21:07:57 +00:00
Dale Johannesen bed9dc423c 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 c656cbb8c2 Update GEP constructors to use an iterator interface to fix
GLIBCXX_DEBUG issues.

llvm-svn: 41697
2007-09-04 15:46:09 +00:00
David Greene 703623d571 Update InvokeInst to work like CallInst
llvm-svn: 41506
2007-08-27 19:04:21 +00:00
Chris Lattner 6a5a2620ba Fix PR1577, a crash on invalid bug.
llvm-svn: 40874
2007-08-06 21:00:37 +00:00
Chandler Carruth 7132e00de7 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 ff4c3be741 Long double, part 1 of N. Support in IR.
llvm-svn: 40774
2007-08-03 01:03:46 +00:00
David Greene 17a5dfe6f7 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 b6508349a7 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 4f178405ad 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 d45d07ac72 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 644f917358 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 314e1cb7ee 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 b567e3ffb0 Add the byval attribute
llvm-svn: 37940
2007-07-06 10:57:03 +00:00
Zhou Sheng 2444a9adeb 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 3b208cca84 Implement full unescaping of escaped hex characters in all quoted identifiers
and strings.

llvm-svn: 37291
2007-05-22 18:52:21 +00:00
Reid Spencer aba0cc7173 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 cf40d5097b 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 39f3cffbe3 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
Reid Spencer 7851765b0a Revert the premature portion of the last commit.
llvm-svn: 36542
2007-04-28 16:06:50 +00:00
Reid Spencer b19636e4af Fix a compilation error (jump to case label).
llvm-svn: 36539
2007-04-28 14:13:42 +00:00
Anton Korobeynikov b18f8f85e9 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 eee35bfc8a 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 0be6fc5fd7 Quiet a compiler warning about assignment in an if-then conditional.
llvm-svn: 36454
2007-04-25 23:52:02 +00:00
Anton Korobeynikov 5e4e8f5e09 Add missed semicolon. Resotre compatibility with older bisons
llvm-svn: 36443
2007-04-25 18:07:40 +00:00
Anton Korobeynikov a97b694c82 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 8448570beb 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 4388f0b4fa 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 0c1349e6bc Revert Christopher Lamb's load/store alignment changes.
llvm-svn: 36309
2007-04-21 18:36:27 +00:00
Christopher Lamb bff50208c8 add support for alignment attributes on load/store instructions
llvm-svn: 36301
2007-04-21 08:16:25 +00:00
Reid Spencer 9c9741e864 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 4339f7d78f 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 0fc73b6aee 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 94bae69764 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 749e4668e7 Implement the "thread_local" keyword.
llvm-svn: 35950
2007-04-12 18:32:50 +00:00
Reid Spencer a472f66dd0 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 71b79e3d99 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 bef90fe7a7 Drop the implementation keyword.
llvm-svn: 35794
2007-04-09 01:55:42 +00:00
Reid Spencer cf2ccbff1a 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 01a599a202 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 2e35a58838 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 a483577d21 Add support for the noreturn and nounwind function attributes.
llvm-svn: 35258
2007-03-22 02:13:23 +00:00
Reid Spencer 0ad5cebb09 Don't delete things before their last use (avoids bad reads).
llvm-svn: 35214
2007-03-20 17:18:33 +00:00
Reid Spencer d05bc52fec Plug some PATypeHolder memory leaks.
llvm-svn: 35198
2007-03-20 01:13:00 +00:00
Reid Spencer 363fd46199 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