Commit Graph

583 Commits

Author SHA1 Message Date
Chris Lattner
b7d0688195 Fix some ..'s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103134 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-05 23:29:09 +00:00
Dan Gohman
7c24ff12c4 Update this comment to note its relationship with the "happens-before"
concept in the proposed memory model changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102911 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-03 14:59:34 +00:00
Dan Gohman
45baf4191b Delete this comment. The behavior of struct loads and stores with
respect to padding bytes isn't something that the dependence text
needs to spell out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102910 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-03 14:58:14 +00:00
Dan Gohman
b532816ac9 Describe invoke instruction dependencies. Generalize the text for
terminator instructions so that it applies to all terminators with
multiple successors, including invoke.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102909 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-03 14:55:22 +00:00
Dan Gohman
855abed3cb Say "operations" instead of "instructions", as nsw can be applied to
constant expressions as well as instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102908 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-03 14:51:43 +00:00
David Chisnall
27195a5831 Fixed @ctor / @dtor the wrong way around in last commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102741 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-30 19:27:35 +00:00
David Chisnall
e31e9966ec Added a brief explanation of @llvm.global_{c,d}tors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102740 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-30 19:23:49 +00:00
Dan Gohman
34b3d993e4 Rewrite the section on trap values to contain a generic description
of dependence and define trap values in terms of dependence, instead
of trying to cover the concept with a flurry of ad-hoc rules.

The dependence model isn't complete yet, but it's already much more
rigorous than the description it replaces.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102479 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-28 00:49:41 +00:00
Dan Gohman
1c70c00c28 Fix spelling errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102478 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-28 00:36:01 +00:00
Chris Lattner
2d4b8ee1d9 further clarify alignment of globals, fix instcombine
to not increase the alignment of globals with an assigned
alignment and section.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102476 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-28 00:31:12 +00:00
Chris Lattner
ce99fa9e26 improve the global variable alignment description.
it is not generally valid for targets to overalign
them when an alignment is specified.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102474 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-28 00:13:42 +00:00
Dan Gohman
ae11c3f83e Integrate Jeffery Yasskin's suggestions with respect to
traps flowing through memory references, add some text to
better cover phi nodes and externally-visible side effects,
add an example of instructions being control-dependent
on a trap value, and reword some of the existing trap rules.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102399 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-26 23:36:52 +00:00
Jeffrey Yasskin
93e066d0e2 Consolidate the description of volatile operations, now that some of the
intrinsics have volatile semantics in addition to the load and store
instructions.  


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102384 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-26 21:21:24 +00:00
Dan Gohman
c30f6e1c89 Branching or switching on trap transfers imminent undefined behavior
onto control-dependent instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102381 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-26 20:54:53 +00:00
Dan Gohman
c68ce066a5 Fix HTML errors that Jeffery Yasskin noticed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102376 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-26 20:21:21 +00:00
Dan Gohman
698cbcb0a4 PHI nodes also do not necessarily return trap with a trap operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102278 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-24 22:15:58 +00:00
Dan Gohman
27ef9976c2 Switch getelementptr inbounds and sdiv exact from undef to trap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102175 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-23 15:23:32 +00:00
Dan Gohman
fff6c5332f Add an initial description of a new concept: trap values, and change
the definition of the nsw and nuw flags to make use of it.

nsw was introduced to help optimizers answer yes to the following:

  // Can we change i from i32 to i64 to eliminate the cast inside the loop?
  for (int i = 0; i < n; ++i) A[i] *= 0.1;

  // Can we assume that this loop will eventually terminate?
  for (int i = 0; i <= n; ++i) A[i] *= 0.1;

In its current form, it isn't truly sufficient for either.

In the first case, if the increment overflows, it'll still have some
valid i32 value; sign-extending it will produce a value which is 33
homogeneous sign bits trailed by 31 independent undef bits. If i is
promoted to i64, it won't have those same values when it reaches that
point. (The compiler could recover here by reasoning about how i is
used by the load, but that's a lot more complicated and isn't always
possible.)

In the second case, there is no value for i which will be greater than
n, so having the increment return undef on overflow doesn't help.

Trap values are a formalization of some existing concepts that we have
about LLVM IR, and give the optimizers a better basis for answering yes
to both questions above.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102140 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-22 23:14:21 +00:00
Duncan Sands
83821c8941 Pointed out by housel on #llvm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101395 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 20:35:54 +00:00
Chris Lattner
ff35c3f0bf typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100738 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 00:54:34 +00:00
Chris Lattner
9f636de348 document isvolatile etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100737 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 00:53:57 +00:00
Mon P Wang
e88909ba72 Update langref for memcpy, memmove, and memset
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100611 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 06:35:53 +00:00
Chris Lattner
cf9a415182 Have the inst emitter add the !srcloc mdnode to the machine instr.
Have the asmprinter use the mdnode to scavenge a source location if
present.  Document this nonsense in langref.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100607 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 05:38:05 +00:00
Chris Lattner
0cec9c85ee various cleanups from daniel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98528 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-15 04:12:21 +00:00
Chris Lattner
82c3dc6347 tidy up and expound more on how half-float works.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98524 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-14 23:03:31 +00:00
Anton Korobeynikov
f02e73018f Document fp16 intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98505 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-14 18:42:47 +00:00
Chris Lattner
2968943463 add support, testcases, and dox for the new GHC calling
convention.  Patch by David Terei!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98212 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-11 00:22:57 +00:00
Evan Cheng
dc444e9a23 Add documentation on sibling call optimization. Rename tailcall2.ll test to sibcall.ll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97980 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-08 21:05:02 +00:00
Devang Patel
e1d50cd5e4 Add metadata example.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97764 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 23:44:48 +00:00
Chris Lattner
0724fbd6e9 attributes are not part of types anymore, patch by James Woodyatt!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97557 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02 06:36:51 +00:00
Dan Gohman
fbbee8d7f9 PerformTailCallOpt was renamed to GuaranteedTailCallOpt to
better reflect its meaning, now that tail call optimizations
are done by default in some cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97530 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02 01:08:11 +00:00
Dan Gohman
b55a1ee36c Fix spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97447 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-01 17:41:39 +00:00
Bill Wendling
7c78dbb493 Fix HTML.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97170 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-25 21:23:24 +00:00
Dan Gohman
2eddfef0df Fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97144 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-25 16:51:31 +00:00
Dan Gohman
ff3ef32c35 Clarify the description of pointer types, and move the
address space content to its own paragraph.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97143 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-25 16:50:07 +00:00
Dan Gohman
fdf2e8cced Update LangRef to match the code; pointers default to being 64-bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96873 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-23 02:44:03 +00:00
David Greene
8939b0d8a9 Add support for emitting non-temporal stores for DAGs marked
non-temporal.  Fix from r96241 for botched encoding of MOVNTDQ.

Add documentation for !nontemporal metadata.

Add a simpler movnt testcase.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96386 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-16 20:50:18 +00:00
Chris Lattner
fdfeb6976f Add support for a union type in LLVM IR. Patch by Talin!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96011 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-12 20:49:41 +00:00
Charles Davis
1e063d14df Add a new function attribute, 'alignstack'. It will indicate (when the backends
implement support for it) that the stack should be forcibly realigned in the
prologue (and the process reversed in the epilogue).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95945 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-12 00:31:15 +00:00
Jakob Stoklund Olesen
570a4a5d9c Reintroduce the InlineHint function attribute.
This time it's for real! I am going to hook this up in the frontends as well.

The inliner has some experimental heuristics for dealing with the inline hint.
When given a -respect-inlinehint option, functions marked with the inline
keyword are given a threshold just above the default for -O3.

We need some experiments to determine if that is the right thing to do.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95466 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-06 01:16:28 +00:00
Chris Lattner
e6a5ddd0fa move "Metadata Nodes and Metadata Strings" section to the right place in the
document and edit it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93559 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 21:50:19 +00:00
Eric Christopher
606a1d1f59 Remove the InlineHint attribute. There are no current or planned
users.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93558 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 21:36:30 +00:00
Chris Lattner
df7a680964 mention that unwind isn't to be trusted, patch by Dustin Laurence
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93518 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 18:08:37 +00:00
Devang Patel
cd1fd251eb Add top level section for named metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93172 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 19:35:55 +00:00
Jeffrey Yasskin
7a088cf27a Improve unclear bits and inaccuracies in structure and insertvalue
documentation.

Patch by Dustin Laurence!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93170 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 19:19:26 +00:00
Jeffrey Yasskin
95fa80af6f Clarify the requirements for a "tail call" to actually be optimized into a
jump.  People clearly weren't finding the extra requirements in
CodeGenerator.html.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93070 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-09 19:44:16 +00:00
Chris Lattner
873187c042 improve documentation for linkonce to be less confusing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93066 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-09 19:15:14 +00:00
Eric Christopher
d003c5b3d7 Grammar thinko.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93027 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-08 21:42:39 +00:00
Devang Patel
3e30c2a3c5 NamedMDNode is a collection MDNodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92761 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 20:41:31 +00:00
Eric Christopher
8295a0a991 Update docs for bitcode changes. For object size checking we won't
work with partial objects so just count the type as a boolean. Update
appropriately.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91954 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 00:29:49 +00:00