Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb, and openmp
release 9.0.0 r372316, and update version numbers.
This commit is contained in:
commit
7fc776a827
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/clang900-import/; revision=352536
@ -3938,6 +3938,9 @@ class CallBrInst : public CallBase {
|
||||
ArrayRef<BasicBlock *> IndirectDests, ArrayRef<Value *> Args,
|
||||
ArrayRef<OperandBundleDef> Bundles, const Twine &NameStr);
|
||||
|
||||
/// Should the Indirect Destinations change, scan + update the Arg list.
|
||||
void updateArgBlockAddresses(unsigned i, BasicBlock *B);
|
||||
|
||||
/// Compute the number of operands to allocate.
|
||||
static int ComputeNumOperands(int NumArgs, int NumIndirectDests,
|
||||
int NumBundleInputs = 0) {
|
||||
@ -4075,7 +4078,7 @@ class CallBrInst : public CallBase {
|
||||
return cast<BasicBlock>(*(&Op<-1>() - getNumIndirectDests() - 1));
|
||||
}
|
||||
BasicBlock *getIndirectDest(unsigned i) const {
|
||||
return cast<BasicBlock>(*(&Op<-1>() - getNumIndirectDests() + i));
|
||||
return cast_or_null<BasicBlock>(*(&Op<-1>() - getNumIndirectDests() + i));
|
||||
}
|
||||
SmallVector<BasicBlock *, 16> getIndirectDests() const {
|
||||
SmallVector<BasicBlock *, 16> IndirectDests;
|
||||
@ -4087,6 +4090,7 @@ class CallBrInst : public CallBase {
|
||||
*(&Op<-1>() - getNumIndirectDests() - 1) = reinterpret_cast<Value *>(B);
|
||||
}
|
||||
void setIndirectDest(unsigned i, BasicBlock *B) {
|
||||
updateArgBlockAddresses(i, B);
|
||||
*(&Op<-1>() - getNumIndirectDests() + i) = reinterpret_cast<Value *>(B);
|
||||
}
|
||||
|
||||
@ -4096,11 +4100,10 @@ class CallBrInst : public CallBase {
|
||||
return i == 0 ? getDefaultDest() : getIndirectDest(i - 1);
|
||||
}
|
||||
|
||||
void setSuccessor(unsigned idx, BasicBlock *NewSucc) {
|
||||
assert(idx < getNumIndirectDests() + 1 &&
|
||||
void setSuccessor(unsigned i, BasicBlock *NewSucc) {
|
||||
assert(i < getNumIndirectDests() + 1 &&
|
||||
"Successor # out of range for callbr!");
|
||||
*(&Op<-1>() - getNumIndirectDests() -1 + idx) =
|
||||
reinterpret_cast<Value *>(NewSucc);
|
||||
return i == 0 ? setDefaultDest(NewSucc) : setIndirectDest(i - 1, NewSucc);
|
||||
}
|
||||
|
||||
unsigned getNumSuccessors() const { return getNumIndirectDests() + 1; }
|
||||
|
@ -912,6 +912,12 @@ void IfConverter::AnalyzeBranches(BBInfo &BBI) {
|
||||
BBI.BrCond.clear();
|
||||
BBI.IsBrAnalyzable =
|
||||
!TII->analyzeBranch(*BBI.BB, BBI.TrueBB, BBI.FalseBB, BBI.BrCond);
|
||||
if (!BBI.IsBrAnalyzable) {
|
||||
BBI.TrueBB = nullptr;
|
||||
BBI.FalseBB = nullptr;
|
||||
BBI.BrCond.clear();
|
||||
}
|
||||
|
||||
SmallVector<MachineOperand, 4> RevCond(BBI.BrCond.begin(), BBI.BrCond.end());
|
||||
BBI.IsBrReversible = (RevCond.size() == 0) ||
|
||||
!TII->reverseBranchCondition(RevCond);
|
||||
|
@ -822,6 +822,17 @@ void CallBrInst::init(FunctionType *FTy, Value *Fn, BasicBlock *Fallthrough,
|
||||
setName(NameStr);
|
||||
}
|
||||
|
||||
void CallBrInst::updateArgBlockAddresses(unsigned i, BasicBlock *B) {
|
||||
assert(getNumIndirectDests() > i && "IndirectDest # out of range for callbr");
|
||||
if (BasicBlock *OldBB = getIndirectDest(i)) {
|
||||
BlockAddress *Old = BlockAddress::get(OldBB);
|
||||
BlockAddress *New = BlockAddress::get(B);
|
||||
for (unsigned ArgNo = 0, e = getNumArgOperands(); ArgNo != e; ++ArgNo)
|
||||
if (dyn_cast<BlockAddress>(getArgOperand(ArgNo)) == Old)
|
||||
setArgOperand(ArgNo, New);
|
||||
}
|
||||
}
|
||||
|
||||
CallBrInst::CallBrInst(const CallBrInst &CBI)
|
||||
: CallBase(CBI.Attrs, CBI.FTy, CBI.getType(), Instruction::CallBr,
|
||||
OperandTraits<CallBase>::op_end(this) - CBI.getNumOperands(),
|
||||
|
@ -7650,17 +7650,22 @@ static SDValue EltsFromConsecutiveLoads(EVT VT, ArrayRef<SDValue> Elts,
|
||||
// IsConsecutiveLoadWithZeros - we need to create a shuffle of the loaded
|
||||
// vector and a zero vector to clear out the zero elements.
|
||||
if (!isAfterLegalize && VT.isVector()) {
|
||||
SmallVector<int, 4> ClearMask(NumElems, -1);
|
||||
for (unsigned i = 0; i < NumElems; ++i) {
|
||||
if (ZeroMask[i])
|
||||
ClearMask[i] = i + NumElems;
|
||||
else if (LoadMask[i])
|
||||
ClearMask[i] = i;
|
||||
unsigned NumMaskElts = VT.getVectorNumElements();
|
||||
if ((NumMaskElts % NumElems) == 0) {
|
||||
unsigned Scale = NumMaskElts / NumElems;
|
||||
SmallVector<int, 4> ClearMask(NumMaskElts, -1);
|
||||
for (unsigned i = 0; i < NumElems; ++i) {
|
||||
if (UndefMask[i])
|
||||
continue;
|
||||
int Offset = ZeroMask[i] ? NumMaskElts : 0;
|
||||
for (unsigned j = 0; j != Scale; ++j)
|
||||
ClearMask[(i * Scale) + j] = (i * Scale) + j + Offset;
|
||||
}
|
||||
SDValue V = CreateLoad(VT, LDBase);
|
||||
SDValue Z = VT.isInteger() ? DAG.getConstant(0, DL, VT)
|
||||
: DAG.getConstantFP(0.0, DL, VT);
|
||||
return DAG.getVectorShuffle(VT, DL, V, Z, ClearMask);
|
||||
}
|
||||
SDValue V = CreateLoad(VT, LDBase);
|
||||
SDValue Z = VT.isInteger() ? DAG.getConstant(0, DL, VT)
|
||||
: DAG.getConstantFP(0.0, DL, VT);
|
||||
return DAG.getVectorShuffle(VT, DL, V, Z, ClearMask);
|
||||
}
|
||||
}
|
||||
|
||||
@ -31664,8 +31669,8 @@ static bool matchUnaryPermuteShuffle(MVT MaskVT, ArrayRef<int> Mask,
|
||||
if (!ContainsZeros && AllowIntDomain && MaskScalarSizeInBits == 16) {
|
||||
SmallVector<int, 4> RepeatedMask;
|
||||
if (is128BitLaneRepeatedShuffleMask(MaskEltVT, Mask, RepeatedMask)) {
|
||||
ArrayRef<int> LoMask(Mask.data() + 0, 4);
|
||||
ArrayRef<int> HiMask(Mask.data() + 4, 4);
|
||||
ArrayRef<int> LoMask(RepeatedMask.data() + 0, 4);
|
||||
ArrayRef<int> HiMask(RepeatedMask.data() + 4, 4);
|
||||
|
||||
// PSHUFLW: permute lower 4 elements only.
|
||||
if (isUndefOrInRange(LoMask, 0, 4) &&
|
||||
|
@ -1480,8 +1480,8 @@ Value *LibCallSimplifier::optimizePow(CallInst *Pow, IRBuilder<> &B) {
|
||||
if (match(Expo, m_SpecificFP(-1.0)))
|
||||
return B.CreateFDiv(ConstantFP::get(Ty, 1.0), Base, "reciprocal");
|
||||
|
||||
// pow(x, 0.0) -> 1.0
|
||||
if (match(Expo, m_SpecificFP(0.0)))
|
||||
// pow(x, +/-0.0) -> 1.0
|
||||
if (match(Expo, m_AnyZeroFP()))
|
||||
return ConstantFP::get(Ty, 1.0);
|
||||
|
||||
// pow(x, 1.0) -> x
|
||||
|
@ -440,7 +440,7 @@ BUILTIN(__builtin_rotateleft64, "UWiUWiUWi", "nc")
|
||||
BUILTIN(__builtin_rotateright8, "UcUcUc", "nc")
|
||||
BUILTIN(__builtin_rotateright16, "UsUsUs", "nc")
|
||||
BUILTIN(__builtin_rotateright32, "UZiUZiUZi", "nc")
|
||||
BUILTIN(__builtin_rotateright64, "UWiUWiWi", "nc")
|
||||
BUILTIN(__builtin_rotateright64, "UWiUWiUWi", "nc")
|
||||
|
||||
// Random GCC builtins
|
||||
BUILTIN(__builtin_constant_p, "i.", "nctu")
|
||||
|
@ -3332,7 +3332,8 @@ SourceRange FunctionDecl::getExceptionSpecSourceRange() const {
|
||||
/// an externally visible symbol, but "extern inline" will not create an
|
||||
/// externally visible symbol.
|
||||
bool FunctionDecl::isInlineDefinitionExternallyVisible() const {
|
||||
assert((doesThisDeclarationHaveABody() || willHaveBody()) &&
|
||||
assert((doesThisDeclarationHaveABody() || willHaveBody() ||
|
||||
hasAttr<AliasAttr>()) &&
|
||||
"Must be a function definition");
|
||||
assert(isInlined() && "Function must be inline");
|
||||
ASTContext &Context = getASTContext();
|
||||
|
@ -35,7 +35,7 @@ std::string getClangRepositoryPath() {
|
||||
|
||||
// If the CLANG_REPOSITORY is empty, try to use the SVN keyword. This helps us
|
||||
// pick up a tag in an SVN export, for example.
|
||||
StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/branches/release_90/lib/Basic/Version.cpp $");
|
||||
StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_900/final/lib/Basic/Version.cpp $");
|
||||
if (URL.empty()) {
|
||||
URL = SVNRepository.slice(SVNRepository.find(':'),
|
||||
SVNRepository.find("/lib/Basic"));
|
||||
|
@ -4355,17 +4355,22 @@ void CodeGenModule::EmitAliasDefinition(GlobalDecl GD) {
|
||||
// Create a reference to the named value. This ensures that it is emitted
|
||||
// if a deferred decl.
|
||||
llvm::Constant *Aliasee;
|
||||
if (isa<llvm::FunctionType>(DeclTy))
|
||||
llvm::GlobalValue::LinkageTypes LT;
|
||||
if (isa<llvm::FunctionType>(DeclTy)) {
|
||||
Aliasee = GetOrCreateLLVMFunction(AA->getAliasee(), DeclTy, GD,
|
||||
/*ForVTable=*/false);
|
||||
else
|
||||
LT = getFunctionLinkage(GD);
|
||||
} else {
|
||||
Aliasee = GetOrCreateLLVMGlobal(AA->getAliasee(),
|
||||
llvm::PointerType::getUnqual(DeclTy),
|
||||
/*D=*/nullptr);
|
||||
LT = getLLVMLinkageVarDefinition(cast<VarDecl>(GD.getDecl()),
|
||||
D->getType().isConstQualified());
|
||||
}
|
||||
|
||||
// Create the new alias itself, but don't set a name yet.
|
||||
auto *GA = llvm::GlobalAlias::create(
|
||||
DeclTy, 0, llvm::Function::ExternalLinkage, "", Aliasee, &getModule());
|
||||
auto *GA =
|
||||
llvm::GlobalAlias::create(DeclTy, 0, LT, "", Aliasee, &getModule());
|
||||
|
||||
if (Entry) {
|
||||
if (GA->getAliasee() == Entry) {
|
||||
|
@ -1,14 +1,14 @@
|
||||
// $FreeBSD$
|
||||
|
||||
#define LLVM_REVISION "371301"
|
||||
#define LLVM_REPOSITORY "https://llvm.org/svn/llvm-project/llvm/branches/release_90"
|
||||
#define LLVM_REVISION "372316"
|
||||
#define LLVM_REPOSITORY "https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_900/final"
|
||||
|
||||
#define CLANG_REVISION "371301"
|
||||
#define CLANG_REPOSITORY "https://llvm.org/svn/llvm-project/cfe/branches/release_90"
|
||||
#define CLANG_REVISION "372316"
|
||||
#define CLANG_REPOSITORY "https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_900/final"
|
||||
|
||||
// <Upstream revision at import>-<Local identifier in __FreeBSD_version style>
|
||||
#define LLD_REVISION "371301-1300004"
|
||||
#define LLD_REVISION "372316-1300004"
|
||||
#define LLD_REPOSITORY "FreeBSD"
|
||||
|
||||
#define LLDB_REVISION "371301"
|
||||
#define LLDB_REPOSITORY "https://llvm.org/svn/llvm-project/lldb/branches/release_90"
|
||||
#define LLDB_REVISION "372316"
|
||||
#define LLDB_REPOSITORY "https://llvm.org/svn/llvm-project/lldb/tags/RELEASE_900/final"
|
||||
|
@ -1,3 +1,3 @@
|
||||
/* $FreeBSD$ */
|
||||
#define LLVM_REVISION "371301"
|
||||
#define LLVM_REPOSITORY "https://llvm.org/svn/llvm-project/llvm/branches/release_90"
|
||||
#define LLVM_REVISION "372316"
|
||||
#define LLVM_REPOSITORY "https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_900/final"
|
||||
|
Loading…
Reference in New Issue
Block a user