Commit Graph

449 Commits

Author SHA1 Message Date
Duncan Sands
7af1c78b98 Allow readonly functions to unwind exceptions. Teach
the optimizers about this.  For example, a readonly
function with no uses cannot be removed unless it is
also marked nounwind.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71071 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-06 06:49:50 +00:00
Chris Lattner
bdd73290a5 Remove obsolete wording, the only exception a readnone function can throw
is the empty set. :)  Thanks to Fritz for pointing this out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70790 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-03 19:06:00 +00:00
Chris Lattner
7a57c5bb08 be very explicit that readnone/readonly functions can't
throw exceptions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70788 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-03 18:49:37 +00:00
Sanjiv Gupta
23c70f44e4 Now that any size of integer indices are allowed for sequential types, remove the unneccessary gyan about promoting them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70181 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-27 03:21:00 +00:00
Sanjiv Gupta
9341c808ae Any size of integral indices are allowed in gep for indexing into sequential types. Also adding a test case to check the indices type allowed into struct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70134 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-26 17:14:35 +00:00
Sanjiv Gupta
9f805c206e Fixed the gep example for i16 type indices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70019 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-25 07:27:44 +00:00
Sanjiv Gupta
16ffa807fc Fixed spaces and the getelementpointer example with i16 type indices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69971 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-24 16:38:13 +00:00
Sanjiv Gupta
7787d4a34b Allow i16 type indices to gep.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69946 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-24 02:37:54 +00:00
Chris Lattner
266c7bbbbc Add a new "available_externally" linkage type. This is intended
to support C99 inline, GNU extern inline, etc.  Related bugzilla's
include PR3517, PR3100, & PR2933.  Nothing uses this yet, but it
appears to work.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68940 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13 05:44:34 +00:00
Nick Lewycky
21cc4460ef Add support for embedded metadata to LLVM. This introduces two new types of
Constant, MDString and MDNode which can only be used by globals with a name
that starts with "llvm." or as arguments to a function with the same naming
restriction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68420 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-04 07:22:01 +00:00
Duncan Sands
19527c6ef3 Add some explanations of how apint loads and stores
work.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67471 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-22 11:33:16 +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
Chris Lattner
8c0e62cdb2 Clarify wording, patch by Stefanus Du Toit!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66458 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-09 20:55:18 +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
Bill Wendling
0a4bbbf62f Fix grammaro.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65727 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-28 22:12:54 +00:00
Chris Lattner
7088279597 don't use the word 'aggregate' with constants, it is confusing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65702 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-28 18:32:25 +00:00
Chris Lattner
03bbad6410 don't redescribe bitcast constraints in two places. It is not valid to
bitcast from one aggregate to another.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65700 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-28 18:27:03 +00:00
Nick Lewycky
6cd74989b9 Update this text for first-class aggregates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65697 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-28 17:30:06 +00:00
Nick Lewycky
b6a7d2565b Demonstrate the act of including multiple space-separated parameter attributes,
by request on IRC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64619 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-15 23:06:14 +00:00
Dale Johannesen
bd5e5a8669 Edit description of floating point constants to
reflect reality.  Acknowledgements to John Clements
for prodding me into this.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64332 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-11 22:14:51 +00:00
Chris Lattner
3060f5bbf7 fix typo, patch by Jonathan Brandmeyer!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64132 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-09 10:00:56 +00:00
Bill Wendling
41b485c9c3 Document llvm.umul.with.overflow indicating that it's badly broken and not intended for use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64104 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08 23:00:09 +00:00
Chris Lattner
e220e8cc07 I can't type today apparently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64097 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08 22:21:28 +00:00
Chris Lattner
056202961d fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64090 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08 19:59:51 +00:00
Chris Lattner
0fd4a27ec0 document pointer type constraints, PR3513
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64088 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08 19:53:29 +00:00
Bill Wendling
da01af7667 Fixes from feedback.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64070 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08 04:04:40 +00:00
Bill Wendling
ac1df8ef33 Document the 'llvm.OP.with.overflow' intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64066 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08 01:40:31 +00:00
Chris Lattner
ce459b1e28 PR3485, document alignment on byref.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63836 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05 05:42:28 +00:00
Chris Lattner
ef56ce18b8 validation error fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63503 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-02 07:33:15 +00:00
Chris Lattner
242d61d1c9 Document type upreferences (PR3380), patch by Stein Roger Skafløtten
with enhancements and corrections by me.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63502 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-02 07:32:36 +00:00
Dan Gohman
d8791e5ed7 Add more documentation mentioning the limitations due to PR2660.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62919 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-24 15:58:40 +00:00
Dan Gohman
c766f7234a Add a few more notes about LLVM IR features that codegen doesn't
yet support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62739 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-22 01:39:38 +00:00
Duncan Sands
81d05c2ae2 Grammar fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62319 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 09:29:46 +00:00
Rafael Espindola
bb46f52027 Add the private linkage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62279 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 20:18:42 +00:00
Dan Gohman
f3e60bd8ee Document several current CodeGen limitations in LangRef.html.
Patches for any of these are welcome!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62120 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-12 23:12:39 +00:00
Dan Gohman
7956412470 The LLVM Assembly Language Reference incorrectly stated that the
prefix used for dll{import,export} is _imp__; it is actually __imp_.
Patch by Mahadevan R!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62103 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-12 21:35:55 +00:00
Chris Lattner
e7886e461b Implement PR3313, and while I'm at it address a very FAQ.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62048 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-11 20:53:49 +00:00
Dan Gohman
398873c032 Fix the example syntax for named sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62033 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-11 00:40:00 +00:00
Dan Gohman
81e21674a6 A few more whitespace tidyments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61655 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-04 23:49:44 +00:00
Dan Gohman
2a08c53238 Tidy whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61653 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-04 23:44:43 +00:00
Chris Lattner
0c7b39fb56 new non-ambiguous syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61559 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-02 07:02:56 +00:00
Nick Lewycky
f23d0d392a Resubmit support for the 'nocapture' attribute.
The problematic part of this patch is that we were out of attribute bits,
requiring some fancy bit hacking to make it fit (by shrinking alignment)
without breaking existing users or the file format.

This change will require users to rebuild llvm-gcc to match llvm.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61239 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-19 06:39:12 +00:00
Bill Wendling
6fa311c233 Temporarily revert r61019, r61030, and r61040. These were breaking LLVM Release
builds.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61094 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-16 19:06:48 +00:00
Nick Lewycky
e642658480 Introducing nocapture, a parameter attribute for pointers to indicate that the
callee will not introduce any new aliases of that pointer.

The attributes had all bits allocated already, so I decided to collapse
alignment. Alignment was previously stored as a 16-bit integer from bits 16 to
32 of the attribute, but it was required to be a power of 2. Now it's stored in
log2 encoded form in five bits from 16 to 21. That gives us 11 more bits of
space.

You may have already noticed that you only need four bits to encode a 16-bit
power of two, so why five bits? Because the AsmParser accepted 32-bit
alignments, even though we couldn't store them (they were silently discarded).
Now we can store them in memory, but not in the bitcode.

The bitcode format was already storing these as 64-bit VBR integers. So, the
bitcode format stays the same, keeping the alignment values stored as 16 bit
raw values. There's some hideous code in the reader and writer that deals with
this, waiting to be ripped out the moment we run out of bits again and have to
replace the parameter attributes table encoding.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61019 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-15 01:34:58 +00:00
Misha Brukman
444087057a Global replace of yellow W3C "valid HTML/CSS" icons with blue ones.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60880 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-11 17:34:48 +00:00
Mon P Wang
01f8d09dd3 Added a little more information that vector shifts require vector shift amount.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60831 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-10 08:55:09 +00:00
Mon P Wang
e9f1015d1f Fix getNode to allow a vector for the shift amount for shifts of vectors.
Fix the shift amount when unrolling a vector shift into scalar shifts.
Fix problem in getShuffleScalarElt where it assumes that the input of
a bit convert must be a vector.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60740 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-09 05:46:39 +00:00
Misha Brukman
b0a57aa893 Fixed HTML closing tag, cleaned up some spacing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60153 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-27 06:41:20 +00:00
Bill Wendling
baa39d8664 Small formatting change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60113 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-26 19:19:05 +00:00