Commit Graph

697 Commits

Author SHA1 Message Date
Dan Gohman
1e109621f1 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107495 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 18:41:32 +00:00
Bill Wendling
5e721d7682 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107433 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 21:55:59 +00:00
Bill Wendling
07d3177117 Revert r107205 and r107207.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107215 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-29 22:34:52 +00:00
Bill Wendling
7645f14ee8 Improve explanation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107207 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-29 21:41:58 +00:00
Bill Wendling
207855cff9 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".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107205 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-29 21:24:00 +00:00
Dan Gohman
c22c0f37b4 Minor clarification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106234 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-17 19:23:50 +00:00
Nick Lewycky
9e130ce3aa Document aggregate operation constant expressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105098 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-29 06:44:15 +00:00
Dale Johannesen
9d8d221a68 Fix Data Layout description of floating point.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104993 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-28 18:54:47 +00:00
Dan Gohman
fe47aae6a8 Fix more whitespace to be consistent with AsmPrinter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104963 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-28 17:13:49 +00:00
Dan Gohman
3dfb3cfb38 Fix whitespace to be more consistent with AsmPrinter's style.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104962 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-28 17:07:41 +00:00
Dan Gohman
f75a7d3fbf Eliminate the restriction that the array size in an alloca must be i32.
This will help reduce the amount of casting required on 64-bit targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104911 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-28 01:14:11 +00:00
Dan Gohman
31f1af118a Fix a missing quote.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104750 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-26 21:56:15 +00:00
mike-m
e2c3a49c80 Revert r103213. It broke several sections of live website.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103219 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 00:28:04 +00:00
mike-m
68cb31901c Overhauled llvm/clang docs builds. Closes PR6613.
NOTE: 2nd part changeset for cfe trunk to follow.

*** PRE-PATCH ISSUES ADDRESSED

- clang api docs fail build from objdir
- clang/llvm api docs collide in install PREFIX/
- clang/llvm main docs collide in install
- clang/llvm main docs have full of hard coded destination
  assumptions and make use of absolute root in static html files;
  namely CommandGuide tools hard codes a website destination
  for cross references and some html cross references assume
  website root paths

*** IMPROVEMENTS

- bumped Doxygen from 1.4.x -> 1.6.3
- splits llvm/clang docs into 'main' and 'api' (doxygen) build trees
- provide consistent, reliable doc builds for both main+api docs
- support buid vs. install vs. website intentions
- support objdir builds
- document targets with 'make help'
- correct clean and uninstall operations
- use recursive dir delete only where absolutely necessary
- added call function fn.RMRF which safeguards against botched 'rm -rf';
  if any target (or any variable is evaluated) which attempts
  to remove any dirs which match a hard-coded 'safelist', a verbose
  error will be printed and make will error-stop.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103213 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 23:45:43 +00:00
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
Eric Christopher
6c7e8a02d8 More updates to objectsize intrinsic docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90644 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-05 02:46:03 +00:00
Eric Christopher
0e97e799d7 Update per Bill's comments. Work in progress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90271 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 22:28:41 +00:00
Eric Christopher
0e671491d7 First pass at llvm.objectsize documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90116 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 08:03:53 +00:00
Duncan Sands
d40d14e98c Vector types are no longer required to have a power-of-two length.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90004 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-27 13:38:03 +00:00
Duncan Sands
65687f76c0 These code generator limitations have been removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90003 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-27 12:33:22 +00:00
Dan Gohman
7657f6b002 The inbounds keyword isn't relevant to overindexing of
static array types. Thanks to Duncan for pointing this out!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86576 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 19:01:53 +00:00
Dan Gohman
9384438071 Remove the "special case" for zero-length arrays, and rephrase this
paragraph to be more precise.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86572 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 18:40:39 +00:00
Chris Lattner
e82bdc4809 add the ability for TargetData to return information about legal integer
datatypes on a given CPU.  This is intended to allow instcombine and other
transformations to avoid converting big sequences of operations to an
inconvenient width, and will help clean up after SRoA.  See also "Adding 
legal integer sizes to TargetData" on Feb 1, 2009 on llvmdev, and PR3451.

Comments welcome.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86370 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 09:35:34 +00:00
Bill Wendling
21c346e171 Add missing end-tag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85769 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-02 00:25:26 +00:00
Bill Wendling
f82d40a33c Some formatting changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85768 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-02 00:24:16 +00:00
Chris Lattner
cdfc940912 Revert 85678/85680. The decision is to stay with the current form of
indirectbr, thus we don't need "blockaddr(@func, null)".  Eliminate it
for simplicity.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85699 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-01 01:27:45 +00:00
Chris Lattner
7d83ebcadd Make blockaddress(@func, null) be valid, and make 'deleting a basic
block with a blockaddress still referring to it' replace the invalid 
blockaddress with a new blockaddress(@func, null) instead of a 
inttoptr(1).

This changes the bitcode encoding format, and still needs codegen 
support (this should produce a non-zero value, referring to the entry
block of the function would also be quite reasonable).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85678 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-31 20:08:37 +00:00
Gabor Greif
a5b6f45b68 use metavariable <result> instead of SSA name %result for consistency
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85388 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-28 13:14:50 +00:00
Gabor Greif
ec58f75d7d ooops, SSA name should not be part of the link
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85387 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-28 13:05:07 +00:00
Gabor Greif
6a29201565 advertise new syntax for unnamed instructions
and eliminate confusing double-use of SSA names
(work in progress)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85385 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-28 09:21:30 +00:00
Chris Lattner
ab21db79ef rename indbr -> indirectbr to appease the residents of #llvm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85351 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-28 00:19:10 +00:00
Chris Lattner
569d9d910b typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85322 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-27 21:52:54 +00:00
Chris Lattner
2dfdf2ab3c you can't take the address of the entry block of a function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85321 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-27 21:49:40 +00:00
Chris Lattner
3fd77cefc1 improvements from gabor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85320 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-27 21:44:20 +00:00
Chris Lattner
f9d078e336 fix things pointed out by Dan!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85310 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-27 21:19:13 +00:00
Chris Lattner
c6f44369c3 document the forthcoming blockaddress constant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85306 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-27 21:01:34 +00:00
Chris Lattner
5f75cf511b fix pasto pointed out by Rafael
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85294 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-27 20:27:24 +00:00
Chris Lattner
f9be95f867 add enough support for indirect branch for the feature test to pass
(assembler,asmprinter, bc reader+writer) and document it.  Codegen
currently aborts on it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85274 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-27 19:13:16 +00:00
Nick Lewycky
8d33659b93 Fix reversed logic spotted by Owen Anderson.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85251 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-27 16:56:58 +00:00
Victor Hernandez
2fee294b3c Remove all references to MallocInst and FreeInst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85177 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-26 23:44:29 +00:00
Dale Johannesen
8ba2d5befc Rename msasm to alignstack per review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84795 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-21 23:28:00 +00:00
Dale Johannesen
09fed25a07 Documentation for the new msasm flag, which is no
worse than the rest of the asm documentation.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84037 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 21:56:55 +00:00
Nick Lewycky
321333e51e Force memory use markers to have a ConstantInt for the size argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83960 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 07:57:33 +00:00
Nick Lewycky
cc271861da Add new "memory use marker" intrinsics. These indicate lifetimes and invariant
sections of memory objects.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83953 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 07:03:23 +00:00
Benjamin Kramer
8040cd3cfd Documentation: Perform automated correction of common typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83849 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-12 14:46:08 +00:00
Chris Lattner
5a2d87541f fix broken anchors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83715 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 18:26:06 +00:00
Nick Lewycky
c261df9fab Remove the "metadata*" type and simplify the code it complicated. This was only
used to support GlobalVariables storing MDNodes, back when they were derived
from Constant before the introduction of NamedMDNode, but never removed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82943 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-27 23:27:42 +00:00
Nick Lewycky
513869453b Remove dead code from this function and optimize. Update its corresponding
LangRef entry too.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82890 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-27 07:55:32 +00:00
Nick Lewycky
ec38da42c8 Move the integer type out of 'derived' and into 'primitive'. This permits us
to explain that derived types are all composed of other types, which primitive
types aren't. Without moving integer out of derived, this wouldn't be true.

Perform a few trivial cleanups; 'i1' went from a link to #t_primitive to
#t_integer (a holdover from when it was a bool type I suppose).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82884 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-27 00:45:11 +00:00
Dale Johannesen
9f8380b425 Revise C library functions description to be vaguer, per Chris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82776 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-25 17:04:42 +00:00
Dale Johannesen
07de8d1acf Clarify that llvm attaches C language semantics to
functions with names that match the C library.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82701 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24 18:38:21 +00:00
Chris Lattner
c608cb14a7 more typos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81499 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-11 01:49:31 +00:00
Chris Lattner
8e371aa7b6 another typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81243 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 19:45:34 +00:00
Chris Lattner
349eb41af4 fix a couple typos pointed out by edwin and duncan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81219 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 15:13:16 +00:00
Chris Lattner
6e9057b0ef add some more notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81170 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 23:33:52 +00:00
Chris Lattner
48a109c36c describe undef semantics in some more detail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81167 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 22:52:39 +00:00
Dan Gohman
fdfca79de0 Fix the syntax of add/sub/mul nsw/nuw and sdiv exact.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80805 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-02 17:31:42 +00:00
Dale Johannesen
de86d473fc Add an 'inline hint' attribute to represent source
code hints that it would be a good idea to inline
a function ("inline" keyword).  No functional change
yet; FEs do not emit this and inliner does not use it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80063 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 01:08:21 +00:00
Chris Lattner
e1eaf916f0 improve documentation for linker_private linkage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79893 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-24 04:32:16 +00:00
Dan Gohman
b255b88f06 Clarify a few things in the inbounds description.
Describing inbounds in terms of infinitely precise arithmetic prohibits
the assumption address-space-sized integer arithmetic will wrap, with
a wrapped-around value landing within the same object.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79538 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-20 17:08:17 +00:00
Chris Lattner
cd81f5df27 common globals may also not be marked constant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78169 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-05 05:41:44 +00:00
Chris Lattner
26d054d903 Clarify common linkage and the requirements on it. Enforce
them in the verifier.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78160 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-05 05:21:07 +00:00
Dan Gohman
0a28d18cd4 Add one-past-the-end language to the inbounds keyword.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77460 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29 16:00:30 +00:00
Chris Lattner
c8eef440f6 some wording changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77443 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29 06:44:13 +00:00
Andreas Bolka
55e459aa75 Fix a few typos and add links.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77403 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29 00:02:05 +00:00
Dan Gohman
dd8004dc73 Add a new keyword 'inbounds' for use with getelementptr. See the
LangRef.html changes for details.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77259 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 21:53:46 +00:00
Andreas Bolka
99a8205ae3 Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77244 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 20:37:10 +00:00
Dan Gohman
556ca272fb Following discussion on llvm-dev ("proposed new rule for getelementptr"),
add a new "Pointer Aliasing Rules" section.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77216 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 18:07:55 +00:00
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