diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9cdc688d42b..fc05f30e4cd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -206,7 +206,7 @@ endif()
include(VersionFromVCS)
option(LLVM_APPEND_VC_REV
- "Append the version control system revision id to LLVM version" OFF)
+ "Embed the version control system revision id in LLVM" ON)
if( LLVM_APPEND_VC_REV )
add_version_info_from_vcs(PACKAGE_VERSION)
diff --git a/CODE_OWNERS.TXT b/CODE_OWNERS.TXT
index 3339c039ff8..619844256ad 100644
--- a/CODE_OWNERS.TXT
+++ b/CODE_OWNERS.TXT
@@ -70,7 +70,7 @@ D: Branch weights and BlockFrequencyInfo
N: Hal Finkel
E: hfinkel@anl.gov
-D: BBVectorize, the loop reroller, alias analysis and the PowerPC target
+D: The loop reroller, alias analysis and the PowerPC target
N: Dan Gohman
E: sunfish@mozilla.com
diff --git a/CREDITS.TXT b/CREDITS.TXT
index 1773f9dd52d..bfc3482e409 100644
--- a/CREDITS.TXT
+++ b/CREDITS.TXT
@@ -318,11 +318,12 @@ D: Support for implicit TLS model used with MS VC runtime
D: Dumping of Win64 EH structures
N: Takumi Nakamura
+I: chapuni
E: geek4civic@gmail.com
E: chapuni@hf.rim.or.jp
-D: Cygwin and MinGW support.
-D: Win32 tweaks.
-S: Yokohama, Japan
+D: Maintaining the Git monorepo
+W: https://github.com/llvm-project/
+S: Ebina, Japan
N: Edward O'Callaghan
E: eocallaghan@auroraux.org
diff --git a/bindings/ocaml/target/target_ocaml.c b/bindings/ocaml/target/target_ocaml.c
index b63bef6d3d5..8872f42b5b6 100644
--- a/bindings/ocaml/target/target_ocaml.c
+++ b/bindings/ocaml/target/target_ocaml.c
@@ -77,7 +77,7 @@ CAMLprim value llvm_datalayout_pointer_size(value DL) {
/* Llvm.llcontext -> DataLayout.t -> Llvm.lltype */
CAMLprim LLVMTypeRef llvm_datalayout_intptr_type(LLVMContextRef C, value DL) {
- return LLVMIntPtrTypeInContext(C, DataLayout_val(DL));;
+ return LLVMIntPtrTypeInContext(C, DataLayout_val(DL));
}
/* int -> DataLayout.t -> int */
diff --git a/docs/CMake.rst b/docs/CMake.rst
index 2deae936187..aeebc8f6acf 100644
--- a/docs/CMake.rst
+++ b/docs/CMake.rst
@@ -247,9 +247,10 @@ LLVM-specific variables
tests.
**LLVM_APPEND_VC_REV**:BOOL
- Append version control revision info (svn revision number or Git revision id)
- to LLVM version string (stored in the PACKAGE_VERSION macro). For this to work
- cmake must be invoked before the build. Defaults to OFF.
+ Embed version control revision info (svn revision number or Git revision id).
+ This is used among other things in the LLVM version string (stored in the
+ PACKAGE_VERSION macro). For this to work cmake must be invoked before the
+ build. Defaults to ON.
**LLVM_ENABLE_THREADS**:BOOL
Build with threads support, if available. Defaults to ON.
diff --git a/docs/CommandGuide/llvm-nm.rst b/docs/CommandGuide/llvm-nm.rst
index 319e6e6aecf..da7edea4743 100644
--- a/docs/CommandGuide/llvm-nm.rst
+++ b/docs/CommandGuide/llvm-nm.rst
@@ -134,9 +134,6 @@ OPTIONS
BUGS
----
- * :program:`llvm-nm` cannot demangle C++ mangled names, like GNU :program:`nm`
- can.
-
* :program:`llvm-nm` does not support the full set of arguments that GNU
:program:`nm` does.
diff --git a/docs/Docker.rst b/docs/Docker.rst
new file mode 100644
index 00000000000..d873e1ebeeb
--- /dev/null
+++ b/docs/Docker.rst
@@ -0,0 +1,205 @@
+=========================================
+A guide to Dockerfiles for building LLVM
+=========================================
+
+Introduction
+============
+You can find a number of sources to build docker images with LLVM components in
+``llvm/utils/docker``. They can be used by anyone who wants to build the docker
+images for their own use, or as a starting point for someone who wants to write
+their own Dockerfiles.
+
+We currently provide Dockerfiles with ``debian8`` and ``nvidia-cuda`` base images.
+We also provide an ``example`` image, which contains placeholders that one would need
+to fill out in order to produce Dockerfiles for a new docker image.
+
+Why?
+----
+Docker images provide a way to produce binary distributions of
+software inside a controlled environment. Having Dockerfiles to builds docker images
+inside LLVM repo makes them much more discoverable than putting them into any other
+place.
+
+Docker basics
+-------------
+If you've never heard about Docker before, you might find this section helpful
+to get a very basic explanation of it.
+`Docker `_ is a popular solution for running programs in
+an isolated and reproducible environment, especially to maintain releases for
+software deployed to large distributed fleets.
+It uses linux kernel namespaces and cgroups to provide a lightweight isolation
+inside currently running linux kernel.
+A single active instance of dockerized environment is called a *docker
+container*.
+A snapshot of a docker container filesystem is called a *docker image*.
+One can start a container from a prebuilt docker image.
+
+Docker images are built from a so-called *Dockerfile*, a source file written in
+a specialized language that defines instructions to be used when build
+the docker image (see `official
+documentation `_ for more
+details). A minimal Dockerfile typically contains a base image and a number
+of RUN commands that have to be executed to build the image. When building a new
+image, docker will first download your base image, mount its filesystem as
+read-only and then add a writable overlay on top of it to keep track of all
+filesystem modifications, performed while building your image. When the build
+process is finished, a diff between your image's final filesystem state and the
+base image's filesystem is stored in the resulting image.
+
+Overview
+========
+The ``llvm/utils/docker`` folder contains Dockerfiles and simple bash scripts to
+serve as a basis for anyone who wants to create their own Docker image with
+LLVM components, compiled from sources. The sources are checked out from the
+upstream svn repository when building the image.
+
+Inside each subfolder we host Dockerfiles for two images:
+
+- ``build/`` image is used to compile LLVM, it installs a system compiler and all
+ build dependencies of LLVM. After the build process is finished, the build
+ image will have an archive with compiled components at ``/tmp/clang.tar.gz``.
+- ``release/`` image usually only contains LLVM components, compiled by the
+ ``build/`` image, and also libstdc++ and binutils to make image minimally
+ useful for C++ development. The assumption is that you usually want clang to
+ be one of the provided components.
+
+To build both of those images, use ``build_docker_image.sh`` script.
+It will checkout LLVM sources and build clang in the ``build`` container, copy results
+of the build to the local filesystem and then build the ``release`` container using
+those. The ``build_docker_image.sh`` accepts a list of LLVM repositories to
+checkout, and arguments for CMake invocation.
+
+If you want to write your own docker image, start with an ``example/`` subfolder.
+It provides incomplete Dockerfiles with (very few) FIXMEs explaining the steps
+you need to take in order to make your Dockerfiles functional.
+
+Usage
+=====
+The ``llvm/utils/build_docker_image.sh`` script provides a rather high degree of
+control on how to run the build. It allows you to specify the projects to
+checkout from svn and provide a list of CMake arguments to use during when
+building LLVM inside docker container.
+
+Here's a very simple example of getting a docker image with clang binary,
+compiled by the system compiler in the debian8 image:
+
+.. code-block:: bash
+
+ ./llvm/utils/docker/build_docker_image.sh \
+ --source debian8 \
+ --docker-repository clang-debian8 --docker-tag "staging" \
+ -- \
+ -p clang -i install-clang -i install-clang-headers \
+ -- \
+ -DCMAKE_BUILD_TYPE=Release
+
+Note there are two levels of ``--`` indirection. First one separates
+``build_docker_image.sh`` arguments from ``llvm/utils/build_install_llvm.sh``
+arguments. Second one separates CMake arguments from ``build_install_llvm.sh``
+arguments. Note that build like that doesn't use a 2-stage build process that
+you probably want for clang. Running a 2-stage build is a little more intricate,
+this command will do that:
+
+.. code-block:: bash
+
+ # Run a 2-stage build.
+ # LLVM_TARGETS_TO_BUILD=Native is to reduce stage1 compile time.
+ # Options, starting with BOOTSTRAP_* are passed to stage2 cmake invocation.
+ ./build_docker_image.sh \
+ --source debian8 \
+ --docker-repository clang-debian8 --docker-tag "staging" \
+ -- \
+ -p clang -i stage2-install-clang -i stage2-install-clang-headers \
+ -- \
+ -DLLVM_TARGETS_TO_BUILD=Native -DCMAKE_BUILD_TYPE=Release \
+ -DBOOTSTRAP_CMAKE_BUILD_TYPE=Release \
+ -DCLANG_ENABLE_BOOTSTRAP=ON -DCLANG_BOOTSTRAP_TARGETS="install-clang;install-clang-headers"
+
+This will produce two images, a release image ``clang-debian8:staging`` and a
+build image ``clang-debian8-build:staging`` from the latest upstream revision.
+After the image is built you can run bash inside a container based on your
+image like this:
+
+.. code-block:: bash
+
+ docker run -ti clang-debian8:staging bash
+
+Now you can run bash commands as you normally would:
+
+.. code-block:: bash
+
+ root@80f351b51825:/# clang -v
+ clang version 5.0.0 (trunk 305064)
+ Target: x86_64-unknown-linux-gnu
+ Thread model: posix
+ InstalledDir: /bin
+ Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
+ Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.4
+ Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
+ Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.2
+ Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
+ Candidate multilib: .;@m64
+ Selected multilib: .;@m64
+
+
+Which image should I choose?
+============================
+We currently provide two images: debian8-based and nvidia-cuda-based. They
+differ in the base image that they use, i.e. they have a different set of
+preinstalled binaries. Debian8 is very minimal, nvidia-cuda is larger, but has
+preinstalled CUDA libraries and allows to access a GPU, installed on your
+machine.
+
+If you need a minimal linux distribution with only clang and libstdc++ included,
+you should try debian8-based image.
+
+If you want to use CUDA libraries and have access to a GPU on your machine,
+you should choose nvidia-cuda-based image and use `nvidia-docker
+`_ to run your docker containers. Note
+that you don't need nvidia-docker to build the images, but you need it in order
+to have an access to GPU from a docker container that is running the built
+image.
+
+If you have a different use-case, you could create your own image based on
+``example/`` folder.
+
+Any docker image can be built and run using only the docker binary, i.e. you can
+run debian8 build on Fedora or any other Linux distribution. You don't need to
+install CMake, compilers or any other clang dependencies. It is all handled
+during the build process inside Docker's isolated environment.
+
+Stable build
+============
+If you want a somewhat recent and somewhat stable build, use the
+``branches/google/stable`` branch, i.e. the following command will produce a
+debian8-based image using the latest ``google/stable`` sources for you:
+
+.. code-block:: bash
+
+ ./llvm/utils/docker/build_docker_image.sh \
+ -s debian8 --d clang-debian8 -t "staging" \
+ -- \
+ --branch branches/google/stable \
+ -p clang -i install-clang -i install-clang-headers \
+ -- \
+ -DCMAKE_BUILD_TYPE=Release
+
+
+Minimizing docker image size
+============================
+Due to Docker restrictions we use two images (i.e., build and release folders)
+for the release image to be as small as possible. It's much easier to achieve
+that using two images, because Docker would store a filesystem layer for each
+command in the Dockerfile, i.e. if you install some packages in one command,
+then remove those in a separate command, the size of the resulting image will
+still be proportinal to the size of an image with installed packages.
+Therefore, we strive to provide a very simple release image which only copies
+compiled clang and does not do anything else.
+
+Docker 1.13 added a ``--squash`` flag that allows to flatten the layers of the
+image, i.e. remove the parts that were actually deleted. That is an easier way
+to produce the smallest images possible by using just a single image. We do not
+use it because as of today the flag is in experimental stage and not everyone
+may have the latest docker version available. When the flag is out of
+experimental stage, we should investigate replacing two images approach with
+just a single image, built using ``--squash`` flag.
diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst
index 95025fb91c7..ddb31acfd02 100644
--- a/docs/ReleaseNotes.rst
+++ b/docs/ReleaseNotes.rst
@@ -54,8 +54,9 @@ Non-comprehensive list of changes in this release
its nature as a general purpose PDB manipulation / diagnostics tool that does
more than just dumping contents.
-
-* ... next change ...
+* The ``BBVectorize`` pass has been removed. It was fully replaced and no
+ longer used back in 2014 but we didn't get around to removing it. Now it is
+ gone. The SLP vectorizer is the suggested non-loop vectorization pass.
.. NOTE
If you would like to document a larger change, then you can add a
@@ -108,6 +109,15 @@ Changes to the OCaml bindings
During this release ...
+Changes to the C API
+--------------------
+
+* Deprecated the ``LLVMAddBBVectorizePass`` interface since the ``BBVectorize``
+ pass has been removed. It is now a no-op and will be removed in the next
+ release. Use ``LLVMAddSLPVectorizePass`` instead to get the supported SLP
+ vectorizer.
+
+
External Open Source Projects Using LLVM 5
==========================================
diff --git a/docs/XRay.rst b/docs/XRay.rst
index e43f78e5ffe..d61e4e6d995 100644
--- a/docs/XRay.rst
+++ b/docs/XRay.rst
@@ -150,7 +150,7 @@ variable, where we list down the options and their defaults below.
| xray_logfile_base | ``const char*`` | ``xray-log.`` | Filename base for the |
| | | | XRay logfile. |
+-------------------+-----------------+---------------+------------------------+
-| xray_fdr_log | ``bool`` | ``false`` | Whether to install the |
+| xray_fdr_log | ``bool`` | ``false`` | Whether to install the |
| | | | Flight Data Recorder |
| | | | (FDR) mode. |
+-------------------+-----------------+---------------+------------------------+
diff --git a/docs/index.rst b/docs/index.rst
index 54b60823653..7f3788f95b6 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -91,6 +91,7 @@ representation.
CompileCudaWithLLVM
ReportingGuide
Benchmarking
+ Docker
:doc:`GettingStarted`
Discusses how to get up and running quickly with the LLVM infrastructure.
@@ -161,6 +162,9 @@ representation.
A collection of tips for frontend authors on how to generate IR
which LLVM is able to effectively optimize.
+:doc:`Docker`
+ A reference for using Dockerfiles provided with LLVM.
+
Programming Documentation
=========================
diff --git a/include/llvm-c/Transforms/Vectorize.h b/include/llvm-c/Transforms/Vectorize.h
index a82ef49cb16..cf8306aee76 100644
--- a/include/llvm-c/Transforms/Vectorize.h
+++ b/include/llvm-c/Transforms/Vectorize.h
@@ -33,7 +33,7 @@ extern "C" {
* @{
*/
-/** See llvm::createBBVectorizePass function. */
+/** DEPRECATED - Use LLVMAddSLPVectorizePass */
void LLVMAddBBVectorizePass(LLVMPassManagerRef PM);
/** See llvm::createLoopVectorizePass function. */
diff --git a/include/llvm/Analysis/AliasSetTracker.h b/include/llvm/Analysis/AliasSetTracker.h
index eac97501c75..daafd2fabe7 100644
--- a/include/llvm/Analysis/AliasSetTracker.h
+++ b/include/llvm/Analysis/AliasSetTracker.h
@@ -69,10 +69,15 @@ class AliasSet : public ilist_node {
if (AAInfo == DenseMapInfo::getEmptyKey())
// We don't have a AAInfo yet. Set it to NewAAInfo.
AAInfo = NewAAInfo;
- else if (AAInfo != NewAAInfo)
- // NewAAInfo conflicts with AAInfo.
- AAInfo = DenseMapInfo::getTombstoneKey();
-
+ else {
+ AAMDNodes Intersection(AAInfo.intersect(NewAAInfo));
+ if (!Intersection) {
+ // NewAAInfo conflicts with AAInfo.
+ AAInfo = DenseMapInfo::getTombstoneKey();
+ return SizeChanged;
+ }
+ AAInfo = Intersection;
+ }
return SizeChanged;
}
diff --git a/include/llvm/Analysis/CFLAliasAnalysisUtils.h b/include/llvm/Analysis/CFLAliasAnalysisUtils.h
new file mode 100644
index 00000000000..981a8ddc228
--- /dev/null
+++ b/include/llvm/Analysis/CFLAliasAnalysisUtils.h
@@ -0,0 +1,58 @@
+//=- CFLAliasAnalysisUtils.h - Utilities for CFL Alias Analysis ----*- C++-*-=//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+// \file
+// These are the utilities/helpers used by the CFL Alias Analyses available in
+// tree, i.e. Steensgaard's and Andersens'.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_ANALYSIS_CFLALIASANALYSISUTILS_H
+#define LLVM_ANALYSIS_CFLALIASANALYSISUTILS_H
+
+#include "llvm/IR/Function.h"
+#include "llvm/IR/ValueHandle.h"
+
+namespace llvm {
+namespace cflaa {
+
+template struct FunctionHandle final : public CallbackVH {
+ FunctionHandle(Function *Fn, AAResult *Result)
+ : CallbackVH(Fn), Result(Result) {
+ assert(Fn != nullptr);
+ assert(Result != nullptr);
+ }
+
+ void deleted() override { removeSelfFromCache(); }
+ void allUsesReplacedWith(Value *) override { removeSelfFromCache(); }
+
+private:
+ AAResult *Result;
+
+ void removeSelfFromCache() {
+ assert(Result != nullptr);
+ auto *Val = getValPtr();
+ Result->evict(cast(Val));
+ setValPtr(nullptr);
+ }
+};
+
+static inline const Function *parentFunctionOfValue(const Value *Val) {
+ if (auto *Inst = dyn_cast(Val)) {
+ auto *Bb = Inst->getParent();
+ return Bb->getParent();
+ }
+
+ if (auto *Arg = dyn_cast(Val))
+ return Arg->getParent();
+ return nullptr;
+} // namespace cflaa
+} // namespace llvm
+}
+
+#endif // LLVM_ANALYSIS_CFLALIASANALYSISUTILS_H
diff --git a/include/llvm/Analysis/CFLAndersAliasAnalysis.h b/include/llvm/Analysis/CFLAndersAliasAnalysis.h
index f3520aa3fe8..4146ad4d18a 100644
--- a/include/llvm/Analysis/CFLAndersAliasAnalysis.h
+++ b/include/llvm/Analysis/CFLAndersAliasAnalysis.h
@@ -18,8 +18,8 @@
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/Optional.h"
#include "llvm/Analysis/AliasAnalysis.h"
+#include "llvm/Analysis/CFLAliasAnalysisUtils.h"
#include "llvm/IR/Function.h"
-#include "llvm/IR/ValueHandle.h"
#include "llvm/Pass.h"
#include
@@ -47,7 +47,7 @@ public:
return false;
}
/// Evict the given function from cache
- void evict(const Function &Fn);
+ void evict(const Function *Fn);
/// \brief Get the alias summary for the given function
/// Return nullptr if the summary is not found or not available
@@ -57,27 +57,6 @@ public:
AliasResult alias(const MemoryLocation &, const MemoryLocation &);
private:
- struct FunctionHandle final : public CallbackVH {
- FunctionHandle(Function *Fn, CFLAndersAAResult *Result)
- : CallbackVH(Fn), Result(Result) {
- assert(Fn != nullptr);
- assert(Result != nullptr);
- }
-
- void deleted() override { removeSelfFromCache(); }
- void allUsesReplacedWith(Value *) override { removeSelfFromCache(); }
-
- private:
- CFLAndersAAResult *Result;
-
- void removeSelfFromCache() {
- assert(Result != nullptr);
- auto *Val = getValPtr();
- Result->evict(*cast(Val));
- setValPtr(nullptr);
- }
- };
-
/// \brief Ensures that the given function is available in the cache.
/// Returns the appropriate entry from the cache.
const Optional &ensureCached(const Function &);
@@ -97,7 +76,7 @@ private:
/// that simply has empty sets.
DenseMap> Cache;
- std::forward_list Handles;
+ std::forward_list> Handles;
};
/// Analysis pass providing a never-invalidated alias analysis result.
diff --git a/include/llvm/Analysis/CFLSteensAliasAnalysis.h b/include/llvm/Analysis/CFLSteensAliasAnalysis.h
index 3aae9a1e9b2..fd3fa5febcd 100644
--- a/include/llvm/Analysis/CFLSteensAliasAnalysis.h
+++ b/include/llvm/Analysis/CFLSteensAliasAnalysis.h
@@ -19,6 +19,7 @@
#include "llvm/ADT/None.h"
#include "llvm/ADT/Optional.h"
#include "llvm/Analysis/AliasAnalysis.h"
+#include "llvm/Analysis/CFLAliasAnalysisUtils.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/ValueHandle.h"
@@ -85,27 +86,6 @@ public:
}
private:
- struct FunctionHandle final : public CallbackVH {
- FunctionHandle(Function *Fn, CFLSteensAAResult *Result)
- : CallbackVH(Fn), Result(Result) {
- assert(Fn != nullptr);
- assert(Result != nullptr);
- }
-
- void deleted() override { removeSelfFromCache(); }
- void allUsesReplacedWith(Value *) override { removeSelfFromCache(); }
-
- private:
- CFLSteensAAResult *Result;
-
- void removeSelfFromCache() {
- assert(Result != nullptr);
- auto *Val = getValPtr();
- Result->evict(cast(Val));
- setValPtr(nullptr);
- }
- };
-
const TargetLibraryInfo &TLI;
/// \brief Cached mapping of Functions to their StratifiedSets.
@@ -114,7 +94,7 @@ private:
/// have any kind of recursion, it is discernable from a function
/// that simply has empty sets.
DenseMap> Cache;
- std::forward_list Handles;
+ std::forward_list> Handles;
FunctionInfo buildSetsFrom(Function *F);
};
diff --git a/include/llvm/Analysis/IteratedDominanceFrontier.h b/include/llvm/Analysis/IteratedDominanceFrontier.h
index af788c818f8..bd74d6bd14c 100644
--- a/include/llvm/Analysis/IteratedDominanceFrontier.h
+++ b/include/llvm/Analysis/IteratedDominanceFrontier.h
@@ -86,7 +86,6 @@ public:
private:
DominatorTreeBase &DT;
bool useLiveIn;
- DenseMap DomLevels;
const SmallPtrSetImpl *LiveInBlocks;
const SmallPtrSetImpl *DefBlocks;
};
diff --git a/include/llvm/Analysis/MemorySSA.h b/include/llvm/Analysis/MemorySSA.h
index 462e4594266..5cec2bfb0cf 100644
--- a/include/llvm/Analysis/MemorySSA.h
+++ b/include/llvm/Analysis/MemorySSA.h
@@ -139,7 +139,7 @@ public:
// Methods for support type inquiry through isa, cast, and
// dyn_cast
- static inline bool classof(const Value *V) {
+ static bool classof(const Value *V) {
unsigned ID = V->getValueID();
return ID == MemoryUseVal || ID == MemoryPhiVal || ID == MemoryDefVal;
}
@@ -241,7 +241,7 @@ public:
/// \brief Get the access that produces the memory state used by this Use.
MemoryAccess *getDefiningAccess() const { return getOperand(0); }
- static inline bool classof(const Value *MA) {
+ static bool classof(const Value *MA) {
return MA->getValueID() == MemoryUseVal || MA->getValueID() == MemoryDefVal;
}
@@ -297,7 +297,7 @@ public:
// allocate space for exactly one operand
void *operator new(size_t s) { return User::operator new(s, 1); }
- static inline bool classof(const Value *MA) {
+ static bool classof(const Value *MA) {
return MA->getValueID() == MemoryUseVal;
}
@@ -353,7 +353,7 @@ public:
// allocate space for exactly one operand
void *operator new(size_t s) { return User::operator new(s, 1); }
- static inline bool classof(const Value *MA) {
+ static bool classof(const Value *MA) {
return MA->getValueID() == MemoryDefVal;
}
@@ -526,7 +526,7 @@ public:
return getIncomingValue(Idx);
}
- static inline bool classof(const Value *V) {
+ static bool classof(const Value *V) {
return V->getValueID() == MemoryPhiVal;
}
diff --git a/include/llvm/Analysis/OptimizationDiagnosticInfo.h b/include/llvm/Analysis/OptimizationDiagnosticInfo.h
index edd9140a349..64dd0737a11 100644
--- a/include/llvm/Analysis/OptimizationDiagnosticInfo.h
+++ b/include/llvm/Analysis/OptimizationDiagnosticInfo.h
@@ -34,7 +34,7 @@ class Value;
///
/// It allows reporting when optimizations are performed and when they are not
/// along with the reasons for it. Hotness information of the corresponding
-/// code region can be included in the remark if DiagnosticHotnessRequested is
+/// code region can be included in the remark if DiagnosticsHotnessRequested is
/// enabled in the LLVM context.
class OptimizationRemarkEmitter {
public:
@@ -45,10 +45,10 @@ public:
/// analysis pass).
///
/// Note that this ctor has a very different cost depending on whether
- /// F->getContext().getDiagnosticHotnessRequested() is on or not. If it's off
+ /// F->getContext().getDiagnosticsHotnessRequested() is on or not. If it's off
/// the operation is free.
///
- /// Whereas if DiagnosticHotnessRequested is on, it is fairly expensive
+ /// Whereas if DiagnosticsHotnessRequested is on, it is fairly expensive
/// operation since BFI and all its required analyses are computed. This is
/// for example useful for CGSCC passes that can't use function analyses
/// passes in the old PM.
diff --git a/include/llvm/Analysis/RegionInfo.h b/include/llvm/Analysis/RegionInfo.h
index 16ee07fa317..2e34928b28a 100644
--- a/include/llvm/Analysis/RegionInfo.h
+++ b/include/llvm/Analysis/RegionInfo.h
@@ -37,18 +37,38 @@
#ifndef LLVM_ANALYSIS_REGIONINFO_H
#define LLVM_ANALYSIS_REGIONINFO_H
+#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DepthFirstIterator.h"
+#include "llvm/ADT/GraphTraits.h"
#include "llvm/ADT/PointerIntPair.h"
#include "llvm/ADT/iterator_range.h"
-#include "llvm/IR/CFG.h"
+#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/PassManager.h"
+#include "llvm/Pass.h"
+#include "llvm/Support/raw_ostream.h"
+#include
+#include
#include