Commit Graph

13 Commits

Author SHA1 Message Date
Dan Gohman
d480ac6f97 Update the polygen grammer to reflect that zext and sext are no longer
valid argument attributes (zeroext and signext are).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68053 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-30 19:59:02 +00:00
Duncan Sands
4dc2b39bf8 It makes no sense to have a ODR version of common
linkage, so remove it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66690 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-11 20:14:15 +00:00
Duncan Sands
5f4ee1fc5d Remove the one-definition-rule version of extern_weak
linkage: this linkage type only applies to declarations,
but ODR is only relevant to globals with definitions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66650 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-11 08:08:06 +00:00
Duncan Sands
667d4b8de6 Introduce new linkage types linkonce_odr, weak_odr, common_odr
and extern_weak_odr.  These are the same as the non-odr versions,
except that they indicate that the global will only be overridden
by an *equivalent* global.  In C, a function with weak linkage can
be overridden by a function which behaves completely differently.
This means that IP passes have to skip weak functions, since any
deductions made from the function definition might be wrong, since
the definition could be replaced by something completely different
at link time.   This is not allowed in C++, thanks to the ODR
(One-Definition-Rule): if a function is replaced by another at
link-time, then the new function must be the same as the original
function.  If a language knows that a function or other global can
only be overridden by an equivalent global, it can give it the
weak_odr linkage type, and the optimizers will understand that it
is alright to make deductions based on the function body.  The
code generators on the other hand map weak and weak_odr linkage
to the same thing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66339 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-07 15:45:40 +00:00
Dan Gohman
de0e7f2481 Fix a thinko in the grammar for thread_local variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61767 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 23:03:03 +00:00
Dan Gohman
8f56ebaf5c A few more polygen grammar updates.
- After GlobalAssign, emit addrspace before global/constant, to follow
   the new syntax.
 - Eliminate "type void", which is now invalid.
 - Fix invalid liblists like [, "foo"].
 - Tweak whitespace in a few places.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61706 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 17:29:42 +00:00
Dan Gohman
571238acc5 Update polygen grammar for recent language changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61669 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 03:21:23 +00:00
Dan Gohman
0d58eb63fc Update the LLVM polygen grammar for recent language changes:
x86_ssecallcc, function notes, and some whitespace adjustments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56221 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-15 16:10:51 +00:00
Dan Gohman
f910eaaddd AsmParser support for immediate constant aggregate values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52149 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-09 14:45:02 +00:00
Dan Gohman
34e71fe29d Update the polygen grammer for the new insertvalue and extractvalue syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51879 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-02 19:47:09 +00:00
Dan Gohman
b737a64a85 Fix the spelling of the va_arg keyword.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51484 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-23 17:11:55 +00:00
Dan Gohman
e4977cf750 Make structs and arrays first-class types, and add assembly
and bitcode support for the extractvalue and insertvalue
instructions and constant expressions.

Note that this does not yet include CodeGen support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51468 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-23 01:55:30 +00:00
Dan Gohman
890c31cfcc Add a polygen grammar definition for LLVM assembly language.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51449 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-22 22:45:03 +00:00