svn commit: r352010 - in projects/clang900-import: contrib/llvm/include/llvm/Transforms/Vectorize contrib/llvm/lib/CodeGen/SelectionDAG contrib/llvm/lib/Target/SystemZ contrib/llvm/lib/Target/X86 c...
Dimitry Andric
dim at FreeBSD.org
Sat Sep 7 12:31:40 UTC 2019
Author: dim
Date: Sat Sep 7 12:31:36 2019
New Revision: 352010
URL: https://svnweb.freebsd.org/changeset/base/352010
Log:
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb, and openmp
release_90 branch r371301, and update version numbers.
Modified:
projects/clang900-import/contrib/llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h
projects/clang900-import/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
projects/clang900-import/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
projects/clang900-import/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.h
projects/clang900-import/contrib/llvm/lib/Target/SystemZ/SystemZLongBranch.cpp
projects/clang900-import/contrib/llvm/lib/Target/SystemZ/SystemZMachineScheduler.cpp
projects/clang900-import/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp
projects/clang900-import/contrib/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
projects/clang900-import/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticDriverKinds.td
projects/clang900-import/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp
projects/clang900-import/contrib/llvm/tools/clang/lib/Driver/Driver.cpp
projects/clang900-import/contrib/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp
projects/clang900-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/EnumCastOutOfRangeChecker.cpp
projects/clang900-import/contrib/llvm/tools/lld/docs/ReleaseNotes.rst
projects/clang900-import/lib/clang/include/VCSVersion.inc
projects/clang900-import/lib/clang/include/llvm/Support/VCSRevision.h
Directory Properties:
projects/clang900-import/contrib/compiler-rt/ (props changed)
projects/clang900-import/contrib/libc++/ (props changed)
projects/clang900-import/contrib/libunwind/ (props changed)
projects/clang900-import/contrib/llvm/ (props changed)
projects/clang900-import/contrib/llvm/tools/clang/ (props changed)
projects/clang900-import/contrib/llvm/tools/lld/ (props changed)
projects/clang900-import/contrib/llvm/tools/lldb/ (props changed)
projects/clang900-import/contrib/openmp/ (props changed)
Modified: projects/clang900-import/contrib/llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h
==============================================================================
--- projects/clang900-import/contrib/llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h Sat Sep 7 12:23:57 2019 (r352009)
+++ projects/clang900-import/contrib/llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h Sat Sep 7 12:31:36 2019 (r352010)
@@ -452,8 +452,8 @@ class LoopVectorizationLegality { (private)
/// Holds the widest induction type encountered.
Type *WidestIndTy = nullptr;
- /// Allowed outside users. This holds the induction and reduction
- /// vars which can be accessed from outside the loop.
+ /// Allowed outside users. This holds the variables that can be accessed from
+ /// outside the loop.
SmallPtrSet<Value *, 4> AllowedExit;
/// Can we assume the absence of NaNs.
Modified: projects/clang900-import/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
==============================================================================
--- projects/clang900-import/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Sat Sep 7 12:23:57 2019 (r352009)
+++ projects/clang900-import/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Sat Sep 7 12:31:36 2019 (r352010)
@@ -1810,7 +1810,7 @@ void SelectionDAGBuilder::visitRet(const ReturnInst &I
// offsets to its parts don't wrap either.
SDValue Ptr = DAG.getObjectPtrOffset(getCurSDLoc(), RetPtr, Offsets[i]);
- SDValue Val = RetOp.getValue(i);
+ SDValue Val = RetOp.getValue(RetOp.getResNo() + i);
if (MemVTs[i] != ValueVTs[i])
Val = DAG.getPtrExtOrTrunc(Val, getCurSDLoc(), MemVTs[i]);
Chains[i] = DAG.getStore(Chain, getCurSDLoc(), Val,
Modified: projects/clang900-import/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
==============================================================================
--- projects/clang900-import/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp Sat Sep 7 12:23:57 2019 (r352009)
+++ projects/clang900-import/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp Sat Sep 7 12:31:36 2019 (r352010)
@@ -468,7 +468,7 @@ bool SystemZInstrInfo::analyzeBranch(MachineBasicBlock
// Can't handle indirect branches.
SystemZII::Branch Branch(getBranchInfo(*I));
- if (!Branch.Target->isMBB())
+ if (!Branch.hasMBBTarget())
return true;
// Punt on compound branches.
@@ -478,7 +478,7 @@ bool SystemZInstrInfo::analyzeBranch(MachineBasicBlock
if (Branch.CCMask == SystemZ::CCMASK_ANY) {
// Handle unconditional branches.
if (!AllowModify) {
- TBB = Branch.Target->getMBB();
+ TBB = Branch.getMBBTarget();
continue;
}
@@ -490,7 +490,7 @@ bool SystemZInstrInfo::analyzeBranch(MachineBasicBlock
FBB = nullptr;
// Delete the JMP if it's equivalent to a fall-through.
- if (MBB.isLayoutSuccessor(Branch.Target->getMBB())) {
+ if (MBB.isLayoutSuccessor(Branch.getMBBTarget())) {
TBB = nullptr;
I->eraseFromParent();
I = MBB.end();
@@ -498,7 +498,7 @@ bool SystemZInstrInfo::analyzeBranch(MachineBasicBlock
}
// TBB is used to indicate the unconditinal destination.
- TBB = Branch.Target->getMBB();
+ TBB = Branch.getMBBTarget();
continue;
}
@@ -506,7 +506,7 @@ bool SystemZInstrInfo::analyzeBranch(MachineBasicBlock
if (Cond.empty()) {
// FIXME: add X86-style branch swap
FBB = TBB;
- TBB = Branch.Target->getMBB();
+ TBB = Branch.getMBBTarget();
Cond.push_back(MachineOperand::CreateImm(Branch.CCValid));
Cond.push_back(MachineOperand::CreateImm(Branch.CCMask));
continue;
@@ -517,7 +517,7 @@ bool SystemZInstrInfo::analyzeBranch(MachineBasicBlock
// Only handle the case where all conditional branches branch to the same
// destination.
- if (TBB != Branch.Target->getMBB())
+ if (TBB != Branch.getMBBTarget())
return true;
// If the conditions are the same, we can leave them alone.
@@ -547,7 +547,7 @@ unsigned SystemZInstrInfo::removeBranch(MachineBasicBl
continue;
if (!I->isBranch())
break;
- if (!getBranchInfo(*I).Target->isMBB())
+ if (!getBranchInfo(*I).hasMBBTarget())
break;
// Remove the branch.
I->eraseFromParent();
@@ -1544,6 +1544,10 @@ SystemZInstrInfo::getBranchInfo(const MachineInstr &MI
case SystemZ::CLGRJ:
return SystemZII::Branch(SystemZII::BranchCLG, SystemZ::CCMASK_ICMP,
MI.getOperand(2).getImm(), &MI.getOperand(3));
+
+ case SystemZ::INLINEASM_BR:
+ // Don't try to analyze asm goto, so pass nullptr as branch target argument.
+ return SystemZII::Branch(SystemZII::AsmGoto, 0, 0, nullptr);
default:
llvm_unreachable("Unrecognized branch opcode");
Modified: projects/clang900-import/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.h
==============================================================================
--- projects/clang900-import/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.h Sat Sep 7 12:23:57 2019 (r352009)
+++ projects/clang900-import/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.h Sat Sep 7 12:31:36 2019 (r352010)
@@ -100,11 +100,18 @@ enum BranchType {
// An instruction that decrements a 64-bit register and branches if
// the result is nonzero.
- BranchCTG
+ BranchCTG,
+
+ // An instruction representing an asm goto statement.
+ AsmGoto
};
// Information about a branch instruction.
-struct Branch {
+class Branch {
+ // The target of the branch. In case of INLINEASM_BR, this is nullptr.
+ const MachineOperand *Target;
+
+public:
// The type of the branch.
BranchType Type;
@@ -114,12 +121,15 @@ struct Branch {
// CCMASK_<N> is set if the branch should be taken when CC == N.
unsigned CCMask;
- // The target of the branch.
- const MachineOperand *Target;
-
Branch(BranchType type, unsigned ccValid, unsigned ccMask,
const MachineOperand *target)
- : Type(type), CCValid(ccValid), CCMask(ccMask), Target(target) {}
+ : Target(target), Type(type), CCValid(ccValid), CCMask(ccMask) {}
+
+ bool isIndirect() { return Target != nullptr && Target->isReg(); }
+ bool hasMBBTarget() { return Target != nullptr && Target->isMBB(); }
+ MachineBasicBlock *getMBBTarget() {
+ return hasMBBTarget() ? Target->getMBB() : nullptr;
+ }
};
// Kinds of fused compares in compare-and-* instructions. Together with type
Modified: projects/clang900-import/contrib/llvm/lib/Target/SystemZ/SystemZLongBranch.cpp
==============================================================================
--- projects/clang900-import/contrib/llvm/lib/Target/SystemZ/SystemZLongBranch.cpp Sat Sep 7 12:23:57 2019 (r352009)
+++ projects/clang900-import/contrib/llvm/lib/Target/SystemZ/SystemZLongBranch.cpp Sat Sep 7 12:31:36 2019 (r352010)
@@ -257,7 +257,7 @@ TerminatorInfo SystemZLongBranch::describeTerminator(M
}
Terminator.Branch = &MI;
Terminator.TargetBlock =
- TII->getBranchInfo(MI).Target->getMBB()->getNumber();
+ TII->getBranchInfo(MI).getMBBTarget()->getNumber();
}
return Terminator;
}
Modified: projects/clang900-import/contrib/llvm/lib/Target/SystemZ/SystemZMachineScheduler.cpp
==============================================================================
--- projects/clang900-import/contrib/llvm/lib/Target/SystemZ/SystemZMachineScheduler.cpp Sat Sep 7 12:23:57 2019 (r352009)
+++ projects/clang900-import/contrib/llvm/lib/Target/SystemZ/SystemZMachineScheduler.cpp Sat Sep 7 12:31:36 2019 (r352010)
@@ -108,8 +108,8 @@ void SystemZPostRASchedStrategy::enterMBB(MachineBasic
I != SinglePredMBB->end(); I++) {
LLVM_DEBUG(dbgs() << "** Emitting incoming branch: "; I->dump(););
bool TakenBranch = (I->isBranch() &&
- (TII->getBranchInfo(*I).Target->isReg() || // Relative branch
- TII->getBranchInfo(*I).Target->getMBB() == MBB));
+ (TII->getBranchInfo(*I).isIndirect() ||
+ TII->getBranchInfo(*I).getMBBTarget() == MBB));
HazardRec->emitInstruction(&*I, TakenBranch);
if (TakenBranch)
break;
Modified: projects/clang900-import/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp
==============================================================================
--- projects/clang900-import/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp Sat Sep 7 12:23:57 2019 (r352009)
+++ projects/clang900-import/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp Sat Sep 7 12:31:36 2019 (r352010)
@@ -33594,7 +33594,7 @@ static SDValue combineShuffleOfConcatUndef(SDNode *N,
}
/// Eliminate a redundant shuffle of a horizontal math op.
-static SDValue foldShuffleOfHorizOp(SDNode *N) {
+static SDValue foldShuffleOfHorizOp(SDNode *N, SelectionDAG &DAG) {
unsigned Opcode = N->getOpcode();
if (Opcode != X86ISD::MOVDDUP && Opcode != X86ISD::VBROADCAST)
if (Opcode != ISD::VECTOR_SHUFFLE || !N->getOperand(1).isUndef())
@@ -33625,6 +33625,25 @@ static SDValue foldShuffleOfHorizOp(SDNode *N) {
HOp.getOperand(0) != HOp.getOperand(1))
return SDValue();
+ // The shuffle that we are eliminating may have allowed the horizontal op to
+ // have an undemanded (undefined) operand. Duplicate the other (defined)
+ // operand to ensure that the results are defined across all lanes without the
+ // shuffle.
+ auto updateHOp = [](SDValue HorizOp, SelectionDAG &DAG) {
+ SDValue X;
+ if (HorizOp.getOperand(0).isUndef()) {
+ assert(!HorizOp.getOperand(1).isUndef() && "Not expecting foldable h-op");
+ X = HorizOp.getOperand(1);
+ } else if (HorizOp.getOperand(1).isUndef()) {
+ assert(!HorizOp.getOperand(0).isUndef() && "Not expecting foldable h-op");
+ X = HorizOp.getOperand(0);
+ } else {
+ return HorizOp;
+ }
+ return DAG.getNode(HorizOp.getOpcode(), SDLoc(HorizOp),
+ HorizOp.getValueType(), X, X);
+ };
+
// When the operands of a horizontal math op are identical, the low half of
// the result is the same as the high half. If a target shuffle is also
// replicating low and high halves, we don't need the shuffle.
@@ -33635,7 +33654,7 @@ static SDValue foldShuffleOfHorizOp(SDNode *N) {
assert((HOp.getValueType() == MVT::v2f64 ||
HOp.getValueType() == MVT::v4f64) && HOp.getValueType() == VT &&
"Unexpected type for h-op");
- return HOp;
+ return updateHOp(HOp, DAG);
}
return SDValue();
}
@@ -33649,14 +33668,14 @@ static SDValue foldShuffleOfHorizOp(SDNode *N) {
(isTargetShuffleEquivalent(Mask, {0, 0}) ||
isTargetShuffleEquivalent(Mask, {0, 1, 0, 1}) ||
isTargetShuffleEquivalent(Mask, {0, 1, 2, 3, 0, 1, 2, 3})))
- return HOp;
+ return updateHOp(HOp, DAG);
if (HOp.getValueSizeInBits() == 256 &&
(isTargetShuffleEquivalent(Mask, {0, 0, 2, 2}) ||
isTargetShuffleEquivalent(Mask, {0, 1, 0, 1, 4, 5, 4, 5}) ||
isTargetShuffleEquivalent(
Mask, {0, 1, 2, 3, 0, 1, 2, 3, 8, 9, 10, 11, 8, 9, 10, 11})))
- return HOp;
+ return updateHOp(HOp, DAG);
return SDValue();
}
@@ -33710,7 +33729,7 @@ static SDValue combineShuffle(SDNode *N, SelectionDAG
if (SDValue AddSub = combineShuffleToAddSubOrFMAddSub(N, Subtarget, DAG))
return AddSub;
- if (SDValue HAddSub = foldShuffleOfHorizOp(N))
+ if (SDValue HAddSub = foldShuffleOfHorizOp(N, DAG))
return HAddSub;
}
Modified: projects/clang900-import/contrib/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
==============================================================================
--- projects/clang900-import/contrib/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp Sat Sep 7 12:23:57 2019 (r352009)
+++ projects/clang900-import/contrib/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp Sat Sep 7 12:31:36 2019 (r352010)
@@ -631,6 +631,7 @@ bool LoopVectorizationLegality::canVectorizeInstrs() {
// Unsafe cyclic dependencies with header phis are identified during
// legalization for reduction, induction and first order
// recurrences.
+ AllowedExit.insert(&I);
continue;
}
Modified: projects/clang900-import/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticDriverKinds.td
==============================================================================
--- projects/clang900-import/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticDriverKinds.td Sat Sep 7 12:23:57 2019 (r352009)
+++ projects/clang900-import/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticDriverKinds.td Sat Sep 7 12:31:36 2019 (r352010)
@@ -91,8 +91,6 @@ def err_no_external_assembler : Error<
"there is no external assembler that can be used on this platform">;
def err_drv_unable_to_remove_file : Error<
"unable to remove file: %0">;
-def err_drv_unable_to_set_working_directory : Error <
- "unable to set working directory: %0">;
def err_drv_command_failure : Error<
"unable to execute command: %0">;
def err_drv_invalid_darwin_version : Error<
Modified: projects/clang900-import/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp
==============================================================================
--- projects/clang900-import/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp Sat Sep 7 12:23:57 2019 (r352009)
+++ projects/clang900-import/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp Sat Sep 7 12:31:36 2019 (r352010)
@@ -9814,10 +9814,25 @@ static GVALinkage basicGVALinkageForVariable(const AST
return StrongLinkage;
case TSK_ExplicitSpecialization:
- return Context.getTargetInfo().getCXXABI().isMicrosoft() &&
- VD->isStaticDataMember()
- ? GVA_StrongODR
- : StrongLinkage;
+ if (Context.getTargetInfo().getCXXABI().isMicrosoft()) {
+ // If this is a fully specialized constexpr variable template, pretend it
+ // was marked inline. MSVC 14.21.27702 headers define _Is_integral in a
+ // header this way, and we don't want to emit non-discardable definitions
+ // of these variables in every TU that includes <type_traits>. This
+ // behavior is non-conforming, since another TU could use an extern
+ // template declaration for this variable, but for constexpr variables,
+ // it's unlikely for a user to want to do that. This behavior can be
+ // removed if the headers change to explicitly mark such variable template
+ // specializations inline.
+ if (isa<VarTemplateSpecializationDecl>(VD) && VD->isConstexpr())
+ return GVA_DiscardableODR;
+
+ // Use ODR linkage for static data members of fully specialized templates
+ // to prevent duplicate definition errors with MSVC.
+ if (VD->isStaticDataMember())
+ return GVA_StrongODR;
+ }
+ return StrongLinkage;
case TSK_ExplicitInstantiationDefinition:
return GVA_StrongODR;
Modified: projects/clang900-import/contrib/llvm/tools/clang/lib/Driver/Driver.cpp
==============================================================================
--- projects/clang900-import/contrib/llvm/tools/clang/lib/Driver/Driver.cpp Sat Sep 7 12:23:57 2019 (r352009)
+++ projects/clang900-import/contrib/llvm/tools/clang/lib/Driver/Driver.cpp Sat Sep 7 12:31:36 2019 (r352010)
@@ -133,7 +133,7 @@ Driver::Driver(StringRef ClangExecutable, StringRef Ta
// Provide a sane fallback if no VFS is specified.
if (!this->VFS)
- this->VFS = llvm::vfs::createPhysicalFileSystem().release();
+ this->VFS = llvm::vfs::getRealFileSystem();
Name = llvm::sys::path::filename(ClangExecutable);
Dir = llvm::sys::path::parent_path(ClangExecutable);
@@ -1010,11 +1010,6 @@ Compilation *Driver::BuildCompilation(ArrayRef<const c
}
}
- // Check for working directory option before accessing any files
- if (Arg *WD = Args.getLastArg(options::OPT_working_directory))
- if (VFS->setCurrentWorkingDirectory(WD->getValue()))
- Diag(diag::err_drv_unable_to_set_working_directory) << WD->getValue();
-
// FIXME: This stuff needs to go into the Compilation, not the driver.
bool CCCPrintPhases;
@@ -1995,11 +1990,20 @@ bool Driver::DiagnoseInputExistence(const DerivedArgLi
if (Value == "-")
return true;
- if (getVFS().exists(Value))
+ SmallString<64> Path(Value);
+ if (Arg *WorkDir = Args.getLastArg(options::OPT_working_directory)) {
+ if (!llvm::sys::path::is_absolute(Path)) {
+ SmallString<64> Directory(WorkDir->getValue());
+ llvm::sys::path::append(Directory, Value);
+ Path.assign(Directory);
+ }
+ }
+
+ if (getVFS().exists(Path))
return true;
if (IsCLMode()) {
- if (!llvm::sys::path::is_absolute(Twine(Value)) &&
+ if (!llvm::sys::path::is_absolute(Twine(Path)) &&
llvm::sys::Process::FindInEnvPath("LIB", Value))
return true;
@@ -2025,12 +2029,12 @@ bool Driver::DiagnoseInputExistence(const DerivedArgLi
if (getOpts().findNearest(Value, Nearest, IncludedFlagsBitmask,
ExcludedFlagsBitmask) <= 1) {
Diag(clang::diag::err_drv_no_such_file_with_suggestion)
- << Value << Nearest;
+ << Path << Nearest;
return false;
}
}
- Diag(clang::diag::err_drv_no_such_file) << Value;
+ Diag(clang::diag::err_drv_no_such_file) << Path;
return false;
}
Modified: projects/clang900-import/contrib/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp
==============================================================================
--- projects/clang900-import/contrib/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp Sat Sep 7 12:23:57 2019 (r352009)
+++ projects/clang900-import/contrib/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp Sat Sep 7 12:31:36 2019 (r352010)
@@ -603,15 +603,16 @@ static bool shouldUseLeafFramePointer(const ArgList &A
}
/// Add a CC1 option to specify the debug compilation directory.
-static void addDebugCompDirArg(const ArgList &Args, ArgStringList &CmdArgs,
- const llvm::vfs::FileSystem &VFS) {
+static void addDebugCompDirArg(const ArgList &Args, ArgStringList &CmdArgs) {
if (Arg *A = Args.getLastArg(options::OPT_fdebug_compilation_dir)) {
CmdArgs.push_back("-fdebug-compilation-dir");
CmdArgs.push_back(A->getValue());
- } else if (llvm::ErrorOr<std::string> CWD =
- VFS.getCurrentWorkingDirectory()) {
- CmdArgs.push_back("-fdebug-compilation-dir");
- CmdArgs.push_back(Args.MakeArgString(*CWD));
+ } else {
+ SmallString<128> cwd;
+ if (!llvm::sys::fs::current_path(cwd)) {
+ CmdArgs.push_back("-fdebug-compilation-dir");
+ CmdArgs.push_back(Args.MakeArgString(cwd));
+ }
}
}
@@ -877,8 +878,13 @@ static void addPGOAndCoverageFlags(const ToolChain &TC
else
OutputFilename = llvm::sys::path::filename(Output.getBaseInput());
SmallString<128> CoverageFilename = OutputFilename;
- if (llvm::sys::path::is_relative(CoverageFilename))
- (void)D.getVFS().makeAbsolute(CoverageFilename);
+ if (llvm::sys::path::is_relative(CoverageFilename)) {
+ SmallString<128> Pwd;
+ if (!llvm::sys::fs::current_path(Pwd)) {
+ llvm::sys::path::append(Pwd, CoverageFilename);
+ CoverageFilename.swap(Pwd);
+ }
+ }
llvm::sys::path::replace_extension(CoverageFilename, "gcno");
CmdArgs.push_back(Args.MakeArgString(CoverageFilename));
@@ -4365,7 +4371,7 @@ void Clang::ConstructJob(Compilation &C, const JobActi
CmdArgs.push_back("-fno-autolink");
// Add in -fdebug-compilation-dir if necessary.
- addDebugCompDirArg(Args, CmdArgs, D.getVFS());
+ addDebugCompDirArg(Args, CmdArgs);
addDebugPrefixMapArg(D, Args, CmdArgs);
@@ -6092,7 +6098,7 @@ void ClangAs::ConstructJob(Compilation &C, const JobAc
DebugInfoKind = (WantDebug ? codegenoptions::LimitedDebugInfo
: codegenoptions::NoDebugInfo);
// Add the -fdebug-compilation-dir flag if needed.
- addDebugCompDirArg(Args, CmdArgs, C.getDriver().getVFS());
+ addDebugCompDirArg(Args, CmdArgs);
addDebugPrefixMapArg(getToolChain().getDriver(), Args, CmdArgs);
Modified: projects/clang900-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/EnumCastOutOfRangeChecker.cpp
==============================================================================
--- projects/clang900-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/EnumCastOutOfRangeChecker.cpp Sat Sep 7 12:23:57 2019 (r352009)
+++ projects/clang900-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/EnumCastOutOfRangeChecker.cpp Sat Sep 7 12:31:36 2019 (r352010)
@@ -91,6 +91,22 @@ void EnumCastOutOfRangeChecker::reportWarning(CheckerC
void EnumCastOutOfRangeChecker::checkPreStmt(const CastExpr *CE,
CheckerContext &C) const {
+
+ // Only perform enum range check on casts where such checks are valid. For
+ // all other cast kinds (where enum range checks are unnecessary or invalid),
+ // just return immediately. TODO: The set of casts whitelisted for enum
+ // range checking may be incomplete. Better to add a missing cast kind to
+ // enable a missing check than to generate false negatives and have to remove
+ // those later.
+ switch (CE->getCastKind()) {
+ case CK_IntegralCast:
+ break;
+
+ default:
+ return;
+ break;
+ }
+
// Get the value of the expression to cast.
const llvm::Optional<DefinedOrUnknownSVal> ValueToCast =
C.getSVal(CE->getSubExpr()).getAs<DefinedOrUnknownSVal>();
Modified: projects/clang900-import/contrib/llvm/tools/lld/docs/ReleaseNotes.rst
==============================================================================
--- projects/clang900-import/contrib/llvm/tools/lld/docs/ReleaseNotes.rst Sat Sep 7 12:23:57 2019 (r352009)
+++ projects/clang900-import/contrib/llvm/tools/lld/docs/ReleaseNotes.rst Sat Sep 7 12:31:36 2019 (r352010)
@@ -8,11 +8,13 @@ lld 9.0.0 Release Notes
Introduction
============
-This document contains the release notes for the lld linker, release 9.0.0.
-Here we describe the status of lld, including major improvements
-from the previous release. All lld releases may be downloaded
-from the `LLVM releases web site <https://llvm.org/releases/>`_.
+lld is a high-performance linker that supports ELF (Unix), COFF
+(Windows), Mach-O (macOS), MinGW and WebAssembly. lld is
+command-line-compatible with GNU linkers and Microsoft link.exe and is
+significantly faster than the system default linkers.
+lld 9 has lots of feature improvements and bug fixes.
+
Non-comprehensive list of changes in this release
=================================================
@@ -22,53 +24,188 @@ ELF Improvements
* ld.lld now has typo suggestions for flags:
``$ ld.lld --call-shared`` now prints
``unknown argument '--call-shared', did you mean '--call_shared'``.
+ (`r361518 <https://reviews.llvm.org/rL361518>`_)
+* ``--allow-shlib-undefined`` and ``--no-allow-shlib-undefined``
+ options are added. ``--no-allow-shlib-undefined`` is the default for
+ executables.
+ (`r352826 <https://reviews.llvm.org/rL352826>`_)
+
+* ``-nmagic`` and ``-omagic`` options are fully supported.
+ (`r360593 <https://reviews.llvm.org/rL360593>`_)
+
+* Segment layout has changed. PT_GNU_RELRO, which was previously
+ placed in the middle of readable/writable PT_LOAD segments, is now
+ placed at the beginning of them. This change permits lld-produced
+ ELF files to be read correctly by GNU strip older than 2.31, which
+ has a bug to discard a PT_GNU_RELRO in the former layout.
+
+* ``-z common-page-size`` is supported.
+ (`r360593 <https://reviews.llvm.org/rL360593>`_)
+
+* Diagnostics messages have improved. A new flag ``--vs-diagnostics``
+ alters the format of diagnostic output to enable source hyperlinks
+ in Microsoft Visual Studio IDE.
+
+* Linker script compatibility with GNU BFD linker has generally improved.
+
+* The clang ``--dependent-library`` form of autolinking is supported.
+
+ This feature is added to implement the Windows-style autolinking for
+ Unix. On Unix, in order to use a library, you usually have to
+ include a header file provided by the library and then explicitly
+ link the library with the linker ``-l`` option. On Windows, header
+ files usually contain pragmas that list needed libraries. Compilers
+ copy that information to object files, so that linkers can
+ automatically link needed libraries. ``--dependent-library`` is
+ added for implementing that Windows semantics on Unix.
+ (`r360984 <https://reviews.llvm.org/rL360984>`_)
+
+* AArch64 BTI and PAC are supported.
+ (`r362793 <https://reviews.llvm.org/rL362793>`_)
+
* lld now supports replacing ``JAL`` with ``JALX`` instructions in case
- of MIPS - microMIPS cross-mode jumps.
+ of MIPS-microMIPS cross-mode jumps.
+ (`r354311 <https://reviews.llvm.org/rL354311>`_)
* lld now creates LA25 thunks for MIPS R6 code.
+ (`r354312 <https://reviews.llvm.org/rL354312>`_)
* Put MIPS-specific .reginfo, .MIPS.options, and .MIPS.abiflags sections
into corresponding PT_MIPS_REGINFO, PT_MIPS_OPTIONS, and PT_MIPS_ABIFLAGS
segments.
+* The quality of RISC-V and PowerPC ports have greatly improved. Many
+ applications can now be linked by lld. PowerPC64 is now almost
+ production ready.
+
+* The Linux kernel for arm32_7, arm64, ppc64le and x86_64 can now be
+ linked by lld.
+
+* x86-64 TLSDESC is supported.
+ (`r361911 <https://reviews.llvm.org/rL361911>`_,
+ `r362078 <https://reviews.llvm.org/rL362078>`_)
+
+* DF_STATIC_TLS flag is set for i386 and x86-64 when needed.
+ (`r353293 <https://reviews.llvm.org/rL353293>`_,
+ `r353378 <https://reviews.llvm.org/rL353378>`_)
+
+* The experimental partitioning feature is added to allow a program to
+ be split into multiple pieces.
+
+ The feature allows you to semi-automatically split a single program
+ into multiple ELF files called "partitions". Since all partitions
+ share the same memory address space and don't use PLT/GOT, split
+ programs run as fast as regular programs.
+
+ With the mechanism, you can start a program only with a "main"
+ partition and load remaining partitions on-demand. For example, you
+ can split a web browser into a main partition and a PDF reader
+ sub-partition and load the PDF reader partition only when a user
+ tries to open a PDF file.
+
+ See `the documentation <Partitions.html>`_ for more information.
+
+* If "-" is given as an output filename, lld writes the final result
+ to the standard output. Previously, it created a file "-" in the
+ current directory.
+ (`r351852 <https://reviews.llvm.org/rL351852>`_)
+
+* ``-z ifunc-noplt`` option is added to reduce IFunc function call
+ overhead in a freestanding environment such as the OS kernel.
+
+ Functions resolved by the IFunc mechanism are usually dispatched via
+ PLT and thus slower than regular functions because of the cost of
+ indirection. With ``-z ifunc-noplt``, you can eliminate it by doing
+ text relocations at load-time. You need a special loader to utilize
+ this feature. This feature is added for the FreeBSD kernel but can
+ be used by any operating systems.
+ (`r360685 <https://reviews.llvm.org/rL360685>`_)
+
+* ``--undefined-glob`` option is added. The new option is an extension
+ to ``--undefined`` to take a glob pattern instead of a single symbol
+ name.
+ (`r363396 <https://reviews.llvm.org/rL363396>`_)
+
+
COFF Improvements
-----------------
* Like the ELF driver, lld-link now has typo suggestions for flags.
+ (`r361518 <https://reviews.llvm.org/rL361518>`_)
-* lld-link now correctly reports duplicate symbol errors for obj files
- that were compiled with /Gy.
+* lld-link now correctly reports duplicate symbol errors for object
+ files that were compiled with ``/Gy``.
+ (`r352590 <https://reviews.llvm.org/rL352590>`_)
-* lld-link now correctly reports duplicate symbol errors when several res
- input files define resources with the same type, name, and language.
- This can be demoted to a warning using ``/force:multipleres``.
+* lld-link now correctly reports duplicate symbol errors when several
+ resource (.res) input files define resources with the same type,
+ name and language. This can be demoted to a warning using
+ ``/force:multipleres``.
+ (`r359829 <https://reviews.llvm.org/rL359829>`_)
-* lld-link now rejects more than one resource obj input files, matching
- link.exe. Previously, lld-link would silently ignore all but one.
- If you hit this: Don't pass resource obj files to the linker, instead pass
- res files to the linker directly. Don't put res files in static libraries,
- pass them on the command line.
+* lld-link now rejects more than one resource object input files,
+ matching link.exe. Previously, lld-link would silently ignore all
+ but one. If you hit this: Don't pass resource object files to the
+ linker, instead pass res files to the linker directly. Don't put
+ resource files in static libraries, pass them on the command line.
+ (`r359749 <https://reviews.llvm.org/rL359749>`_)
* Having more than two ``/natvis:`` now works correctly; it used to not
work for larger binaries before.
+ (`r327895 <https://reviews.llvm.org/rL327895>`_)
* Undefined symbols are now printed only in demangled form. Pass
``/demangle:no`` to see raw symbol names instead.
+ (`r355878 <https://reviews.llvm.org/rL355878>`_)
-* The following flags have been added: ``/functionpadmin``, ``/swaprun:``,
- ``/threads:no``
-
* Several speed and memory usage improvements.
-* Range extension thunks are now created for ARM64, if needed
-
* lld-link now supports resource object files created by GNU windres and
- MS cvtres, not only llvm-cvtres
+ MS cvtres, not only llvm-cvtres.
* The generated thunks for delayimports now share the majority of code
- among thunks, significantly reducing the overhead of using delayimport
+ among thunks, significantly reducing the overhead of using delayimport.
+ (`r365823 <https://reviews.llvm.org/rL365823>`_)
+* ``IMAGE_REL_ARM{,64}_REL32`` relocations are supported.
+ (`r352325 <https://reviews.llvm.org/rL352325>`_)
+
+* Range extension thunks for AArch64 are now supported, so lld can
+ create large executables for Windows/ARM64.
+ (`r352929 <https://reviews.llvm.org/rL352929>`_)
+
+* The following flags have been added:
+ ``/functionpadmin`` (`r354716 <https://reviews.llvm.org/rL354716>`_),
+ ``/swaprun:`` (`r359192 <https://reviews.llvm.org/rL359192>`_),
+ ``/threads:no`` (`r355029 <https://reviews.llvm.org/rL355029>`_),
+ ``/filealign`` (`r361634 <https://reviews.llvm.org/rL361634>`_)
+
+WebAssembly Improvements
+------------------------
+
+* Imports from custom module names are supported.
+ (`r352828 <https://reviews.llvm.org/rL352828>`_)
+
+* Symbols that are in llvm.used are now exported by default.
+ (`r353364 <https://reviews.llvm.org/rL353364>`_)
+
+* Initial support for PIC and dynamic linking has landed.
+ (`r357022 <https://reviews.llvm.org/rL357022>`_)
+
+* wasm-ld now add ``__start_``/``__stop_`` symbols for data sections.
+ (`r361236 <https://reviews.llvm.org/rL361236>`_)
+
+* wasm-ld now doesn't report an error on archives without a symbol index.
+ (`r364338 <https://reviews.llvm.org/rL364338>`_)
+
+* The following flags have been added:
+ ``--emit-relocs`` (`r361635 <https://reviews.llvm.org/rL361635>`_),
+ ``--wrap`` (`r361639 <https://reviews.llvm.org/rL361639>`_),
+ ``--trace`` and ``--trace-symbol``
+ (`r353264 <https://reviews.llvm.org/rL353264>`_).
+
+
MinGW Improvements
------------------
@@ -77,12 +214,18 @@ MinGW Improvements
DWARF exception handling with libgcc and gcc's crtend.o.
* lld now also handles DWARF unwind info generated by GCC, when linking
- with libgcc
+ with libgcc.
-* Many more GNU ld options are now supported, which e.g. allows the lld
- MinGW frontend to be called by GCC
-
* PDB output can be requested without manually specifying the PDB file
name, with the new option ``-pdb=`` with an empty value to the option.
(The old existing syntax ``-pdb <filename>`` was more cumbersome to use
with an empty parameter value.)
+
+* ``--no-insert-timestamp`` option is added as an alias to ``/timestamp:0``.
+ (`r353145 <https://reviews.llvm.org/rL353145>`_)
+
+* Many more GNU ld options are now supported, which e.g. allows the lld
+ MinGW frontend to be called by GCC.
+
+* The following options are added: ``--exclude-all-symbols``,
+ ``--appcontainer``, ``--undefined``
Modified: projects/clang900-import/lib/clang/include/VCSVersion.inc
==============================================================================
--- projects/clang900-import/lib/clang/include/VCSVersion.inc Sat Sep 7 12:23:57 2019 (r352009)
+++ projects/clang900-import/lib/clang/include/VCSVersion.inc Sat Sep 7 12:31:36 2019 (r352010)
@@ -1,14 +1,14 @@
// $FreeBSD$
-#define LLVM_REVISION "370514"
+#define LLVM_REVISION "371301"
#define LLVM_REPOSITORY "https://llvm.org/svn/llvm-project/llvm/branches/release_90"
-#define CLANG_REVISION "370514"
+#define CLANG_REVISION "371301"
#define CLANG_REPOSITORY "https://llvm.org/svn/llvm-project/cfe/branches/release_90"
// <Upstream revision at import>-<Local identifier in __FreeBSD_version style>
-#define LLD_REVISION "370514-1300004"
+#define LLD_REVISION "371301-1300004"
#define LLD_REPOSITORY "FreeBSD"
-#define LLDB_REVISION "370514"
+#define LLDB_REVISION "371301"
#define LLDB_REPOSITORY "https://llvm.org/svn/llvm-project/lldb/branches/release_90"
Modified: projects/clang900-import/lib/clang/include/llvm/Support/VCSRevision.h
==============================================================================
--- projects/clang900-import/lib/clang/include/llvm/Support/VCSRevision.h Sat Sep 7 12:23:57 2019 (r352009)
+++ projects/clang900-import/lib/clang/include/llvm/Support/VCSRevision.h Sat Sep 7 12:31:36 2019 (r352010)
@@ -1,3 +1,3 @@
/* $FreeBSD$ */
-#define LLVM_REVISION "370514"
+#define LLVM_REVISION "371301"
#define LLVM_REPOSITORY "https://llvm.org/svn/llvm-project/llvm/branches/release_90"
More information about the svn-src-projects
mailing list