Commit Graph

365 Commits

Author SHA1 Message Date
Reid Spencer
e87f23377c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40632 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-31 14:39:10 +00:00
Reid Spencer
bf7f45152c 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40619 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-31 06:37:27 +00:00
Reid Spencer
1d3d230861 For PR1553:
Make the AsmParser auto-upgrade the old zext and sext
keywords for parameter attributes and handle the 
end-of-line ambiguity.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40610 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-31 02:57:37 +00:00
Duncan Sands
36397f5034 Support for trampolines, except for X86 codegen which is
still under discussion.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40549 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-27 12:58:54 +00:00
Reid Spencer
9445e9aaa0 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40069 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-19 23:13:04 +00:00
Rafael Espindola
1aa7efbd2c Add the byval attribute
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37940 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-06 10:57:03 +00:00
Zhou Sheng
febca3499e Commit first round work of PR1373. "noalias" is now fully supported in
VMCore, BitCode, and Assembly. Documentation and test case paramattrs.ll
updated also.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37432 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-05 05:28:26 +00:00
Reid Spencer
6ecdcc1c03 Implement full unescaping of escaped hex characters in all quoted identifiers
and strings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37291 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-22 18:52:21 +00:00
Reid Spencer
aa7c2f8c03 Make the %"..." syntax legal for local name. This just makes it symmetric
with global names which can already be @"..."


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37257 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-19 07:21:26 +00:00
Chris Lattner
dd3094a2a8 fix a bug where llvm-as couldn't assemble the .ll file for 252.eon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36739 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-04 04:01:07 +00:00
Anton Korobeynikov
6f9896fcc8 Implement protected visibility. This partly implements PR1363. Linker
should be taught to deal with protected symbols.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36565 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 18:35:00 +00:00
Reid Spencer
863dd88cc5 Revert the premature portion of the last commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36542 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 16:06:50 +00:00
Reid Spencer
3cb4ddaec0 Fix a compilation error (jump to case label).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36539 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 14:13:42 +00:00
Anton Korobeynikov
a80e1181b7 Implement review feedback. Aliasees can be either GlobalValue's or
bitcasts of them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36537 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 13:45:00 +00:00
Chris Lattner
4989b84271 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36469 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-26 05:30:35 +00:00
Bill Wendling
9de1371fc9 Quiet a compiler warning about assignment in an if-then conditional.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36454 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-25 23:52:02 +00:00
Anton Korobeynikov
c0fabcbabe Add missed semicolon. Resotre compatibility with older bisons
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36443 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-25 18:07:40 +00:00
Anton Korobeynikov
8b0a8c84da Implement aliases. This fixes PR1017 and it's dependent bugs. CFE part
will follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36435 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-25 14:27:10 +00:00
Christopher Lamb
43c7f37942 PR400 work phase 1. Add attributed load/store instructions for volatile/align to LLVM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36349 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 19:24:39 +00:00
Reid Spencer
4f859aa532 For PR1146:
Make ParamAttrsList objects unique. You can no longer directly create or
destroy them but instead must go through the ParamAttrsList::get()
interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36327 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 05:46:44 +00:00
Reid Spencer
c67bdc288a Revert Christopher Lamb's load/store alignment changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36309 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-21 18:36:27 +00:00
Christopher Lamb
2330e4d4c4 add support for alignment attributes on load/store instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36301 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-21 08:16:25 +00:00
Reid Spencer
ce1e8efc43 Okay, yes there *is* a getKeyLength method on ValueName. And, it should be
used because we *do* want to allow nulls in names.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36178 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-16 22:01:57 +00:00
Reid Spencer
43e607303b Check length of string before we walk off the end of it.
Thanks, Chris.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36155 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-16 20:31:06 +00:00
Reid Spencer
5b35fbe6b9 Use a more optimal way to get the name of a function. Thanks, Chris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36143 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-16 17:45:50 +00:00
Reid Spencer
ebff55ce38 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36121 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-16 06:55:42 +00:00
Lauro Ramos Venancio
c763552299 Implement the "thread_local" keyword.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35950 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-12 18:32:50 +00:00
Reid Spencer
18da072088 For PR1146:
Put the parameter attributes in their own ParamAttr name space. Adjust the
rest of llvm as a result.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35877 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-11 02:44:20 +00:00
Reid Spencer
5694b6e90e For PR1146:
Adapt handling of parameter attributes to use the new ParamAttrsList class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35814 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-09 06:17:21 +00:00
Reid Spencer
744d036318 Drop the implementation keyword.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35794 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-09 01:55:42 +00:00
Reid Spencer
cd5bd90a7b 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35499 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-30 01:37:13 +00:00
Reid Spencer
a5005c077b Give users a grace period on the implementation keyword. This *will* get
removed in a few days.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35472 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 18:49:28 +00:00
Reid Spencer
66a82155b4 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35410 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-28 02:36:42 +00:00
Reid Spencer
a39dfd39e4 Add support for the noreturn and nounwind function attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35258 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-22 02:13:23 +00:00
Reid Spencer
810cce8434 Don't delete things before their last use (avoids bad reads).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35214 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-20 17:18:33 +00:00
Reid Spencer
2c9df214c7 Plug some PATypeHolder memory leaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35198 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-20 01:13:00 +00:00
Reid Spencer
eac65746d7 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35182 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-19 20:40:22 +00:00
Reid Spencer
186a43f1ad 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35173 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-19 18:39:36 +00:00
Reid Spencer
af1aacd91a 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34794 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-01 19:32:01 +00:00
Reid Spencer
f231004a1c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34714 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 02:23:44 +00:00
Reid Spencer
ac9dcb94dd For PR1195:
Change use of "packed" term to "vector" in comments, strings, variable
names, etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34300 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 03:39:18 +00:00
Reid Spencer
9d6565a5b1 For PR1195:
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34293 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 02:26:10 +00:00
Chris Lattner
9d2fda6883 eliminate use of vector ctors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34221 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 05:53:56 +00:00
Chris Lattner
c856c7aea6 eliminate use of methods that take vectors as args
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34211 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 00:57:40 +00:00
Chris Lattner
c02659f675 add #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34187 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-11 21:39:35 +00:00
Reid Spencer
ef9b9a7939 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33918 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-05 20:47:22 +00:00
Reid Spencer
1755a9a7b1 ! removal was a little over zealous. Put the ! back in asserts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33911 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-05 17:01:20 +00:00
Reid Spencer
f4fa590293 There is nothing exclamatory about an error message. No other compiler
or assembler uses ! at the end of every message. We shouldn't either.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33907 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-05 10:16:10 +00:00
Reid Spencer
832254e1c2 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33776 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-02 02:16:23 +00:00
Chris Lattner
e013540654 eliminate a temporary vector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33695 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-31 04:43:46 +00:00