1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
Commit Graph

697 Commits

Author SHA1 Message Date
Peter Collingbourne
798811d4fd Document tbaa metadata in LangRef (documentation largely based on
comments at top of TypeBasedAliasAnalysis.cpp).

llvm-svn: 143134
2011-10-27 19:19:07 +00:00
Eli Friedman
1f79409e08 Remove dead atomic intrinsics from LangRef.
llvm-svn: 142994
2011-10-26 00:36:41 +00:00
Lang Hames
b0db984fab Fixed typo.
llvm-svn: 141906
2011-10-13 23:04:49 +00:00
Chris Lattner
0d2ef52b69 target data is a contract with the code generator, not the "processor"
llvm-svn: 141734
2011-10-11 23:02:17 +00:00
Chris Lattner
9795434c0b improve some of the documentation around target data layout strings.
llvm-svn: 141733
2011-10-11 23:01:39 +00:00
Lang Hames
77c4f6fc53 Fixed docs to reflect the proper default value and behaviour of the natural stack alignment.
llvm-svn: 141687
2011-10-11 17:50:14 +00:00
Bill Wendling
093fd0ca05 Use the proper name for "externally visible" linkage -- 'external'. This is the
keyword in LLVM for externally visible linkage.
PR10636

llvm-svn: 141649
2011-10-11 06:41:28 +00:00
Lang Hames
be4997db2f Add a natural stack alignment field to TargetData, and prevent InstCombine from
promoting allocas to preferred alignments that exceed the natural
alignment. This avoids some potentially expensive dynamic stack realignments.

The natural stack alignment is set in target data strings via the "S<size>"
option. Size is in bits and must be a multiple of 8. The natural stack alignment
defaults to "unspecified" (represented by a zero value), and the "unspecified"
value does not prevent any alignment promotions. Target maintainers that care
about avoiding promotions should explicitly add the "S<size>" option to their
target data strings.

llvm-svn: 141599
2011-10-10 23:42:08 +00:00
Rafael Espindola
0158ec7cce Remove last references to hotpatch.
llvm-svn: 141057
2011-10-04 03:08:43 +00:00
Rafael Espindola
4700f53cee Add the returns_twice attribute to LLVM.
llvm-svn: 141001
2011-10-03 14:45:37 +00:00
Duncan Sands
6939ae53ac Split the init.trampoline intrinsic, which currently combines GCC's
init.trampoline and adjust.trampoline intrinsics, into two intrinsics
like in GCC.  While having one combined intrinsic is tempting, it is
not natural because typically the trampoline initialization needs to
be done in one function, and the result of adjust trampoline is needed
in a different (nested) function.  To get around this llvm-gcc hacks the
nested function lowering code to insert an additional parent variable
holding the adjust.trampoline result that can be accessed from the child
function.  Dragonegg doesn't have the luxury of tweaking GCC code, so it
stored the result of adjust.trampoline in the memory GCC set aside for
the trampoline itself (this is always available in the child function),
and set up some new memory (using an alloca) to hold the trampoline.
Unfortunately this breaks Go which allocates trampoline memory on the
heap and wants to use it even after the parent has exited (!).  Rather
than doing even more hacks to get Go working, it seemed best to just use
two intrinsics like in GCC.  Patch mostly by Sanjoy Das.

llvm-svn: 139140
2011-09-06 13:37:06 +00:00
Eli Friedman
67b35cbeee Some minor updates to atomic acquire/release docs in LangRef.
llvm-svn: 138472
2011-08-24 20:28:39 +00:00
Rafael Espindola
5ad9eaf265 Fix an example in the documentation.
Patch by Sanjoy Das!

llvm-svn: 138346
2011-08-23 18:26:56 +00:00
Eli Friedman
e8cbd06288 Some minor wording updates and cross-linking for atomic docs. Explicitly note that we don't try to portably define what volatile in LLVM IR means.
llvm-svn: 138274
2011-08-22 21:35:27 +00:00
John Criswell
1e3b4b2f5b Fixed some punctuation. Sentences can be combined with semi-colons but not
commas.

llvm-svn: 138043
2011-08-19 16:57:55 +00:00
Eli Friedman
ca9b9f06ee Fix the getelementptr description so it is extremely clear that array indices passed to getelementptr are signed.
llvm-svn: 137538
2011-08-12 23:37:55 +00:00
Eli Friedman
baf0f69f9a Move "atomic" and "volatile" designations on instructions after the opcode
of the instruction.

Note that this change affects the existing non-atomic load and store
instructions; the parser now accepts both forms, and the change is noted
in the release notes.

llvm-svn: 137527
2011-08-12 22:50:01 +00:00
Bill Wendling
4cbbcd4f82 Initial commit of the 'landingpad' instruction.
This implements the 'landingpad' instruction. It's used to indicate that a basic
block is a landing pad. There are several restrictions on its use (see
LangRef.html for more detail). These restrictions allow the exception handling
code to gather the information it needs in a much more sane way.

This patch has the definition, implementation, C interface, parsing, and bitcode
support in it.

llvm-svn: 137501
2011-08-12 20:24:12 +00:00
Chris Lattner
72f9fbf34e fix one reference that slipped through, thanks Eli
llvm-svn: 137488
2011-08-12 18:12:40 +00:00
Chris Lattner
d666fbc755 add new accessors to reflect new terminology in struct types.
llvm-svn: 137468
2011-08-12 17:31:02 +00:00
NAKAMURA Takumi
ecab34205a docs: Update HTML markup(s).
llvm-svn: 137433
2011-08-12 06:17:17 +00:00
Eli Friedman
306aa10c47 Fix minor typo.
llvm-svn: 137177
2011-08-09 23:26:12 +00:00
Eli Friedman
5a2d27800e Representation of 'atomic load' and 'atomic store' in IR.
llvm-svn: 137170
2011-08-09 23:02:53 +00:00
Bill Wendling
0f2208f619 Clean up the grammar for the landingpad instruction.
llvm-svn: 137042
2011-08-08 08:06:05 +00:00
Bill Wendling
83c0ada603 Fix typo found by John.
llvm-svn: 137040
2011-08-08 07:58:58 +00:00
Bill Wendling
6eae915356 Go back to the old definition. It's not clear that a 'resume' can be 'outlined' from the function with the landing pad for all platforms.
llvm-svn: 136799
2011-08-03 18:37:32 +00:00
Bill Wendling
da7eb90ea1 Explain how clauses are applied.
llvm-svn: 136790
2011-08-03 17:17:06 +00:00
Bill Wendling
9f3e3462b8 Add the documentation for the 'landingpad' instruction. Improve the 'invoke'
instruction's documentation to reference the landingpad and resume instructions.

llvm-svn: 136729
2011-08-02 21:52:38 +00:00
Chris Lattner
a780c5c9f1 no need to count the terminators.
llvm-svn: 136718
2011-08-02 20:29:13 +00:00
Eli Friedman
22875e2d35 Minor wording tweak for memory model.
llvm-svn: 136668
2011-08-02 01:15:34 +00:00
Bill Wendling
108ce4478d Fix some validation errors.
llvm-svn: 136591
2011-07-31 06:47:33 +00:00
Bill Wendling
3f24afed54 Fix some validation errors.
llvm-svn: 136590
2011-07-31 06:45:03 +00:00
Bill Wendling
8a625cebd2 Add the 'resume' instruction for the new EH rewrite.
This adds the 'resume' instruction class, IR parsing, and bitcode reading and
writing. The 'resume' instruction resumes propagation of an existing (in-flight)
exception whose unwinding was interrupted with a 'landingpad' instruction (to be
added later).

llvm-svn: 136589
2011-07-31 06:30:59 +00:00
Bill Wendling
57ddbb84ac Revert r136253, r136263, r136269, r136313, r136325, r136326, r136329, r136338,
r136339, r136341, r136369, r136387, r136392, r136396, r136429, r136430, r136444,
r136445, r136446, r136253 pending review.

llvm-svn: 136556
2011-07-30 05:42:50 +00:00
Eli Friedman
f6797ffc9a LangRef and basic memory-representation/reading/writing for 'cmpxchg' and
'atomicrmw' instructions, which allow representing all the current atomic
rmw intrinsics.

The allowed operands for these instructions are heavily restricted at the
moment; we can probably loosen it a bit, but supporting general
first-class types (where it makes sense) might get a bit complicated,
given how SelectionDAG works.

As an initial cut, these operations do not support specifying an alignment,
but it would be possible to add if we think it's useful. Specifying an
alignment lower than the natural alignment would be essentially
impossible to support on anything other than x86, but specifying a greater
alignment would be possible.  I can't think of any useful optimizations which
would use that information, but maybe someone else has ideas.

Optimizer/codegen support coming soon.

llvm-svn: 136404
2011-07-28 21:48:00 +00:00
Bill Wendling
b20cfdfe95 Merge the contents from exception-handling-rewrite to the mainline.
This adds the new instructions 'landingpad' and 'resume'.

llvm-svn: 136253
2011-07-27 20:18:04 +00:00
Bill Wendling
470df5ce10 Fix a typo.
llvm-svn: 136133
2011-07-26 20:42:28 +00:00
Bill Wendling
82fa07e47a Clean up the HTML here a bit.
llvm-svn: 136074
2011-07-26 10:41:15 +00:00
Eli Friedman
50291d09da Initial implementation of 'fence' instruction, the new C++0x-style replacement for llvm.memory.barrier.
This is just a LangRef entry and reading/writing/memory representation; optimizer+codegen support coming soon.

llvm-svn: 136009
2011-07-25 23:16:38 +00:00
Rafael Espindola
c04ccde860 Add uwtable to the langref.
llvm-svn: 135913
2011-07-25 15:27:59 +00:00
Chris Lattner
ec448a31de clarify that opaque is actually a struct type, PR10430
llvm-svn: 135861
2011-07-23 19:59:08 +00:00
Eli Friedman
cbbabe6d39 Some LangRef tweaks, per Dan's comments.
llvm-svn: 135744
2011-07-22 03:04:45 +00:00
Eli Friedman
d9ac7681be Commit LangRef changes for LLVM concurrency model. Start of supporting C++0x memory model and atomics. See thread on llvmdev titled "Reviving the new LLVM concurrency model".
llvm-svn: 135624
2011-07-20 21:35:53 +00:00
Chris Lattner
a106725fc5 Land the long talked about "type system rewrite" patch. This
patch brings numerous advantages to LLVM.  One way to look at it
is through diffstat:
 109 files changed, 3005 insertions(+), 5906 deletions(-)

Removing almost 3K lines of code is a good thing.  Other advantages
include:

1. Value::getType() is a simple load that can be CSE'd, not a mutating
   union-find operation.
2. Types a uniqued and never move once created, defining away PATypeHolder.
3. Structs can be "named" now, and their name is part of the identity that
   uniques them.  This means that the compiler doesn't merge them structurally
   which makes the IR much less confusing.
4. Now that there is no way to get a cycle in a type graph without a named
   struct type, "upreferences" go away.
5. Type refinement is completely gone, which should make LTO much MUCH faster
   in some common cases with C++ code.
6. Types are now generally immutable, so we can use "Type *" instead 
   "const Type *" everywhere.

Downsides of this patch are that it removes some functions from the C API,
so people using those will have to upgrade to (not yet added) new API.  
"LLVM 3.0" is the right time to do this.

There are still some cleanups pending after this, this patch is large enough
as-is.

llvm-svn: 134829
2011-07-09 17:41:24 +00:00
Cameron Zwarich
7375e5af26 Use add instead of accumulate.
llvm-svn: 134752
2011-07-08 22:13:55 +00:00
Cameron Zwarich
c23366d357 Add an intrinsic and codegen support for fused multiply-accumulate. The intent
is to use this for architectures that have a native FMA instruction.

llvm-svn: 134742
2011-07-08 21:39:21 +00:00
Owen Anderson
dccc4e4b9a Generalize @llvm.ctlz, @llvm.cttz, and @llvm.ctpop to work on vectors of integers, and fix the one optimization pass that I'm aware of that needs updating for this. At least one current target, ARM NEON, can implement these operations on vectors directly.
llvm-svn: 134265
2011-07-01 21:52:38 +00:00
Evan Cheng
91e568589d Add missing operand. rdar://9694169
llvm-svn: 134078
2011-06-29 17:14:00 +00:00
Dan Gohman
6251ddaa83 Document nonlazybind.
llvm-svn: 133160
2011-06-16 16:03:13 +00:00
Bruno Cardoso Lopes
b6afc5168f Add one more argument to the prefetch intrinsic to indicate whether it's a data
or instruction cache access. Update the targets to match it and also teach
autoupgrade.

llvm-svn: 132976
2011-06-14 04:58:37 +00:00