Commit Graph

5519 Commits

Author SHA1 Message Date
Sean Silva
cd04094266 [docs][LLVM-style RTTI] Add a mention of multiple inheritance.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228479 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-07 01:16:26 +00:00
Sean Silva
54a6137379 [docs] Put an explicit link to InAlloca.rst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228192 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-04 20:51:19 +00:00
Peter Collingbourne
5e51ed875d Misc documentation/comment fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228093 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-04 00:42:45 +00:00
Yunzhong Gao
9dbaae6fae Remove the preverify pass from the documentation now that it has been removed
since r199487.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227608 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-30 20:51:09 +00:00
Philip Reames
afe3498413 Remove gc.root's performCustomLowering
This is a refactoring to restructure the single user of performCustomLowering as a specific lowering pass and remove the custom lowering hook entirely.

Before this change, the LowerIntrinsics pass (note to self: rename!) was essentially acting as a pass manager, but without being structured in terms of passes. Instead, it proxied calls to a set of GCStrategies internally. This adds a lot of conceptual complexity (i.e. GCStrategies are stateful!) for very little benefit. Since there's been interest in keeping the ShadowStackGC working, I extracting it's custom lowering pass into a dedicated pass and just added that to the pass order. It will only run for functions which opt-in to that gc.

I wasn't able to find an easy way to preserve the runtime registration of custom lowering functionality. Given that no user of this exists that I'm aware of, I made the choice to just remove that. If someone really cares, we can look at restoring it via dynamic pass registration in the future.

Note that despite the large diff, none of the lowering code actual changes. I added the framing needed to make it a pass and rename the class, but that's it.

Differential Revision: http://reviews.llvm.org/D7218



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227351 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-28 19:28:03 +00:00
Sean Silva
a8104c5ab0 [docs] Use slightly more proper .rst markup
Again, I'd like to emphasize to everyone that this sort of markup change
is *not* what you should be concerned about when writing docs. Focus on
*content*.

I applaud Chandler for focusing on the fantastic content of this new
section!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227305 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-28 10:36:41 +00:00
Sean Silva
a5f199122a [docs] [cleanup] No need for a comment around C++11 override
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227304 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-28 10:26:29 +00:00
Chandler Carruth
dde94fb301 Introduce a section to the programmers manual about type hierarchies,
polymorphism, and virtual dispatch.

This is essentially trying to explain the emerging design techniques
being used in LLVM these days somewhere more accessible than the
comments on a particular piece of infrastructure. It covers the
"concepts-based polymorphism" that caused some confusion during initial
reviews of the new pass manager as well as the tagged-dispatch mechanism
used pervasively in LLVM and Clang.

Perhaps most notably, I've tried to provide some criteria to help
developers choose between these options when designing new pieces of
infrastructure.

Differential Revision: http://reviews.llvm.org/D7191

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227292 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-28 03:04:54 +00:00
Simon Atanasyan
1029e9ca38 [docs] Add link to the MIPS 64-bit ELF object file specification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227050 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-25 16:20:30 +00:00
Charlie Turner
c7efed60ef Fixup debug information references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227020 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-24 21:51:21 +00:00
Charlie Turner
7f58cf305f Update references to lines of code count.
The number of lines of code in Kaleidoscope has risen from the
previously reported 700 to 986 according to the cloc tool. This tools
was run on the toy.cpp file from Chapter 8.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227019 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-24 21:51:17 +00:00
Ramkumar Ramachandra
230796b278 Intrinsics: introduce llvm_any_ty aka ValueType Any
Specifically, gc.result benefits from this greatly. Instead of:

gc.result.int.*
gc.result.float.*
gc.result.ptr.*
...

We now have a gc.result.* that can specialize to literally any type.

Differential Revision: http://reviews.llvm.org/D7020

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226857 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-22 20:14:38 +00:00
Paul Robinson
5b17b4ea2b Explicitly describe '///' versus '//' comment delimiters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226750 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-22 00:19:56 +00:00
Chandler Carruth
de5df29556 [PM] Split the LoopInfo object apart from the legacy pass, creating
a LoopInfoWrapperPass to wire the object up to the legacy pass manager.

This switches all the clients of LoopInfo over and paves the way to port
LoopInfo to the new pass manager. No functionality change is intended
with this iteration.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226373 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-17 14:16:18 +00:00
Hans Wennborg
aaac99269f ProgrammersManual.rst: fix a typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226367 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-17 03:19:21 +00:00
Hal Finkel
92cd0ca3b2 [PowerPC] Adjust PatchPoints for ppc64le
Bill Schmidt pointed out that some adjustments would be needed to properly
support powerpc64le (using the ELF V2 ABI). For one thing, R11 is not available
as a scratch register, so we need to use R12. R12 is also available under ELF
V1, so to maintain consistency, I flipped the order to make R12 the first
scratch register in the array under both ABIs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226247 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-16 04:40:58 +00:00
Hans Wennborg
a805f7edd0 ReleaseNotes.rst: bump version to 3.7
The 3.6 notes are now in the 3.6 branch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226007 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-14 18:07:30 +00:00
Hans Wennborg
f11d9b1933 Trunk is now 3.7.0svn
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226004 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-14 17:38:03 +00:00
Sanjay Patel
2f39336782 fix typos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225991 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-14 16:03:58 +00:00
Mehdi Amini
df6c8efd9d SelectionDAG: add a -filter-view-dags option to llc
This option takes the name of the basic block you want to visualize
with -view-*-dags

Differential Revision: http://reviews.llvm.org/D6948



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225953 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-14 06:03:18 +00:00
Hal Finkel
ade705c6e5 Revert "r225811 - Revert "r225808 - [PowerPC] Add StackMap/PatchPoint support""
This re-applies r225808, fixed to avoid problems with SDAG dependencies along
with the preceding fix to ScheduleDAGSDNodes::RegDefIter::InitNodeNumDefs.
These problems caused the original regression tests to assert/segfault on many
(but not all) systems.

Original commit message:

This commit does two things:

 1. Refactors PPCFastISel to use more of the common infrastructure for call
    lowering (this lets us take advantage of this common code for lowering some
    common intrinsics, stackmap/patchpoint among them).

 2. Adds support for stackmap/patchpoint lowering. For the most part, this is
    very similar to the support in the AArch64 target, with the obvious differences
    (different registers, NOP instructions, etc.). The test cases are adapted
    from the AArch64 test cases.

One difference of note is that the patchpoint call sequence takes 24 bytes, so
you can't use less than that (on AArch64 you can go down to 16). Also, as noted
in the docs, we take the patchpoint address to be the actual code address
(assuming the call is local in the TOC-sharing sense), which should yield
higher performance than generating the full cross-DSO indirect-call sequence
and is likely just as useful for JITed code (if not, we'll change it).

StackMaps and Patchpoints are still marked as experimental, and so this support
is doubly experimental. So go ahead and experiment!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225909 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-14 01:07:51 +00:00
Duncan P. N. Exon Smith
3b0fe4ec0a AsmParser/Bitcode: Add support for MDLocation
This adds assembly and bitcode support for `MDLocation`.  The assembly
side is rather big, since this is the first `MDNode` subclass (that
isn't `MDTuple`).  Part of PR21433.

(If you're wondering where the mountains of testcase updates are, we
don't need them until I update `DILocation` and `DebugLoc` to actually
use this class.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225830 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-13 21:10:44 +00:00
Peter Collingbourne
0ba9a7e4bb Add link to Go bindings documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225815 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-13 18:49:42 +00:00
Hal Finkel
ea55eceaed Revert "r225808 - [PowerPC] Add StackMap/PatchPoint support"
Reverting this while I investiage buildbot failures (segfaulting in
GetCostForDef at ScheduleDAGRRList.cpp:314).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225811 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-13 18:25:05 +00:00
Hal Finkel
232f393466 [PowerPC] Add StackMap/PatchPoint support
This commit does two things:

 1. Refactors PPCFastISel to use more of the common infrastructure for call
    lowering (this lets us take advantage of this common code for lowering some
    common intrinsics, stackmap/patchpoint among them).

 2. Adds support for stackmap/patchpoint lowering. For the most part, this is
    very similar to the support in the AArch64 target, with the obvious differences
    (different registers, NOP instructions, etc.). The test cases are adapted
    from the AArch64 test cases.

One difference of note is that the patchpoint call sequence takes 24 bytes, so
you can't use less than that (on AArch64 you can go down to 16). Also, as noted
in the docs, we take the patchpoint address to be the actual code address
(assuming the call is local in the TOC-sharing sense), which should yield
higher performance than generating the full cross-DSO indirect-call sequence
and is likely just as useful for JITed code (if not, we'll change it).

StackMaps and Patchpoints are still marked as experimental, and so this support
is doubly experimental. So go ahead and experiment!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225808 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-13 17:48:12 +00:00
Daniel Sanders
102e66e83c Added a Mips lld milestone to the release notes for the 3.6 release.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225797 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-13 15:17:00 +00:00
Peter Zotov
44ce0c866c Update release notes wrt OCaml bindings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225779 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-13 09:48:02 +00:00
Reid Kleckner
d8f69a7201 Rename llvm.recoverframeallocation to llvm.framerecover
This name is less descriptive, but it sort of puts things in the
'llvm.frame...' namespace, relating it to frameallocate and
frameaddress. It also avoids using "allocate" and "allocation" together.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225752 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-13 01:51:34 +00:00
Paul Robinson
35352518fe Phabricator calls it "subscriber" not "cc"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225747 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-13 00:50:31 +00:00
Reid Kleckner
221a7075cf Add the llvm.frameallocate and llvm.recoverframeallocation intrinsics
These intrinsics allow multiple functions to share a single stack
allocation from one function's call frame. The function with the
allocation may only perform one allocation, and it must be in the entry
block.

Functions accessing the allocation call llvm.recoverframeallocation with
the function whose frame they are accessing and a frame pointer from an
active call frame of that function.

These intrinsics are very difficult to inline correctly, so the
intention is that they be introduced rarely, or at least very late
during EH preparation.

Reviewers: echristo, andrew.w.kaylor

Differential Revision: http://reviews.llvm.org/D6493

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225746 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-13 00:48:10 +00:00
Bill Schmidt
9e3e492f03 First crack at PowerPC 3.6 release notes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225695 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-12 20:46:43 +00:00
Daniel Sanders
8da1635c6a Fix silly mistake in release notes for Mips.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225608 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-11 10:48:20 +00:00
Daniel Sanders
e7f28b2bb0 Added release notes for the Mips target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225607 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-11 10:34:52 +00:00
Hans Wennborg
d4ca466ed6 ReleaseNotes.rst: these are for 3.6
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225482 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-09 00:21:26 +00:00
Duncan P. N. Exon Smith
cce3a8acec LangRef: Add usage points for distinct MDNodes
Omission pointed out by Sean Silva!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225479 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-08 23:50:26 +00:00
Duncan P. N. Exon Smith
f416d72973 IR: Add 'distinct' MDNodes to bitcode and assembly
Propagate whether `MDNode`s are 'distinct' through the other types of IR
(assembly and bitcode).  This adds the `distinct` keyword to assembly.

Currently, no one actually calls `MDNode::getDistinct()`, so these nodes
only get created for:

  - self-references, which are never uniqued, and
  - nodes whose operands are replaced that hit a uniquing collision.

The concept of distinct nodes is still not quite first-class, since
distinct-ness doesn't yet survive across `MapMetadata()`.

Part of PR22111.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225474 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-08 22:38:29 +00:00
Eric Christopher
aa73f89bba The Kaleidoscope tutorial should be using "mcjit" for the library,
"jit" doesn't exist anymore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225462 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-08 19:07:01 +00:00
Sean Silva
699e5d7bc9 [LangRef] PR22118: Hyphen is allowed in IR identifiers.
E.g. %-foo and %fo-o.

Thanks to eagle-eyed reporter Tomas Brukner.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225400 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-07 21:35:14 +00:00
Rafael Espindola
f907a26bc2 Change the .ll syntax for comdats and add a syntactic sugar.
In order to make comdats always explicit in the IR, we decided to make
the syntax a bit more compact for the case of a GlobalObject in a
comdat with the same name.

Just dropping the $name causes problems for

@foo = globabl i32 0, comdat
$bar = comdat ...

and

declare void @foo() comdat
$bar = comdat ...

So the syntax is changed to

@g1 = globabl i32 0, comdat($c1)
@g2 = globabl i32 0, comdat

and

declare void @foo() comdat($c1)
declare void @foo() comdat

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225302 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-06 22:55:16 +00:00
Hal Finkel
edef0847bc [LangRef] Correct a typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225148 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-05 04:05:21 +00:00
Philip Reames
8c599f7536 Reformat statepoint documentation and fix a couple of typos
Patch by Ramkumar Ramachandra <artagnon@gmail.com>.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225084 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-02 19:46:49 +00:00
Elena Demikhovsky
cce6e81631 Fixed 2 minor typos in the documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224917 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-29 09:47:51 +00:00
Elena Demikhovsky
773f64844d Documentation for Masked Load and Store intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224832 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-25 09:29:13 +00:00
Duncan P. N. Exon Smith
1ef70ff39b IR: Make metadata typeless in assembly
Now that `Metadata` is typeless, reflect that in the assembly.  These
are the matching assembly changes for the metadata/value split in
r223802.

  - Only use the `metadata` type when referencing metadata from a call
    intrinsic -- i.e., only when it's used as a `Value`.

  - Stop pretending that `ValueAsMetadata` is wrapped in an `MDNode`
    when referencing it from call intrinsics.

So, assembly like this:

    define @foo(i32 %v) {
      call void @llvm.foo(metadata !{i32 %v}, metadata !0)
      call void @llvm.foo(metadata !{i32 7}, metadata !0)
      call void @llvm.foo(metadata !1, metadata !0)
      call void @llvm.foo(metadata !3, metadata !0)
      call void @llvm.foo(metadata !{metadata !3}, metadata !0)
      ret void, !bar !2
    }
    !0 = metadata !{metadata !2}
    !1 = metadata !{i32* @global}
    !2 = metadata !{metadata !3}
    !3 = metadata !{}

turns into this:

    define @foo(i32 %v) {
      call void @llvm.foo(metadata i32 %v, metadata !0)
      call void @llvm.foo(metadata i32 7, metadata !0)
      call void @llvm.foo(metadata i32* @global, metadata !0)
      call void @llvm.foo(metadata !3, metadata !0)
      call void @llvm.foo(metadata !{!3}, metadata !0)
      ret void, !bar !2
    }
    !0 = !{!2}
    !1 = !{i32* @global}
    !2 = !{!3}
    !3 = !{}

I wrote an upgrade script that handled almost all of the tests in llvm
and many of the tests in cfe (even handling many `CHECK` lines).  I've
attached it (or will attach it in a moment if you're speedy) to PR21532
to help everyone update their out-of-tree testcases.

This is part of PR21532.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224257 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-15 19:07:53 +00:00
Rafael Espindola
708bc15ff0 Require python 2.7.
We were already requiring 2.5, which meant that people on old linux distros
had to upgrade anyway.

Requiring python 2.6 will make supporting 3.X easier as we can use the 3.X
exception syntax.

According to the discussion on llvmdev, there is not much value is requiring
just 2.6, we may as well just require 2.7.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224129 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-12 15:29:31 +00:00
Stepan Dyatkovskiy
4912640253 Added documentation for MergeFunctions pass:
Pass looks for equivalent functions that are mergable and folds them.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223931 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 17:42:01 +00:00
Eric Christopher
772e538fb8 Add argument variable support to the debug info tutorial
and rearrange the prologue source location hack to immediately
after it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223725 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-09 00:28:24 +00:00
Eric Christopher
abe81e4794 Clean up the rst for the debug info tutorial
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223682 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-08 18:48:08 +00:00
Justin Bogner
70b0751080 InstrProf: An intrinsic and lowering for instrumentation based profiling
Introduce the ``llvm.instrprof_increment`` intrinsic and the
``-instrprof`` pass. These provide the infrastructure for writing
counters for profiling, as in clang's ``-fprofile-instr-generate``.

The implementation of the instrprof pass is ported directly out of the
CodeGenPGO classes in clang, and with the followup in clang that rips
that code out to use these new intrinsics this ends up being NFC.

Doing the instrumentation this way opens some doors in terms of
improving the counter performance. For example, this will make it
simple to experiment with alternate lowering strategies, and allows us
to try handling profiling specially in some optimizations if we want
to.

Finally, this drastically simplifies the frontend and puts all of the
lowering logic in one place.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223672 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-08 18:02:35 +00:00
Eric Christopher
23cf05ab9e Add Chapter 8 to the Kaleidoscope tutorial. This chapter adds
a description of how to add debug information using DWARF and
DIBuilder to the language.

Thanks to David Blaikie for his assistance with this tutorial.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223671 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-08 18:00:47 +00:00