Update clang, llvm, lld, lldb, compiler-rt and libc++ to 4.0.0 release.

We were already very close to the last release candidate, so this is a
pretty minor update.

Relnotes:	yes
MFC after:	1 month
X-MFC-With:	r314564
This commit is contained in:
dim 2017-03-10 19:02:41 +00:00
parent a41aa9dd7e
commit b66f65929a
6 changed files with 16 additions and 29 deletions

View File

@ -141,8 +141,8 @@ static cl::opt<int> PreInlineThreshold(
"(default = 75)")); "(default = 75)"));
static cl::opt<bool> EnableGVNHoist( static cl::opt<bool> EnableGVNHoist(
"enable-gvn-hoist", cl::init(true), cl::Hidden, "enable-gvn-hoist", cl::init(false), cl::Hidden,
cl::desc("Enable the GVN hoisting pass (default = on)")); cl::desc("Enable the GVN hoisting pass"));
static cl::opt<bool> static cl::opt<bool>
DisableLibCallsShrinkWrap("disable-libcalls-shrinkwrap", cl::init(false), DisableLibCallsShrinkWrap("disable-libcalls-shrinkwrap", cl::init(false),

View File

@ -200,13 +200,11 @@ static void combineKnownMetadata(Instruction *ReplInst, Instruction *I) {
class GVNHoist { class GVNHoist {
public: public:
GVNHoist(DominatorTree *DT, AliasAnalysis *AA, MemoryDependenceResults *MD, GVNHoist(DominatorTree *DT, AliasAnalysis *AA, MemoryDependenceResults *MD,
MemorySSA *MSSA, bool OptForMinSize) MemorySSA *MSSA)
: DT(DT), AA(AA), MD(MD), MSSA(MSSA), OptForMinSize(OptForMinSize), : DT(DT), AA(AA), MD(MD), MSSA(MSSA),
HoistingGeps(OptForMinSize), HoistedCtr(0) { HoistingGeps(false),
// Hoist as far as possible when optimizing for code-size. HoistedCtr(0)
if (OptForMinSize) { }
MaxNumberOfBBSInPath = -1;
}
bool run(Function &F) { bool run(Function &F) {
VN.setDomTree(DT); VN.setDomTree(DT);
@ -251,7 +249,6 @@ private:
AliasAnalysis *AA; AliasAnalysis *AA;
MemoryDependenceResults *MD; MemoryDependenceResults *MD;
MemorySSA *MSSA; MemorySSA *MSSA;
const bool OptForMinSize;
const bool HoistingGeps; const bool HoistingGeps;
DenseMap<const Value *, unsigned> DFSNumber; DenseMap<const Value *, unsigned> DFSNumber;
BBSideEffectsSet BBSideEffects; BBSideEffectsSet BBSideEffects;
@ -505,11 +502,6 @@ private:
bool safeToHoistScalar(const BasicBlock *HoistBB, bool safeToHoistScalar(const BasicBlock *HoistBB,
SmallPtrSetImpl<const BasicBlock *> &WL, SmallPtrSetImpl<const BasicBlock *> &WL,
int &NBBsOnAllPaths) { int &NBBsOnAllPaths) {
// Enable scalar hoisting at -Oz as it is safe to hoist scalars to a place
// where they are partially needed.
if (OptForMinSize)
return true;
// Check that the hoisted expression is needed on all paths. // Check that the hoisted expression is needed on all paths.
if (!hoistingFromAllPaths(HoistBB, WL)) if (!hoistingFromAllPaths(HoistBB, WL))
return false; return false;
@ -923,13 +915,8 @@ private:
Intr->getIntrinsicID() == Intrinsic::assume) Intr->getIntrinsicID() == Intrinsic::assume)
continue; continue;
} }
if (Call->mayHaveSideEffects()) { if (Call->mayHaveSideEffects())
if (!OptForMinSize) break;
break;
// We may continue hoisting across calls which write to memory.
if (Call->mayThrow())
break;
}
if (Call->isConvergent()) if (Call->isConvergent())
break; break;
@ -971,7 +958,7 @@ public:
auto &MD = getAnalysis<MemoryDependenceWrapperPass>().getMemDep(); auto &MD = getAnalysis<MemoryDependenceWrapperPass>().getMemDep();
auto &MSSA = getAnalysis<MemorySSAWrapperPass>().getMSSA(); auto &MSSA = getAnalysis<MemorySSAWrapperPass>().getMSSA();
GVNHoist G(&DT, &AA, &MD, &MSSA, F.optForMinSize()); GVNHoist G(&DT, &AA, &MD, &MSSA);
return G.run(F); return G.run(F);
} }
@ -991,7 +978,7 @@ PreservedAnalyses GVNHoistPass::run(Function &F, FunctionAnalysisManager &AM) {
AliasAnalysis &AA = AM.getResult<AAManager>(F); AliasAnalysis &AA = AM.getResult<AAManager>(F);
MemoryDependenceResults &MD = AM.getResult<MemoryDependenceAnalysis>(F); MemoryDependenceResults &MD = AM.getResult<MemoryDependenceAnalysis>(F);
MemorySSA &MSSA = AM.getResult<MemorySSAAnalysis>(F).getMSSA(); MemorySSA &MSSA = AM.getResult<MemorySSAAnalysis>(F).getMSSA();
GVNHoist G(&DT, &AA, &MD, &MSSA, F.optForMinSize()); GVNHoist G(&DT, &AA, &MD, &MSSA);
if (!G.run(F)) if (!G.run(F))
return PreservedAnalyses::all(); return PreservedAnalyses::all();

View File

@ -36,7 +36,7 @@ std::string getClangRepositoryPath() {
// If the SVN_REPOSITORY is empty, try to use the SVN keyword. This helps us // If the SVN_REPOSITORY is empty, try to use the SVN keyword. This helps us
// pick up a tag in an SVN export, for example. // pick up a tag in an SVN export, for example.
StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/branches/release_40/lib/Basic/Version.cpp $"); StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_400/final/lib/Basic/Version.cpp $");
if (URL.empty()) { if (URL.empty()) {
URL = SVNRepository.slice(SVNRepository.find(':'), URL = SVNRepository.slice(SVNRepository.find(':'),
SVNRepository.find("/lib/Basic")); SVNRepository.find("/lib/Basic"));

View File

@ -2513,8 +2513,8 @@ static bool isConsumerInterestedIn(ASTContext &Ctx, Decl *D, bool HasBody) {
// An ImportDecl or VarDecl imported from a module will get emitted when // An ImportDecl or VarDecl imported from a module will get emitted when
// we import the relevant module. // we import the relevant module.
if ((isa<ImportDecl>(D) || isa<VarDecl>(D)) && Ctx.DeclMustBeEmitted(D) && if ((isa<ImportDecl>(D) || isa<VarDecl>(D)) && D->getImportedOwningModule() &&
D->getImportedOwningModule()) Ctx.DeclMustBeEmitted(D))
return false; return false;
if (isa<FileScopeAsmDecl>(D) || if (isa<FileScopeAsmDecl>(D) ||

View File

@ -8,4 +8,4 @@
#define CLANG_VENDOR "FreeBSD " #define CLANG_VENDOR "FreeBSD "
#define SVN_REVISION "296509" #define SVN_REVISION "297347"

View File

@ -4,5 +4,5 @@
#define LLD_VERSION_STRING "4.0.0" #define LLD_VERSION_STRING "4.0.0"
#define LLD_VERSION_MAJOR 4 #define LLD_VERSION_MAJOR 4
#define LLD_VERSION_MINOR 0 #define LLD_VERSION_MINOR 0
#define LLD_REVISION_STRING "296509" #define LLD_REVISION_STRING "297347"
#define LLD_REPOSITORY_STRING "FreeBSD" #define LLD_REPOSITORY_STRING "FreeBSD"