Commit Graph

459 Commits

Author SHA1 Message Date
Daniel Dunbar
87bde0b7d3 Document the stack alignment part of target data description.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73089 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-08 22:17:53 +00:00
Dan Gohman
ae3a0be92e Split the Add, Sub, and Mul instruction opcodes into separate
integer and floating-point opcodes, introducing
FAdd, FSub, and FMul.

For now, the AsmParser, BitcodeReader, and IRBuilder all preserve
backwards compatability, and the Core LLVM APIs preserve backwards
compatibility for IR producers. Most front-ends won't need to change
immediately.

This implements the first step of the plan outlined here:
http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72897 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-04 22:49:04 +00:00
Jay Foad
d244909b76 Document how phi and invoke instructions interact with SSA form.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72762 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-03 10:20:10 +00:00
Nick Lewycky
1e8c7a687d Metadata uses metadata type not empty struct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72623 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-30 16:08:30 +00:00
Nick Lewycky
7a0370f66a Give embedded metadata its own type instead of relying on EmptyStructTy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72610 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-30 05:06:04 +00:00
Nick Lewycky
86c48647f3 Remove border around table used for layout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72357 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-24 02:46:06 +00:00
Dan Gohman
f96a499535 Add a note mentioning that uses of the return value of an invoke
must be dominated by the normal label.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72285 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-22 21:47:08 +00:00
Nick Lewycky
cb33799b9f Make MDNode use CallbackVH. Also change MDNode to store Value* instead of
Constant* in preperation of a future change to support holding non-Constants
in an MDNode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71407 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-10 20:57:05 +00:00
Chris Lattner
60150a3dc4 fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71362 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-09 18:11:50 +00:00
Bill Wendling
871eb0ab23 Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71260 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-08 20:49:29 +00:00
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