aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2022-04-28 18:32:24 +0000
committerDimitry Andric <dim@FreeBSD.org>2022-05-14 11:46:42 +0000
commit3a9a9c0ca44ec535dcf73fe8462bee458e54814b (patch)
tree13eff4cf89a999893d2f6ead8c5b4684236df8ed
parent53683b95ef66a12337999587cd98302b1b425920 (diff)
parent139d5007613696147437159a7f0d0cdcac702529 (diff)
downloadsrc-3a9a9c0ca44ec535dcf73fe8462bee458e54814b.tar.gz
src-3a9a9c0ca44ec535dcf73fe8462bee458e54814b.zip
Merge llvm-project release/14.x llvmorg-14.0.3-0-g1f9140064dfb
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-14.0.3-0-g1f9140064dfb. PR: 261742 MFC after: 2 weeks
-rw-r--r--ObsoleteFiles.inc4
-rw-r--r--contrib/llvm-project/clang/include/clang/Driver/Options.td3
-rw-r--r--contrib/llvm-project/clang/include/clang/Interpreter/Interpreter.h2
-rw-r--r--contrib/llvm-project/clang/lib/CodeGen/CGExpr.cpp14
-rw-r--r--contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/AArch64.cpp3
-rw-r--r--contrib/llvm-project/clang/lib/Driver/ToolChains/OpenBSD.cpp9
-rw-r--r--contrib/llvm-project/clang/lib/Driver/ToolChains/OpenBSD.h4
-rw-r--r--contrib/llvm-project/clang/lib/Interpreter/IncrementalExecutor.h1
-rw-r--r--contrib/llvm-project/clang/lib/Interpreter/Interpreter.cpp6
-rw-r--r--contrib/llvm-project/clang/utils/TableGen/NeonEmitter.cpp23
-rw-r--r--contrib/llvm-project/compiler-rt/lib/asan/asan_linux.cpp30
-rw-r--r--contrib/llvm-project/compiler-rt/lib/scudo/scudo_allocator.cpp4
-rw-r--r--contrib/llvm-project/compiler-rt/lib/scudo/scudo_crc32.cpp4
-rw-r--r--contrib/llvm-project/compiler-rt/lib/scudo/scudo_crc32.h12
-rw-r--r--contrib/llvm-project/compiler-rt/lib/scudo/standalone/checksum.h8
-rw-r--r--contrib/llvm-project/compiler-rt/lib/scudo/standalone/chunk.h4
-rw-r--r--contrib/llvm-project/compiler-rt/lib/scudo/standalone/crc32_hw.cpp4
-rw-r--r--contrib/llvm-project/libcxx/src/random.cpp2
-rw-r--r--contrib/llvm-project/lld/COFF/DebugTypes.cpp19
-rw-r--r--contrib/llvm-project/lld/ELF/SyntheticSections.h4
-rw-r--r--contrib/llvm-project/lld/ELF/Writer.cpp41
-rw-r--r--contrib/llvm-project/llvm/include/llvm/CodeGen/FastISel.h7
-rw-r--r--contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAG.h13
-rw-r--r--contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAGISel.h1
-rw-r--r--contrib/llvm-project/llvm/lib/CodeGen/MachineFunction.cpp3
-rw-r--r--contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp4
-rw-r--r--contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp5
-rw-r--r--contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h3
-rw-r--r--contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp3
-rw-r--r--contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp3
-rw-r--r--contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp12
-rw-r--r--contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp5
-rw-r--r--contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp10
-rw-r--r--contrib/llvm-project/llvm/lib/MC/ELFObjectWriter.cpp1
-rw-r--r--contrib/llvm-project/llvm/lib/Object/ELF.cpp2
-rw-r--r--contrib/llvm-project/llvm/lib/Support/AArch64TargetParser.cpp2
-rw-r--r--contrib/llvm-project/llvm/lib/Target/AArch64/AArch64.td12
-rw-r--r--contrib/llvm-project/llvm/lib/Target/AArch64/AArch64CollectLOH.cpp2
-rw-r--r--contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp34
-rw-r--r--contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FastISel.cpp8
-rw-r--r--contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp163
-rw-r--r--contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.h9
-rw-r--r--contrib/llvm-project/llvm/lib/Target/AArch64/AArch64InstrInfo.td11
-rw-r--r--contrib/llvm-project/llvm/lib/Target/AArch64/AArch64Subtarget.h6
-rw-r--r--contrib/llvm-project/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp16
-rw-r--r--contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp12
-rw-r--r--contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64PreLegalizerCombiner.cpp7
-rw-r--r--contrib/llvm-project/llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp1
-rw-r--r--contrib/llvm-project/llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp63
-rw-r--r--contrib/llvm-project/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp2
-rw-r--r--contrib/llvm-project/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp2
-rw-r--r--contrib/llvm-project/llvm/lib/Target/PowerPC/MCTargetDesc/PPCFixupKinds.h4
-rw-r--r--contrib/llvm-project/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp4
-rw-r--r--contrib/llvm-project/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.cpp13
-rw-r--r--contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp1
-rw-r--r--contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.td4
-rw-r--r--contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp8
-rw-r--r--contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.cpp54
-rw-r--r--contrib/llvm-project/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp23
-rw-r--r--contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelLowering.cpp71
-rw-r--r--contrib/llvm-project/llvm/lib/Target/RISCV/RISCVMachineFunctionInfo.cpp30
-rw-r--r--contrib/llvm-project/llvm/lib/Target/RISCV/RISCVMachineFunctionInfo.h25
-rw-r--r--contrib/llvm-project/llvm/lib/Target/RISCV/RISCVTargetMachine.cpp23
-rw-r--r--contrib/llvm-project/llvm/lib/Target/RISCV/RISCVTargetMachine.h8
-rw-r--r--contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp24
-rw-r--r--contrib/llvm-project/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp6
-rw-r--r--contrib/llvm-project/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp17
-rw-r--r--contrib/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp37
-rw-r--r--contrib/llvm-project/llvm/lib/Transforms/Vectorize/VectorCombine.cpp8
-rw-r--r--contrib/llvm-project/llvm/tools/llvm-objdump/ELFDump.cpp8
-rw-r--r--etc/mtree/BSD.debug.dist2
-rw-r--r--etc/mtree/BSD.usr.dist2
-rw-r--r--lib/clang/headers/Makefile2
-rw-r--r--lib/clang/include/VCSVersion.inc6
-rw-r--r--lib/clang/include/clang/Basic/Version.inc6
-rw-r--r--lib/clang/include/clang/Config/config.h2
-rw-r--r--lib/clang/include/lld/Common/Version.inc4
-rw-r--r--lib/clang/include/lldb/Version/Version.inc6
-rw-r--r--lib/clang/include/llvm/Config/TargetMCAs.def4
-rw-r--r--lib/clang/include/llvm/Config/config.h4
-rw-r--r--lib/clang/include/llvm/Config/llvm-config.h4
-rw-r--r--lib/clang/include/llvm/Support/VCSRevision.h2
-rw-r--r--lib/clang/libllvm/Makefile2
-rw-r--r--lib/libclang_rt/compiler-rt-vars.mk2
-rw-r--r--lib/libclang_rt/include/Makefile1
-rw-r--r--lib/libclang_rt/profile/Makefile1
-rw-r--r--sys/sys/param.h2
-rw-r--r--tools/build/mk/OptionalObsoleteFiles.inc602
88 files changed, 985 insertions, 660 deletions
diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc
index 8627a5e91a26..64ca3faee70f 100644
--- a/ObsoleteFiles.inc
+++ b/ObsoleteFiles.inc
@@ -52,7 +52,7 @@
# xargs -n1 | sort | uniq -d;
# done
-# 20220514: new clang import which bumps version from 13.0.0 to 14.0.0
+# 20220514: new clang import which bumps version from 13.0.0 to 14.0.3
OLD_FILES+=usr/lib/clang/13.0.0/include/cuda_wrappers/algorithm
OLD_FILES+=usr/lib/clang/13.0.0/include/cuda_wrappers/complex
OLD_FILES+=usr/lib/clang/13.0.0/include/cuda_wrappers/new
@@ -349,7 +349,7 @@ OLD_DIRS+=usr/lib/clang/13.0.0/lib/freebsd
OLD_DIRS+=usr/lib/clang/13.0.0/lib
OLD_DIRS+=usr/lib/clang/13.0.0
-# 20220514: new libc++ import which bumps version from 13.0.0 to 14.0.0
+# 20220514: new libc++ import which bumps version from 13.0.0 to 14.0.3
OLD_FILES+=usr/include/c++/v1/__function_like.h
OLD_FILES+=usr/include/c++/v1/__memory/pointer_safety.h
OLD_FILES+=usr/include/c++/v1/__utility/__decay_copy.h
diff --git a/contrib/llvm-project/clang/include/clang/Driver/Options.td b/contrib/llvm-project/clang/include/clang/Driver/Options.td
index 53e68ed2cef9..e0d215840714 100644
--- a/contrib/llvm-project/clang/include/clang/Driver/Options.td
+++ b/contrib/llvm-project/clang/include/clang/Driver/Options.td
@@ -3372,7 +3372,7 @@ def mmark_bti_property : Flag<["-"], "mmark-bti-property">,
def mno_bti_at_return_twice : Flag<["-"], "mno-bti-at-return-twice">,
Group<m_arm_Features_Group>,
HelpText<"Do not add a BTI instruction after a setjmp or other"
- " return-twice construct (Arm only)">;
+ " return-twice construct (Arm/AArch64 only)">;
foreach i = {1-31} in
def ffixed_x#i : Flag<["-"], "ffixed-x"#i>, Group<m_Group>,
@@ -3400,6 +3400,7 @@ def msign_return_address_EQ : Joined<["-"], "msign-return-address=">,
Flags<[CC1Option]>, Group<m_Group>, Values<"none,all,non-leaf">,
HelpText<"Select return address signing scope">;
def mbranch_protection_EQ : Joined<["-"], "mbranch-protection=">,
+ Group<m_Group>,
HelpText<"Enforce targets of indirect branches and function returns">;
def mharden_sls_EQ : Joined<["-"], "mharden-sls=">,
diff --git a/contrib/llvm-project/clang/include/clang/Interpreter/Interpreter.h b/contrib/llvm-project/clang/include/clang/Interpreter/Interpreter.h
index 721a649deb43..f2fdb90f5ba4 100644
--- a/contrib/llvm-project/clang/include/clang/Interpreter/Interpreter.h
+++ b/contrib/llvm-project/clang/include/clang/Interpreter/Interpreter.h
@@ -26,6 +26,7 @@
namespace llvm {
namespace orc {
+class LLJIT;
class ThreadSafeContext;
}
} // namespace llvm
@@ -56,6 +57,7 @@ public:
static llvm::Expected<std::unique_ptr<Interpreter>>
create(std::unique_ptr<CompilerInstance> CI);
const CompilerInstance *getCompilerInstance() const;
+ const llvm::orc::LLJIT *getExecutionEngine() const;
llvm::Expected<PartialTranslationUnit &> Parse(llvm::StringRef Code);
llvm::Error Execute(PartialTranslationUnit &T);
llvm::Error ParseAndExecute(llvm::StringRef Code) {
diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGExpr.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGExpr.cpp
index bb5d18b74894..2a9b108c31bc 100644
--- a/contrib/llvm-project/clang/lib/CodeGen/CGExpr.cpp
+++ b/contrib/llvm-project/clang/lib/CodeGen/CGExpr.cpp
@@ -4895,6 +4895,16 @@ RValue CodeGenFunction::EmitSimpleCallExpr(const CallExpr *E,
return EmitCall(E->getCallee()->getType(), Callee, E, ReturnValue);
}
+// Detect the unusual situation where an inline version is shadowed by a
+// non-inline version. In that case we should pick the external one
+// everywhere. That's GCC behavior too.
+static bool OnlyHasInlineBuiltinDeclaration(const FunctionDecl *FD) {
+ for (const FunctionDecl *PD = FD; PD; PD = PD->getPreviousDecl())
+ if (!PD->isInlineBuiltinDeclaration())
+ return false;
+ return true;
+}
+
static CGCallee EmitDirectCallee(CodeGenFunction &CGF, GlobalDecl GD) {
const FunctionDecl *FD = cast<FunctionDecl>(GD.getDecl());
@@ -4902,8 +4912,8 @@ static CGCallee EmitDirectCallee(CodeGenFunction &CGF, GlobalDecl GD) {
std::string FDInlineName = (FD->getName() + ".inline").str();
// When directing calling an inline builtin, call it through it's mangled
// name to make it clear it's not the actual builtin.
- if (FD->isInlineBuiltinDeclaration() &&
- CGF.CurFn->getName() != FDInlineName) {
+ if (CGF.CurFn->getName() != FDInlineName &&
+ OnlyHasInlineBuiltinDeclaration(FD)) {
llvm::Constant *CalleePtr = EmitFunctionDeclPointer(CGF.CGM, GD);
llvm::Function *Fn = llvm::cast<llvm::Function>(CalleePtr);
llvm::Module *M = Fn->getParent();
diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/AArch64.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/AArch64.cpp
index ca0ca4bf4eea..53610f0909a2 100644
--- a/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/AArch64.cpp
+++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/AArch64.cpp
@@ -592,4 +592,7 @@ fp16_fml_fallthrough:
// Enabled A53 errata (835769) workaround by default on android
Features.push_back("+fix-cortex-a53-835769");
}
+
+ if (Args.getLastArg(options::OPT_mno_bti_at_return_twice))
+ Features.push_back("+no-bti-at-return-twice");
}
diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/OpenBSD.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/OpenBSD.cpp
index bcd54bedfa89..86a10ce4b0e7 100644
--- a/contrib/llvm-project/clang/lib/Driver/ToolChains/OpenBSD.cpp
+++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/OpenBSD.cpp
@@ -342,3 +342,12 @@ Tool *OpenBSD::buildAssembler() const {
Tool *OpenBSD::buildLinker() const { return new tools::openbsd::Linker(*this); }
bool OpenBSD::HasNativeLLVMSupport() const { return true; }
+
+bool OpenBSD::IsUnwindTablesDefault(const ArgList &Args) const {
+ switch (getArch()) {
+ case llvm::Triple::arm:
+ return false;
+ default:
+ return true;
+ }
+}
diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/OpenBSD.h b/contrib/llvm-project/clang/lib/Driver/ToolChains/OpenBSD.h
index 9d668711b91b..2d4c4e34520b 100644
--- a/contrib/llvm-project/clang/lib/Driver/ToolChains/OpenBSD.h
+++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/OpenBSD.h
@@ -82,9 +82,7 @@ public:
std::string getCompilerRT(const llvm::opt::ArgList &Args, StringRef Component,
FileType Type = ToolChain::FT_Static) const override;
- bool IsUnwindTablesDefault(const llvm::opt::ArgList &Args) const override {
- return true;
- }
+ bool IsUnwindTablesDefault(const llvm::opt::ArgList &Args) const override;
LangOptions::StackProtectorMode
GetDefaultStackProtectorLevel(bool KernelOrKext) const override {
diff --git a/contrib/llvm-project/clang/lib/Interpreter/IncrementalExecutor.h b/contrib/llvm-project/clang/lib/Interpreter/IncrementalExecutor.h
index 24447994d5f1..51b4d83d10b1 100644
--- a/contrib/llvm-project/clang/lib/Interpreter/IncrementalExecutor.h
+++ b/contrib/llvm-project/clang/lib/Interpreter/IncrementalExecutor.h
@@ -45,6 +45,7 @@ public:
llvm::Error runCtors() const;
llvm::Expected<llvm::JITTargetAddress>
getSymbolAddress(llvm::StringRef Name, SymbolNameKind NameKind) const;
+ llvm::orc::LLJIT *getExecutionEngine() const { return Jit.get(); }
};
} // end namespace clang
diff --git a/contrib/llvm-project/clang/lib/Interpreter/Interpreter.cpp b/contrib/llvm-project/clang/lib/Interpreter/Interpreter.cpp
index b2e7727be39a..470c9c289a74 100644
--- a/contrib/llvm-project/clang/lib/Interpreter/Interpreter.cpp
+++ b/contrib/llvm-project/clang/lib/Interpreter/Interpreter.cpp
@@ -196,6 +196,12 @@ const CompilerInstance *Interpreter::getCompilerInstance() const {
return IncrParser->getCI();
}
+const llvm::orc::LLJIT *Interpreter::getExecutionEngine() const {
+ if (IncrExecutor)
+ return IncrExecutor->getExecutionEngine();
+ return nullptr;
+}
+
llvm::Expected<PartialTranslationUnit &>
Interpreter::Parse(llvm::StringRef Code) {
return IncrParser->Parse(Code);
diff --git a/contrib/llvm-project/clang/utils/TableGen/NeonEmitter.cpp b/contrib/llvm-project/clang/utils/TableGen/NeonEmitter.cpp
index a69fbe0e42dc..1550a8a1e273 100644
--- a/contrib/llvm-project/clang/utils/TableGen/NeonEmitter.cpp
+++ b/contrib/llvm-project/clang/utils/TableGen/NeonEmitter.cpp
@@ -502,6 +502,7 @@ private:
void emitBody(StringRef CallPrefix);
void emitShadowedArgs();
void emitArgumentReversal();
+ void emitReturnVarDecl();
void emitReturnReversal();
void emitReverseVariable(Variable &Dest, Variable &Src);
void emitNewLine();
@@ -1228,6 +1229,15 @@ void Intrinsic::emitArgumentReversal() {
}
}
+void Intrinsic::emitReturnVarDecl() {
+ assert(RetVar.getType() == Types[0]);
+ // Create a return variable, if we're not void.
+ if (!RetVar.getType().isVoid()) {
+ OS << " " << RetVar.getType().str() << " " << RetVar.getName() << ";";
+ emitNewLine();
+ }
+}
+
void Intrinsic::emitReturnReversal() {
if (isBigEndianSafe())
return;
@@ -1353,13 +1363,6 @@ void Intrinsic::emitBodyAsBuiltinCall() {
void Intrinsic::emitBody(StringRef CallPrefix) {
std::vector<std::string> Lines;
- assert(RetVar.getType() == Types[0]);
- // Create a return variable, if we're not void.
- if (!RetVar.getType().isVoid()) {
- OS << " " << RetVar.getType().str() << " " << RetVar.getName() << ";";
- emitNewLine();
- }
-
if (!Body || Body->getValues().empty()) {
// Nothing specific to output - must output a builtin.
emitBodyAsBuiltinCall();
@@ -1849,6 +1852,9 @@ void Intrinsic::generateImpl(bool ReverseArguments,
OS << " __attribute__((unavailable));";
} else {
emitOpeningBrace();
+ // Emit return variable declaration first as to not trigger
+ // -Wdeclaration-after-statement.
+ emitReturnVarDecl();
emitShadowedArgs();
if (ReverseArguments)
emitArgumentReversal();
@@ -1867,6 +1873,9 @@ void Intrinsic::indexBody() {
CurrentRecord = R;
initVariables();
+ // Emit return variable declaration first as to not trigger
+ // -Wdeclaration-after-statement.
+ emitReturnVarDecl();
emitBody("");
OS.str("");
diff --git a/contrib/llvm-project/compiler-rt/lib/asan/asan_linux.cpp b/contrib/llvm-project/compiler-rt/lib/asan/asan_linux.cpp
index 1d92c530bd11..defd81bc19e2 100644
--- a/contrib/llvm-project/compiler-rt/lib/asan/asan_linux.cpp
+++ b/contrib/llvm-project/compiler-rt/lib/asan/asan_linux.cpp
@@ -131,30 +131,24 @@ static int FindFirstDSOCallback(struct dl_phdr_info *info, size_t size,
VReport(2, "info->dlpi_name = %s\tinfo->dlpi_addr = %p\n", info->dlpi_name,
(void *)info->dlpi_addr);
- // Continue until the first dynamic library is found
- if (!info->dlpi_name || info->dlpi_name[0] == 0)
- return 0;
-
- // Ignore vDSO
- if (internal_strncmp(info->dlpi_name, "linux-", sizeof("linux-") - 1) == 0)
- return 0;
+ const char **name = (const char **)data;
-#if SANITIZER_FREEBSD || SANITIZER_NETBSD
// Ignore first entry (the main program)
- char **p = (char **)data;
- if (!(*p)) {
- *p = (char *)-1;
+ if (!*name) {
+ *name = "";
return 0;
}
-#endif
-#if SANITIZER_SOLARIS
- // Ignore executable on Solaris
- if (info->dlpi_addr == 0)
+# if SANITIZER_LINUX
+ // Ignore vDSO. glibc versions earlier than 2.15 (and some patched
+ // by distributors) return an empty name for the vDSO entry, so
+ // detect this as well.
+ if (!info->dlpi_name[0] ||
+ internal_strncmp(info->dlpi_name, "linux-", sizeof("linux-") - 1) == 0)
return 0;
-#endif
+# endif
- *(const char **)data = info->dlpi_name;
+ *name = info->dlpi_name;
return 1;
}
@@ -175,7 +169,7 @@ void AsanCheckDynamicRTPrereqs() {
// Ensure that dynamic RT is the first DSO in the list
const char *first_dso_name = nullptr;
dl_iterate_phdr(FindFirstDSOCallback, &first_dso_name);
- if (first_dso_name && !IsDynamicRTName(first_dso_name)) {
+ if (first_dso_name && first_dso_name[0] && !IsDynamicRTName(first_dso_name)) {
Report("ASan runtime does not come first in initial library list; "
"you should either link runtime to your application or "
"manually preload it with LD_PRELOAD.\n");
diff --git a/contrib/llvm-project/compiler-rt/lib/scudo/scudo_allocator.cpp b/contrib/llvm-project/compiler-rt/lib/scudo/scudo_allocator.cpp
index 5b6ac8b35493..6a6b577ab002 100644
--- a/contrib/llvm-project/compiler-rt/lib/scudo/scudo_allocator.cpp
+++ b/contrib/llvm-project/compiler-rt/lib/scudo/scudo_allocator.cpp
@@ -49,7 +49,7 @@ inline u32 computeCRC32(u32 Crc, uptr Value, uptr *Array, uptr ArraySize) {
// as opposed to only for scudo_crc32.cpp. This means that other hardware
// specific instructions were likely emitted at other places, and as a
// result there is no reason to not use it here.
-#if defined(__SSE4_2__) || defined(__ARM_FEATURE_CRC32)
+#if defined(__CRC32__) || defined(__SSE4_2__) || defined(__ARM_FEATURE_CRC32)
Crc = CRC32_INTRINSIC(Crc, Value);
for (uptr i = 0; i < ArraySize; i++)
Crc = CRC32_INTRINSIC(Crc, Array[i]);
@@ -65,7 +65,7 @@ inline u32 computeCRC32(u32 Crc, uptr Value, uptr *Array, uptr ArraySize) {
for (uptr i = 0; i < ArraySize; i++)
Crc = computeSoftwareCRC32(Crc, Array[i]);
return Crc;
-#endif // defined(__SSE4_2__) || defined(__ARM_FEATURE_CRC32)
+#endif // defined(__CRC32__) || defined(__SSE4_2__) || defined(__ARM_FEATURE_CRC32)
}
static BackendT &getBackend();
diff --git a/contrib/llvm-project/compiler-rt/lib/scudo/scudo_crc32.cpp b/contrib/llvm-project/compiler-rt/lib/scudo/scudo_crc32.cpp
index 87473505fe79..137c44c5c1cd 100644
--- a/contrib/llvm-project/compiler-rt/lib/scudo/scudo_crc32.cpp
+++ b/contrib/llvm-project/compiler-rt/lib/scudo/scudo_crc32.cpp
@@ -15,10 +15,10 @@
namespace __scudo {
-#if defined(__SSE4_2__) || defined(__ARM_FEATURE_CRC32)
+#if defined(__CRC32__) || defined(__SSE4_2__) || defined(__ARM_FEATURE_CRC32)
u32 computeHardwareCRC32(u32 Crc, uptr Data) {
return CRC32_INTRINSIC(Crc, Data);
}
-#endif // defined(__SSE4_2__) || defined(__ARM_FEATURE_CRC32)
+#endif // defined(__CRC32__) || defined(__SSE4_2__) || defined(__ARM_FEATURE_CRC32)
} // namespace __scudo
diff --git a/contrib/llvm-project/compiler-rt/lib/scudo/scudo_crc32.h b/contrib/llvm-project/compiler-rt/lib/scudo/scudo_crc32.h
index ef40595a56d1..4314d30e929f 100644
--- a/contrib/llvm-project/compiler-rt/lib/scudo/scudo_crc32.h
+++ b/contrib/llvm-project/compiler-rt/lib/scudo/scudo_crc32.h
@@ -16,13 +16,17 @@
#include "sanitizer_common/sanitizer_internal_defs.h"
// Hardware CRC32 is supported at compilation via the following:
-// - for i386 & x86_64: -msse4.2
+// - for i386 & x86_64: -mcrc32 (earlier: -msse4.2)
// - for ARM & AArch64: -march=armv8-a+crc or -mcrc
// An additional check must be performed at runtime as well to make sure the
// emitted instructions are valid on the target host.
-#if defined(__SSE4_2__) || defined(__ARM_FEATURE_CRC32)
-# ifdef __SSE4_2__
+#if defined(__CRC32__) || defined(__SSE4_2__) || defined(__ARM_FEATURE_CRC32)
+# if defined(__CRC32__)
+// NB: clang has <crc32intrin.h> but GCC does not
+# include <smmintrin.h>
+# define CRC32_INTRINSIC FIRST_32_SECOND_64(__builtin_ia32_crc32si, __builtin_ia32_crc32di)
+# elif defined(__SSE4_2__)
# include <smmintrin.h>
# define CRC32_INTRINSIC FIRST_32_SECOND_64(_mm_crc32_u32, _mm_crc32_u64)
# endif
@@ -30,7 +34,7 @@
# include <arm_acle.h>
# define CRC32_INTRINSIC FIRST_32_SECOND_64(__crc32cw, __crc32cd)
# endif
-#endif // defined(__SSE4_2__) || defined(__ARM_FEATURE_CRC32)
+#endif // defined(__CRC32__) || defined(__SSE4_2__) || defined(__ARM_FEATURE_CRC32)
namespace __scudo {
diff --git a/contrib/llvm-project/compiler-rt/lib/scudo/standalone/checksum.h b/contrib/llvm-project/compiler-rt/lib/scudo/standalone/checksum.h
index a63b1b4f064d..0f787ce2b5cd 100644
--- a/contrib/llvm-project/compiler-rt/lib/scudo/standalone/checksum.h
+++ b/contrib/llvm-project/compiler-rt/lib/scudo/standalone/checksum.h
@@ -12,12 +12,16 @@
#include "internal_defs.h"
// Hardware CRC32 is supported at compilation via the following:
-// - for i386 & x86_64: -msse4.2
+// - for i386 & x86_64: -mcrc32 (earlier: -msse4.2)
// - for ARM & AArch64: -march=armv8-a+crc or -mcrc
// An additional check must be performed at runtime as well to make sure the
// emitted instructions are valid on the target host.
-#ifdef __SSE4_2__
+#if defined(__CRC32__)
+// NB: clang has <crc32intrin.h> but GCC does not
+#include <smmintrin.h>
+#define CRC32_INTRINSIC FIRST_32_SECOND_64(__builtin_ia32_crc32si, __builtin_ia32_crc32di)
+#elif defined(__SSE4_2__)
#include <smmintrin.h>
#define CRC32_INTRINSIC FIRST_32_SECOND_64(_mm_crc32_u32, _mm_crc32_u64)
#endif
diff --git a/contrib/llvm-project/compiler-rt/lib/scudo/standalone/chunk.h b/contrib/llvm-project/compiler-rt/lib/scudo/standalone/chunk.h
index 69b8e1b12a91..0581420dfc99 100644
--- a/contrib/llvm-project/compiler-rt/lib/scudo/standalone/chunk.h
+++ b/contrib/llvm-project/compiler-rt/lib/scudo/standalone/chunk.h
@@ -25,7 +25,7 @@ inline u16 computeChecksum(u32 Seed, uptr Value, uptr *Array, uptr ArraySize) {
// as opposed to only for crc32_hw.cpp. This means that other hardware
// specific instructions were likely emitted at other places, and as a result
// there is no reason to not use it here.
-#if defined(__SSE4_2__) || defined(__ARM_FEATURE_CRC32)
+#if defined(__CRC32__) || defined(__SSE4_2__) || defined(__ARM_FEATURE_CRC32)
u32 Crc = static_cast<u32>(CRC32_INTRINSIC(Seed, Value));
for (uptr I = 0; I < ArraySize; I++)
Crc = static_cast<u32>(CRC32_INTRINSIC(Crc, Array[I]));
@@ -42,7 +42,7 @@ inline u16 computeChecksum(u32 Seed, uptr Value, uptr *Array, uptr ArraySize) {
Checksum = computeBSDChecksum(Checksum, Array[I]);
return Checksum;
}
-#endif // defined(__SSE4_2__) || defined(__ARM_FEATURE_CRC32)
+#endif // defined(__CRC32__) || defined(__SSE4_2__) || defined(__ARM_FEATURE_CRC32)
}
namespace Chunk {
diff --git a/contrib/llvm-project/compiler-rt/lib/scudo/standalone/crc32_hw.cpp b/contrib/llvm-project/compiler-rt/lib/scudo/standalone/crc32_hw.cpp
index 62841ba51019..d13c615498ff 100644
--- a/contrib/llvm-project/compiler-rt/lib/scudo/standalone/crc32_hw.cpp
+++ b/contrib/llvm-project/compiler-rt/lib/scudo/standalone/crc32_hw.cpp
@@ -10,10 +10,10 @@
namespace scudo {
-#if defined(__SSE4_2__) || defined(__ARM_FEATURE_CRC32)
+#if defined(__CRC32__) || defined(__SSE4_2__) || defined(__ARM_FEATURE_CRC32)
u32 computeHardwareCRC32(u32 Crc, uptr Data) {
return static_cast<u32>(CRC32_INTRINSIC(Crc, Data));
}
-#endif // defined(__SSE4_2__) || defined(__ARM_FEATURE_CRC32)
+#endif // defined(__CRC32__) || defined(__SSE4_2__) || defined(__ARM_FEATURE_CRC32)
} // namespace scudo
diff --git a/contrib/llvm-project/libcxx/src/random.cpp b/contrib/llvm-project/libcxx/src/random.cpp
index 6472a8dbcba3..146b7c56bdeb 100644
--- a/contrib/llvm-project/libcxx/src/random.cpp
+++ b/contrib/llvm-project/libcxx/src/random.cpp
@@ -210,7 +210,7 @@ random_device::entropy() const noexcept
return std::numeric_limits<result_type>::digits;
return ent;
-#elif defined(__OpenBSD__) || defined(_LIBCPP_USING_FUCHSIA_CPRNG)
+#elif defined(_LIBCPP_USING_ARC4_RANDOM) || defined(_LIBCPP_USING_FUCHSIA_CPRNG)
return std::numeric_limits<result_type>::digits;
#else
return 0;
diff --git a/contrib/llvm-project/lld/COFF/DebugTypes.cpp b/contrib/llvm-project/lld/COFF/DebugTypes.cpp
index 67b708c5b36a..0d25de464f9f 100644
--- a/contrib/llvm-project/lld/COFF/DebugTypes.cpp
+++ b/contrib/llvm-project/lld/COFF/DebugTypes.cpp
@@ -56,8 +56,12 @@ public:
return;
Guid = expectedInfo->getGuid();
auto it = ctx.typeServerSourceMappings.emplace(Guid, this);
- assert(it.second);
- (void)it;
+ if (!it.second) {
+ // If we hit here we have collision on Guid's in two PDB files.
+ // This can happen if the PDB Guid is invalid or if we are really
+ // unlucky. This should fall back on stright file-system lookup.
+ it.first->second = nullptr;
+ }
}
Error mergeDebugT(TypeMerger *m) override;
@@ -398,11 +402,12 @@ Expected<TypeServerSource *> UseTypeServerSource::getTypeServerSource() {
const codeview::GUID &tsId = typeServerDependency.getGuid();
StringRef tsPath = typeServerDependency.getName();
- TypeServerSource *tsSrc;
+ TypeServerSource *tsSrc = nullptr;
auto it = ctx.typeServerSourceMappings.find(tsId);
if (it != ctx.typeServerSourceMappings.end()) {
tsSrc = (TypeServerSource *)it->second;
- } else {
+ }
+ if (tsSrc == nullptr) {
// The file failed to load, lookup by name
PDBInputFile *pdb = PDBInputFile::findFromRecordPath(ctx, tsPath, file);
if (!pdb)
@@ -897,7 +902,11 @@ struct GHashTable {
/// A ghash table cell for deduplicating types from TpiSources.
class GHashCell {
- uint64_t data = 0;
+ // Force "data" to be 64-bit aligned; otherwise, some versions of clang
+ // will generate calls to libatomic when using some versions of libstdc++
+ // on 32-bit targets. (Also, in theory, there could be a target where
+ // new[] doesn't always return an 8-byte-aligned allocation.)
+ alignas(sizeof(uint64_t)) uint64_t data = 0;
public:
GHashCell() = default;
diff --git a/contrib/llvm-project/lld/ELF/SyntheticSections.h b/contrib/llvm-project/lld/ELF/SyntheticSections.h
index e609b3d7982a..3161785988f6 100644
--- a/contrib/llvm-project/lld/ELF/SyntheticSections.h
+++ b/contrib/llvm-project/lld/ELF/SyntheticSections.h
@@ -187,9 +187,7 @@ private:
class BssSection final : public SyntheticSection {
public:
BssSection(StringRef name, uint64_t size, uint32_t alignment);
- void writeTo(uint8_t *) override {
- llvm_unreachable("unexpected writeTo() call for SHT_NOBITS section");
- }
+ void writeTo(uint8_t *) override {}
bool isNeeded() const override { return size != 0; }
size_t getSize() const override { return size; }
diff --git a/contrib/llvm-project/lld/ELF/Writer.cpp b/contrib/llvm-project/lld/ELF/Writer.cpp
index 9383ac46c8e7..5794f048c990 100644
--- a/contrib/llvm-project/lld/ELF/Writer.cpp
+++ b/contrib/llvm-project/lld/ELF/Writer.cpp
@@ -722,23 +722,30 @@ template <class ELFT> void Writer<ELFT>::addSectionSymbols() {
auto *sec = dyn_cast<OutputSection>(cmd);
if (!sec)
continue;
- auto i = llvm::find_if(sec->commands, [](SectionCommand *cmd) {
- if (auto *isd = dyn_cast<InputSectionDescription>(cmd))
- return !isd->sections.empty();
- return false;
- });
- if (i == sec->commands.end())
- continue;
- InputSectionBase *isec = cast<InputSectionDescription>(*i)->sections[0];
-
- // Relocations are not using REL[A] section symbols.
- if (isec->type == SHT_REL || isec->type == SHT_RELA)
- continue;
-
- // Unlike other synthetic sections, mergeable output sections contain data
- // copied from input sections, and there may be a relocation pointing to its
- // contents if -r or --emit-reloc is given.
- if (isa<SyntheticSection>(isec) && !(isec->flags & SHF_MERGE))
+ OutputSection &osec = *sec;
+ InputSectionBase *isec = nullptr;
+ // Iterate over all input sections and add a STT_SECTION symbol if any input
+ // section may be a relocation target.
+ for (SectionCommand *cmd : osec.commands) {
+ auto *isd = dyn_cast<InputSectionDescription>(cmd);
+ if (!isd)
+ continue;
+ for (InputSectionBase *s : isd->sections) {
+ // Relocations are not using REL[A] section symbols.
+ if (s->type == SHT_REL || s->type == SHT_RELA)
+ continue;
+
+ // Unlike other synthetic sections, mergeable output sections contain
+ // data copied from input sections, and there may be a relocation
+ // pointing to its contents if -r or --emit-reloc is given.
+ if (isa<SyntheticSection>(s) && !(s->flags & SHF_MERGE))
+ continue;
+
+ isec = s;
+ break;
+ }
+ }
+ if (!isec)
continue;
// Set the symbol to be relative to the output section so that its st_value
diff --git a/contrib/llvm-project/llvm/include/llvm/CodeGen/FastISel.h b/contrib/llvm-project/llvm/include/llvm/CodeGen/FastISel.h
index 775698a66ada..6de8ac4273f7 100644
--- a/contrib/llvm-project/llvm/include/llvm/CodeGen/FastISel.h
+++ b/contrib/llvm-project/llvm/include/llvm/CodeGen/FastISel.h
@@ -212,6 +212,7 @@ protected:
const TargetRegisterInfo &TRI;
const TargetLibraryInfo *LibInfo;
bool SkipTargetIndependentISel;
+ bool UseInstrRefDebugInfo = false;
/// The position of the last instruction for materializing constants
/// for use in the current block. It resets to EmitStartPt when it makes sense
@@ -318,6 +319,12 @@ public:
/// Reset InsertPt to the given old insert position.
void leaveLocalValueArea(SavePoint Old);
+ /// Signal whether instruction referencing variable locations are desired for
+ /// this function's debug-info.
+ void useInstrRefDebugInfo(bool Flag) {
+ UseInstrRefDebugInfo = Flag;
+ }
+
protected:
explicit FastISel(FunctionLoweringInfo &FuncInfo,
const TargetLibraryInfo *LibInfo,
diff --git a/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAG.h b/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAG.h
index e31719bcff0b..4f348c9feaa5 100644
--- a/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAG.h
+++ b/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAG.h
@@ -278,6 +278,9 @@ class SelectionDAG {
uint16_t NextPersistentId = 0;
+ /// Are instruction referencing variable locations desired for this function?
+ bool UseInstrRefDebugInfo = false;
+
public:
/// Clients of various APIs that cause global effects on
/// the DAG can optionally implement this interface. This allows the clients
@@ -1702,6 +1705,16 @@ public:
/// function mirrors \c llvm::salvageDebugInfo.
void salvageDebugInfo(SDNode &N);
+ /// Signal whether instruction referencing variable locations are desired for
+ /// this function's debug-info.
+ void useInstrRefDebugInfo(bool Flag) {
+ UseInstrRefDebugInfo = Flag;
+ }
+
+ bool getUseInstrRefDebugInfo() const {
+ return UseInstrRefDebugInfo;
+ }
+
void dump() const;
/// In most cases this function returns the ABI alignment for a given type,
diff --git a/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAGISel.h b/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAGISel.h
index 9cea197724cc..fc3fdf3e4583 100644
--- a/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAGISel.h
+++ b/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAGISel.h
@@ -53,6 +53,7 @@ public:
const TargetLowering *TLI;
bool FastISelFailed;
SmallPtrSet<const Instruction *, 4> ElidedArgCopyInstrs;
+ bool UseInstrRefDebugInfo = false;
/// Current optimization remark emitter.
/// Used to report things like combines and FastISel failures.
diff --git a/contrib/llvm-project/llvm/lib/CodeGen/MachineFunction.cpp b/contrib/llvm-project/llvm/lib/CodeGen/MachineFunction.cpp
index fd5ea5cad072..02f58ca5eef0 100644
--- a/contrib/llvm-project/llvm/lib/CodeGen/MachineFunction.cpp
+++ b/contrib/llvm-project/llvm/lib/CodeGen/MachineFunction.cpp
@@ -1181,9 +1181,6 @@ void MachineFunction::finalizeDebugInstrRefs() {
MI.getOperand(1).ChangeToRegister(0, false);
};
- if (!useDebugInstrRef())
- return;
-
for (auto &MBB : *this) {
for (auto &MI : MBB) {
if (!MI.isDebugRef() || !MI.getOperand(0).isReg())
diff --git a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
index d8ef79fe9a7b..87a1ebe4c1db 100644
--- a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -1265,7 +1265,7 @@ bool FastISel::selectIntrinsicCall(const IntrinsicInst *II) {
// If using instruction referencing, mutate this into a DBG_INSTR_REF,
// to be later patched up by finalizeDebugInstrRefs. Tack a deref onto
// the expression, we don't have an "indirect" flag in DBG_INSTR_REF.
- if (FuncInfo.MF->useDebugInstrRef() && Op->isReg()) {
+ if (UseInstrRefDebugInfo && Op->isReg()) {
Builder->setDesc(TII.get(TargetOpcode::DBG_INSTR_REF));
Builder->getOperand(1).ChangeToImmediate(0);
auto *NewExpr =
@@ -1324,7 +1324,7 @@ bool FastISel::selectIntrinsicCall(const IntrinsicInst *II) {
// If using instruction referencing, mutate this into a DBG_INSTR_REF,
// to be later patched up by finalizeDebugInstrRefs.
- if (FuncInfo.MF->useDebugInstrRef()) {
+ if (UseInstrRefDebugInfo) {
Builder->setDesc(TII.get(TargetOpcode::DBG_INSTR_REF));
Builder->getOperand(1).ChangeToImmediate(0);
}
diff --git a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
index 331e0325aea3..e3e05c868102 100644
--- a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
+++ b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
@@ -1341,11 +1341,12 @@ EmitSpecialNode(SDNode *Node, bool IsClone, bool IsCloned,
/// InstrEmitter - Construct an InstrEmitter and set it to start inserting
/// at the given position in the given block.
InstrEmitter::InstrEmitter(const TargetMachine &TM, MachineBasicBlock *mbb,
- MachineBasicBlock::iterator insertpos)
+ MachineBasicBlock::iterator insertpos,
+ bool UseInstrRefDebugInfo)
: MF(mbb->getParent()), MRI(&MF->getRegInfo()),
TII(MF->getSubtarget().getInstrInfo()),
TRI(MF->getSubtarget().getRegisterInfo()),
TLI(MF->getSubtarget().getTargetLowering()), MBB(mbb),
InsertPos(insertpos) {
- EmitDebugInstrRefs = MF->useDebugInstrRef();
+ EmitDebugInstrRefs = UseInstrRefDebugInfo;
}
diff --git a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h
index ac8a70156522..ced8f064b9be 100644
--- a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h
+++ b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h
@@ -154,7 +154,8 @@ public:
/// InstrEmitter - Construct an InstrEmitter and set it to start inserting
/// at the given position in the given block.
InstrEmitter(const TargetMachine &TM, MachineBasicBlock *mbb,
- MachineBasicBlock::iterator insertpos);
+ MachineBasicBlock::iterator insertpos,
+ bool UseInstrRefDebugInfo);
private:
void EmitMachineNode(SDNode *Node, bool IsClone, bool IsCloned,
diff --git a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
index 1b89864116cb..1a6be0cc2091 100644
--- a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
+++ b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
@@ -758,7 +758,8 @@ void ScheduleDAGLinearize::Schedule() {
MachineBasicBlock*
ScheduleDAGLinearize::EmitSchedule(MachineBasicBlock::iterator &InsertPos) {
- InstrEmitter Emitter(DAG->getTarget(), BB, InsertPos);
+ InstrEmitter Emitter(DAG->getTarget(), BB, InsertPos,
+ DAG->getUseInstrRefDebugInfo());
DenseMap<SDValue, Register> VRBaseMap;
LLVM_DEBUG({ dbgs() << "\n*** Final schedule ***\n"; });
diff --git a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
index 55f6f288f3e3..92897aca7f6b 100644
--- a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
+++ b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
@@ -843,7 +843,8 @@ EmitPhysRegCopy(SUnit *SU, DenseMap<SUnit*, Register> &VRBaseMap,
/// not necessarily refer to returned BB. The emitter may split blocks.
MachineBasicBlock *ScheduleDAGSDNodes::
EmitSchedule(MachineBasicBlock::iterator &InsertPos) {
- InstrEmitter Emitter(DAG->getTarget(), BB, InsertPos);
+ InstrEmitter Emitter(DAG->getTarget(), BB, InsertPos,
+ DAG->getUseInstrRefDebugInfo());
DenseMap<SDValue, Register> VRBaseMap;
DenseMap<SUnit*, Register> CopyVRBaseMap;
SmallVector<std::pair<unsigned, MachineInstr*>, 32> Orders;
diff --git a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index d5998d166d25..40d861702e86 100644
--- a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -5494,8 +5494,18 @@ SDValue SelectionDAG::FoldConstantArithmetic(unsigned Opcode, const SDLoc &DL,
// Build vector (integer) scalar operands may need implicit
// truncation - do this before constant folding.
- if (ScalarVT.isInteger() && ScalarVT.bitsGT(InSVT))
+ if (ScalarVT.isInteger() && ScalarVT.bitsGT(InSVT)) {
+ // Don't create illegally-typed nodes unless they're constants or undef
+ // - if we fail to constant fold we can't guarantee the (dead) nodes
+ // we're creating will be cleaned up before being visited for
+ // legalization.
+ if (NewNodesMustHaveLegalTypes && !ScalarOp.isUndef() &&
+ !isa<ConstantSDNode>(ScalarOp) &&
+ TLI->getTypeAction(*getContext(), InSVT) !=
+ TargetLowering::TypeLegal)
+ return SDValue();
ScalarOp = getNode(ISD::TRUNCATE, DL, InSVT, ScalarOp);
+ }
ScalarOps.push_back(ScalarOp);
}
diff --git a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index 01230a36e744..c61716ba1676 100644
--- a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -926,7 +926,10 @@ void RegsForValue::getCopyToRegs(SDValue Val, SelectionDAG &DAG,
CallConv.getValue(), RegVTs[Value])
: RegVTs[Value];
- if (ExtendKind == ISD::ANY_EXTEND && TLI.isZExtFree(Val, RegisterVT))
+ // We need to zero extend constants that are liveout to match assumptions
+ // in FunctionLoweringInfo::ComputePHILiveOutRegInfo.
+ if (ExtendKind == ISD::ANY_EXTEND &&
+ (TLI.isZExtFree(Val, RegisterVT) || isa<ConstantSDNode>(Val)))
ExtendKind = ISD::ZERO_EXTEND;
getCopyToParts(DAG, dl, Val.getValue(Val.getResNo() + Value), &Parts[Part],
diff --git a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 3c786904620a..b83a60129c78 100644
--- a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -425,6 +425,11 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) {
const Function &Fn = mf.getFunction();
MF = &mf;
+ // Decide what flavour of variable location debug-info will be used, before
+ // we change the optimisation level.
+ UseInstrRefDebugInfo = mf.useDebugInstrRef();
+ CurDAG->useInstrRefDebugInfo(UseInstrRefDebugInfo);
+
// Reset the target options before resetting the optimization
// level below.
// FIXME: This is a horrible hack and should be processed via
@@ -654,7 +659,8 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) {
// For debug-info, in instruction referencing mode, we need to perform some
// post-isel maintenence.
- MF->finalizeDebugInstrRefs();
+ if (UseInstrRefDebugInfo)
+ MF->finalizeDebugInstrRefs();
// Determine if there are any calls in this machine function.
MachineFrameInfo &MFI = MF->getFrameInfo();
@@ -1380,6 +1386,8 @@ void SelectionDAGISel::SelectAllBasicBlocks(const Function &Fn) {
if (TM.Options.EnableFastISel) {
LLVM_DEBUG(dbgs() << "Enabling fast-isel\n");
FastIS = TLI->createFastISel(*FuncInfo, LibInfo);
+ if (FastIS)
+ FastIS->useInstrRefDebugInfo(UseInstrRefDebugInfo);
}
ReversePostOrderTraversal<const Function*> RPOT(&Fn);
diff --git a/contrib/llvm-project/llvm/lib/MC/ELFObjectWriter.cpp b/contrib/llvm-project/llvm/lib/MC/ELFObjectWriter.cpp
index 883735fcc293..6fd2f7e7a718 100644
--- a/contrib/llvm-project/llvm/lib/MC/ELFObjectWriter.cpp
+++ b/contrib/llvm-project/llvm/lib/MC/ELFObjectWriter.cpp
@@ -1336,6 +1336,7 @@ bool ELFObjectWriter::shouldRelocateWithSymbol(const MCAssembler &Asm,
// can update it.
return true;
case ELF::STB_GLOBAL:
+ case ELF::STB_GNU_UNIQUE:
// Global ELF symbols can be preempted by the dynamic linker. The relocation
// has to point to the symbol for a reason analogous to the STB_WEAK case.
return true;
diff --git a/contrib/llvm-project/llvm/lib/Object/ELF.cpp b/contrib/llvm-project/llvm/lib/Object/ELF.cpp
index 6e56da1a31f3..56a426211755 100644
--- a/contrib/llvm-project/llvm/lib/Object/ELF.cpp
+++ b/contrib/llvm-project/llvm/lib/Object/ELF.cpp
@@ -561,11 +561,9 @@ Expected<typename ELFT::DynRange> ELFFile<ELFT>::dynamicEntries() const {
}
if (Dyn.empty())
- // TODO: this error is untested.
return createError("invalid empty dynamic section");
if (Dyn.back().d_tag != ELF::DT_NULL)
- // TODO: this error is untested.
return createError("dynamic sections must be DT_NULL terminated");
return Dyn;
diff --git a/contrib/llvm-project/llvm/lib/Support/AArch64TargetParser.cpp b/contrib/llvm-project/llvm/lib/Support/AArch64TargetParser.cpp
index cdf7c8ade9aa..bb19e2714be1 100644
--- a/contrib/llvm-project/llvm/lib/Support/AArch64TargetParser.cpp
+++ b/contrib/llvm-project/llvm/lib/Support/AArch64TargetParser.cpp
@@ -120,6 +120,8 @@ bool AArch64::getExtensionFeatures(uint64_t Extensions,
Features.push_back("+mops");
if (Extensions & AArch64::AEK_PERFMON)
Features.push_back("+perfmon");
+ if (Extensions & AArch64::AEK_SSBS)
+ Features.push_back("+ssbs");
return true;
}
diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64.td b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64.td
index 9a04b28a8b8f..70c7b7b3f5dc 100644
--- a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64.td
+++ b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64.td
@@ -464,6 +464,11 @@ def FeatureEL3 : SubtargetFeature<"el3", "HasEL3", "true",
def FeatureFixCortexA53_835769 : SubtargetFeature<"fix-cortex-a53-835769",
"FixCortexA53_835769", "true", "Mitigate Cortex-A53 Erratum 835769">;
+def FeatureNoBTIAtReturnTwice : SubtargetFeature<"no-bti-at-return-twice",
+ "NoBTIAtReturnTwice", "true",
+ "Don't place a BTI instruction "
+ "after a return-twice">;
+
//===----------------------------------------------------------------------===//
// Architectures.
//
@@ -953,7 +958,7 @@ def ProcessorFeatures {
FeatureRCPC, FeatureSSBS];
list<SubtargetFeature> A77 = [HasV8_2aOps, FeatureCrypto, FeatureFPARMv8,
FeatureNEON, FeatureFullFP16, FeatureDotProd,
- FeatureRCPC];
+ FeatureRCPC, FeatureSSBS];
list<SubtargetFeature> A78 = [HasV8_2aOps, FeatureCrypto, FeatureFPARMv8,
FeatureNEON, FeatureFullFP16, FeatureDotProd,
FeatureRCPC, FeaturePerfMon, FeatureSPE,
@@ -971,11 +976,12 @@ def ProcessorFeatures {
FeatureSB, FeatureSpecRestrict];
list<SubtargetFeature> X1 = [HasV8_2aOps, FeatureCrypto, FeatureFPARMv8,
FeatureNEON, FeatureRCPC, FeaturePerfMon,
- FeatureSPE, FeatureFullFP16, FeatureDotProd];
+ FeatureSPE, FeatureFullFP16, FeatureDotProd,
+ FeatureSSBS];
list<SubtargetFeature> X1C = [HasV8_2aOps, FeatureCrypto, FeatureFPARMv8,
FeatureNEON, FeatureRCPC, FeaturePerfMon,
FeatureSPE, FeatureFullFP16, FeatureDotProd,
- FeaturePAuth];
+ FeaturePAuth, FeatureSSBS];
list<SubtargetFeature> X2 = [HasV9_0aOps, FeatureNEON, FeaturePerfMon,
FeatureMatMulInt8, FeatureBF16, FeatureAM,
FeatureMTE, FeatureETE, FeatureSVE2BitPerm,
diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64CollectLOH.cpp b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64CollectLOH.cpp
index ac243347b24d..b31b709c0c0a 100644
--- a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64CollectLOH.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64CollectLOH.cpp
@@ -559,7 +559,7 @@ bool AArch64CollectLOH::runOnMachineFunction(MachineFunction &MF) {
// Walk the basic block backwards and update the per register state machine
// in the process.
for (const MachineInstr &MI :
- instructionsWithoutDebug(MBB.rbegin(), MBB.rend())) {
+ instructionsWithoutDebug(MBB.instr_rbegin(), MBB.instr_rend())) {
unsigned Opcode = MI.getOpcode();
switch (Opcode) {
case AArch64::ADDXri:
diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp
index b0f739cc26e6..910f8cdede75 100644
--- a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp
@@ -86,6 +86,7 @@ private:
unsigned N);
bool expandCALL_RVMARKER(MachineBasicBlock &MBB,
MachineBasicBlock::iterator MBBI);
+ bool expandCALL_BTI(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI);
bool expandStoreSwiftAsyncContext(MachineBasicBlock &MBB,
MachineBasicBlock::iterator MBBI);
};
@@ -759,6 +760,37 @@ bool AArch64ExpandPseudo::expandCALL_RVMARKER(
return true;
}
+bool AArch64ExpandPseudo::expandCALL_BTI(MachineBasicBlock &MBB,
+ MachineBasicBlock::iterator MBBI) {
+ // Expand CALL_BTI pseudo to:
+ // - a branch to the call target
+ // - a BTI instruction
+ // Mark the sequence as a bundle, to avoid passes moving other code in
+ // between.
+
+ MachineInstr &MI = *MBBI;
+ MachineOperand &CallTarget = MI.getOperand(0);
+ assert((CallTarget.isGlobal() || CallTarget.isReg()) &&
+ "invalid operand for regular call");
+ unsigned Opc = CallTarget.isGlobal() ? AArch64::BL : AArch64::BLR;
+ MachineInstr *Call =
+ BuildMI(MBB, MBBI, MI.getDebugLoc(), TII->get(Opc)).getInstr();
+ Call->addOperand(CallTarget);
+
+ MachineInstr *BTI =
+ BuildMI(MBB, MBBI, MI.getDebugLoc(), TII->get(AArch64::HINT))
+ // BTI J so that setjmp can to BR to this.
+ .addImm(36)
+ .getInstr();
+
+ if (MI.shouldUpdateCallSiteInfo())
+ MBB.getParent()->moveCallSiteInfo(&MI, Call);
+
+ MI.eraseFromParent();
+ finalizeBundle(MBB, Call->getIterator(), std::next(BTI->getIterator()));
+ return true;
+}
+
bool AArch64ExpandPseudo::expandStoreSwiftAsyncContext(
MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI) {
Register CtxReg = MBBI->getOperand(0).getReg();
@@ -1238,6 +1270,8 @@ bool AArch64ExpandPseudo::expandMI(MachineBasicBlock &MBB,
return expandSVESpillFill(MBB, MBBI, AArch64::LDR_ZXI, 2);
case AArch64::BLR_RVMARKER:
return expandCALL_RVMARKER(MBB, MBBI);
+ case AArch64::BLR_BTI:
+ return expandCALL_BTI(MBB, MBBI);
case AArch64::StoreSwiftAsyncContext:
return expandStoreSwiftAsyncContext(MBB, MBBI);
}
diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FastISel.cpp b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FastISel.cpp
index c67fa62c7a92..dc5e6807945d 100644
--- a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FastISel.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FastISel.cpp
@@ -14,6 +14,7 @@
#include "AArch64.h"
#include "AArch64CallingConvention.h"
+#include "AArch64MachineFunctionInfo.h"
#include "AArch64RegisterInfo.h"
#include "AArch64Subtarget.h"
#include "MCTargetDesc/AArch64AddressingModes.h"
@@ -3127,6 +3128,13 @@ bool AArch64FastISel::fastLowerCall(CallLoweringInfo &CLI) {
if (!Callee && !Symbol)
return false;
+ // Allow SelectionDAG isel to handle calls to functions like setjmp that need
+ // a bti instruction following the call.
+ if (CLI.CB && CLI.CB->hasFnAttr(Attribute::ReturnsTwice) &&
+ !Subtarget->noBTIAtReturnTwice() &&
+ MF->getInfo<AArch64FunctionInfo>()->branchTargetEnforcement())
+ return false;
+
// Allow SelectionDAG isel to handle tail calls.
if (IsTailCall)
return false;
diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
index ac5e51e47ddf..4d1cb0720a5a 100644
--- a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -2278,6 +2278,7 @@ const char *AArch64TargetLowering::getTargetNodeName(unsigned Opcode) const {
MAKE_CASE(AArch64ISD::MOPS_MEMSET_TAGGING)
MAKE_CASE(AArch64ISD::MOPS_MEMCOPY)
MAKE_CASE(AArch64ISD::MOPS_MEMMOVE)
+ MAKE_CASE(AArch64ISD::CALL_BTI)
}
#undef MAKE_CASE
return nullptr;
@@ -5843,14 +5844,62 @@ static bool mayTailCallThisCC(CallingConv::ID CC) {
}
}
+static void analyzeCallOperands(const AArch64TargetLowering &TLI,
+ const AArch64Subtarget *Subtarget,
+ const TargetLowering::CallLoweringInfo &CLI,
+ CCState &CCInfo) {
+ const SelectionDAG &DAG = CLI.DAG;
+ CallingConv::ID CalleeCC = CLI.CallConv;
+ bool IsVarArg = CLI.IsVarArg;
+ const SmallVector<ISD::OutputArg, 32> &Outs = CLI.Outs;
+ bool IsCalleeWin64 = Subtarget->isCallingConvWin64(CalleeCC);
+
+ unsigned NumArgs = Outs.size();
+ for (unsigned i = 0; i != NumArgs; ++i) {
+ MVT ArgVT = Outs[i].VT;
+ ISD::ArgFlagsTy ArgFlags = Outs[i].Flags;
+
+ bool UseVarArgCC = false;
+ if (IsVarArg) {
+ // On Windows, the fixed arguments in a vararg call are passed in GPRs
+ // too, so use the vararg CC to force them to integer registers.
+ if (IsCalleeWin64) {
+ UseVarArgCC = true;
+ } else {
+ UseVarArgCC = !Outs[i].IsFixed;
+ }
+ } else {
+ // Get type of the original argument.
+ EVT ActualVT =
+ TLI.getValueType(DAG.getDataLayout(), CLI.Args[Outs[i].OrigArgIndex].Ty,
+ /*AllowUnknown*/ true);
+ MVT ActualMVT = ActualVT.isSimple() ? ActualVT.getSimpleVT() : ArgVT;
+ // If ActualMVT is i1/i8/i16, we should set LocVT to i8/i8/i16.
+ if (ActualMVT == MVT::i1 || ActualMVT == MVT::i8)
+ ArgVT = MVT::i8;
+ else if (ActualMVT == MVT::i16)
+ ArgVT = MVT::i16;
+ }
+
+ CCAssignFn *AssignFn = TLI.CCAssignFnForCall(CalleeCC, UseVarArgCC);
+ bool Res = AssignFn(i, ArgVT, ArgVT, CCValAssign::Full, ArgFlags, CCInfo);
+ assert(!Res && "Call operand has unhandled type");
+ (void)Res;
+ }
+}
+
bool AArch64TargetLowering::isEligibleForTailCallOptimization(
- SDValue Callee, CallingConv::ID CalleeCC, bool isVarArg,
- const SmallVectorImpl<ISD::OutputArg> &Outs,
- const SmallVectorImpl<SDValue> &OutVals,
- const SmallVectorImpl<ISD::InputArg> &Ins, SelectionDAG &DAG) const {
+ const CallLoweringInfo &CLI) const {
+ CallingConv::ID CalleeCC = CLI.CallConv;
if (!mayTailCallThisCC(CalleeCC))
return false;
+ SDValue Callee = CLI.Callee;
+ bool IsVarArg = CLI.IsVarArg;
+ const SmallVector<ISD::OutputArg, 32> &Outs = CLI.Outs;
+ const SmallVector<SDValue, 32> &OutVals = CLI.OutVals;
+ const SmallVector<ISD::InputArg, 32> &Ins = CLI.Ins;
+ const SelectionDAG &DAG = CLI.DAG;
MachineFunction &MF = DAG.getMachineFunction();
const Function &CallerF = MF.getFunction();
CallingConv::ID CallerCC = CallerF.getCallingConv();
@@ -5915,30 +5964,14 @@ bool AArch64TargetLowering::isEligibleForTailCallOptimization(
// I want anyone implementing a new calling convention to think long and hard
// about this assert.
- assert((!isVarArg || CalleeCC == CallingConv::C) &&
+ assert((!IsVarArg || CalleeCC == CallingConv::C) &&
"Unexpected variadic calling convention");
LLVMContext &C = *DAG.getContext();
- if (isVarArg && !Outs.empty()) {
- // At least two cases here: if caller is fastcc then we can't have any
- // memory arguments (we'd be expected to clean up the stack afterwards). If
- // caller is C then we could potentially use its argument area.
-
- // FIXME: for now we take the most conservative of these in both cases:
- // disallow all variadic memory operands.
- SmallVector<CCValAssign, 16> ArgLocs;
- CCState CCInfo(CalleeCC, isVarArg, MF, ArgLocs, C);
-
- CCInfo.AnalyzeCallOperands(Outs, CCAssignFnForCall(CalleeCC, true));
- for (const CCValAssign &ArgLoc : ArgLocs)
- if (!ArgLoc.isRegLoc())
- return false;
- }
-
// Check that the call results are passed in the same way.
if (!CCState::resultsCompatible(CalleeCC, CallerCC, MF, C, Ins,
- CCAssignFnForCall(CalleeCC, isVarArg),
- CCAssignFnForCall(CallerCC, isVarArg)))
+ CCAssignFnForCall(CalleeCC, IsVarArg),
+ CCAssignFnForCall(CallerCC, IsVarArg)))
return false;
// The callee has to preserve all registers the caller needs to preserve.
const AArch64RegisterInfo *TRI = Subtarget->getRegisterInfo();
@@ -5958,9 +5991,22 @@ bool AArch64TargetLowering::isEligibleForTailCallOptimization(
return true;
SmallVector<CCValAssign, 16> ArgLocs;
- CCState CCInfo(CalleeCC, isVarArg, MF, ArgLocs, C);
+ CCState CCInfo(CalleeCC, IsVarArg, MF, ArgLocs, C);
- CCInfo.AnalyzeCallOperands(Outs, CCAssignFnForCall(CalleeCC, isVarArg));
+ analyzeCallOperands(*this, Subtarget, CLI, CCInfo);
+
+ if (IsVarArg && !(CLI.CB && CLI.CB->isMustTailCall())) {
+ // When we are musttail, additional checks have been done and we can safely ignore this check
+ // At least two cases here: if caller is fastcc then we can't have any
+ // memory arguments (we'd be expected to clean up the stack afterwards). If
+ // caller is C then we could potentially use its argument area.
+
+ // FIXME: for now we take the most conservative of these in both cases:
+ // disallow all variadic memory operands.
+ for (const CCValAssign &ArgLoc : ArgLocs)
+ if (!ArgLoc.isRegLoc())
+ return false;
+ }
const AArch64FunctionInfo *FuncInfo = MF.getInfo<AArch64FunctionInfo>();
@@ -6051,7 +6097,7 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI,
SDValue Chain = CLI.Chain;
SDValue Callee = CLI.Callee;
bool &IsTailCall = CLI.IsTailCall;
- CallingConv::ID CallConv = CLI.CallConv;
+ CallingConv::ID &CallConv = CLI.CallConv;
bool IsVarArg = CLI.IsVarArg;
MachineFunction &MF = DAG.getMachineFunction();
@@ -6061,7 +6107,12 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI,
AArch64FunctionInfo *FuncInfo = MF.getInfo<AArch64FunctionInfo>();
bool TailCallOpt = MF.getTarget().Options.GuaranteedTailCallOpt;
bool IsSibCall = false;
- bool IsCalleeWin64 = Subtarget->isCallingConvWin64(CallConv);
+ bool GuardWithBTI = false;
+
+ if (CLI.CB && CLI.CB->getAttributes().hasFnAttr(Attribute::ReturnsTwice) &&
+ !Subtarget->noBTIAtReturnTwice()) {
+ GuardWithBTI = FuncInfo->branchTargetEnforcement();
+ }
// Check callee args/returns for SVE registers and set calling convention
// accordingly.
@@ -6079,8 +6130,7 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI,
if (IsTailCall) {
// Check if it's really possible to do a tail call.
- IsTailCall = isEligibleForTailCallOptimization(
- Callee, CallConv, IsVarArg, Outs, OutVals, Ins, DAG);
+ IsTailCall = isEligibleForTailCallOptimization(CLI);
// A sibling call is one where we're under the usual C ABI and not planning
// to change that but can still do a tail call:
@@ -6101,56 +6151,17 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI,
CCState CCInfo(CallConv, IsVarArg, MF, ArgLocs, *DAG.getContext());
if (IsVarArg) {
- // Handle fixed and variable vector arguments differently.
- // Variable vector arguments always go into memory.
unsigned NumArgs = Outs.size();
for (unsigned i = 0; i != NumArgs; ++i) {
- MVT ArgVT = Outs[i].VT;
- if (!Outs[i].IsFixed && ArgVT.isScalableVector())
+ if (!Outs[i].IsFixed && Outs[i].VT.isScalableVector())
report_fatal_error("Passing SVE types to variadic functions is "
"currently not supported");
-
- ISD::ArgFlagsTy ArgFlags = Outs[i].Flags;
- bool UseVarArgCC = !Outs[i].IsFixed;
- // On Windows, the fixed arguments in a vararg call are passed in GPRs
- // too, so use the vararg CC to force them to integer registers.
- if (IsCalleeWin64)
- UseVarArgCC = true;
- CCAssignFn *AssignFn = CCAssignFnForCall(CallConv, UseVarArgCC);
- bool Res = AssignFn(i, ArgVT, ArgVT, CCValAssign::Full, ArgFlags, CCInfo);
- assert(!Res && "Call operand has unhandled type");
- (void)Res;
- }
- } else {
- // At this point, Outs[].VT may already be promoted to i32. To correctly
- // handle passing i8 as i8 instead of i32 on stack, we pass in both i32 and
- // i8 to CC_AArch64_AAPCS with i32 being ValVT and i8 being LocVT.
- // Since AnalyzeCallOperands uses Ins[].VT for both ValVT and LocVT, here
- // we use a special version of AnalyzeCallOperands to pass in ValVT and
- // LocVT.
- unsigned NumArgs = Outs.size();
- for (unsigned i = 0; i != NumArgs; ++i) {
- MVT ValVT = Outs[i].VT;
- // Get type of the original argument.
- EVT ActualVT = getValueType(DAG.getDataLayout(),
- CLI.getArgs()[Outs[i].OrigArgIndex].Ty,
- /*AllowUnknown*/ true);
- MVT ActualMVT = ActualVT.isSimple() ? ActualVT.getSimpleVT() : ValVT;
- ISD::ArgFlagsTy ArgFlags = Outs[i].Flags;
- // If ActualMVT is i1/i8/i16, we should set LocVT to i8/i8/i16.
- if (ActualMVT == MVT::i1 || ActualMVT == MVT::i8)
- ValVT = MVT::i8;
- else if (ActualMVT == MVT::i16)
- ValVT = MVT::i16;
-
- CCAssignFn *AssignFn = CCAssignFnForCall(CallConv, /*IsVarArg=*/false);
- bool Res = AssignFn(i, ValVT, ValVT, CCValAssign::Full, ArgFlags, CCInfo);
- assert(!Res && "Call operand has unhandled type");
- (void)Res;
}
}
+ analyzeCallOperands(*this, Subtarget, CLI, CCInfo);
+
// Get a count of how many bytes are to be pushed on the stack.
unsigned NumBytes = CCInfo.getNextStackOffset();
@@ -6536,7 +6547,8 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI,
Function *ARCFn = *objcarc::getAttachedARCFunction(CLI.CB);
auto GA = DAG.getTargetGlobalAddress(ARCFn, DL, PtrVT);
Ops.insert(Ops.begin() + 1, GA);
- }
+ } else if (GuardWithBTI)
+ CallOpc = AArch64ISD::CALL_BTI;
// Returns a chain and a flag for retval copy to use.
Chain = DAG.getNode(CallOpc, DL, NodeTys, Ops);
@@ -17111,13 +17123,14 @@ static SDValue performGlobalAddressCombine(SDNode *N, SelectionDAG &DAG,
// Check whether folding this offset is legal. It must not go out of bounds of
// the referenced object to avoid violating the code model, and must be
- // smaller than 2^21 because this is the largest offset expressible in all
- // object formats.
+ // smaller than 2^20 because this is the largest offset expressible in all
+ // object formats. (The IMAGE_REL_ARM64_PAGEBASE_REL21 relocation in COFF
+ // stores an immediate signed 21 bit offset.)
//
// This check also prevents us from folding negative offsets, which will end
// up being treated in the same way as large positive ones. They could also
// cause code model violations, and aren't really common enough to matter.
- if (Offset >= (1 << 21))
+ if (Offset >= (1 << 20))
return SDValue();
const GlobalValue *GV = GN->getGlobal();
diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.h b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.h
index 2138c0ffe70a..80b7e84872cd 100644
--- a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.h
+++ b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.h
@@ -55,6 +55,8 @@ enum NodeType : unsigned {
// x29, x29` marker instruction.
CALL_RVMARKER,
+ CALL_BTI, // Function call followed by a BTI instruction.
+
// Produces the full sequence of instructions for getting the thread pointer
// offset of a variable into X0, using the TLSDesc model.
TLSDESC_CALLSEQ,
@@ -898,11 +900,8 @@ private:
SDValue LowerINTRINSIC_W_CHAIN(SDValue Op, SelectionDAG &DAG) const;
SDValue LowerINTRINSIC_WO_CHAIN(SDValue Op, SelectionDAG &DAG) const;
- bool isEligibleForTailCallOptimization(
- SDValue Callee, CallingConv::ID CalleeCC, bool isVarArg,
- const SmallVectorImpl<ISD::OutputArg> &Outs,
- const SmallVectorImpl<SDValue> &OutVals,
- const SmallVectorImpl<ISD::InputArg> &Ins, SelectionDAG &DAG) const;
+ bool
+ isEligibleForTailCallOptimization(const CallLoweringInfo &CLI) const;
/// Finds the incoming stack arguments which overlap the given fixed stack
/// object and incorporates their load into the current chain. This prevents
diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64InstrInfo.td b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64InstrInfo.td
index 1316161f05f1..2680b5ac094e 100644
--- a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64InstrInfo.td
+++ b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64InstrInfo.td
@@ -473,6 +473,11 @@ def AArch64call : SDNode<"AArch64ISD::CALL",
[SDNPHasChain, SDNPOptInGlue, SDNPOutGlue,
SDNPVariadic]>;
+def AArch64call_bti : SDNode<"AArch64ISD::CALL_BTI",
+ SDTypeProfile<0, -1, [SDTCisPtrTy<0>]>,
+ [SDNPHasChain, SDNPOptInGlue, SDNPOutGlue,
+ SDNPVariadic]>;
+
def AArch64call_rvmarker: SDNode<"AArch64ISD::CALL_RVMARKER",
SDTypeProfile<0, -1, [SDTCisPtrTy<0>]>,
[SDNPHasChain, SDNPOptInGlue, SDNPOutGlue,
@@ -2320,6 +2325,8 @@ let isCall = 1, Defs = [LR], Uses = [SP] in {
PseudoInstExpansion<(BLR GPR64:$Rn)>;
def BLR_RVMARKER : Pseudo<(outs), (ins variable_ops), []>,
Sched<[WriteBrReg]>;
+ def BLR_BTI : Pseudo<(outs), (ins variable_ops), []>,
+ Sched<[WriteBrReg]>;
} // isCall
def : Pat<(AArch64call GPR64:$Rn),
@@ -2333,6 +2340,10 @@ def : Pat<(AArch64call_rvmarker (i64 tglobaladdr:$rvfunc), GPR64:$Rn),
(BLR_RVMARKER tglobaladdr:$rvfunc, GPR64:$Rn)>,
Requires<[NoSLSBLRMitigation]>;
+def : Pat<(AArch64call_bti GPR64:$Rn),
+ (BLR_BTI GPR64:$Rn)>,
+ Requires<[NoSLSBLRMitigation]>;
+
let isBranch = 1, isTerminator = 1, isBarrier = 1, isIndirectBranch = 1 in {
def BR : BranchReg<0b0000, "br", [(brind GPR64:$Rn)]>;
} // isBranch, isTerminator, isBarrier, isIndirectBranch
diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64Subtarget.h b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64Subtarget.h
index 7b2bbad30f85..061db926ee2b 100644
--- a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64Subtarget.h
+++ b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64Subtarget.h
@@ -243,6 +243,10 @@ protected:
// Enable 64-bit vectorization in SLP.
unsigned MinVectorRegisterBitWidth = 64;
+ // Do not place a BTI instruction after a call to a return twice function like
+ // setjmp.
+ bool NoBTIAtReturnTwice = false;
+
bool OutlineAtomics = false;
bool PredictableSelectIsExpensive = false;
bool BalanceFPOps = false;
@@ -588,6 +592,8 @@ public:
bool fixCortexA53_835769() const { return FixCortexA53_835769; }
+ bool noBTIAtReturnTwice() const { return NoBTIAtReturnTwice; }
+
bool addrSinkUsingGEPs() const override {
// Keeping GEPs inbounds is important for exploiting AArch64
// addressing-modes in ILP32 mode.
diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp b/contrib/llvm-project/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
index 33ed7ae9780e..8f71eb3095cf 100644
--- a/contrib/llvm-project/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
@@ -6515,21 +6515,13 @@ bool AArch64AsmParser::parseDirectiveCFIBKeyFrame() {
/// parseDirectiveVariantPCS
/// ::= .variant_pcs symbolname
bool AArch64AsmParser::parseDirectiveVariantPCS(SMLoc L) {
- const AsmToken &Tok = getTok();
- if (Tok.isNot(AsmToken::Identifier))
+ StringRef Name;
+ if (getParser().parseIdentifier(Name))
return TokError("expected symbol name");
-
- StringRef SymbolName = Tok.getIdentifier();
-
- MCSymbol *Sym = getContext().lookupSymbol(SymbolName);
- if (!Sym)
- return TokError("unknown symbol");
-
- Lex(); // Eat the symbol
-
if (parseEOL())
return true;
- getTargetStreamer().emitDirectiveVariantPCS(Sym);
+ getTargetStreamer().emitDirectiveVariantPCS(
+ getContext().getOrCreateSymbol(Name));
return false;
}
diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp b/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp
index 097b93e4fcca..bb6c7938791e 100644
--- a/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp
@@ -1127,14 +1127,22 @@ bool AArch64CallLowering::lowerCall(MachineIRBuilder &MIRBuilder,
// Create a temporarily-floating call instruction so we can add the implicit
// uses of arg registers.
- unsigned Opc = getCallOpcode(MF, Info.Callee.isReg(), false);
+ const AArch64Subtarget &Subtarget = MF.getSubtarget<AArch64Subtarget>();
+ unsigned Opc = 0;
+ // A call to a returns twice function like setjmp must be followed by a bti
+ // instruction.
+ if (Info.CB && Info.CB->getAttributes().hasFnAttr(Attribute::ReturnsTwice) &&
+ !Subtarget.noBTIAtReturnTwice() &&
+ MF.getInfo<AArch64FunctionInfo>()->branchTargetEnforcement())
+ Opc = AArch64::BLR_BTI;
+ else
+ Opc = getCallOpcode(MF, Info.Callee.isReg(), false);
auto MIB = MIRBuilder.buildInstrNoInsert(Opc);
MIB.add(Info.Callee);
// Tell the call which registers are clobbered.
const uint32_t *Mask;
- const AArch64Subtarget &Subtarget = MF.getSubtarget<AArch64Subtarget>();
const auto *TRI = Subtarget.getRegisterInfo();
AArch64OutgoingValueAssigner Assigner(AssignFnFixed, AssignFnVarArg,
diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64PreLegalizerCombiner.cpp b/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64PreLegalizerCombiner.cpp
index d3f4130d2ba1..3730030aa140 100644
--- a/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64PreLegalizerCombiner.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64PreLegalizerCombiner.cpp
@@ -162,13 +162,14 @@ static bool matchFoldGlobalOffset(MachineInstr &MI, MachineRegisterInfo &MRI,
// Check whether folding this offset is legal. It must not go out of bounds of
// the referenced object to avoid violating the code model, and must be
- // smaller than 2^21 because this is the largest offset expressible in all
- // object formats.
+ // smaller than 2^20 because this is the largest offset expressible in all
+ // object formats. (The IMAGE_REL_ARM64_PAGEBASE_REL21 relocation in COFF
+ // stores an immediate signed 21 bit offset.)
//
// This check also prevents us from folding negative offsets, which will end
// up being treated in the same way as large positive ones. They could also
// cause code model violations, and aren't really common enough to matter.
- if (NewOffset >= (1 << 21))
+ if (NewOffset >= (1 << 20))
return false;
Type *T = GV->getValueType();
diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp b/contrib/llvm-project/llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp
index 78c0e90b1384..46edb12959d2 100644
--- a/contrib/llvm-project/llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp
@@ -254,6 +254,7 @@ void AArch64TargetELFStreamer::emitInst(uint32_t Inst) {
}
void AArch64TargetELFStreamer::emitDirectiveVariantPCS(MCSymbol *Symbol) {
+ getStreamer().getAssembler().registerSymbol(*Symbol);
cast<MCSymbolELF>(Symbol)->setOther(ELF::STO_AARCH64_VARIANT_PCS);
}
diff --git a/contrib/llvm-project/llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp b/contrib/llvm-project/llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp
index 715cff72dcab..7113fe33b5d7 100644
--- a/contrib/llvm-project/llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp
@@ -341,31 +341,11 @@ public:
bool isU10Imm() const { return Kind == Immediate && isUInt<10>(getImm()); }
bool isU12Imm() const { return Kind == Immediate && isUInt<12>(getImm()); }
- bool isU16Imm() const {
- switch (Kind) {
- case Expression:
- return true;
- case Immediate:
- case ContextImmediate:
- return isUInt<16>(getImmU16Context());
- default:
- return false;
- }
- }
- bool isS16Imm() const {
- switch (Kind) {
- case Expression:
- return true;
- case Immediate:
- case ContextImmediate:
- return isInt<16>(getImmS16Context());
- default:
- return false;
- }
- }
- bool isS16ImmX4() const { return Kind == Expression ||
- (Kind == Immediate && isInt<16>(getImm()) &&
- (getImm() & 3) == 0); }
+ bool isU16Imm() const { return isExtImm<16>(/*Signed*/ false, 1); }
+ bool isS16Imm() const { return isExtImm<16>(/*Signed*/ true, 1); }
+ bool isS16ImmX4() const { return isExtImm<16>(/*Signed*/ true, 4); }
+ bool isS16ImmX16() const { return isExtImm<16>(/*Signed*/ true, 16); }
+ bool isS17Imm() const { return isExtImm<17>(/*Signed*/ true, 1); }
bool isHashImmX8() const {
// The Hash Imm form is used for instructions that check or store a hash.
@@ -375,9 +355,6 @@ public:
(getImm() & 7) == 0);
}
- bool isS16ImmX16() const { return Kind == Expression ||
- (Kind == Immediate && isInt<16>(getImm()) &&
- (getImm() & 15) == 0); }
bool isS34ImmX16() const {
return Kind == Expression ||
(Kind == Immediate && isInt<34>(getImm()) && (getImm() & 15) == 0);
@@ -388,17 +365,6 @@ public:
return Kind == Expression || (Kind == Immediate && isInt<34>(getImm()));
}
- bool isS17Imm() const {
- switch (Kind) {
- case Expression:
- return true;
- case Immediate:
- case ContextImmediate:
- return isInt<17>(getImmS16Context());
- default:
- return false;
- }
- }
bool isTLSReg() const { return Kind == TLSRegister; }
bool isDirectBr() const {
if (Kind == Expression)
@@ -712,6 +678,25 @@ public:
return CreateExpr(Val, S, E, IsPPC64);
}
+
+private:
+ template <unsigned Width>
+ bool isExtImm(bool Signed, unsigned Multiple) const {
+ switch (Kind) {
+ default:
+ return false;
+ case Expression:
+ return true;
+ case Immediate:
+ case ContextImmediate:
+ if (Signed)
+ return isInt<Width>(getImmS16Context()) &&
+ (getImmS16Context() & (Multiple - 1)) == 0;
+ else
+ return isUInt<Width>(getImmU16Context()) &&
+ (getImmU16Context() & (Multiple - 1)) == 0;
+ }
+ }
};
} // end anonymous namespace.
diff --git a/contrib/llvm-project/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp b/contrib/llvm-project/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp
index 9df94edc8cdf..2e678ffd58c2 100644
--- a/contrib/llvm-project/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp
@@ -44,6 +44,7 @@ static uint64_t adjustFixupValue(unsigned Kind, uint64_t Value) {
case PPC::fixup_ppc_half16:
return Value & 0xffff;
case PPC::fixup_ppc_half16ds:
+ case PPC::fixup_ppc_half16dq:
return Value & 0xfffc;
case PPC::fixup_ppc_pcrel34:
case PPC::fixup_ppc_imm34:
@@ -60,6 +61,7 @@ static unsigned getFixupKindNumBytes(unsigned Kind) {
case FK_Data_2:
case PPC::fixup_ppc_half16:
case PPC::fixup_ppc_half16ds:
+ case PPC::fixup_ppc_half16dq:
return 2;
case FK_Data_4:
case PPC::fixup_ppc_brcond14:
diff --git a/contrib/llvm-project/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp b/contrib/llvm-project/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp
index 94ef7b45434f..1e58039582c2 100644
--- a/contrib/llvm-project/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp
@@ -125,6 +125,7 @@ unsigned PPCELFObjectWriter::getRelocType(MCContext &Ctx, const MCValue &Target,
}
break;
case PPC::fixup_ppc_half16ds:
+ case PPC::fixup_ppc_half16dq:
Target.print(errs());
errs() << '\n';
report_fatal_error("Invalid PC-relative half16ds relocation");
@@ -349,6 +350,7 @@ unsigned PPCELFObjectWriter::getRelocType(MCContext &Ctx, const MCValue &Target,
}
break;
case PPC::fixup_ppc_half16ds:
+ case PPC::fixup_ppc_half16dq:
switch (Modifier) {
default: llvm_unreachable("Unsupported Modifier");
case MCSymbolRefExpr::VK_None:
diff --git a/contrib/llvm-project/llvm/lib/Target/PowerPC/MCTargetDesc/PPCFixupKinds.h b/contrib/llvm-project/llvm/lib/Target/PowerPC/MCTargetDesc/PPCFixupKinds.h
index 73292f7b7938..df0c666f5b11 100644
--- a/contrib/llvm-project/llvm/lib/Target/PowerPC/MCTargetDesc/PPCFixupKinds.h
+++ b/contrib/llvm-project/llvm/lib/Target/PowerPC/MCTargetDesc/PPCFixupKinds.h
@@ -51,6 +51,10 @@ enum Fixups {
/// register number.
fixup_ppc_nofixup,
+ /// A 16-bit fixup corresponding to lo16(_foo) with implied 3 zero bits for
+ /// instrs like 'lxv'. Produces the same relocation as fixup_ppc_half16ds.
+ fixup_ppc_half16dq,
+
// Marker
LastTargetFixupKind,
NumTargetFixupKinds = LastTargetFixupKind - FirstTargetFixupKind
diff --git a/contrib/llvm-project/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp b/contrib/llvm-project/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp
index 4dfa7d5e600c..d76795fcebc4 100644
--- a/contrib/llvm-project/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp
@@ -198,8 +198,8 @@ unsigned PPCMCCodeEmitter::getMemRIX16Encoding(const MCInst &MI, unsigned OpNo,
}
// Otherwise add a fixup for the displacement field.
- Fixups.push_back(MCFixup::create(IsLittleEndian? 0 : 2, MO.getExpr(),
- (MCFixupKind)PPC::fixup_ppc_half16ds));
+ Fixups.push_back(MCFixup::create(IsLittleEndian ? 0 : 2, MO.getExpr(),
+ (MCFixupKind)PPC::fixup_ppc_half16dq));
return RegBits;
}
diff --git a/contrib/llvm-project/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.cpp b/contrib/llvm-project/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.cpp
index abff44449131..6cd04ee018fd 100644
--- a/contrib/llvm-project/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.cpp
@@ -110,9 +110,18 @@ PPCMCExpr::evaluateAsRelocatableImpl(MCValue &Res,
if (Value.isAbsolute()) {
int64_t Result = evaluateAsInt64(Value.getConstant());
- if ((Fixup == nullptr || (unsigned)Fixup->getKind() != PPC::fixup_ppc_half16) &&
- (Result >= 0x8000))
+ bool IsHalf16 = Fixup && Fixup->getTargetKind() == PPC::fixup_ppc_half16;
+ bool IsHalf16DS =
+ Fixup && Fixup->getTargetKind() == PPC::fixup_ppc_half16ds;
+ bool IsHalf16DQ =
+ Fixup && Fixup->getTargetKind() == PPC::fixup_ppc_half16dq;
+ bool IsHalf = IsHalf16 || IsHalf16DS || IsHalf16DQ;
+
+ if (!IsHalf && Result >= 0x8000)
return false;
+ if ((IsHalf16DS && (Result & 0x3)) || (IsHalf16DQ && (Result & 0xf)))
+ return false;
+
Res = MCValue::get(Result);
} else {
if (!Layout)
diff --git a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
index de9c5712a877..d9d37638c8a7 100644
--- a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -1305,6 +1305,7 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
setBooleanVectorContents(ZeroOrNegativeOneBooleanContent);
}
+ setLibcallName(RTLIB::MULO_I128, nullptr);
if (!isPPC64) {
// These libcalls are not available in 32-bit.
setLibcallName(RTLIB::SHL_I128, nullptr);
diff --git a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.td b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.td
index c26b4f6ceb7d..53e73e33b003 100644
--- a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.td
+++ b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.td
@@ -1016,7 +1016,7 @@ def dispRI : Operand<iPTR> {
}
def PPCDispRIXOperand : AsmOperandClass {
let Name = "DispRIX"; let PredicateMethod = "isS16ImmX4";
- let RenderMethod = "addImmOperands";
+ let RenderMethod = "addS16ImmOperands";
}
def dispRIX : Operand<iPTR> {
let ParserMatchClass = PPCDispRIXOperand;
@@ -1030,7 +1030,7 @@ def dispRIHash : Operand<iPTR> {
}
def PPCDispRIX16Operand : AsmOperandClass {
let Name = "DispRIX16"; let PredicateMethod = "isS16ImmX16";
- let RenderMethod = "addImmOperands";
+ let RenderMethod = "addS16ImmOperands";
}
def dispRIX16 : Operand<iPTR> {
let ParserMatchClass = PPCDispRIX16Operand;
diff --git a/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp b/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
index 514789b3f645..4b940093482f 100644
--- a/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
@@ -583,10 +583,11 @@ void RISCVAsmBackend::applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
bool RISCVAsmBackend::shouldInsertExtraNopBytesForCodeAlign(
const MCAlignFragment &AF, unsigned &Size) {
// Calculate Nops Size only when linker relaxation enabled.
- if (!STI.getFeatureBits()[RISCV::FeatureRelax])
+ const MCSubtargetInfo *STI = AF.getSubtargetInfo();
+ if (!STI->getFeatureBits()[RISCV::FeatureRelax])
return false;
- bool HasStdExtC = STI.getFeatureBits()[RISCV::FeatureStdExtC];
+ bool HasStdExtC = STI->getFeatureBits()[RISCV::FeatureStdExtC];
unsigned MinNopLen = HasStdExtC ? 2 : 4;
if (AF.getAlignment() <= MinNopLen) {
@@ -606,7 +607,8 @@ bool RISCVAsmBackend::shouldInsertFixupForCodeAlign(MCAssembler &Asm,
const MCAsmLayout &Layout,
MCAlignFragment &AF) {
// Insert the fixup only when linker relaxation enabled.
- if (!STI.getFeatureBits()[RISCV::FeatureRelax])
+ const MCSubtargetInfo *STI = AF.getSubtargetInfo();
+ if (!STI->getFeatureBits()[RISCV::FeatureRelax])
return false;
// Calculate total Nops we need to insert. If there are none to insert
diff --git a/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.cpp b/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.cpp
index e935179e5f9b..4adcd25600f2 100644
--- a/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.cpp
@@ -302,32 +302,34 @@ InstSeq generateInstSeq(int64_t Val, const FeatureBitset &ActiveFeatures) {
TmpSeq.push_back(RISCVMatInt::Inst(Opc, 0));
if (TmpSeq.size() < Res.size())
Res = TmpSeq;
- }
- // Try to use LUI+SH*ADD+ADDI.
- int64_t Hi52 = ((uint64_t)Val + 0x800ull) & ~0xfffull;
- int64_t Lo12 = SignExtend64<12>(Val);
- Div = 0;
- if (isInt<32>(Hi52 / 3) && (Hi52 % 3) == 0) {
- Div = 3;
- Opc = RISCV::SH1ADD;
- } else if (isInt<32>(Hi52 / 5) && (Hi52 % 5) == 0) {
- Div = 5;
- Opc = RISCV::SH2ADD;
- } else if (isInt<32>(Hi52 / 9) && (Hi52 % 9) == 0) {
- Div = 9;
- Opc = RISCV::SH3ADD;
- }
- // Build the new instruction sequence.
- if (Div > 0) {
- // For Val that has zero Lo12 (implies Val equals to Hi52) should has
- // already been processed to LUI+SH*ADD by previous optimization.
- assert(Lo12 != 0 &&
- "unexpected instruction sequence for immediate materialisation");
- generateInstSeqImpl(Hi52 / Div, ActiveFeatures, TmpSeq);
- TmpSeq.push_back(RISCVMatInt::Inst(Opc, 0));
- TmpSeq.push_back(RISCVMatInt::Inst(RISCV::ADDI, Lo12));
- if (TmpSeq.size() < Res.size())
- Res = TmpSeq;
+ } else {
+ // Try to use LUI+SH*ADD+ADDI.
+ int64_t Hi52 = ((uint64_t)Val + 0x800ull) & ~0xfffull;
+ int64_t Lo12 = SignExtend64<12>(Val);
+ Div = 0;
+ if (isInt<32>(Hi52 / 3) && (Hi52 % 3) == 0) {
+ Div = 3;
+ Opc = RISCV::SH1ADD;
+ } else if (isInt<32>(Hi52 / 5) && (Hi52 % 5) == 0) {
+ Div = 5;
+ Opc = RISCV::SH2ADD;
+ } else if (isInt<32>(Hi52 / 9) && (Hi52 % 9) == 0) {
+ Div = 9;
+ Opc = RISCV::SH3ADD;
+ }
+ // Build the new instruction sequence.
+ if (Div > 0) {
+ // For Val that has zero Lo12 (implies Val equals to Hi52) should has
+ // already been processed to LUI+SH*ADD by previous optimization.
+ assert(Lo12 != 0 &&
+ "unexpected instruction sequence for immediate materialisation");
+ assert(TmpSeq.empty() && "Expected empty TmpSeq");
+ generateInstSeqImpl(Hi52 / Div, ActiveFeatures, TmpSeq);
+ TmpSeq.push_back(RISCVMatInt::Inst(Opc, 0));
+ TmpSeq.push_back(RISCVMatInt::Inst(RISCV::ADDI, Lo12));
+ if (TmpSeq.size() < Res.size())
+ Res = TmpSeq;
+ }
}
}
diff --git a/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp b/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
index f3cc7d3fb46f..8f250eeb7248 100644
--- a/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
@@ -674,7 +674,10 @@ RISCVFrameLowering::getFrameIndexReference(const MachineFunction &MF, int FI,
if (hasBP(MF)) {
FrameReg = RISCVABI::getBPReg();
// |--------------------------| -- <-- FP
- // | callee-saved registers | | <----.
+ // | callee-allocated save | | <----|
+ // | area for register varargs| | |
+ // |--------------------------| | |
+ // | callee-saved registers | | |
// |--------------------------| -- |
// | realignment (the size of | | |
// | this area is not counted | | |
@@ -699,7 +702,10 @@ RISCVFrameLowering::getFrameIndexReference(const MachineFunction &MF, int FI,
} else {
FrameReg = RISCV::X2;
// |--------------------------| -- <-- FP
- // | callee-saved registers | | <----.
+ // | callee-allocated save | | <----|
+ // | area for register varargs| | |
+ // |--------------------------| | |
+ // | callee-saved registers | | |
// |--------------------------| -- |
// | realignment (the size of | | |
// | this area is not counted | | |
@@ -742,6 +748,9 @@ RISCVFrameLowering::getFrameIndexReference(const MachineFunction &MF, int FI,
// the frame size.
//
// |--------------------------| -- <-- FP
+ // | callee-allocated save | |
+ // | area for register varargs| |
+ // |--------------------------| |
// | callee-saved registers | |
// |--------------------------| | MFI.getStackSize()
// | scalar local variables | |
@@ -756,7 +765,10 @@ RISCVFrameLowering::getFrameIndexReference(const MachineFunction &MF, int FI,
// When using SP to access frame objects, we need to add RVV stack size.
//
// |--------------------------| -- <-- FP
- // | callee-saved registers | | <----.
+ // | callee-allocated save | | <----|
+ // | area for register varargs| | |
+ // |--------------------------| | |
+ // | callee-saved registers | | |
// |--------------------------| -- |
// | Padding after RVV | | |
// | (not counted in | | |
@@ -786,8 +798,11 @@ RISCVFrameLowering::getFrameIndexReference(const MachineFunction &MF, int FI,
Offset += StackOffset::getFixed(MFI.getStackSize());
}
} else if (MFI.getStackID(FI) == TargetStackID::ScalableVector) {
+ int ScalarLocalVarSize = MFI.getStackSize() -
+ RVFI->getCalleeSavedStackSize() -
+ RVFI->getVarArgsSaveSize();
Offset += StackOffset::get(
- alignTo(MFI.getStackSize() - RVFI->getCalleeSavedStackSize(), 8),
+ alignTo(ScalarLocalVarSize, 8),
RVFI->getRVVStackSize());
}
}
diff --git a/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index e7672a7652cd..274b86593e0f 100644
--- a/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -1908,37 +1908,27 @@ static Optional<VIDSequence> isSimpleVIDSequence(SDValue Op) {
// A zero-value value difference means that we're somewhere in the middle
// of a fractional step, e.g. <0,0,0*,0,1,1,1,1>. Wait until we notice a
// step change before evaluating the sequence.
- if (ValDiff != 0) {
- int64_t Remainder = ValDiff % IdxDiff;
- // Normalize the step if it's greater than 1.
- if (Remainder != ValDiff) {
- // The difference must cleanly divide the element span.
- if (Remainder != 0)
- return None;
- ValDiff /= IdxDiff;
- IdxDiff = 1;
- }
-
- if (!SeqStepNum)
- SeqStepNum = ValDiff;
- else if (ValDiff != SeqStepNum)
- return None;
+ if (ValDiff == 0)
+ continue;
- if (!SeqStepDenom)
- SeqStepDenom = IdxDiff;
- else if (IdxDiff != *SeqStepDenom)
+ int64_t Remainder = ValDiff % IdxDiff;
+ // Normalize the step if it's greater than 1.
+ if (Remainder != ValDiff) {
+ // The difference must cleanly divide the element span.
+ if (Remainder != 0)
return None;
+ ValDiff /= IdxDiff;
+ IdxDiff = 1;
}
- }
- // Record and/or check any addend.
- if (SeqStepNum && SeqStepDenom) {
- uint64_t ExpectedVal =
- (int64_t)(Idx * (uint64_t)*SeqStepNum) / *SeqStepDenom;
- int64_t Addend = SignExtend64(Val - ExpectedVal, EltSizeInBits);
- if (!SeqAddend)
- SeqAddend = Addend;
- else if (SeqAddend != Addend)
+ if (!SeqStepNum)
+ SeqStepNum = ValDiff;
+ else if (ValDiff != SeqStepNum)
+ return None;
+
+ if (!SeqStepDenom)
+ SeqStepDenom = IdxDiff;
+ else if (IdxDiff != *SeqStepDenom)
return None;
}
@@ -1946,11 +1936,29 @@ static Optional<VIDSequence> isSimpleVIDSequence(SDValue Op) {
if (!PrevElt || PrevElt->first != Val)
PrevElt = std::make_pair(Val, Idx);
}
- // We need to have logged both a step and an addend for this to count as
- // a legal index sequence.
- if (!SeqStepNum || !SeqStepDenom || !SeqAddend)
+
+ // We need to have logged a step for this to count as a legal index sequence.
+ if (!SeqStepNum || !SeqStepDenom)
return None;
+ // Loop back through the sequence and validate elements we might have skipped
+ // while waiting for a valid step. While doing this, log any sequence addend.
+ for (unsigned Idx = 0; Idx < NumElts; Idx++) {
+ if (Op.getOperand(Idx).isUndef())
+ continue;
+ uint64_t Val = Op.getConstantOperandVal(Idx) &
+ maskTrailingOnes<uint64_t>(EltSizeInBits);
+ uint64_t ExpectedVal =
+ (int64_t)(Idx * (uint64_t)*SeqStepNum) / *SeqStepDenom;
+ int64_t Addend = SignExtend64(Val - ExpectedVal, EltSizeInBits);
+ if (!SeqAddend)
+ SeqAddend = Addend;
+ else if (Addend != SeqAddend)
+ return None;
+ }
+
+ assert(SeqAddend && "Must have an addend if we have a step");
+
return VIDSequence{*SeqStepNum, *SeqStepDenom, *SeqAddend};
}
@@ -2109,7 +2117,8 @@ static SDValue lowerBUILD_VECTOR(SDValue Op, SelectionDAG &DAG,
// a single addi instruction.
if (((StepOpcode == ISD::MUL && isInt<12>(SplatStepVal)) ||
(StepOpcode == ISD::SHL && isUInt<5>(SplatStepVal))) &&
- isPowerOf2_32(StepDenominator) && isInt<5>(Addend)) {
+ isPowerOf2_32(StepDenominator) &&
+ (SplatStepVal >= 0 || StepDenominator == 1) && isInt<5>(Addend)) {
SDValue VID = DAG.getNode(RISCVISD::VID_VL, DL, ContainerVT, Mask, VL);
// Convert right out of the scalable type so we can use standard ISD
// nodes for the rest of the computation. If we used scalable types with
diff --git a/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVMachineFunctionInfo.cpp b/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVMachineFunctionInfo.cpp
new file mode 100644
index 000000000000..bde0326a8de4
--- /dev/null
+++ b/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVMachineFunctionInfo.cpp
@@ -0,0 +1,30 @@
+//=- RISCVMachineFunctionInfo.cpp - RISCV machine function info ---*- C++ -*-=//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file declares RISCV-specific per-machine-function information.
+//
+//===----------------------------------------------------------------------===//
+
+#include "RISCVMachineFunctionInfo.h"
+
+using namespace llvm;
+
+yaml::RISCVMachineFunctionInfo::RISCVMachineFunctionInfo(
+ const llvm::RISCVMachineFunctionInfo &MFI)
+ : VarArgsFrameIndex(MFI.getVarArgsFrameIndex()),
+ VarArgsSaveSize(MFI.getVarArgsSaveSize()) {}
+
+void yaml::RISCVMachineFunctionInfo::mappingImpl(yaml::IO &YamlIO) {
+ MappingTraits<RISCVMachineFunctionInfo>::mapping(YamlIO, *this);
+}
+
+void RISCVMachineFunctionInfo::initializeBaseYamlFields(
+ const yaml::RISCVMachineFunctionInfo &YamlMFI) {
+ VarArgsFrameIndex = YamlMFI.VarArgsFrameIndex;
+ VarArgsSaveSize = YamlMFI.VarArgsSaveSize;
+}
diff --git a/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVMachineFunctionInfo.h b/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVMachineFunctionInfo.h
index b5609e9a3890..a549ec211a94 100644
--- a/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVMachineFunctionInfo.h
+++ b/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVMachineFunctionInfo.h
@@ -14,11 +14,34 @@
#define LLVM_LIB_TARGET_RISCV_RISCVMACHINEFUNCTIONINFO_H
#include "RISCVSubtarget.h"
+#include "llvm/CodeGen/MIRYamlMapping.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
namespace llvm {
+class RISCVMachineFunctionInfo;
+
+namespace yaml {
+struct RISCVMachineFunctionInfo final : public yaml::MachineFunctionInfo {
+ int VarArgsFrameIndex;
+ int VarArgsSaveSize;
+
+ RISCVMachineFunctionInfo() = default;
+ RISCVMachineFunctionInfo(const llvm::RISCVMachineFunctionInfo &MFI);
+
+ void mappingImpl(yaml::IO &YamlIO) override;
+ ~RISCVMachineFunctionInfo() = default;
+};
+
+template <> struct MappingTraits<RISCVMachineFunctionInfo> {
+ static void mapping(IO &YamlIO, RISCVMachineFunctionInfo &MFI) {
+ YamlIO.mapOptional("varArgsFrameIndex", MFI.VarArgsFrameIndex);
+ YamlIO.mapOptional("varArgsSaveSize", MFI.VarArgsSaveSize);
+ }
+};
+} // end namespace yaml
+
/// RISCVMachineFunctionInfo - This class is derived from MachineFunctionInfo
/// and contains private RISCV-specific information for each MachineFunction.
class RISCVMachineFunctionInfo : public MachineFunctionInfo {
@@ -74,6 +97,8 @@ public:
unsigned getCalleeSavedStackSize() const { return CalleeSavedStackSize; }
void setCalleeSavedStackSize(unsigned Size) { CalleeSavedStackSize = Size; }
+
+ void initializeBaseYamlFields(const yaml::RISCVMachineFunctionInfo &YamlMFI);
};
} // end namespace llvm
diff --git a/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVTargetMachine.cpp b/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
index db5e2f1eeb6f..0248ea0039bc 100644
--- a/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
@@ -13,6 +13,7 @@
#include "RISCVTargetMachine.h"
#include "MCTargetDesc/RISCVBaseInfo.h"
#include "RISCV.h"
+#include "RISCVMachineFunctionInfo.h"
#include "RISCVTargetObjectFile.h"
#include "RISCVTargetTransformInfo.h"
#include "TargetInfo/RISCVTargetInfo.h"
@@ -22,6 +23,8 @@
#include "llvm/CodeGen/GlobalISel/InstructionSelect.h"
#include "llvm/CodeGen/GlobalISel/Legalizer.h"
#include "llvm/CodeGen/GlobalISel/RegBankSelect.h"
+#include "llvm/CodeGen/MIRParser/MIParser.h"
+#include "llvm/CodeGen/MIRYamlMapping.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
#include "llvm/CodeGen/TargetPassConfig.h"
@@ -208,3 +211,23 @@ void RISCVPassConfig::addPreRegAlloc() {
addPass(createRISCVMergeBaseOffsetOptPass());
addPass(createRISCVInsertVSETVLIPass());
}
+
+yaml::MachineFunctionInfo *
+RISCVTargetMachine::createDefaultFuncInfoYAML() const {
+ return new yaml::RISCVMachineFunctionInfo();
+}
+
+yaml::MachineFunctionInfo *
+RISCVTargetMachine::convertFuncInfoToYAML(const MachineFunction &MF) const {
+ const auto *MFI = MF.getInfo<RISCVMachineFunctionInfo>();
+ return new yaml::RISCVMachineFunctionInfo(*MFI);
+}
+
+bool RISCVTargetMachine::parseMachineFunctionInfo(
+ const yaml::MachineFunctionInfo &MFI, PerFunctionMIParsingState &PFS,
+ SMDiagnostic &Error, SMRange &SourceRange) const {
+ const auto &YamlMFI =
+ static_cast<const yaml::RISCVMachineFunctionInfo &>(MFI);
+ PFS.MF.getInfo<RISCVMachineFunctionInfo>()->initializeBaseYamlFields(YamlMFI);
+ return false;
+}
diff --git a/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVTargetMachine.h b/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVTargetMachine.h
index 3156333f7ee1..2a0212c846a0 100644
--- a/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVTargetMachine.h
+++ b/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVTargetMachine.h
@@ -46,6 +46,14 @@ public:
virtual bool isNoopAddrSpaceCast(unsigned SrcAS,
unsigned DstAS) const override;
+
+ yaml::MachineFunctionInfo *createDefaultFuncInfoYAML() const override;
+ yaml::MachineFunctionInfo *
+ convertFuncInfoToYAML(const MachineFunction &MF) const override;
+ bool parseMachineFunctionInfo(const yaml::MachineFunctionInfo &,
+ PerFunctionMIParsingState &PFS,
+ SMDiagnostic &Error,
+ SMRange &SourceRange) const override;
};
} // namespace llvm
diff --git a/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp b/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp
index 77c2e7d16990..682932b8f3e6 100644
--- a/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -15796,7 +15796,8 @@ static SDValue lowerV8I16Shuffle(const SDLoc &DL, ArrayRef<int> Mask,
V1 = extract128BitVector(V1V2, 0, DAG, DL);
V2 = extract128BitVector(V1V2, 4, DAG, DL);
} else {
- SmallVector<SDValue> DWordClearOps(4, DAG.getConstant(0, DL, MVT::i32));
+ SmallVector<SDValue, 4> DWordClearOps(4,
+ DAG.getConstant(0, DL, MVT::i32));
for (unsigned i = 0; i != 4; i += 1 << (NumEvenDrops - 1))
DWordClearOps[i] = DAG.getConstant(0xFFFF, DL, MVT::i32);
SDValue DWordClearMask =
@@ -47109,8 +47110,7 @@ static SDValue combineLogicBlendIntoPBLENDV(SDNode *N, SelectionDAG &DAG,
// into:
// srl(ctlz x), log2(bitsize(x))
// Input pattern is checked by caller.
-static SDValue lowerX86CmpEqZeroToCtlzSrl(SDValue Op, EVT ExtTy,
- SelectionDAG &DAG) {
+static SDValue lowerX86CmpEqZeroToCtlzSrl(SDValue Op, SelectionDAG &DAG) {
SDValue Cmp = Op.getOperand(1);
EVT VT = Cmp.getOperand(0).getValueType();
unsigned Log2b = Log2_32(VT.getSizeInBits());
@@ -47121,7 +47121,7 @@ static SDValue lowerX86CmpEqZeroToCtlzSrl(SDValue Op, EVT ExtTy,
SDValue Trunc = DAG.getZExtOrTrunc(Clz, dl, MVT::i32);
SDValue Scc = DAG.getNode(ISD::SRL, dl, MVT::i32, Trunc,
DAG.getConstant(Log2b, dl, MVT::i8));
- return DAG.getZExtOrTrunc(Scc, dl, ExtTy);
+ return Scc;
}
// Try to transform:
@@ -47181,11 +47181,10 @@ static SDValue combineOrCmpEqZeroToCtlzSrl(SDNode *N, SelectionDAG &DAG,
// or(srl(ctlz),srl(ctlz)).
// The dag combiner can then fold it into:
// srl(or(ctlz, ctlz)).
- EVT VT = OR->getValueType(0);
- SDValue NewLHS = lowerX86CmpEqZeroToCtlzSrl(LHS, VT, DAG);
+ SDValue NewLHS = lowerX86CmpEqZeroToCtlzSrl(LHS, DAG);
SDValue Ret, NewRHS;
- if (NewLHS && (NewRHS = lowerX86CmpEqZeroToCtlzSrl(RHS, VT, DAG)))
- Ret = DAG.getNode(ISD::OR, SDLoc(OR), VT, NewLHS, NewRHS);
+ if (NewLHS && (NewRHS = lowerX86CmpEqZeroToCtlzSrl(RHS, DAG)))
+ Ret = DAG.getNode(ISD::OR, SDLoc(OR), MVT::i32, NewLHS, NewRHS);
if (!Ret)
return SDValue();
@@ -47198,16 +47197,13 @@ static SDValue combineOrCmpEqZeroToCtlzSrl(SDNode *N, SelectionDAG &DAG,
// Swap rhs with lhs to match or(setcc(eq, cmp, 0), or).
if (RHS->getOpcode() == ISD::OR)
std::swap(LHS, RHS);
- NewRHS = lowerX86CmpEqZeroToCtlzSrl(RHS, VT, DAG);
+ NewRHS = lowerX86CmpEqZeroToCtlzSrl(RHS, DAG);
if (!NewRHS)
return SDValue();
- Ret = DAG.getNode(ISD::OR, SDLoc(OR), VT, Ret, NewRHS);
+ Ret = DAG.getNode(ISD::OR, SDLoc(OR), MVT::i32, Ret, NewRHS);
}
- if (Ret)
- Ret = DAG.getNode(ISD::ZERO_EXTEND, SDLoc(N), N->getValueType(0), Ret);
-
- return Ret;
+ return DAG.getNode(ISD::ZERO_EXTEND, SDLoc(N), N->getValueType(0), Ret);
}
static SDValue foldMaskedMergeImpl(SDValue And0_L, SDValue And0_R,
diff --git a/contrib/llvm-project/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp b/contrib/llvm-project/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
index 6bbb0251f2bc..2aab79e89078 100644
--- a/contrib/llvm-project/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
+++ b/contrib/llvm-project/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
@@ -1961,6 +1961,12 @@ Instruction *InstCombinerImpl::visitAnd(BinaryOperator &I) {
}
}
+ // If this 'and' clears the sign-bits added by ashr, replace with lshr:
+ // and (ashr X, ShiftC), C --> lshr X, ShiftC
+ if (match(Op0, m_AShr(m_Value(X), m_APInt(ShiftC))) && ShiftC->ult(Width) &&
+ C->isMask(Width - ShiftC->getZExtValue()))
+ return BinaryOperator::CreateLShr(X, ConstantInt::get(Ty, *ShiftC));
+
const APInt *AddC;
if (match(Op0, m_Add(m_Value(X), m_APInt(AddC)))) {
// If we add zeros to every bit below a mask, the add has no effect:
diff --git a/contrib/llvm-project/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp b/contrib/llvm-project/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
index 65e60498ff95..881b00f2a55a 100644
--- a/contrib/llvm-project/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+++ b/contrib/llvm-project/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
@@ -1572,6 +1572,23 @@ Instruction *InstCombinerImpl::foldSelectInstWithICmp(SelectInst &SI,
}
}
+ // Canonicalize a signbit condition to use zero constant by swapping:
+ // (CmpLHS > -1) ? TV : FV --> (CmpLHS < 0) ? FV : TV
+ // To avoid conflicts (infinite loops) with other canonicalizations, this is
+ // not applied with any constant select arm.
+ if (Pred == ICmpInst::ICMP_SGT && match(CmpRHS, m_AllOnes()) &&
+ !match(TrueVal, m_Constant()) && !match(FalseVal, m_Constant()) &&
+ ICI->hasOneUse()) {
+ InstCombiner::BuilderTy::InsertPointGuard Guard(Builder);
+ Builder.SetInsertPoint(&SI);
+ Value *IsNeg = Builder.CreateICmpSLT(
+ CmpLHS, ConstantInt::getNullValue(CmpLHS->getType()), ICI->getName());
+ replaceOperand(SI, 0, IsNeg);
+ SI.swapValues();
+ SI.swapProfMetadata();
+ return &SI;
+ }
+
// FIXME: This code is nearly duplicated in InstSimplify. Using/refactoring
// decomposeBitTestICmp() might help.
{
diff --git a/contrib/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/contrib/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 21c16f07e237..46ff0994e04e 100644
--- a/contrib/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/contrib/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -2544,19 +2544,18 @@ void InnerLoopVectorizer::widenIntOrFpInduction(
Type *ScalarTy = IntegerType::get(ScalarIV->getContext(),
Step->getType()->getScalarSizeInBits());
- Instruction::BinaryOps IncOp = ID.getInductionOpcode();
- if (IncOp == Instruction::BinaryOpsEnd)
- IncOp = Instruction::Add;
for (unsigned Part = 0; Part < UF; ++Part) {
Value *StartIdx = ConstantInt::get(ScalarTy, Part);
- Instruction::BinaryOps MulOp = Instruction::Mul;
+ Value *EntryPart;
if (Step->getType()->isFloatingPointTy()) {
StartIdx = Builder.CreateUIToFP(StartIdx, Step->getType());
- MulOp = Instruction::FMul;
+ Value *MulOp = Builder.CreateFMul(StartIdx, Step);
+ EntryPart = Builder.CreateBinOp(ID.getInductionOpcode(), ScalarIV,
+ MulOp, "induction");
+ } else {
+ EntryPart = Builder.CreateAdd(
+ ScalarIV, Builder.CreateMul(StartIdx, Step), "induction");
}
-
- Value *Mul = Builder.CreateBinOp(MulOp, StartIdx, Step);
- Value *EntryPart = Builder.CreateBinOp(IncOp, ScalarIV, Mul, "induction");
State.set(Def, EntryPart, Part);
if (Trunc) {
assert(!Step->getType()->isFloatingPointTy() &&
@@ -6035,6 +6034,18 @@ unsigned LoopVectorizationCostModel::selectInterleaveCount(ElementCount VF,
!(InterleaveSmallLoopScalarReduction && HasReductions && VF.isScalar()))
return 1;
+ // If we did not calculate the cost for VF (because the user selected the VF)
+ // then we calculate the cost of VF here.
+ if (LoopCost == 0) {
+ InstructionCost C = expectedCost(VF).first;
+ assert(C.isValid() && "Expected to have chosen a VF with valid cost");
+ LoopCost = *C.getValue();
+
+ // Loop body is free and there is no need for interleaving.
+ if (LoopCost == 0)
+ return 1;
+ }
+
RegisterUsage R = calculateRegisterUsage({VF})[0];
// We divide by these constants so assume that we have at least one
// instruction that uses at least one register.
@@ -6126,16 +6137,6 @@ unsigned LoopVectorizationCostModel::selectInterleaveCount(ElementCount VF,
assert(IC > 0 && "Interleave count must be greater than 0.");
- // If we did not calculate the cost for VF (because the user selected the VF)
- // then we calculate the cost of VF here.
- if (LoopCost == 0) {
- InstructionCost C = expectedCost(VF).first;
- assert(C.isValid() && "Expected to have chosen a VF with valid cost");
- LoopCost = *C.getValue();
- }
-
- assert(LoopCost && "Non-zero loop cost expected");
-
// Interleave if we vectorized this loop and there is a reduction that could
// benefit from interleaving.
if (VF.isVector() && HasReductions) {
diff --git a/contrib/llvm-project/llvm/lib/Transforms/Vectorize/VectorCombine.cpp b/contrib/llvm-project/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
index 620d388199e0..258f6c67e54d 100644
--- a/contrib/llvm-project/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
+++ b/contrib/llvm-project/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
@@ -152,12 +152,7 @@ bool VectorCombine::vectorizeLoadInsert(Instruction &I) {
Value *SrcPtr = Load->getPointerOperand()->stripPointerCasts();
assert(isa<PointerType>(SrcPtr->getType()) && "Expected a pointer type");
- // If original AS != Load's AS, we can't bitcast the original pointer and have
- // to use Load's operand instead. Ideally we would want to strip pointer casts
- // without changing AS, but there's no API to do that ATM.
unsigned AS = Load->getPointerAddressSpace();
- if (AS != SrcPtr->getType()->getPointerAddressSpace())
- SrcPtr = Load->getPointerOperand();
// We are potentially transforming byte-sized (8-bit) memory accesses, so make
// sure we have all of our type-based constraints in place for this target.
@@ -245,7 +240,8 @@ bool VectorCombine::vectorizeLoadInsert(Instruction &I) {
// It is safe and potentially profitable to load a vector directly:
// inselt undef, load Scalar, 0 --> load VecPtr
IRBuilder<> Builder(Load);
- Value *CastedPtr = Builder.CreateBitCast(SrcPtr, MinVecTy->getPointerTo(AS));
+ Value *CastedPtr = Builder.CreatePointerBitCastOrAddrSpaceCast(
+ SrcPtr, MinVecTy->getPointerTo(AS));
Value *VecLd = Builder.CreateAlignedLoad(MinVecTy, CastedPtr, Alignment);
VecLd = Builder.CreateShuffleVector(VecLd, Mask);
diff --git a/contrib/llvm-project/llvm/tools/llvm-objdump/ELFDump.cpp b/contrib/llvm-project/llvm/tools/llvm-objdump/ELFDump.cpp
index 98e71497d022..ca73dafe2b8e 100644
--- a/contrib/llvm-project/llvm/tools/llvm-objdump/ELFDump.cpp
+++ b/contrib/llvm-project/llvm/tools/llvm-objdump/ELFDump.cpp
@@ -171,8 +171,12 @@ uint64_t objdump::getELFSectionLMA(const object::ELFSectionRef &Sec) {
template <class ELFT>
static void printDynamicSection(const ELFFile<ELFT> &Elf, StringRef Filename) {
- ArrayRef<typename ELFT::Dyn> DynamicEntries =
- unwrapOrError(Elf.dynamicEntries(), Filename);
+ auto DynamicEntriesOrErr = Elf.dynamicEntries();
+ if (!DynamicEntriesOrErr) {
+ reportWarning(toString(DynamicEntriesOrErr.takeError()), Filename);
+ return;
+ }
+ ArrayRef<typename ELFT::Dyn> DynamicEntries = *DynamicEntriesOrErr;
// Find the maximum tag name length to format the value column properly.
size_t MaxLen = 0;
diff --git a/etc/mtree/BSD.debug.dist b/etc/mtree/BSD.debug.dist
index 061a488a0abd..91b050b02c16 100644
--- a/etc/mtree/BSD.debug.dist
+++ b/etc/mtree/BSD.debug.dist
@@ -31,7 +31,7 @@
..
lib
clang
- 14.0.0
+ 14.0.3
lib
freebsd
..
diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist
index bb92174197bf..3aac572a314f 100644
--- a/etc/mtree/BSD.usr.dist
+++ b/etc/mtree/BSD.usr.dist
@@ -37,7 +37,7 @@
..
lib
clang
- 14.0.0
+ 14.0.3
include
cuda_wrappers
..
diff --git a/lib/clang/headers/Makefile b/lib/clang/headers/Makefile
index 7a5bac4a2034..49d2f579ee22 100644
--- a/lib/clang/headers/Makefile
+++ b/lib/clang/headers/Makefile
@@ -5,7 +5,7 @@
.PATH: ${CLANG_SRCS}/lib/Headers
INCSGROUPS= INCS CUDA OMP PPC
-INCSDIR= ${LIBDIR}/clang/14.0.0/include
+INCSDIR= ${LIBDIR}/clang/14.0.3/include
CUDADIR= ${INCSDIR}/cuda_wrappers
OMPDIR= ${INCSDIR}/openmp_wrappers
PPCDIR= ${INCSDIR}/ppc_wrappers
diff --git a/lib/clang/include/VCSVersion.inc b/lib/clang/include/VCSVersion.inc
index bed489b0b0fb..f3ef7edf1151 100644
--- a/lib/clang/include/VCSVersion.inc
+++ b/lib/clang/include/VCSVersion.inc
@@ -1,10 +1,10 @@
// $FreeBSD$
-#define LLVM_REVISION "llvmorg-14.0.0-2-g3f43d803382d"
+#define LLVM_REVISION "llvmorg-14.0.3-0-g1f9140064dfb"
#define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git"
-#define CLANG_REVISION "llvmorg-14.0.0-2-g3f43d803382d"
+#define CLANG_REVISION "llvmorg-14.0.3-0-g1f9140064dfb"
#define CLANG_REPOSITORY "https://github.com/llvm/llvm-project.git"
-#define LLDB_REVISION "llvmorg-14.0.0-2-g3f43d803382d"
+#define LLDB_REVISION "llvmorg-14.0.3-0-g1f9140064dfb"
#define LLDB_REPOSITORY "https://github.com/llvm/llvm-project.git"
diff --git a/lib/clang/include/clang/Basic/Version.inc b/lib/clang/include/clang/Basic/Version.inc
index 5cfdd07b8386..6d52a256d7c9 100644
--- a/lib/clang/include/clang/Basic/Version.inc
+++ b/lib/clang/include/clang/Basic/Version.inc
@@ -1,9 +1,9 @@
/* $FreeBSD$ */
-#define CLANG_VERSION 14.0.0
-#define CLANG_VERSION_STRING "14.0.0"
+#define CLANG_VERSION 14.0.3
+#define CLANG_VERSION_STRING "14.0.3"
#define CLANG_VERSION_MAJOR 14
#define CLANG_VERSION_MINOR 0
-#define CLANG_VERSION_PATCHLEVEL 0
+#define CLANG_VERSION_PATCHLEVEL 3
#define CLANG_VENDOR "FreeBSD "
diff --git a/lib/clang/include/clang/Config/config.h b/lib/clang/include/clang/Config/config.h
index fbdeedbbf8ad..1e6b9f9f6034 100644
--- a/lib/clang/include/clang/Config/config.h
+++ b/lib/clang/include/clang/Config/config.h
@@ -68,7 +68,7 @@
#define CLANG_HAVE_RLIMITS 1
/* The LLVM product name and version */
-#define BACKEND_PACKAGE_STRING "LLVM 14.0.0"
+#define BACKEND_PACKAGE_STRING "LLVM 14.0.3"
/* Linker version detected at compile time. */
/* #undef HOST_LINK_VERSION */
diff --git a/lib/clang/include/lld/Common/Version.inc b/lib/clang/include/lld/Common/Version.inc
index a469435359e8..1af3ef380317 100644
--- a/lib/clang/include/lld/Common/Version.inc
+++ b/lib/clang/include/lld/Common/Version.inc
@@ -1,4 +1,4 @@
// Local identifier in __FreeBSD_version style
-#define LLD_FREEBSD_VERSION 1400003
+#define LLD_FREEBSD_VERSION 1400004
-#define LLD_VERSION_STRING "14.0.0 (FreeBSD llvmorg-14.0.0-2-g3f43d803382d-" __XSTRING(LLD_FREEBSD_VERSION) ")"
+#define LLD_VERSION_STRING "14.0.3 (FreeBSD llvmorg-14.0.3-0-g1f9140064dfb-" __XSTRING(LLD_FREEBSD_VERSION) ")"
diff --git a/lib/clang/include/lldb/Version/Version.inc b/lib/clang/include/lldb/Version/Version.inc
index 10cb375a29d7..c6de80430710 100644
--- a/lib/clang/include/lldb/Version/Version.inc
+++ b/lib/clang/include/lldb/Version/Version.inc
@@ -1,6 +1,6 @@
-#define LLDB_VERSION 14.0.0
-#define LLDB_VERSION_STRING "14.0.0"
+#define LLDB_VERSION 14.0.3
+#define LLDB_VERSION_STRING "14.0.3"
#define LLDB_VERSION_MAJOR 14
#define LLDB_VERSION_MINOR 0
-#define LLDB_VERSION_PATCHLEVEL
+#define LLDB_VERSION_PATCH 3
/* #undef LLDB_FULL_VERSION_STRING */
diff --git a/lib/clang/include/llvm/Config/TargetMCAs.def b/lib/clang/include/llvm/Config/TargetMCAs.def
index b67a5ce8bbf7..a6446bbf9a9e 100644
--- a/lib/clang/include/llvm/Config/TargetMCAs.def
+++ b/lib/clang/include/llvm/Config/TargetMCAs.def
@@ -4,4 +4,8 @@
# error Please define the macro LLVM_TARGETMCA(TargetName)
#endif
+#ifdef LLVM_TARGET_ENABLE_X86
+LLVM_TARGETMCA(X86)
+#endif
+
#undef LLVM_TARGETMCA
diff --git a/lib/clang/include/llvm/Config/config.h b/lib/clang/include/llvm/Config/config.h
index d56654aab7df..7461a54424f6 100644
--- a/lib/clang/include/llvm/Config/config.h
+++ b/lib/clang/include/llvm/Config/config.h
@@ -366,10 +366,10 @@
#define PACKAGE_NAME "LLVM"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "LLVM 14.0.0"
+#define PACKAGE_STRING "LLVM 14.0.3"
/* Define to the version of this package. */
-#define PACKAGE_VERSION "14.0.0"
+#define PACKAGE_VERSION "14.0.3"
/* Define to the vendor of this package. */
/* #undef PACKAGE_VENDOR */
diff --git a/lib/clang/include/llvm/Config/llvm-config.h b/lib/clang/include/llvm/Config/llvm-config.h
index 575787e1f9b3..e32e031a6bc9 100644
--- a/lib/clang/include/llvm/Config/llvm-config.h
+++ b/lib/clang/include/llvm/Config/llvm-config.h
@@ -73,10 +73,10 @@
#define LLVM_VERSION_MINOR 0
/* Patch version of the LLVM API */
-#define LLVM_VERSION_PATCH 0
+#define LLVM_VERSION_PATCH 3
/* LLVM version string */
-#define LLVM_VERSION_STRING "14.0.0"
+#define LLVM_VERSION_STRING "14.0.3"
/* Whether LLVM records statistics for use with GetStatistics(),
* PrintStatistics() or PrintStatisticsJSON()
diff --git a/lib/clang/include/llvm/Support/VCSRevision.h b/lib/clang/include/llvm/Support/VCSRevision.h
index 5a7906b88e4d..20e168a7b001 100644
--- a/lib/clang/include/llvm/Support/VCSRevision.h
+++ b/lib/clang/include/llvm/Support/VCSRevision.h
@@ -1,3 +1,3 @@
/* $FreeBSD$ */
-#define LLVM_REVISION "llvmorg-14.0.0-2-g3f43d803382d"
+#define LLVM_REVISION "llvmorg-14.0.3-0-g1f9140064dfb"
#define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git"
diff --git a/lib/clang/libllvm/Makefile b/lib/clang/libllvm/Makefile
index 31cf33e0f9bd..52216847685a 100644
--- a/lib/clang/libllvm/Makefile
+++ b/lib/clang/libllvm/Makefile
@@ -1399,6 +1399,7 @@ SRCS_MIN+= Target/RISCV/RISCVISelDAGToDAG.cpp
SRCS_MIN+= Target/RISCV/RISCVISelLowering.cpp
SRCS_MIN+= Target/RISCV/RISCVLegalizerInfo.cpp
SRCS_MIN+= Target/RISCV/RISCVMCInstLower.cpp
+SRCS_MIN+= Target/RISCV/RISCVMachineFunctionInfo.cpp
SRCS_MIN+= Target/RISCV/RISCVMergeBaseOffset.cpp
SRCS_MIN+= Target/RISCV/RISCVRegisterBankInfo.cpp
SRCS_MIN+= Target/RISCV/RISCVRegisterInfo.cpp
@@ -1416,6 +1417,7 @@ SRCS_MIN+= Target/TargetMachineC.cpp
.if ${MK_LLVM_TARGET_X86} != "no"
SRCS_MIN+= Target/X86/AsmParser/X86AsmParser.cpp
SRCS_XDW+= Target/X86/Disassembler/X86Disassembler.cpp
+SRCS_EXT+= Target/X86/MCA/X86CustomBehaviour.cpp
SRCS_MIN+= Target/X86/MCTargetDesc/X86ATTInstPrinter.cpp
SRCS_MIN+= Target/X86/MCTargetDesc/X86AsmBackend.cpp
SRCS_MIN+= Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp
diff --git a/lib/libclang_rt/compiler-rt-vars.mk b/lib/libclang_rt/compiler-rt-vars.mk
index 91d2fb4b228a..78468be5f465 100644
--- a/lib/libclang_rt/compiler-rt-vars.mk
+++ b/lib/libclang_rt/compiler-rt-vars.mk
@@ -1,4 +1,4 @@
-CLANG_SUBDIR=clang/14.0.0
+CLANG_SUBDIR=clang/14.0.3
CLANGDIR= /usr/lib/${CLANG_SUBDIR}
SANITIZER_LIBDIR= ${CLANGDIR}/lib/freebsd
diff --git a/lib/libclang_rt/include/Makefile b/lib/libclang_rt/include/Makefile
index cdd10435fe75..e04519d65d97 100644
--- a/lib/libclang_rt/include/Makefile
+++ b/lib/libclang_rt/include/Makefile
@@ -14,6 +14,7 @@ INCS+= dfsan_interface.h
INCS+= hwasan_interface.h
INCS+= linux_syscall_hooks.h
INCS+= lsan_interface.h
+INCS+= memprof_interface.h
INCS+= msan_interface.h
INCS+= netbsd_syscall_hooks.h
INCS+= scudo_interface.h
diff --git a/lib/libclang_rt/profile/Makefile b/lib/libclang_rt/profile/Makefile
index d683983e5b97..8d1eb6ebd3ba 100644
--- a/lib/libclang_rt/profile/Makefile
+++ b/lib/libclang_rt/profile/Makefile
@@ -30,5 +30,6 @@ SRCS+= profile/InstrProfilingWriter.c
.PATH: ${CRTSRC}/include/profile
INCSDIR= ${CLANGDIR}/include/profile
INCS+= InstrProfData.inc
+INCS+= MemProfData.inc
.include <bsd.lib.mk>
diff --git a/sys/sys/param.h b/sys/sys/param.h
index 1e1fb80cb38e..1f720ed31142 100644
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -76,7 +76,7 @@
* cannot include sys/param.h and should only be updated here.
*/
#undef __FreeBSD_version
-#define __FreeBSD_version 1400058
+#define __FreeBSD_version 1400059
/*
* __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc
index faf46ca8938c..6a1776690608 100644
--- a/tools/build/mk/OptionalObsoleteFiles.inc
+++ b/tools/build/mk/OptionalObsoleteFiles.inc
@@ -1187,306 +1187,308 @@ OLD_FILES+=usr/share/man/man1/llvm-symbolizer.1.gz
OLD_FILES+=usr/bin/clang
OLD_FILES+=usr/bin/clang++
OLD_FILES+=usr/bin/clang-cpp
-OLD_FILES+=usr/lib/clang/14.0.0/include/cuda_wrappers/algorithm
-OLD_FILES+=usr/lib/clang/14.0.0/include/cuda_wrappers/complex
-OLD_FILES+=usr/lib/clang/14.0.0/include/cuda_wrappers/new
-OLD_DIRS+=usr/lib/clang/14.0.0/include/cuda_wrappers
-OLD_FILES+=usr/lib/clang/14.0.0/include/fuzzer/FuzzedDataProvider.h
-OLD_DIRS+=usr/lib/clang/14.0.0/include/fuzzer
-OLD_FILES+=usr/lib/clang/14.0.0/include/openmp_wrappers/__clang_openmp_device_functions.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/openmp_wrappers/cmath
-OLD_FILES+=usr/lib/clang/14.0.0/include/openmp_wrappers/complex
-OLD_FILES+=usr/lib/clang/14.0.0/include/openmp_wrappers/complex.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/openmp_wrappers/complex_cmath.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/openmp_wrappers/math.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/openmp_wrappers/new
-OLD_DIRS+=usr/lib/clang/14.0.0/include/openmp_wrappers
-OLD_FILES+=usr/lib/clang/14.0.0/include/ppc_wrappers/emmintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/ppc_wrappers/mm_malloc.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/ppc_wrappers/mmintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/ppc_wrappers/pmmintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/ppc_wrappers/smmintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/ppc_wrappers/tmmintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/ppc_wrappers/xmmintrin.h
-OLD_DIRS+=usr/lib/clang/14.0.0/include/ppc_wrappers
-OLD_FILES+=usr/lib/clang/14.0.0/include/profile/InstrProfData.inc
-OLD_DIRS+=usr/lib/clang/14.0.0/include/profile
-OLD_FILES+=usr/lib/clang/14.0.0/include/sanitizer/allocator_interface.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/sanitizer/asan_interface.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/sanitizer/common_interface_defs.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/sanitizer/coverage_interface.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/sanitizer/dfsan_interface.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/sanitizer/hwasan_interface.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/sanitizer/linux_syscall_hooks.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/sanitizer/lsan_interface.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/sanitizer/msan_interface.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/sanitizer/netbsd_syscall_hooks.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/sanitizer/scudo_interface.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/sanitizer/tsan_interface.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/sanitizer/tsan_interface_atomic.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/sanitizer/ubsan_interface.h
-OLD_DIRS+=usr/lib/clang/14.0.0/include/sanitizer
-OLD_FILES+=usr/lib/clang/14.0.0/include/xray/xray_interface.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/xray/xray_log_interface.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/xray/xray_records.h
-OLD_DIRS+=usr/lib/clang/14.0.0/include/xray
-OLD_FILES+=usr/lib/clang/14.0.0/include/__clang_cuda_builtin_vars.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/__clang_cuda_cmath.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/__clang_cuda_complex_builtins.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/__clang_cuda_device_functions.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/__clang_cuda_intrinsics.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/__clang_cuda_libdevice_declares.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/__clang_cuda_math.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/__clang_cuda_math_forward_declares.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/__clang_cuda_runtime_wrapper.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/__clang_cuda_texture_intrinsics.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/__clang_hip_cmath.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/__clang_hip_libdevice_declares.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/__clang_hip_math.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/__clang_hip_runtime_wrapper.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/__stddef_max_align_t.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/__wmmintrin_aes.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/__wmmintrin_pclmul.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/adxintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/altivec.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/ammintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/amxintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/arm64intr.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/arm_acle.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/arm_bf16.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/arm_cde.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/arm_cmse.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/arm_fp16.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/arm_mve.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/arm_neon.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/arm_neon_sve_bridge.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/arm_sve.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/armintr.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/avx2intrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/avx512bf16intrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/avx512bitalgintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/avx512bwintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/avx512cdintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/avx512dqintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/avx512erintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/avx512fintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/avx512fp16intrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/avx512ifmaintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/avx512ifmavlintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/avx512pfintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/avx512vbmi2intrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/avx512vbmiintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/avx512vbmivlintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/avx512vlbf16intrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/avx512vlbitalgintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/avx512vlbwintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/avx512vlcdintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/avx512vldqintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/avx512vlfp16intrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/avx512vlintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/avx512vlvbmi2intrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/avx512vlvnniintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/avx512vlvp2intersectintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/avx512vnniintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/avx512vp2intersectintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/avx512vpopcntdqintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/avx512vpopcntdqvlintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/avxintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/avxvnniintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/bmi2intrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/bmiintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/builtins.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/cet.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/cetintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/cldemoteintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/clflushoptintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/clwbintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/clzerointrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/cpuid.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/crc32intrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/emmintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/enqcmdintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/f16cintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/float.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/fma4intrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/fmaintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/fxsrintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/gfniintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/hexagon_circ_brev_intrinsics.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/hexagon_protos.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/hexagon_types.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/hresetintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/htmintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/htmxlintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/hvx_hexagon_protos.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/ia32intrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/immintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/intrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/inttypes.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/invpcidintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/iso646.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/keylockerintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/limits.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/lwpintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/lzcntintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/mm3dnow.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/mm_malloc.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/mmintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/module.modulemap
-OLD_FILES+=usr/lib/clang/14.0.0/include/movdirintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/msa.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/mwaitxintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/nmmintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/omp-tools.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/omp.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/ompt.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/opencl-c-base.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/opencl-c.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/pconfigintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/pkuintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/pmmintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/popcntintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/prfchwintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/ptwriteintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/rdseedintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/riscv_vector.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/rtmintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/s390intrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/serializeintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/sgxintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/shaintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/smmintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/stdalign.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/stdarg.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/stdatomic.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/stdbool.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/stddef.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/stdint.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/stdnoreturn.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/tbmintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/tgmath.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/tmmintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/tsxldtrkintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/uintrintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/unwind.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/vadefs.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/vaesintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/varargs.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/vecintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/vpclmulqdqintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/waitpkgintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/wasm_simd128.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/wbnoinvdintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/wmmintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/x86gprintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/x86intrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/xmmintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/xopintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/xsavecintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/xsaveintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/xsaveoptintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/xsavesintrin.h
-OLD_FILES+=usr/lib/clang/14.0.0/include/xtestintrin.h
-OLD_DIRS+=usr/lib/clang/14.0.0/include
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.asan-aarch64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.asan-aarch64.so
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.asan-arm.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.asan-arm.so
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.asan-armhf.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.asan-armhf.so
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.asan-i386.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.asan-i386.so
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.asan-preinit-aarch64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.asan-preinit-arm.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.asan-preinit-armhf.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.asan-preinit-i386.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.asan-preinit-x86_64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.asan-x86_64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.asan-x86_64.so
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.asan_cxx-aarch64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.asan_cxx-arm.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.asan_cxx-armhf.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.asan_cxx-i386.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.cfi-aarch64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.cfi-arm.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.cfi-armhf.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.cfi-i386.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.cfi-x86_64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.cfi_diag-aarch64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.cfi_diag-arm.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.cfi_diag-armhf.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.cfi_diag-i386.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.cfi_diag-x86_64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.dd-aarch64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.dd-x86_64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.fuzzer-aarch64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.fuzzer-x86_64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.fuzzer_no_main-aarch64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.fuzzer_no_main-x86_64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.msan-aarch64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.msan-x86_64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.msan_cxx-aarch64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.msan_cxx-x86_64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.profile-aarch64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.profile-arm.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.profile-armhf.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.profile-i386.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.profile-powerpc.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.profile-powerpc64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.profile-powerpc64le.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.profile-x86_64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.safestack-aarch64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.safestack-i386.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.safestack-x86_64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.stats-aarch64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.stats-arm.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.stats-armhf.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.stats-i386.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.stats-x86_64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.stats_client-aarch64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.stats_client-arm.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.stats_client-armhf.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.stats_client-i386.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.stats_client-x86_64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.tsan-aarch64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.tsan-x86_64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.tsan_cxx-aarch64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.tsan_cxx-x86_64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.ubsan_minimal-aarch64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.ubsan_minimal-arm.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.ubsan_minimal-armhf.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.ubsan_minimal-i386.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.ubsan_minimal-x86_64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.ubsan_standalone-aarch64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.ubsan_standalone-arm.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.ubsan_standalone-armhf.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.ubsan_standalone-i386.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-aarch64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-arm.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-armhf.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.xray-aarch64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.xray-arm.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.xray-armhf.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.xray-basic-aarch64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.xray-basic-arm.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.xray-basic-armhf.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.xray-basic-x86_64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.xray-fdr-aarch64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.xray-fdr-arm.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.xray-fdr-armhf.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.xray-fdr-x86_64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.xray-profiling-aarch64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.xray-profiling-arm.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.xray-profiling-armhf.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.xray-profiling-x86_64.a
-OLD_FILES+=usr/lib/clang/14.0.0/lib/freebsd/libclang_rt.xray-x86_64.a
-OLD_DIRS+=usr/lib/clang/14.0.0/lib/freebsd
-OLD_DIRS+=usr/lib/clang/14.0.0/lib
-OLD_DIRS+=usr/lib/clang/14.0.0
+OLD_FILES+=usr/lib/clang/14.0.3/include/cuda_wrappers/algorithm
+OLD_FILES+=usr/lib/clang/14.0.3/include/cuda_wrappers/complex
+OLD_FILES+=usr/lib/clang/14.0.3/include/cuda_wrappers/new
+OLD_DIRS+=usr/lib/clang/14.0.3/include/cuda_wrappers
+OLD_FILES+=usr/lib/clang/14.0.3/include/fuzzer/FuzzedDataProvider.h
+OLD_DIRS+=usr/lib/clang/14.0.3/include/fuzzer
+OLD_FILES+=usr/lib/clang/14.0.3/include/openmp_wrappers/__clang_openmp_device_functions.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/openmp_wrappers/cmath
+OLD_FILES+=usr/lib/clang/14.0.3/include/openmp_wrappers/complex
+OLD_FILES+=usr/lib/clang/14.0.3/include/openmp_wrappers/complex.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/openmp_wrappers/complex_cmath.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/openmp_wrappers/math.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/openmp_wrappers/new
+OLD_DIRS+=usr/lib/clang/14.0.3/include/openmp_wrappers
+OLD_FILES+=usr/lib/clang/14.0.3/include/ppc_wrappers/emmintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/ppc_wrappers/mm_malloc.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/ppc_wrappers/mmintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/ppc_wrappers/pmmintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/ppc_wrappers/smmintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/ppc_wrappers/tmmintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/ppc_wrappers/xmmintrin.h
+OLD_DIRS+=usr/lib/clang/14.0.3/include/ppc_wrappers
+OLD_FILES+=usr/lib/clang/14.0.3/include/profile/InstrProfData.inc
+OLD_FILES+=usr/lib/clang/14.0.3/include/profile/MemProfData.inc
+OLD_DIRS+=usr/lib/clang/14.0.3/include/profile
+OLD_FILES+=usr/lib/clang/14.0.3/include/sanitizer/allocator_interface.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/sanitizer/asan_interface.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/sanitizer/common_interface_defs.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/sanitizer/coverage_interface.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/sanitizer/dfsan_interface.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/sanitizer/hwasan_interface.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/sanitizer/linux_syscall_hooks.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/sanitizer/lsan_interface.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/sanitizer/memprof_interface.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/sanitizer/msan_interface.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/sanitizer/netbsd_syscall_hooks.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/sanitizer/scudo_interface.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/sanitizer/tsan_interface.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/sanitizer/tsan_interface_atomic.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/sanitizer/ubsan_interface.h
+OLD_DIRS+=usr/lib/clang/14.0.3/include/sanitizer
+OLD_FILES+=usr/lib/clang/14.0.3/include/xray/xray_interface.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/xray/xray_log_interface.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/xray/xray_records.h
+OLD_DIRS+=usr/lib/clang/14.0.3/include/xray
+OLD_FILES+=usr/lib/clang/14.0.3/include/__clang_cuda_builtin_vars.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/__clang_cuda_cmath.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/__clang_cuda_complex_builtins.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/__clang_cuda_device_functions.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/__clang_cuda_intrinsics.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/__clang_cuda_libdevice_declares.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/__clang_cuda_math.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/__clang_cuda_math_forward_declares.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/__clang_cuda_runtime_wrapper.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/__clang_cuda_texture_intrinsics.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/__clang_hip_cmath.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/__clang_hip_libdevice_declares.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/__clang_hip_math.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/__clang_hip_runtime_wrapper.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/__stddef_max_align_t.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/__wmmintrin_aes.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/__wmmintrin_pclmul.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/adxintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/altivec.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/ammintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/amxintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/arm64intr.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/arm_acle.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/arm_bf16.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/arm_cde.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/arm_cmse.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/arm_fp16.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/arm_mve.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/arm_neon.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/arm_neon_sve_bridge.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/arm_sve.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/armintr.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/avx2intrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/avx512bf16intrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/avx512bitalgintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/avx512bwintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/avx512cdintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/avx512dqintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/avx512erintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/avx512fintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/avx512fp16intrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/avx512ifmaintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/avx512ifmavlintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/avx512pfintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/avx512vbmi2intrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/avx512vbmiintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/avx512vbmivlintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/avx512vlbf16intrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/avx512vlbitalgintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/avx512vlbwintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/avx512vlcdintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/avx512vldqintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/avx512vlfp16intrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/avx512vlintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/avx512vlvbmi2intrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/avx512vlvnniintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/avx512vlvp2intersectintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/avx512vnniintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/avx512vp2intersectintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/avx512vpopcntdqintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/avx512vpopcntdqvlintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/avxintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/avxvnniintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/bmi2intrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/bmiintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/builtins.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/cet.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/cetintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/cldemoteintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/clflushoptintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/clwbintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/clzerointrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/cpuid.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/crc32intrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/emmintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/enqcmdintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/f16cintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/float.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/fma4intrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/fmaintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/fxsrintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/gfniintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/hexagon_circ_brev_intrinsics.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/hexagon_protos.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/hexagon_types.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/hresetintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/htmintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/htmxlintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/hvx_hexagon_protos.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/ia32intrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/immintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/intrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/inttypes.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/invpcidintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/iso646.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/keylockerintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/limits.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/lwpintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/lzcntintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/mm3dnow.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/mm_malloc.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/mmintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/module.modulemap
+OLD_FILES+=usr/lib/clang/14.0.3/include/movdirintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/msa.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/mwaitxintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/nmmintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/omp-tools.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/omp.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/ompt.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/opencl-c-base.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/opencl-c.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/pconfigintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/pkuintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/pmmintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/popcntintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/prfchwintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/ptwriteintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/rdseedintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/riscv_vector.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/rtmintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/s390intrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/serializeintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/sgxintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/shaintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/smmintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/stdalign.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/stdarg.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/stdatomic.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/stdbool.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/stddef.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/stdint.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/stdnoreturn.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/tbmintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/tgmath.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/tmmintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/tsxldtrkintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/uintrintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/unwind.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/vadefs.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/vaesintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/varargs.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/vecintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/vpclmulqdqintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/waitpkgintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/wasm_simd128.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/wbnoinvdintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/wmmintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/x86gprintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/x86intrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/xmmintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/xopintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/xsavecintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/xsaveintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/xsaveoptintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/xsavesintrin.h
+OLD_FILES+=usr/lib/clang/14.0.3/include/xtestintrin.h
+OLD_DIRS+=usr/lib/clang/14.0.3/include
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.asan-aarch64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.asan-aarch64.so
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.asan-arm.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.asan-arm.so
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.asan-armhf.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.asan-armhf.so
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.asan-i386.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.asan-i386.so
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.asan-preinit-aarch64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.asan-preinit-arm.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.asan-preinit-armhf.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.asan-preinit-i386.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.asan-preinit-x86_64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.asan-x86_64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.asan-x86_64.so
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.asan_cxx-aarch64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.asan_cxx-arm.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.asan_cxx-armhf.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.asan_cxx-i386.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.asan_cxx-x86_64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.cfi-aarch64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.cfi-arm.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.cfi-armhf.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.cfi-i386.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.cfi-x86_64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.cfi_diag-aarch64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.cfi_diag-arm.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.cfi_diag-armhf.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.cfi_diag-i386.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.cfi_diag-x86_64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.dd-aarch64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.dd-x86_64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.fuzzer-aarch64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.fuzzer-x86_64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.fuzzer_no_main-aarch64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.fuzzer_no_main-x86_64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.msan-aarch64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.msan-x86_64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.msan_cxx-aarch64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.msan_cxx-x86_64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.profile-aarch64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.profile-arm.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.profile-armhf.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.profile-i386.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.profile-powerpc.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.profile-powerpc64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.profile-powerpc64le.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.profile-x86_64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.safestack-aarch64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.safestack-i386.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.safestack-x86_64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.stats-aarch64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.stats-arm.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.stats-armhf.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.stats-i386.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.stats-x86_64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.stats_client-aarch64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.stats_client-arm.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.stats_client-armhf.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.stats_client-i386.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.stats_client-x86_64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.tsan-aarch64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.tsan-x86_64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.tsan_cxx-aarch64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.tsan_cxx-x86_64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.ubsan_minimal-aarch64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.ubsan_minimal-arm.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.ubsan_minimal-armhf.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.ubsan_minimal-i386.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.ubsan_minimal-x86_64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.ubsan_standalone-aarch64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.ubsan_standalone-arm.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.ubsan_standalone-armhf.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.ubsan_standalone-i386.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.ubsan_standalone_cxx-aarch64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.ubsan_standalone_cxx-arm.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.ubsan_standalone_cxx-armhf.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.xray-aarch64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.xray-arm.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.xray-armhf.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.xray-basic-aarch64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.xray-basic-arm.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.xray-basic-armhf.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.xray-basic-x86_64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.xray-fdr-aarch64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.xray-fdr-arm.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.xray-fdr-armhf.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.xray-fdr-x86_64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.xray-profiling-aarch64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.xray-profiling-arm.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.xray-profiling-armhf.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.xray-profiling-x86_64.a
+OLD_FILES+=usr/lib/clang/14.0.3/lib/freebsd/libclang_rt.xray-x86_64.a
+OLD_DIRS+=usr/lib/clang/14.0.3/lib/freebsd
+OLD_DIRS+=usr/lib/clang/14.0.3/lib
+OLD_DIRS+=usr/lib/clang/14.0.3
OLD_DIRS+=usr/lib/clang
OLD_FILES+=usr/share/doc/llvm/clang/LICENSE.TXT
OLD_DIRS+=usr/share/doc/llvm/clang