1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

638 Commits

Author SHA1 Message Date
Nick Lewycky
753ef5bbf0 Pick better examples. "fpext float 3.1415 to double" won't parse because 3.1415
isn't an exact float. Also "fpext float 1.0 to float" is invalid IR because
it's not performing an extension.

llvm-svn: 128647
2011-03-31 18:20:19 +00:00
Cameron Zwarich
0f031dccab Change the signext language in LangRef to closer match zeroext.
llvm-svn: 127808
2011-03-17 14:21:58 +00:00
Cameron Zwarich
2bb1e45ea3 The x86-64 ABI says that a bool is only guaranteed to be sign-extended to a byte
rather than an int. Thankfully, this only causes LLVM to miss optimizations, not
generate incorrect code.

This just fixes the zext at the return. We still insert an i32 ZextAssert when
reading a function's arguments, but it is followed by a truncate and another i8
ZextAssert so it is not optimized.

llvm-svn: 127766
2011-03-16 22:20:18 +00:00
Duncan Sands
1e5b90b716 Clarify that the result of an srem is only guaranteed to have the same sign as the
left-hand-side if the result is non-zero.

llvm-svn: 127156
2011-03-07 09:12:24 +00:00
Bill Wendling
e65e2ba6c4 Small cleanup.
llvm-svn: 126821
2011-03-02 02:17:11 +00:00
Nadav Rotem
ab7cf630f4 Enable support for vector sext and trunc:
Limit the folding of any_ext and sext  into the load operation to scalars.
Limit the active-bits trunc optimization to scalars.
Document vector trunc and vector sext in LangRef.

Similar to commit 126080 (for enabling zext).

llvm-svn: 126424
2011-02-24 21:01:34 +00:00
Nadav Rotem
1660c0bc25 Fix 9267; Add vector zext support.
The DAGCombiner folds the zext into complex load instructions. This patch
prevents this optimization on vectors since none of the supported targets
knows how to perform load+vector_zext in one instruction.

llvm-svn: 126080
2011-02-20 12:37:50 +00:00
Chris Lattner
6fbe8f23a6 fix typo
llvm-svn: 125192
2011-02-09 16:44:44 +00:00
Chris Lattner
2fd09e3397 implement .ll and .bc support for nsw/nuw on shl and exact on lshr/ashr.
Factor some code better.

llvm-svn: 125006
2011-02-07 16:40:21 +00:00
Chris Lattner
7b6a968f5d enhance vmcore to know that udiv's can be exact, and add a trivial
instcombine xform to exercise this.

Nothing forms exact udivs yet though.  This is progress on PR8862

llvm-svn: 124992
2011-02-06 21:44:57 +00:00
Nick Lewycky
9fe6ef1bed Most browsers eliminate whitespace between anchor tags. Force whitespace with
  so that the code reads properly.

llvm-svn: 124514
2011-01-29 01:09:53 +00:00
Rafael Espindola
fde74c53b6 Add a clarification about merging constants with and without unnamed_addr.
llvm-svn: 123530
2011-01-15 08:20:57 +00:00
Rafael Espindola
9f526bcf4d First step in fixing PR8927:
Add a unnamed_addr bit to global variables and functions. This will be used
to indicate that the address is not significant and therefore the constant
or function can be merged with others.

If an optimization pass can show that an address is not used, it can set this.

Examples of things that can have this set by the FE are globals created to
hold string literals and C++ constructors.

Adding unnamed_addr to a non-const global should have no effect unless
an optimization can transform that global into a constant.

Aliases are not allowed to have unnamed_addr since I couldn't figure
out any use for it.

llvm-svn: 123063
2011-01-08 16:42:36 +00:00
Tobias Grosser
4f458bffaa Integers are primitive types. Update the documentation to state this
This was done for label, void, floating point, x86mmx, metadata,
just not integer.

llvm-svn: 122606
2010-12-28 20:29:31 +00:00
Frits van Bommel
96efe38470 Clarify some of the differences between indexing with getelementptr and indexing with insertvalue/extractvalue.
llvm-svn: 120957
2010-12-05 20:54:38 +00:00
Nick Lewycky
87f97b60f8 Make @llvm.invariant.start not be readonly, so that it has side-effects. This
unbreaks test/Transforms/InstCombine/invariant.ll which was broken by r120382.
This is a fix-forward to do what I think Chris intended.

llvm-svn: 120388
2010-11-30 04:13:41 +00:00
Chris Lattner
d4da93abb1 a byval argument without an align can have an arbitrary alignment
requirement on the input pointer.

llvm-svn: 119914
2010-11-20 23:49:06 +00:00
Chris Lattner
5faff99d84 With the newly simplified SourceMgr interfaces and the generalized
SrcMgrDiagHandler, we can improve clang diagnostics for inline asm:
instead of reporting them on a source line of the original line,
we can report it on the correct line wherever the string literal came
from. For something like this:

void foo() {
  asm("push %rax\n"
      ".code32\n");
}

we used to get this: (note that the line in t.c isn't helpful)

t.c:4:7: error: warning: ignoring directive for now
  asm("push %rax\n"
      ^
<inline asm>:2:1: note: instantiated into assembly here
.code32
^

now we get:

t.c:5:8: error: warning: ignoring directive for now
      ".code32\n"
       ^
<inline asm>:2:1: note: instantiated into assembly here
.code32
^

Note that we're pointing to line 5 properly now.

llvm-svn: 119488
2010-11-17 08:20:42 +00:00
Bill Wendling
bead915338 Random cleanups and format changes.
llvm-svn: 117428
2010-10-27 01:07:41 +00:00
Charles Davis
3f1683a2ce Make the description of the hotpatch attribute even more generic. Spotted by
Michael Spencer.

llvm-svn: 117286
2010-10-25 19:07:39 +00:00
Charles Davis
96b28d2fba Make hotpatch attribute description a little less Wintel-specific.
llvm-svn: 117267
2010-10-25 16:29:03 +00:00
Charles Davis
42270b5d54 Add a new 'hotpatch' attribute. This attribute will insert a two-byte no-op
instruction at the beginning of each function that has the attribute, allowing
the function to be easily hooked and/or patched.

llvm-svn: 117264
2010-10-25 15:37:09 +00:00
Chris Lattner
c2bd6d02e5 clarify that zero sized vectors are illegal, PR8340
llvm-svn: 116167
2010-10-10 18:20:35 +00:00
Dale Johannesen
80b0b36c10 Fix pasto.
llvm-svn: 115261
2010-10-01 01:07:02 +00:00
Dale Johannesen
e6f908a6ab Add some doc for the x86mmx type.
llvm-svn: 115255
2010-10-01 00:48:59 +00:00
Chris Lattner
ecf276b787 remove unions from LLVM IR. They are severely buggy and not
being actively maintained, improved, or extended.

llvm-svn: 112356
2010-08-28 04:09:24 +00:00
Bill Wendling
163660135e Create the new linker type "linker_private_weak_def_auto".
It's similar to "linker_private_weak", but it's known that the address of the
object is not taken. For instance, functions that had an inline definition, but
the compiler decided not to inline it. Note, unlike linker_private and
linker_private_weak, linker_private_weak_def_auto may have only default
visibility.  The symbols are removed by the linker from the final linked image
(executable or dynamic library).

llvm-svn: 111684
2010-08-20 22:05:50 +00:00
Chris Lattner
982a804b20 fix a broken link
llvm-svn: 111326
2010-08-17 23:26:04 +00:00
Chris Lattner
c61aa15b46 add some &nbsp;'s to a pre to avoid newlines being eaten
and the formatting being thrown off.  I admit to not knowing
what is going on here.

llvm-svn: 111249
2010-08-17 17:13:42 +00:00
John Criswell
bc5393a5fe Grammar cop pullover: Corrected and improved some grammar in the description of
the llvm.memset() intrinsic family.
No content changes.

llvm-svn: 109863
2010-07-30 16:30:28 +00:00
Dan Gohman
fc3ee085a0 Disallow null as a named metadata operand.
Make MDNode::destroy private.
Fix the one thing that used MDNode::destroy, outside of MDNode itself.

One should never delete or destroy an MDNode explicitly. MDNodes
implicitly go away when there are no references to them (implementation
details aside).

llvm-svn: 109028
2010-07-21 18:54:18 +00:00
Dan Gohman
546332a032 Fix the Named Metadata example to make it clear which specific
construct is the named metadata.

llvm-svn: 108263
2010-07-13 19:48:13 +00:00
Benjamin Kramer
9af04e360e HTML cleanup and validation.
llvm-svn: 108239
2010-07-13 12:26:09 +00:00
Duncan Sands
710b57b4b1 When doing sext/zext of constants, the target type must be strictly
wider than the source type.  Correct LangRef.

llvm-svn: 108238
2010-07-13 12:06:14 +00:00
Dan Gohman
226e208014 sdiv overflow is outright undefined behavior, with or without the
'exact' keyword. Thanks to nlewycky for pointing this out!

llvm-svn: 108064
2010-07-11 00:08:34 +00:00
John McCall
a59e143fec Closing tags start with slashes.
llvm-svn: 107699
2010-07-06 21:07:14 +00:00
Chris Lattner
3139b75beb minor typo
llvm-svn: 107696
2010-07-06 20:51:35 +00:00
Nick Lewycky
529cb5fcd1 Alphabetize the list of function parameters.
llvm-svn: 107680
2010-07-06 18:24:09 +00:00
Dan Gohman
33f0f11376 Note the relationship between C99 restrict and LLVM noalias, and
clarify a few other things.

llvm-svn: 107659
2010-07-06 15:26:33 +00:00
Dan Gohman
4848c9631b Describe which dependencies are relevant to noalias, and document how
AliasAnalyses have the choice to respect noalias.

llvm-svn: 107544
2010-07-02 23:46:54 +00:00
Dan Gohman
7a6a35dbf7 Add some html anchors, to allow attributes to be linked to directly.
llvm-svn: 107538
2010-07-02 23:18:08 +00:00
Dan Gohman
04beeefa61 Reword the definition of the noalias attribute. The intention is for
the noalias argument on function attributes be usable to model the
C99 restrict keyword on arguments, and to allow AliasAnalysis to
consider a noalias-attributed argument to be an "identified object".

To support this, refactor a new "based on" concept out of the current
pointer aliasing "associated" concept. This "based on" concept is very
similar to (though it is not identical with) the "based on" concept
in C99.

Also, reword the definition of NoAlias to more closely describe the
concept that the optimizer uses.

llvm-svn: 107495
2010-07-02 18:41:32 +00:00
Bill Wendling
90b6422f2f Implement the "linker_private_weak" linkage type. This will be used for
Objective-C metadata types which should be marked as "weak", but which the
linker will remove upon final linkage. However, this linkage isn't specific to
Objective-C.

For example, the "objc_msgSend_fixup_alloc" symbol is defined like this:

      .globl l_objc_msgSend_fixup_alloc
      .weak_definition l_objc_msgSend_fixup_alloc
      .section __DATA, __objc_msgrefs, coalesced
      .align 3
l_objc_msgSend_fixup_alloc:
       .quad   _objc_msgSend_fixup
       .quad   L_OBJC_METH_VAR_NAME_1

This is different from the "linker_private" linkage type, because it can't have
the metadata defined with ".weak_definition".

Currently only supported on Darwin platforms.

llvm-svn: 107433
2010-07-01 21:55:59 +00:00
Bill Wendling
59ef9bcc6d Revert r107205 and r107207.
llvm-svn: 107215
2010-06-29 22:34:52 +00:00
Bill Wendling
462de20dd8 Improve explanation.
llvm-svn: 107207
2010-06-29 21:41:58 +00:00
Bill Wendling
05a4c0b1f2 Introducing the "linker_weak" linkage type. This will be used for Objective-C
metadata types which should be marked as "weak", but which the linker will
remove upon final linkage. For example, the "objc_msgSend_fixup_alloc" symbol is
defined like this:

       .globl l_objc_msgSend_fixup_alloc
       .weak_definition l_objc_msgSend_fixup_alloc
       .section __DATA, __objc_msgrefs, coalesced
       .align 3
l_objc_msgSend_fixup_alloc:
        .quad   _objc_msgSend_fixup
        .quad   L_OBJC_METH_VAR_NAME_1

This is different from the "linker_private" linkage type, because it can't have
the metadata defined with ".weak_definition".

llvm-svn: 107205
2010-06-29 21:24:00 +00:00
Dan Gohman
40c17ca0db Minor clarification.
llvm-svn: 106234
2010-06-17 19:23:50 +00:00
Nick Lewycky
2896d590c0 Document aggregate operation constant expressions.
llvm-svn: 105098
2010-05-29 06:44:15 +00:00
Dale Johannesen
3dde3fe642 Fix Data Layout description of floating point.
llvm-svn: 104993
2010-05-28 18:54:47 +00:00
Dan Gohman
5e04f2df0b Fix more whitespace to be consistent with AsmPrinter.
llvm-svn: 104963
2010-05-28 17:13:49 +00:00