Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Release 36@227537 #28

Closed
wants to merge 47 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
9696cd8
Merging r226075:
zmodem Jan 15, 2015
8e4eedc
Merging r226182:
zmodem Jan 15, 2015
0b5f8d1
Write 3.6 metadata release notes
dexonsmith Jan 15, 2015
5d8d6ce
Fix nit from review of metadata release notes.
dexonsmith Jan 15, 2015
de8a73a
Port r226022 to the 3.6 branch.
espindola Jan 17, 2015
fc56780
Revert r225957 from the 3.6 branch.
espindola Jan 17, 2015
23e4d9d
Merging r226170:
dsandersllvm Jan 17, 2015
6caadcf
Merging r226171:
dsandersllvm Jan 17, 2015
a4475bb
Add a few items to the 3.6 release notes.
espindola Jan 20, 2015
e1fa02c
Merging r226473:
zmodem Jan 20, 2015
493f96e
Merging r226186:
tstellarAMD Jan 21, 2015
e781723
Merging r226187:
tstellarAMD Jan 21, 2015
5193190
Merging r226188:
tstellarAMD Jan 21, 2015
2a56d53
Merging r226189:
tstellarAMD Jan 21, 2015
028c9e7
Merging r226190:
tstellarAMD Jan 21, 2015
01a640b
Merging r226191:
tstellarAMD Jan 21, 2015
3dd7164
Merging r226226:
tstellarAMD Jan 21, 2015
87f0cda
Merging r226583:
tstellarAMD Jan 21, 2015
b17ae4f
Merging r226584:
tstellarAMD Jan 21, 2015
e554cfd
Merging r226585:
tstellarAMD Jan 21, 2015
f957779
Merging r226586:
tstellarAMD Jan 21, 2015
e09ead0
Merging r226591:
tstellarAMD Jan 21, 2015
8c3d5ad
Merging r226596:
tstellarAMD Jan 21, 2015
870f78a
Merging r226597:
tstellarAMD Jan 21, 2015
5baa764
Merging r226755:
zmodem Jan 22, 2015
4f7a137
Merging r226708:
zmodem Jan 22, 2015
913134b
Merging r226711:
zmodem Jan 23, 2015
3c3b55e
Merging r226664:
zmodem Jan 26, 2015
3fdca84
pocl and TCE work with LLVM 3.6 now. Added them to the ReleaseNotes.
pjaaskel Jan 27, 2015
6a9506a
Merging r227005:
dsandersllvm Jan 27, 2015
e180cfa
Merging r227260:
zmodem Jan 28, 2015
cf80ede
Merging r227261:
zmodem Jan 28, 2015
7324280
Merging r227294:
zmodem Jan 28, 2015
4cfcb90
Merging r227299:
zmodem Jan 28, 2015
50e9ef1
Merging r227300:
zmodem Jan 28, 2015
f765399
Backport r226026 and r226031 to 3.6.
espindola Jan 28, 2015
ab8bcad
Merging r227250:
zmodem Jan 28, 2015
cf87413
Merging r226945:
tstellarAMD Jan 28, 2015
1eaeee8
Merging r226970:
tstellarAMD Jan 28, 2015
32d3823
Merging r227085:
zmodem Jan 28, 2015
f65176f
Merging r227319:
zmodem Jan 29, 2015
ccdb0c3
Merging r227339:
zmodem Jan 29, 2015
65794dd
Merging r227290:
zmodem Jan 29, 2015
76a77fb
Merging r227491:
zmodem Jan 30, 2015
7833b56
Add a NullCheckElimination pass
Jun 26, 2014
109ad08
Add the NullCheckElimination pass to the default pass list
Jun 27, 2014
2d54c4f
Improve the NullCheckElimination pass
Jun 29, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
307 changes: 305 additions & 2 deletions docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,282 @@ enable handling of case (3).
.. _discussions: http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-May/073235.html


Metadata is not a Value
-----------------------

Metadata nodes (``!{...}``) and strings (``!"..."``) are no longer values.
They have no use-lists, no type, cannot RAUW, and cannot be function-local.

Bridges between Value and Metadata
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

LLVM intrinsics can reference metadata using the ``metadata`` type, and
metadata nodes can reference constant values.

Function-local metadata is limited to direct arguments to LLVM intrinsics.

Metadata is typeless
^^^^^^^^^^^^^^^^^^^^

The following old IR:

.. code-block:: llvm

@g = global i32 0

define void @foo(i32 %v) {
entry:
call void @llvm.md(metadata !{i32 %v})
call void @llvm.md(metadata !{i32* @global})
call void @llvm.md(metadata !0)
call void @llvm.md(metadata !{metadata !"string"})
call void @llvm.md(metadata !{metadata !{metadata !1, metadata !"string"}})
ret void, !bar !1, !baz !2
}

declare void @llvm.md(metadata)

!0 = metadata !{metadata !1, metadata !2, metadata !3, metadata !"some string"}
!1 = metadata !{metadata !2, null, metadata !"other", i32* @global, i32 7}
!2 = metadata !{}

should now be written as:

.. code-block:: llvm

@g = global i32 0

define void @foo(i32 %v) {
entry:
call void @llvm.md(metadata i32 %v) ; The only legal place for function-local
; metadata.
call void @llvm.md(metadata i32* @global)
call void @llvm.md(metadata !0)
call void @llvm.md(metadata !{!"string"})
call void @llvm.md(metadata !{!{!1, !"string"}})
ret void, !bar !1, !baz !2
}

declare void @llvm.md(metadata)

!0 = !{!1, !2, !3, !"some string"}
!1 = !{!2, null, !"other", i32* @global, i32 7}
!2 = !{}

Distinct metadata nodes
^^^^^^^^^^^^^^^^^^^^^^^

Metadata nodes can opt-out of uniquing, using the keyword ``distinct``.
Distinct nodes are still owned by the context, but are stored in a side table,
and not uniqued.

In LLVM 3.5, metadata nodes would drop uniquing if an operand changed to
``null`` during optimizations. This is no longer true. However, if an operand
change causes a uniquing collision, they become ``distinct``. Unlike LLVM 3.5,
where serializing to assembly or bitcode would re-unique the nodes, they now
remain ``distinct``.

The following IR:

.. code-block:: llvm

!named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8}

!0 = !{}
!1 = !{}
!2 = distinct !{}
!3 = distinct !{}
!4 = !{!0}
!5 = distinct !{!0}
!6 = !{!4, !{}, !5}
!7 = !{!{!0}, !0, !5}
!8 = distinct !{!{!0}, !0, !5}

is equivalent to the following:

.. code-block:: llvm

!named = !{!0, !0, !1, !2, !3, !4, !5, !5, !6}

!0 = !{}
!1 = distinct !{}
!2 = distinct !{}
!3 = !{!0}
!4 = distinct !{!0}
!5 = !{!3, !0, !4}
!6 = distinct !{!3, !0, !4}

Constructing cyclic graphs
^^^^^^^^^^^^^^^^^^^^^^^^^^

During graph construction, if a metadata node transitively references a forward
declaration, the node itself is considered "unresolved" until the forward
declaration resolves. An unresolved node can RAUW itself to support uniquing.
Nodes automatically resolve once all their operands have resolved.

However, cyclic graphs prevent the nodes from resolving. An API client that
constructs a cyclic graph must call ``resolveCycles()`` to resolve nodes in the
cycle.

To save self-references from that burden, self-referencing nodes are implicitly
``distinct``. So the following IR:

.. code-block:: llvm

!named = !{!0, !1, !2, !3, !4}

!0 = !{!0}
!1 = !{!1}
!2 = !{!2, !1}
!3 = !{!2, !1}
!4 = !{!2, !1}

is equivalent to:

.. code-block:: llvm

!named = !{!0, !1, !2, !3, !3}

!0 = distinct !{!0}
!1 = distinct !{!1}
!2 = distinct !{!2, !1}
!3 = !{!2, !1}

MDLocation (aka DebugLoc aka DILocation)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

There's a new first-class metadata construct called ``MDLocation`` (to be
followed in subsequent releases by others). It's used for the locations
referenced by ``!dbg`` metadata attachments.

For example, if an old ``!dbg`` attachment looked like this:

.. code-block:: llvm

define i32 @foo(i32 %a, i32 %b) {
entry:
%add = add i32 %a, %b, !dbg !0
ret %add, !dbg !1
}

!0 = metadata !{i32 10, i32 3, metadata !2, metadata !1)
!1 = metadata !{i32 20, i32 7, metadata !3)
!2 = metadata !{...}
!3 = metadata !{...}

the new attachment looks like this:

.. code-block:: llvm

define i32 @foo(i32 %a, i32 %b) {
entry:
%add = add i32 %a, %b, !dbg !0
ret %add, !dbg !1
}

!0 = !MDLocation(line: 10, column: 3, scope: !2, inlinedAt: !1)
!1 = !MDLocation(line: 20, column: 7, scope: !3)
!2 = !{...}
!3 = !{...}

The fields are named, can be reordered, and have sane defaults if left out
(although ``scope:`` is required).


Alias syntax change
-----------------------

The syntax for aliases is now closer to what is used for global variables

.. code-block:: llvm

@a = weak global ...
@b = weak alias ...

The order of the ``alias`` keyword and the linkage was swapped before.

The old JIT has been removed
----------------------------

All users should transition to MCJIT.


object::Binary doesn't owns the file buffer
-------------------------------------------

It is now just a wrapper, which simplifies using object::Binary with other
users of the underlying file.

IR in object files is now supported
-----------------------------------

Regular object files can contain IR in a section named ``.llvmbc``.


The gold plugin has been rewritten
----------------------------------

It is now implemented directly on top of lib/Linker instead of ``lib/LTO``.
The API of ``lib/LTO`` is sufficiently different from gold's view of the
linking process that some cases could not be conveniently implemented.

The new implementation is also lazier and has a ``save-temps`` option.


Change in the representation of lazy loaded funcs
-------------------------------------------------

Lazy loaded functions are now represented is a way that ``isDeclaration``
returns the correct answer even before reading the body.


The opt option -std-compile-opts was removed
--------------------------------------------

It was effectively an alias of -O3.


Python 2.7 is now required
--------------------------

This was done to simplify compatibility with python 3.

The leak detector has been removed
----------------------------------

In practice tools like asan and valgrind were finding way more bugs than
the old leak detector, so it was removed.


New comdat syntax
-----------------

The syntax of comdats was changed to

.. code-block:: llvm

$c = comdat any
@g = global i32 0, comdat($c)
@c = global i32 0, comdat

The version without the parentheses is a syntatic sugar for a comdat with
the same name as the global.


Diagnotic infrastructure used by lib/Linker and lib/Bitcode
-----------------------------------------------------------

These libraries now use the diagnostic handler to print errors and warnings.
This provides better error messages and simpler error handling.


The PreserveSource linker mode was removed
------------------------------------------

It was fairly broken and was removed.



Changes to the ARM Backend
--------------------------

Expand Down Expand Up @@ -237,8 +513,35 @@ An exciting aspect of LLVM is that it is used as an enabling technology for
a lot of other language and tools projects. This section lists some of the
projects that have already been updated to work with LLVM 3.6.

* A project

Portable Computing Language (pocl)
----------------------------------

In addition to producing an easily portable open source OpenCL
implementation, another major goal of `pocl <http://portablecl.org/>`_
is improving performance portability of OpenCL programs with
compiler optimizations, reducing the need for target-dependent manual
optimizations. An important part of pocl is a set of LLVM passes used to
statically parallelize multiple work-items with the kernel compiler, even in
the presence of work-group barriers. This enables static parallelization of
the fine-grained static concurrency in the work groups in multiple ways.

TTA-based Co-design Environment (TCE)
-------------------------------------

`TCE <http://tce.cs.tut.fi/>`_ is a toolset for designing customized
exposed datapath processors based on the Transport triggered
architecture (TTA).

The toolset provides a complete co-design flow from C/C++
programs down to synthesizable VHDL/Verilog and parallel program binaries.
Processor customization points include the register files, function units,
supported operations, and the interconnection network.

TCE uses Clang and LLVM for C/C++/OpenCL C language support, target independent
optimizations and also for parts of code generation. It generates
new LLVM-based code generators "on the fly" for the designed processors and
loads them in to the compiler backend as runtime libraries to avoid
per-target recompilation of larger parts of the compiler chain.

Additional Information
======================
Expand Down
9 changes: 9 additions & 0 deletions include/llvm/IR/LegacyPassManagers.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ class PMTopLevelManager {
/// then return NULL.
Pass *findAnalysisPass(AnalysisID AID);

/// Retrieve the PassInfo for an analysis.
const PassInfo *findAnalysisPassInfo(AnalysisID AID) const;

/// Find analysis usage information for the pass P.
AnalysisUsage *findAnalysisUsage(Pass *P);

Expand Down Expand Up @@ -251,6 +254,12 @@ class PMTopLevelManager {
SmallVector<ImmutablePass *, 16> ImmutablePasses;

DenseMap<Pass *, AnalysisUsage *> AnUsageMap;

/// Collection of PassInfo objects found via analysis IDs and in this top
/// level manager. This is used to memoize queries to the pass registry.
/// FIXME: This is an egregious hack because querying the pass registry is
/// either slow or racy.
mutable DenseMap<AnalysisID, const PassInfo *> AnalysisPassInfos;
};


Expand Down
3 changes: 3 additions & 0 deletions include/llvm/InitializePasses.h
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,9 @@ void initializeStackMapLivenessPass(PassRegistry&);
void initializeMachineCombinerPass(PassRegistry &);
void initializeLoadCombinePass(PassRegistry&);
void initializeRewriteSymbolsPass(PassRegistry&);

// Specific to the rust-lang llvm branch:
void initializeNullCheckEliminationPass(PassRegistry&);
}

#endif
3 changes: 3 additions & 0 deletions include/llvm/LinkAllPasses.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ namespace {
(void) llvm::createSeparateConstOffsetFromGEPPass();
(void) llvm::createRewriteSymbolsPass();

// Specific to the rust-lang llvm branch:
(void) llvm::createNullCheckEliminationPass();

(void)new llvm::IntervalPartition();
(void)new llvm::ScalarEvolution();
((llvm::Function*)nullptr)->viewCFGOnly();
Expand Down
6 changes: 6 additions & 0 deletions include/llvm/MC/MCAsmBackend.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ class MCAsmBackend {
/// markers. If not, data region directives will be ignored.
bool hasDataInCodeSupport() const { return HasDataInCodeSupport; }

/// doesSectionRequireSymbols - Check whether the given section requires that
/// all symbols (even temporaries) have symbol table entries.
virtual bool doesSectionRequireSymbols(const MCSection &Section) const {
return false;
}

/// @name Target Fixup Interfaces
/// @{

Expand Down
Loading