Commit Graph

480 Commits

Author SHA1 Message Date
Dan Gohman
4df605ba46 Update to new syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77043 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 02:23:48 +00:00
Dan Gohman
08d012eba4 Rename the new unsigned and signed keywords to nuw and nsw,
which stand for no-unsigned-wrap and no-signed-wrap.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76810 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 22:44:56 +00:00
Dan Gohman
9c5beed5f5 Misc. doc fixes following suggestions from Eli.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76699 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 00:04:19 +00:00
Dan Gohman
cbb38f2f67 Documentation for the new non-overflow and exact keywords.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76495 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 22:41:19 +00:00
Chris Lattner
401e10c4fb implement a new magic global "llvm.compiler.used" which is like llvm.used, but
doesn't cause ".no_dead_strip" to be emitted on darwin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76399 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 06:14:25 +00:00
Chris Lattner
857755c2a5 document llvm.used and llvm.metadata. Stub out llvm.global_[cd]tors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76396 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 05:55:19 +00:00
Bill Wendling
987e7eb59c Rename the index to linkage types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76394 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 02:41:50 +00:00
Bill Wendling
c39e3e0abc More reformatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76393 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 02:39:26 +00:00
Bill Wendling
d9fe298ccb Fix HTML violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76392 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 02:32:41 +00:00
Bill Wendling
e910b4cefe Obsessivly reformat.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76391 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 02:29:24 +00:00
Bill Wendling
3d10a5a757 Add plumbing for the `linker_private' linkage type. This type is meant for
"private" symbols which the assember shouldn't strip, but which the linker may
remove after evaluation. This is mostly useful for Objective-C metadata.

This is plumbing, so we don't have a use of it yet. More to come, etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76385 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 01:03:30 +00:00
Chris Lattner
8ad2f98739 fix some typos pointed out by Hidenobu Seki
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76342 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 21:47:15 +00:00
Chris Lattner
0c542ff13f end sentence in period, draw attention to the fact that you should
only do this if you are a crazy russian hacker. ;-)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76241 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 21:14:28 +00:00
Anton Korobeynikov
c5ec8a78ea Add support for naked functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76198 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 18:07:26 +00:00
Chris Lattner
eaff524670 remove llvm.part.set.* and llvm.part.select.*. They have never been
implemented in codegen, have no frontend to generate them, and are 
better implemented with pattern matching (like the ppc backend does
to generate rlwimi/rlwinm etc).

PR4543



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75430 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-12 21:08:53 +00:00
Nick Lewycky
7f6aa2b162 Remove the vicmp and vfcmp instructions. Because we never had a release with
these instructions, no autoupgrade or backwards compatibility support is
provided.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74991 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 03:04:38 +00:00
Duncan Sands
434ca80b31 Clarify that if the alignment is zero then an alignment
compatible with the type will be used (at least the ABI
alignment).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73827 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-20 13:26:06 +00:00
Eli Friedman
7ed5d56541 Remove the "llvm.umul.with.overflow is broken" warning; it should be
essentially working now, at least for common cases, and it shouldn't 
silently generate bad code.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73484 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-16 10:24:13 +00:00
Dan Gohman
125473b84c Rewrite the noredzone description, attempting to avoid confusing language.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73421 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-15 21:18:01 +00:00
Dan Gohman
2185f9e1eb Reword the description of the noredzone attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73394 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-15 17:37:09 +00:00
Devang Patel
5d96fdac41 Document noredzone and noimplicitfloat function attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73246 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-12 19:45:19 +00:00
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