Commit Graph

5206 Commits

Author SHA1 Message Date
Renato Golin
ec15d70712 Add overall description, file comments, some structure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204479 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-21 16:49:43 +00:00
Mark Seaborn
9bb9615e1f Remove LowerInvoke's obsolete "-enable-correct-eh-support" option
This option caused LowerInvoke to generate code using SJLJ-based
exception handling, but there is no code left that interprets the
jmp_buf stack that the resulting code maintained (llvm.sjljeh.jblist).
This option has been obsolete for a while, and replaced by
SjLjEHPrepare.

This leaves the default behaviour of LowerInvoke, which is to convert
invokes to calls.

Differential Revision: http://llvm-reviews.chandlerc.com/D3136

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204388 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-20 19:54:47 +00:00
Eli Bendersky
072228083f Fix a few more grammatic errors in docs/TableGen/index.rst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204364 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-20 17:59:37 +00:00
Eli Bendersky
f631e0b64e Fix a couple of typos and an inaccurate description in the new TableGen doc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204363 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-20 17:45:30 +00:00
Renato Golin
1625937ddb Re-factor TableGen docs
This is mainly a movement of content around to give place to new content
allowing different people to add bits to it in the right place. There is some
new content, but mostly to fill the gaps left by text movement.

I'm dropping the old syntax documentation as it has the problem of being
quickly outdated by changes and largely unnecessary to people not involved
in creating the language, but using it, which is the whole point of the
documentation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204351 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-20 16:08:34 +00:00
Renato Golin
f48cfddd26 Add IAS/EHABI changes to release notes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204134 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-18 10:16:15 +00:00
Adrian Prantl
5e8144df32 Switch the type field in DIVariable and DIGlobalVariable over to DITypeRefs.
This allows us to catch more opportunities for ODR-based type uniquing
during LTO.
Paired commit with CFE which updates some testcases to verify the new
DIBuilder behavior.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204106 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-18 02:34:58 +00:00
Richard Osborne
43cf3f0c91 [docs] Add links to XMOS XCore documentation.
Summary: Add links to XCore ISA and ABI documents.

CC: llvm-commits, rafael

Differential Revision: http://llvm-reviews.chandlerc.com/D2981

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203936 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-14 15:53:50 +00:00
Rafael Espindola
1f21e0dd0d Remove the linker_private and linker_private_weak linkages.
These linkages were introduced some time ago, but it was never very
clear what exactly their semantics were or what they should be used
for. Some investigation found these uses:

* utf-16 strings in clang.
* non-unnamed_addr strings produced by the sanitizers.

It turns out they were just working around a more fundamental problem.
For some sections a MachO linker needs a symbol in order to split the
section into atoms, and llvm had no idea that was the case. I fixed
that in r201700 and it is now safe to use the private linkage. When
the object ends up in a section that requires symbols, llvm will use a
'l' prefix instead of a 'L' prefix and things just work.

With that, these linkages were already dead, but there was a potential
future user in the objc metadata information. I am still looking at
CGObjcMac.cpp, but at this point I am convinced that linker_private
and linker_private_weak are not what they need.

The objc uses are currently split in

* Regular symbols (no '\01' prefix). LLVM already directly provides
whatever semantics they need.
* Uses of a private name (start with "\01L" or "\01l") and private
linkage. We can drop the "\01L" and "\01l" prefixes as soon as llvm
agrees with clang on L being ok or not for a given section. I have two
patches in code review for this.
* Uses of private name and weak linkage.

The last case is the one that one could think would fit one of these
linkages. That is not the case. The semantics are

* the linker will merge these symbol by *name*.
* the linker will hide them in the final DSO.

Given that the merging is done by name, any of the private (or
internal) linkages would be a bad match. They allow llvm to rename the
symbols, and that is really not what we want. From the llvm point of
view, these objects should really be (linkonce|weak)(_odr)?.

For now, just keeping the "\01l" prefix is probably the best for these
symbols. If we one day want to have a more direct support in llvm,
IMHO what we should add is not a linkage, it is just a hidden_symbol
attribute. It would be applicable to multiple linkages. For example,
on weak it would produce the current behavior we have for objc
metadata. On internal, it would be equivalent to private (and we
should then remove private).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203866 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-13 23:18:37 +00:00
Stephan Tolksdorf
ac01874f19 Test commit - remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203834 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-13 19:07:39 +00:00
Arnold Schwaighofer
8d46932137 Fix whitespace in vectorizer example
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203738 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-12 23:58:07 +00:00
Arnold Schwaighofer
6a7d263e8b Fix vectorizer docs.
This example is not vectorized because LLVM does not prove no-wrapping of
"a[i*7] += ...".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203734 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-12 23:23:44 +00:00
Rafael Espindola
9802a6cbdc Remove projects/sample.
As an example that was not actually being used, it suffered from a slow bitrot.

The two main issues with it were that it had no cmake support and
included a copy of the autoconf directory. The reality is that
autoconf is not easily composable. The lack of composabilty is why we
have clang options in llvm's configure. Suggesting that users include
a copy of autoconf/ in their projects seems a bad idea.

We are also in the process of switching to cmake, so pushing autoconf
to new project is probably not what we want.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203728 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-12 22:40:22 +00:00
Rafael Espindola
38048cdb1c Reject alias to undefined symbols in the verifier.
On ELF and COFF an alias is just another name for a position in the file.
There is no way to refer to a position in another file, so an alias to
undefined is meaningless.

MachO currently doesn't support aliases. The spec has a N_INDR, which when
implemented will have a different set of restrictions. Adding support for
it shouldn't be harder than any other IR extension.

For now, having the IR represent what is actually possible with current
tools makes it easier to fix the design of GlobalAlias.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203705 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-12 20:15:49 +00:00
Tim Northover
ca396e391e IR: add a second ordering operand to cmpxhg for failure
The syntax for "cmpxchg" should now look something like:

	cmpxchg i32* %addr, i32 42, i32 3 acquire monotonic

where the second ordering argument gives the required semantics in the case
that no exchange takes place. It should be no stronger than the first ordering
constraint and cannot be either "release" or "acq_rel" (since no store will
have taken place).

rdar://problem/15996804

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203559 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-11 10:48:52 +00:00
Saleem Abdulrasool
afe381c0a9 Object: rename ARMV7 to ARMNT
The official specifications state the name to be ARMNT (as per the Microsoft
Portable Executable and Common Object Format Specification v8.3).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203530 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-11 03:08:37 +00:00
Tim Northover
7806d2c9af Docs: remove paragraph about manual account creation.
There's now a normal UI for that, apparently.

Patch by Manuel Jacob.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203481 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-10 19:24:30 +00:00
David Majnemer
39a09d2b7c IR: Change inalloca's grammar a bit
The grammar for LLVM IR is not well specified in any document but seems
to obey the following rules:

 - Attributes which have parenthesized arguments are never preceded by
   commas.  This form of attribute is the only one which ever has
   optional arguments.  However, not all of these attributes support
   optional arguments: 'thread_local' supports an optional argument but
   'addrspace' does not.  Interestingly, 'addrspace' is documented as
   being a "qualifier".  What constitutes a qualifier?  I cannot find a
   definition.

 - Some attributes use a space between the keyword and the value.
   Examples of this form are 'align' and 'section'.  These are always
   preceded by a comma.

 - Otherwise, the attribute has no argument.  These attributes do not
   have a preceding comma.

Sometimes an attribute goes before the instruction, between the
instruction and it's type, or after it's type.  'atomicrmw' has
'volatile' between the instruction and the type while 'call' has 'tail'
preceding the instruction.

With all this in mind, it seems most consistent for 'inalloca' on an
'inalloca' instruction to occur before between the instruction and the
type.  Unlike the current formulation, there would be no preceding
comma.  The combination 'alloca inalloca' doesn't look particularly
appetizing, perhaps a better spelling of 'inalloca' is down the road.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203376 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-09 06:41:58 +00:00
Michael Gottesman
fac2487347 [docs] Teach CMake docs build how to generate Qt Creator help/documentation files.
Patch by Konrad Kleine.

Differential Revision: http://llvm-reviews.chandlerc.com/D2967

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203272 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 19:19:28 +00:00
Nico Weber
f456d37c4f "Mac OS/X" -> "Mac OS X" spelling fixes for llvm.
Patch from Sean McBride <sean@rogue-research.com>!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203258 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 18:08:54 +00:00
Duncan P. N. Exon Smith
feed88059f C++11: Remove const from in auto guidelines
Using const is orthogonal to guidelines on using auto& and auto*.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203257 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 18:06:15 +00:00
Duncan P. N. Exon Smith
fc9031cdff C++11: Copy pointers with const auto *
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203254 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 17:23:29 +00:00
Benjamin Kramer
c1dafe8dc3 [C++11] Replace LLVM-style type traits with C++11 standard ones.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203242 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 14:42:25 +00:00
Ahmed Charles
6a2154ebd9 [Typo] Fix sentence in CMake documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203206 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 06:24:30 +00:00
Rafael Espindola
40e107d960 Add missing "[unnamed_addr]" to LangRef.rst#functions.
Patch by Manuel Jacob.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203197 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 04:28:28 +00:00
Tobias Grosser
4c16a16505 [LangRef] Improve llvm.mem.parallel_loop_access example
The following changes have been applied:

  - Removed 'align 4'. We can simplify this away, as it does not provide useful
    information in the example.
  - Use named instructions instead of '%0'. This is nicer, but more importantly
    this makes the IR valid. Before we had two assignments to %0 in a single
    example.
  - Add a missing branch instruction to make the loop structure clear.
  - Move one access into outer.for.body to make it not look that empty.
  - The statments that are only in the outer loop body should not reference the
    inner loop metadata, but only the outer loop. Only statements in both loops
    should reference both surrounding loops.
  - Rename the array indexes to make them all independent. Before there were
    identical array indexes in the inner and the outer loop. We want to
    avoid this special case as it may lead to confusion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202973 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-05 13:36:04 +00:00
Reid Kleckner
3b9afd3087 Change x86mmx -> x86_mmx in LangRef.rst
The correct name of the type in LLVM assembly is "x86_mmx".  Also remove
the reST label "t_x86mmx" because it was unused anyway.

Patch by Manuel Jacob!

Differential Revision: http://llvm-reviews.chandlerc.com/D2955

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202929 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-05 02:41:37 +00:00
Reid Kleckner
d6e0bca951 LangRef: Remove stale docs on LLVM types in module structure
The distinction between "identified" and "literal" struct types is fully
documented in a later section.

Patch by Philip Reames!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202927 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-05 02:21:50 +00:00
Chandler Carruth
7225e27b4c [Modules] Move ValueMap to the IR library. While this class does not
directly care about the Value class (it is templated so that the key can
be any arbitrary Value subclass), it is in fact concretely tied to the
Value class through the ValueHandle's CallbackVH interface which relies
on the key type being some Value subclass to establish the value handle
chain.

Ironically, the unittest is already in the right library.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202824 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-04 11:26:31 +00:00
Reid Kleckner
739dd523e6 Avoid std::function until PR19030 is fixed
We'd like to keep the clang-cl self-host working until we implement
MSVC-compatible RTTI.

Differential Revision: http://llvm-reviews.chandlerc.com/D2930

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202758 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-03 21:12:13 +00:00
Peter Collingbourne
c3835ccef9 Document that std::initializer_list is not always available.
Differential Revision: http://llvm-reviews.chandlerc.com/D2923

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202750 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-03 19:54:42 +00:00
Diego Novillo
6f8c0c0613 Add DWARF discriminator support to DILexicalBlocks.
This adds support for emitting discriminators from DILexicalBlocks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202736 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-03 18:53:17 +00:00
Duncan P. N. Exon Smith
59a4517759 C++11: Beware unnecessary copies with auto
It's easy to copy unintentionally when using 'auto', particularly inside
range-based for loops.  Best practise is to use 'const&' unless there's
a good reason not to.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202729 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-03 16:48:47 +00:00
Duncan P. N. Exon Smith
653638bea4 Clarify struct usage guidelines
The current coding standards restrict the use of struct to PODs, but no
one has been following them.  This patch updates the standards to
clarify when structs are dangerous and describe common practice in LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202728 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-03 16:48:44 +00:00
Chandler Carruth
bab807eaa1 [C++11] Suggest placing callable arguments as the last argument to
facilitate the nice formatting of lambdas passed there. Suggested by
Chris during review of my lambda additions, and something I strongly
agree with.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202622 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-02 09:13:39 +00:00
Chandler Carruth
cfbdd4df6d [C++11] Update the coding standards to provide some important guidance
about a few constructs in C++11 that are worth starting off in
a consistent manner within the codebase.

This will be matched with a change to clang-format's LLVM style which
will switch the options to support C++11 and use these conventions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202620 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-02 08:38:35 +00:00
Chris Lattner
a45e3ff4f2 remove an old entry whose link is broken anyway
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202617 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-02 06:37:03 +00:00
Sean Silva
aede1c9884 [docs] Fix some Sphinx warnings.
The docs now build cleanly. Yay!

The following warnings were fixed:

/home/sean/pg/llvm/llvm/docs/HowToReleaseLLVM.rst:364: WARNING: Enumerated list ends without a blank line; unexpected unindent.
/home/sean/pg/llvm/llvm/docs/InAlloca.rst:: WARNING: document isn't included in any toctree

/home/sean/pg/llvm/llvm/docs/CodingStandards.rst:85: WARNING: Title underline too short.

Supported C++11 Language and Library Features
-------------------------------------------
/home/sean/pg/llvm/llvm/docs/CodingStandards.rst:85: WARNING: Title underline too short.

Supported C++11 Language and Library Features
-------------------------------------------
/home/sean/pg/llvm/llvm/docs/GettingStarted.rst:185: WARNING: Explicit markup ends without a blank line; unexpected unindent.
/home/sean/pg/llvm/llvm/docs/GettingStarted.rst:565: WARNING: Explicit markup ends without a blank line; unexpected unindent.
/home/sean/pg/llvm/llvm/docs/GettingStarted.rst:567: WARNING: Block quote ends without a blank line; unexpected unindent.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202603 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-02 00:21:42 +00:00
Chandler Carruth
f468dea807 [docs] Update the docs to remove my hedging about C++98 vs. C++11. =]
The switch has been thrown. While I'm still watching for any failures or
problems with this, the documentation can go ahead and move forward.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202566 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-01 02:48:03 +00:00
Chandler Carruth
e6a2102aa2 [docs] Clarify that there isn't much to be done other than watch build
bots when using the standard library facilities. The missing pieces here
aren't always in useful discreet chunks.

Fortunately, the missing pieces are few and far between, and we can
emulate most of them in our headers as needed.

Based on feedback from Lang and Dave.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202548 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-28 21:59:51 +00:00
Richard Smith
80883b6a27 Add more whitespace to fix more bullets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202538 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-28 21:14:25 +00:00
Richard Smith
27f41a3736 Add whitespace to try to fix bulleted list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202537 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-28 21:11:28 +00:00
Ben Langmuir
640da197ae Fix some links to C++11 feature papers in the Coding Standards
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202532 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-28 19:37:20 +00:00
Gabor Greif
4a2f39338c add missing 3.4 release
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202531 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-28 19:20:48 +00:00
Chandler Carruth
2dc637fce3 [docs] Add a section to the coding standards about languages and such.
A lot of this is writing down common knowledge and things often
communicated on mailing lists and in discussions. It could live in the
Programmer's Manual alternatively, but that felt slightly less
well-fitting.

It also includes (and was motivated by) the section on the relevant
language standards for LLVM and the specific features that will be
enabled with the switch to C++11.

With this, all of the documentation for the C++11 switch is, I think, in
place. I plan to flip the switch RSN. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202497 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-28 13:35:54 +00:00
Chandler Carruth
72667d1447 [docs] A slight tweak to the intro for the golden rule in the coding
standards.

It claims the document intentionally doesn't give fixed standards for
brace placement or spacing, and then the document goes on to do
precisely that in several places. Instead, try to highlight that even
these rules are simply *guidance* which may be trumped by some other
circumstance or the local conventions of code.

I'm not trying to change the thrust of this part of the document, and if
folks think this does so, I'm happy to re-wordsmith it. I just don't
want it to be so self-contradicting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202495 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-28 12:24:18 +00:00
Chandler Carruth
345ca696e7 [docs] Tweak the example to match what is apparantly the desired form
for the style templates we're using.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202494 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-28 12:14:56 +00:00
Chandler Carruth
a20d48d01a [docs] Switch to external hyperlink references. Much more readable and
hopefully easier to get the formatting right for ReST.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202493 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-28 12:09:14 +00:00
Chandler Carruth
9447b54039 [docs] Fix my links to use the correct ReST syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202490 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-28 11:12:14 +00:00
Chandler Carruth
ed0b862022 [docs] Fix 80-column wrap that I messed up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202489 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-28 11:11:41 +00:00