Commit Graph

755 Commits

Author SHA1 Message Date
Bill Wendling
f6cc4c2d60 Minor cleanup. No content change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145521 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-30 21:43:43 +00:00
Chris Lattner
fbe910e7f4 remove asmparsing and documentation support for "volatile load", which was only produced by LLVM 2.9 and earlier. LLVM 3.0 and later prefers "load volatile".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145172 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-27 06:56:53 +00:00
Bill Wendling
0656e254a7 Reformat the quote and tag the math stuff with <tt> tags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144204 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-09 19:33:56 +00:00
Bill Wendling
9ae7563732 Cleanup the formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144053 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 00:32:45 +00:00
Bill Wendling
5c3a9f7dd6 Fix some misplaced punctuation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143737 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-04 20:40:41 +00:00
NAKAMURA Takumi
4b2e07aa58 docs/*.html: Fix markups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143349 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-31 13:04:26 +00:00
Nick Lewycky
1c929be810 Close <div> that was indenting the rest of the page.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143328 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-31 01:32:21 +00:00
Peter Collingbourne
999f90bedf Add a pinned metadata name for fpaccuracy, and document it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143135 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-27 19:19:14 +00:00
Peter Collingbourne
249d953ed7 Document tbaa metadata in LangRef (documentation largely based on
comments at top of TypeBasedAliasAnalysis.cpp).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143134 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-27 19:19:07 +00:00
Eli Friedman
5289142cc8 Remove dead atomic intrinsics from LangRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142994 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-26 00:36:41 +00:00
Lang Hames
87d5cb81fb Fixed typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141906 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-13 23:04:49 +00:00
Chris Lattner
e4617b0280 target data is a contract with the code generator, not the "processor"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141734 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-11 23:02:17 +00:00
Chris Lattner
6509f50c69 improve some of the documentation around target data layout strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141733 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-11 23:01:39 +00:00
Lang Hames
5f119a6237 Fixed docs to reflect the proper default value and behaviour of the natural stack alignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141687 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-11 17:50:14 +00:00
Bill Wendling
f7f06103c2 Use the proper name for "externally visible" linkage -- 'external'. This is the
keyword in LLVM for externally visible linkage.
PR10636


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141649 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-11 06:41:28 +00:00
Lang Hames
bb5b3f3359 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141599 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-10 23:42:08 +00:00
Rafael Espindola
b3c4e26dc5 Remove last references to hotpatch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141057 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-04 03:08:43 +00:00
Rafael Espindola
25456ef74c Add the returns_twice attribute to LLVM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141001 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-03 14:45:37 +00:00
Duncan Sands
4a544a79bd 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139140 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-06 13:37:06 +00:00
Eli Friedman
c264b2f693 Some minor updates to atomic acquire/release docs in LangRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138472 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-24 20:28:39 +00:00
Rafael Espindola
3395fe1e4b Fix an example in the documentation.
Patch by Sanjoy Das!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138346 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-23 18:26:56 +00:00
Eli Friedman
234bccd194 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138274 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-22 21:35:27 +00:00
John Criswell
e865c035fd Fixed some punctuation. Sentences can be combined with semi-colons but not
commas.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138043 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-19 16:57:55 +00:00
Eli Friedman
266246c0ed Fix the getelementptr description so it is extremely clear that array indices passed to getelementptr are signed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137538 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-12 23:37:55 +00:00
Eli Friedman
f03bb260c9 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137527 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-12 22:50:01 +00:00
Bill Wendling
e6e8826870 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137501 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-12 20:24:12 +00:00
Chris Lattner
aa175c37d1 fix one reference that slipped through, thanks Eli
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137488 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-12 18:12:40 +00:00
Chris Lattner
2c38d65fd9 add new accessors to reflect new terminology in struct types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137468 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-12 17:31:02 +00:00
NAKAMURA Takumi
b5bb29c71f docs: Update HTML markup(s).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137433 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-12 06:17:17 +00:00
Eli Friedman
8fa281a471 Fix minor typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137177 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-09 23:26:12 +00:00
Eli Friedman
21006d40ac Representation of 'atomic load' and 'atomic store' in IR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137170 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-09 23:02:53 +00:00
Bill Wendling
bf13ee1941 Clean up the grammar for the landingpad instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137042 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-08 08:06:05 +00:00
Bill Wendling
2905c32335 Fix typo found by John.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137040 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-08 07:58:58 +00:00
Bill Wendling
e4ad50bb43 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136799 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-03 18:37:32 +00:00
Bill Wendling
b7a01353ea Explain how clauses are applied.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136790 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-03 17:17:06 +00:00
Bill Wendling
f78faf84a8 Add the documentation for the 'landingpad' instruction. Improve the 'invoke'
instruction's documentation to reference the landingpad and resume instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136729 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-02 21:52:38 +00:00
Chris Lattner
6445ecbdb9 no need to count the terminators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136718 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-02 20:29:13 +00:00
Eli Friedman
101c81da45 Minor wording tweak for memory model.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136668 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-02 01:15:34 +00:00
Bill Wendling
af75f0ca86 Fix some validation errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136591 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-31 06:47:33 +00:00
Bill Wendling
0246bb77db Fix some validation errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136590 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-31 06:45:03 +00:00
Bill Wendling
dccc03b242 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136589 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-31 06:30:59 +00:00
Bill Wendling
10c6d12a9f Revert r136253, r136263, r136269, r136313, r136325, r136326, r136329, r136338,
r136339, r136341, r136369, r136387, r136392, r136396, r136429, r136430, r136444,
r136445, r136446, r136253 pending review.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136556 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-30 05:42:50 +00:00
Eli Friedman
ff03048c13 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136404 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 21:48:00 +00:00
Bill Wendling
772fe17a6d Merge the contents from exception-handling-rewrite to the mainline.
This adds the new instructions 'landingpad' and 'resume'.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136253 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-27 20:18:04 +00:00
Bill Wendling
194229e591 Fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136133 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-26 20:42:28 +00:00
Bill Wendling
b3aa4715c1 Clean up the HTML here a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136074 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-26 10:41:15 +00:00
Eli Friedman
47f3513dd5 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136009 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-25 23:16:38 +00:00
Rafael Espindola
fbff0ec2c7 Add uwtable to the langref.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135913 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-25 15:27:59 +00:00
Chris Lattner
628ed39dcf clarify that opaque is actually a struct type, PR10430
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135861 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-23 19:59:08 +00:00
Eli Friedman
118973a2c5 Some LangRef tweaks, per Dan's comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135744 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-22 03:04:45 +00:00
Eli Friedman
5b60e1b6fc 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".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135624 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20 21:35:53 +00:00
Chris Lattner
1afcace3a3 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.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134829 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-09 17:41:24 +00:00
Cameron Zwarich
abc43e69ea Use add instead of accumulate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134752 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-08 22:13:55 +00:00
Cameron Zwarich
33390848a7 Add an intrinsic and codegen support for fused multiply-accumulate. The intent
is to use this for architectures that have a native FMA instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134742 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-08 21:39:21 +00:00
Owen Anderson
f1ac465b67 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134265 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-01 21:52:38 +00:00
Evan Cheng
0b0669a056 Add missing operand. rdar://9694169
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134078 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-29 17:14:00 +00:00
Dan Gohman
129bd56eeb Document nonlazybind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133160 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-16 16:03:13 +00:00
Bruno Cardoso Lopes
9a767330f5 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132976 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-14 04:58:37 +00:00
Dan Gohman
08b280b0fe Fix copy+pastos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132168 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 00:36:31 +00:00
Dan Gohman
4e9011cbac Document llvm.exp and llvm.pow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131921 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-23 21:13:03 +00:00
Chris Lattner
8645d1acc0 insertvalue takes a variable number of arguments, document this, fixing PR9935.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131850 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-22 07:18:08 +00:00
Nick Lewycky
64f9fb1975 Fix errors in this llvm ir example.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131416 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-16 19:29:30 +00:00
NAKAMURA Takumi
f5af6ada3b docs: Introduce cascading style <div> and <p> continued on <h[2-5]>.
<h2>Section Example</h2>
<div> <!-- h2+div is applied -->
<p>Section preamble.</p>

<h3>Subsection Example</h3>
<p> <!-- h3+p is applied -->
Subsection body
</p>

<!-- End of section body -->
</div>

FIXME: Care H5 better.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130040 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-23 00:30:22 +00:00
NAKAMURA Takumi
05d0265fef docs: Use <Hn> as Heading elements instead of <DIV class="doc_foo">.
H1 ... doc_title
H2 ... doc_section
H3 ... doc_subsection
H4 ... doc_subsubsection

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129736 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-18 23:59:50 +00:00
Chris Lattner
7a2bdde0a0 Fix a ton of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129558 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-15 05:18:47 +00:00
Dan Gohman
ca4cac4c74 Fix a hole in the definition of "dependence" used by trap values. Trap
values are also transmitted through branches which cause side effects to
be skipped altogether.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129404 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-12 23:05:59 +00:00
NAKAMURA Takumi
b9a33634cc docs: Canonicalize URLs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129181 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-09 02:13:37 +00:00
Nick Lewycky
5bb3eced65 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128647 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-31 18:20:19 +00:00
Cameron Zwarich
9e69ff914d Change the signext language in LangRef to closer match zeroext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127808 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-17 14:21:58 +00:00
Cameron Zwarich
ebe8173941 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127766 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-16 22:20:18 +00:00
Duncan Sands
dea3a5e202 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127156 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-07 09:12:24 +00:00
Bill Wendling
9ff5de99df Small cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126821 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-02 02:17:11 +00:00
Nadav Rotem
8c20ec54d9 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).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126424 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-24 21:01:34 +00:00
Nadav Rotem
ed9b934f65 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126080 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-20 12:37:50 +00:00
Chris Lattner
66298c104e fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125192 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-09 16:44:44 +00:00
Chris Lattner
f067d584a8 implement .ll and .bc support for nsw/nuw on shl and exact on lshr/ashr.
Factor some code better.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125006 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-07 16:40:21 +00:00
Chris Lattner
35bda8914c 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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124992 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-06 21:44:57 +00:00
Nick Lewycky
db9cd76635 Most browsers eliminate whitespace between anchor tags. Force whitespace with
&nbsp; so that the code reads properly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124514 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-29 01:09:53 +00:00
Rafael Espindola
a5eaa861e4 Add a clarification about merging constants with and without unnamed_addr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123530 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-15 08:20:57 +00:00
Rafael Espindola
bea4626f93 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123063 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-08 16:42:36 +00:00
Tobias Grosser
0538729a3a Integers are primitive types. Update the documentation to state this
This was done for label, void, floating point, x86mmx, metadata,
just not integer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122606 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-28 20:29:31 +00:00
Frits van Bommel
1324289d24 Clarify some of the differences between indexing with getelementptr and indexing with insertvalue/extractvalue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120957 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-05 20:54:38 +00:00
Nick Lewycky
29b6cb40c1 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120388 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-30 04:13:41 +00:00
Chris Lattner
a6fd81dd7f a byval argument without an align can have an arbitrary alignment
requirement on the input pointer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119914 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-20 23:49:06 +00:00
Chris Lattner
ce1b9ad539 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119488 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-17 08:20:42 +00:00
Bill Wendling
1b383ba6ae Random cleanups and format changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117428 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-27 01:07:41 +00:00
Charles Davis
0076d2057c Make the description of the hotpatch attribute even more generic. Spotted by
Michael Spencer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117286 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-25 19:07:39 +00:00
Charles Davis
6f12e29f7d Make hotpatch attribute description a little less Wintel-specific.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117267 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-25 16:29:03 +00:00
Charles Davis
970bfcc7d8 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117264 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-25 15:37:09 +00:00
Chris Lattner
7d2e7bef90 clarify that zero sized vectors are illegal, PR8340
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116167 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-10 18:20:35 +00:00
Dale Johannesen
473a8c84f2 Fix pasto.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115261 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01 01:07:02 +00:00
Dale Johannesen
21fe99bbc8 Add some doc for the x86mmx type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115255 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01 00:48:59 +00:00
Chris Lattner
61c70e98ac remove unions from LLVM IR. They are severely buggy and not
being actively maintained, improved, or extended.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112356 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-28 04:09:24 +00:00
Bill Wendling
55ae515f9d 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).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111684 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 22:05:50 +00:00
Chris Lattner
dc65f22390 fix a broken link
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111326 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 23:26:04 +00:00
Chris Lattner
63e4ccb3cd 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111249 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 17:13:42 +00:00
John Criswell
cdcbbfcb15 Grammar cop pullover: Corrected and improved some grammar in the description of
the llvm.memset() intrinsic family.
No content changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109863 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-30 16:30:28 +00:00
Dan Gohman
872814ae04 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109028 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-21 18:54:18 +00:00
Dan Gohman
1005bc5068 Fix the Named Metadata example to make it clear which specific
construct is the named metadata.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108263 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-13 19:48:13 +00:00
Benjamin Kramer
26fe25f651 HTML cleanup and validation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108239 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-13 12:26:09 +00:00