Commit Graph

49 Commits

Author SHA1 Message Date
Richard Smith 939889f6a4 Fix link.
llvm-svn: 183248
2013-06-04 20:42:42 +00:00
Paul Redmond 219ef811ca Fix warning and resulting formatting issue.
llvm-svn: 182939
2013-05-30 17:24:32 +00:00
Paul Redmond eccbb323ea Revise llvm.vectorizer.width documentation
- clarify that vectorizer.width only applies if the vectorizer decides to
  vectorize.

llvm-svn: 182938
2013-05-30 17:22:46 +00:00
Paul Redmond 5fdf836ba4 Add support for llvm.vectorizer metadata
- llvm.loop.parallel metadata has been renamed to llvm.loop to be more generic
  by making the root of additional loop metadata.
  - Loop::isAnnotatedParallel now looks for llvm.loop and associated
    llvm.mem.parallel_loop_access
  - document llvm.loop and update llvm.mem.parallel_loop_access
- add support for llvm.vectorizer.width and llvm.vectorizer.unroll
  - document llvm.vectorizer.* metadata
  - add utility class LoopVectorizerHints for getting/setting loop metadata
  - use llvm.vectorizer.width=1 to indicate already vectorized instead of
    already_vectorized
- update existing tests that used llvm.loop.parallel and
  llvm.vectorizer.already_vectorized

Reviewed by: Nadav Rotem

llvm-svn: 182802
2013-05-28 20:00:34 +00:00
Diego Novillo c63995394d Add a new function attribute 'cold' to functions.
Other than recognizing the attribute, the patch does little else.
It changes the branch probability analyzer so that edges into
blocks postdominated by a cold function are given low weight.

Added analysis and code generation tests.  Added documentation for the
new attribute.

llvm-svn: 182638
2013-05-24 12:26:52 +00:00
Tim Northover bc93308489 ARM: implement @llvm.readcyclecounter intrinsic
This implements the @llvm.readcyclecounter intrinsic as the specific
MRC instruction specified in the ARM manuals for CPUs with the Power
Management extensions.

Older CPUs had slightly different methods which may also have to be
implemented eventually, but this should cover all v7 cases.

rdar://problem/13939186

llvm-svn: 182603
2013-05-23 19:11:20 +00:00
Sean Silva 8ca1178f45 LangRef.rst: Clarify how basic blocks without named label are handled.
Describe that they are assigned numbered label using the same counter
as for unnamed temporaries.

Based on http://llvm.org/bugs/show_bug.cgi?id=16043 and mailing list
discussion.

Patch by Paul Sokolovsky!

llvm-svn: 182332
2013-05-20 23:31:12 +00:00
Tim Northover 8b5b360781 Correct logical shift documentation
llvm-svn: 181290
2013-05-07 06:17:14 +00:00
Richard Sandiford ae426b4a61 Remove comment that no target supports 128-bit IEEE floats
The soon-to-be-committed SystemZ port uses 128-bit IEEE floats.
MIPS64 GNU/Linux does too (albeit with unusual NaNs).

llvm-svn: 181016
2013-05-03 14:32:27 +00:00
Rafael Espindola 74f2e46eef Clarify that llvm.used can contain aliases.
Also add a check for llvm.used in the verifier and simplify clients now that
they can assume they have a ConstantArray.

llvm-svn: 180019
2013-04-22 14:58:02 +00:00
Stephen Lin b8bd232a3d Add CodeGen support for functions that always return arguments via a new parameter attribute 'returned', which is taken advantage of in target-independent tail call opportunity detection and in ARM call lowering (when placed on an integral first parameter).
llvm-svn: 179925
2013-04-20 05:14:40 +00:00
Eli Bendersky 97ad9245f1 Fixes to LangRef.rst: incorrect attributes syntax and misplaced 'nobuiltin'
Patch by Stephen Lin

llvm-svn: 179763
2013-04-18 16:11:44 +00:00
Eli Bendersky 239a78b835 More consistent formatting and tidying-up
llvm-svn: 179716
2013-04-17 20:17:08 +00:00
Eli Bendersky ca38084d57 Make formatting more consistent and tidy-up.
llvm-svn: 179689
2013-04-17 17:17:20 +00:00
Michael Gottesman 88d1883de7 Added documentation to LangRef for the intrinsic llvm.ptr.annotation.* which for some reason was never written.
llvm-svn: 177950
2013-03-26 00:34:27 +00:00
Eli Bendersky 9c0d49331e Missing period in doc
llvm-svn: 176809
2013-03-11 16:51:15 +00:00
Michael Liao a7699084b9 Remove tailing whitespaces
llvm-svn: 176570
2013-03-06 18:24:34 +00:00
Kostya Serebryany cf880b9443 Unify clang/llvm attributes for asan/tsan/msan (LLVM part)
These are two related changes (one in llvm, one in clang).
LLVM: 
- rename address_safety => sanitize_address (the enum value is the same, so we preserve binary compatibility with old bitcode)
- rename thread_safety => sanitize_thread
- rename no_uninitialized_checks -> sanitize_memory

CLANG: 
- add __attribute__((no_sanitize_address)) as a synonym for __attribute__((no_address_safety_analysis))
- add __attribute__((no_sanitize_thread))
- add __attribute__((no_sanitize_memory))

for S in address thread memory
If -fsanitize=S is present and __attribute__((no_sanitize_S)) is not
set llvm attribute sanitize_S

llvm-svn: 176075
2013-02-26 06:58:09 +00:00
Pekka Jaaskelainen 119a2b6f31 Made it more explicit that the self-referential llvm.loop identifier metadata
should be unique for each loop.

llvm-svn: 175888
2013-02-22 12:03:07 +00:00
Bill Wendling 09bd1f71ee Implement the NoBuiltin attribute.
The 'nobuiltin' attribute is applied to call sites to indicate that LLVM should
not treat the callee function as a built-in function. I.e., it shouldn't try to
replace that function with different code.

llvm-svn: 175835
2013-02-22 00:12:35 +00:00
Paul Redmond eaaed3b1fe add missing space which prevented the llvm.loop code-block from appearing in the
generated html.

llvm-svn: 175769
2013-02-21 17:20:45 +00:00
Pekka Jaaskelainen 0d23725a8d Metadata for annotating loops as parallel. The first consumer for this
metadata is the loop vectorizer.

See the documentation update for more info.

llvm-svn: 175060
2013-02-13 18:08:57 +00:00
Kostya Serebryany d688bab563 [tsan/msan] adding thread_safety and uninitialized_checks attributes
llvm-svn: 174864
2013-02-11 08:13:54 +00:00
Bill Wendling 63b8819445 Initial submission for the attribute group feature.
Attribute groups are of the form:

  #0 = attributes { noinline "no-sse" "cpu"="cortex-a8" alignstack=4 }

Target-dependent attributes are represented as strings. Attributes can have
optional values associated with them. E.g., the "cpu" attribute has the value
"cortex-a8".

Target-independent attributes are listed as enums inside the attribute classes.

Multiple attribute groups can be referenced by the same object. In that case,
the attributes are merged together.

llvm-svn: 174493
2013-02-06 06:52:58 +00:00
Bill Wendling bf902f1d0d Alphabetize the function attributes.
llvm-svn: 174490
2013-02-06 06:22:58 +00:00
Michael Gottesman e743a30850 Removed reference to LLVM as a project (since in LangRef it is used solely as a reference to the IR). Thanks silvas!
llvm-svn: 174301
2013-02-04 03:22:00 +00:00
Michael Gottesman 8901bb66fb Added new Global Variable marker ``externally_initialized'' to LangRef.
llvm-svn: 174270
2013-02-03 09:57:18 +00:00
Michael Gottesman ef2bc77330 Added clarification paragraph to LangRef's documentation of
GlobalVariable about LLVM's assumptions vis-a-vis Global Variable
initial values and Global Variable initializers.

This is in preparation for adding the new keyword
externally_initialized.

Specifically, the patch explains how LLVM optimizes global initializers
by assumign that global variables defined within the module are not
modified from their initial values before the start of the global
initializer.

llvm-svn: 174269
2013-02-03 09:57:15 +00:00
Michael Gottesman 006039cc74 Fixed a mistake in my previous commit where I changed the wording slightly and forgot to undo the change after changing my mind and deciding to only commit the style changes.
llvm-svn: 174041
2013-01-31 05:48:48 +00:00
Michael Gottesman 1cffcf74d1 Formatting Fix. Changed " to `` around the word 'constant' in the Lang Ref
section Global Variable so that the style matches the other keywords in
said section.

llvm-svn: 174040
2013-01-31 05:44:04 +00:00
Andrew Trick 7e6f928a7a LangRef: Add a Rationale for volatile rules.
llvm-svn: 174007
2013-01-31 00:49:39 +00:00
Andrew Trick 89fc5a6627 ...in light of recent activity related to llvm.memcpy flags. I want to
prevent an llvm developer from mistakenly thinking that just because the
intrinsic has volatile flags that volatile operations can be converted
to or folded into them.

Platforms may rely on volatile loads and stores of natively supported
data width to be executed as single instruction. When compiling
C, this expectation likely holds for l-values of volatile primitive
types with native hardware support, but not necessarily for aggregate
types. The frontend upholds these expectations, which are not
specified in the IR.

llvm-svn: 173974
2013-01-30 21:19:35 +00:00
Patrik Hagglund a832ab1bfc Documentation: Updating the data layout default specifications to
correspond to the code.

Patch by Stephen McGruer.

llvm-svn: 173914
2013-01-30 09:02:06 +00:00
Dmitri Gribenko 69b5647369 Documentation: add empty lines so that lists are properly recognized
llvm-svn: 173845
2013-01-29 23:14:41 +00:00
Dmitri Gribenko 675911d99c Documentation: fix syntax error
Patch by David Waggoner

llvm-svn: 173571
2013-01-26 13:30:13 +00:00
Eli Bendersky 4f2162f8f8 Fix small typo
llvm-svn: 173298
2013-01-23 22:05:19 +00:00
Bill Wendling 7c8f96a91b Add the heuristic to differentiate SSPStrong from SSPRequired.
The requirements of the strong heuristic are:

* A Protector is required for functions which contain an array, regardless of
  type or length.

* A Protector is required for functions which contain a structure/union which
  contains an array, regardless of type or length.  Note, there is no limit to
  the depth of nesting.

* A protector is required when the address of a local variable (i.e., stack
  based variable) is exposed. (E.g., such as through a local whose address is
  taken as part of the RHS of an assignment or a local whose address is taken as
  part of a function argument.)

llvm-svn: 173231
2013-01-23 06:43:53 +00:00
Bill Wendling d154e283f2 Add the IR attribute 'sspstrong'.
SSPStrong applies a heuristic to insert stack protectors in these situations:

* A Protector is required for functions which contain an array, regardless of
  type or length.

* A Protector is required for functions which contain a structure/union which
  contains an array, regardless of type or length.  Note, there is no limit to
  the depth of nesting.

* A protector is required when the address of a local variable (i.e., stack
  based variable) is exposed. (E.g., such as through a local whose address is
  taken as part of the RHS of an assignment or a local whose address is taken as
  part of a function argument.)

This patch implements the SSPString attribute to be equivalent to
SSPRequired. This will change in a subsequent patch.

llvm-svn: 173230
2013-01-23 06:41:41 +00:00
Dmitri Gribenko e813112c71 Documentation: replace some non-ASCII characters by equivalent markup
llvm-svn: 172917
2013-01-19 20:34:20 +00:00
Daniel Dunbar 9585612876 [MC/Mach-O] Implement integrated assembler support for linker options.
- Also, fixup syntax errors in LangRef and missing newline in the MCAsmStreamer.

llvm-svn: 172837
2013-01-18 19:37:00 +00:00
Daniel Dunbar 1dc66cafca [docs] Get rid of some UTF8 characters (non-breaking space maybe).
llvm-svn: 172741
2013-01-17 18:57:32 +00:00
Daniel Dunbar 252bedc568 [IR] Reserve/define the purpose for the "Linker Options" metadata flags.
llvm-svn: 172681
2013-01-17 00:16:27 +00:00
Lang Hames 045f439310 Update the description of the llvm.fmuladd.* intrinsics to avoid use of the
ambiguous term 'legal'.

Suggested by Andrew Booker. Thanks Andrew!

llvm-svn: 172680
2013-01-17 00:00:49 +00:00
Dmitri Gribenko 4dc2ba15d7 Documentation: fix a typo 'IEE754'
Reported on IRC by _savage

llvm-svn: 172677
2013-01-16 23:40:37 +00:00
Daniel Dunbar d77d9fb04d [IR] Add 'Append' and 'AppendUnique' module flag behaviors.
llvm-svn: 172659
2013-01-16 21:38:56 +00:00
Daniel Dunbar 25c4b5718b [IR] Add verifier support for llvm.module.flags.
- Also, update the LangRef documentation on module flags to match the
   implementation.

llvm-svn: 172498
2013-01-15 01:22:53 +00:00
James Molloy 4f6fb953a7 Add a new attribute, 'noduplicate'. If a function contains a noduplicate call, the call cannot be duplicated - Jump threading, loop unrolling, loop unswitching, and loop rotation are inhibited if they would duplicate the call.
Similarly inlining of the function is inhibited, if that would duplicate the call (in particular inlining is still allowed when there is only one callsite and the function has internal linkage).

llvm-svn: 170704
2012-12-20 16:04:27 +00:00
Chris Lattner c11b91ec18 So many people have touched this, it doesn't make sense to ascribe authorship anymore.
llvm-svn: 169704
2012-12-09 16:55:39 +00:00
Sean Silva b084af416a docs: Convert LangRef to reST.
NOTE: If you have any patches in the works that modify LangRef, you will
need to rewrite the changes to LangRef.html to their equivalents in
LangRef.rst. If you need assistance feel free to contact me.

Since LangRef is mission-critical for the project and "normative", I
have taken extra care to ensure that no content was lost or altered in
the conversion. The content was converted with a tool called `pandoc`,
so there is no chance for a human error like accidentally forgetting a
sentence or whatever. After the initial conversion by `pandoc`, only
changes to the markup were done.

This is just the most literal conversion of the HTML document as
possible. It might be worth exploring some way to chop up this massive
document into separate pages, e.g. something like
`docs/LangRef/Instructions.rst`, `docs/LangRef/Intrinsics.rst`, etc.
with `docs/LangRef.rst` being an "intro/navigation page" of sorts. On
the other hand, that loses the ability to {Ctrl,Cmd}-F for a given term
right from your browser.

IMO, I think our stylesheet needs some work because I find it hard to
tell what level of nesting some of the headings are at (e.g. "is this a
new section or is it a subsection?"). The issue is present on other
pages, but the sheer size and deep section structure of LangRef really
brings this issue out. If there are any web designers out there in the
community it would be awesome if you tried to come up with something
nicer.

llvm-svn: 169596
2012-12-07 10:36:55 +00:00