summaryrefslogtreecommitdiff
path: root/gnu/llvm
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2019-09-01 16:37:26 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2019-09-01 16:37:26 +0000
commitd402b1a8336e9a516b7c23b71da369da1b18a58b (patch)
treef32cbc2ac2762af2cfea86ce97aacd7f80d675c8 /gnu/llvm
parent7aea50eae9e46a1ff53acea498e9f2f4c15055df (diff)
Merge LLVM 8.0.1 release.
Tested in snaps and package builds Tested on amd64 by naddy@ Tested on arm64 by patrick@ Tested on octeon by visa@
Diffstat (limited to 'gnu/llvm')
-rw-r--r--gnu/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp7
-rw-r--r--gnu/llvm/lib/Target/Mips/MipsAsmPrinter.cpp3
-rw-r--r--gnu/llvm/lib/Target/X86/X86TargetMachine.cpp6
-rw-r--r--gnu/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp12
-rw-r--r--gnu/llvm/tools/clang/www/cxx_dr_status.html2
-rw-r--r--gnu/llvm/tools/clang/www/cxx_status.html2
-rw-r--r--gnu/llvm/tools/lld/ELF/SyntheticSections.cpp5
-rw-r--r--gnu/llvm/tools/lld/ELF/Writer.cpp16
8 files changed, 33 insertions, 20 deletions
diff --git a/gnu/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp b/gnu/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
index bb2152845e2..3ac2b11528c 100644
--- a/gnu/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
+++ b/gnu/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
@@ -700,8 +700,11 @@ void MipsTargetAsmStreamer::emitDirectiveCpreturn(unsigned SaveLocation,
}
void MipsTargetAsmStreamer::emitDirectiveModuleFP() {
- OS << "\t.module\tfp=";
- OS << ABIFlagsSection.getFpABIString(ABIFlagsSection.getFpABI()) << "\n";
+ MipsABIFlagsSection::FpABIKind FpABI = ABIFlagsSection.getFpABI();
+ if (FpABI == MipsABIFlagsSection::FpABIKind::SOFT)
+ OS << "\t.module\tsoftfloat\n";
+ else
+ OS << "\t.module\tfp=" << ABIFlagsSection.getFpABIString(FpABI) << "\n";
}
void MipsTargetAsmStreamer::emitDirectiveSetFp(
diff --git a/gnu/llvm/lib/Target/Mips/MipsAsmPrinter.cpp b/gnu/llvm/lib/Target/Mips/MipsAsmPrinter.cpp
index b813e8027e0..4a2c4a7239f 100644
--- a/gnu/llvm/lib/Target/Mips/MipsAsmPrinter.cpp
+++ b/gnu/llvm/lib/Target/Mips/MipsAsmPrinter.cpp
@@ -815,7 +815,8 @@ void MipsAsmPrinter::EmitStartOfAsmFile(Module &M) {
// We should always emit a '.module fp=...' but binutils 2.24 does not accept
// it. We therefore emit it when it contradicts the ABI defaults (-mfpxx or
// -mfp64) and omit it otherwise.
- if (ABI.IsO32() && (STI.isABI_FPXX() || STI.isFP64bit()))
+ if ((ABI.IsO32() && (STI.isABI_FPXX() || STI.isFP64bit())) ||
+ STI.useSoftFloat())
TS.emitDirectiveModuleFP();
// We should always emit a '.module [no]oddspreg' but binutils 2.24 does not
diff --git a/gnu/llvm/lib/Target/X86/X86TargetMachine.cpp b/gnu/llvm/lib/Target/X86/X86TargetMachine.cpp
index 925fd51b444..b91803c3c73 100644
--- a/gnu/llvm/lib/Target/X86/X86TargetMachine.cpp
+++ b/gnu/llvm/lib/Target/X86/X86TargetMachine.cpp
@@ -38,6 +38,7 @@
#include "llvm/IR/Attributes.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Function.h"
+#include "llvm/MC/MCAsmInfo.h"
#include "llvm/Pass.h"
#include "llvm/Support/CodeGen.h"
#include "llvm/Support/CommandLine.h"
@@ -513,6 +514,9 @@ void X86PassConfig::addPreEmitPass2() {
// correct CFA calculation rule where needed by inserting appropriate CFI
// instructions.
const Triple &TT = TM->getTargetTriple();
- if (!TT.isOSDarwin() && !TT.isOSWindows())
+ const MCAsmInfo *MAI = TM->getMCAsmInfo();
+ if (!TT.isOSDarwin() &&
+ (!TT.isOSWindows() ||
+ MAI->getExceptionHandlingType() == ExceptionHandling::DwarfCFI))
addPass(createCFIInstrInserter());
}
diff --git a/gnu/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp b/gnu/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp
index 1b3288d0adc..78bf9acf5c9 100644
--- a/gnu/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/gnu/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp
@@ -718,8 +718,9 @@ static void appendUserToPath(SmallVectorImpl<char> &Result) {
Result.append(UID.begin(), UID.end());
}
-static void addPGOAndCoverageFlags(Compilation &C, const Driver &D,
- const InputInfo &Output, const ArgList &Args,
+static void addPGOAndCoverageFlags(const ToolChain &TC, Compilation &C,
+ const Driver &D, const InputInfo &Output,
+ const ArgList &Args,
ArgStringList &CmdArgs) {
auto *PGOGenerateArg = Args.getLastArg(options::OPT_fprofile_generate,
@@ -759,6 +760,11 @@ static void addPGOAndCoverageFlags(Compilation &C, const Driver &D,
ProfileGenerateArg->getValue()));
// The default is to use Clang Instrumentation.
CmdArgs.push_back("-fprofile-instrument=clang");
+ if (TC.getTriple().isWindowsMSVCEnvironment()) {
+ // Add dependent lib for clang_rt.profile
+ CmdArgs.push_back(Args.MakeArgString("--dependent-lib=" +
+ TC.getCompilerRT(Args, "profile")));
+ }
}
if (PGOGenerateArg) {
@@ -4121,7 +4127,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
// sampling, overhead of call arc collection is way too high and there's no
// way to collect the output.
if (!Triple.isNVPTX())
- addPGOAndCoverageFlags(C, D, Output, Args, CmdArgs);
+ addPGOAndCoverageFlags(TC, C, D, Output, Args, CmdArgs);
if (auto *ABICompatArg = Args.getLastArg(options::OPT_fclang_abi_compat_EQ))
ABICompatArg->render(Args, CmdArgs);
diff --git a/gnu/llvm/tools/clang/www/cxx_dr_status.html b/gnu/llvm/tools/clang/www/cxx_dr_status.html
index f2ca601c93c..c30b9cbaed3 100644
--- a/gnu/llvm/tools/clang/www/cxx_dr_status.html
+++ b/gnu/llvm/tools/clang/www/cxx_dr_status.html
@@ -28,7 +28,7 @@
<!--*************************************************************************-->
<h1>C++ Defect Report Support in Clang</h1>
<!--*************************************************************************-->
-<p>Last updated: $Date: 2019/06/23 22:05:16 $</p>
+<p>Last updated: $Date: 2019/09/01 16:37:25 $</p>
<h2 id="cxxdr">C++ defect report implementation status</h2>
diff --git a/gnu/llvm/tools/clang/www/cxx_status.html b/gnu/llvm/tools/clang/www/cxx_status.html
index fc0265e1f67..0ebb4ea97fe 100644
--- a/gnu/llvm/tools/clang/www/cxx_status.html
+++ b/gnu/llvm/tools/clang/www/cxx_status.html
@@ -26,7 +26,7 @@
<!--*************************************************************************-->
<h1>C++ Support in Clang</h1>
<!--*************************************************************************-->
-<p>Last updated: $Date: 2019/06/23 22:05:16 $</p>
+<p>Last updated: $Date: 2019/09/01 16:37:25 $</p>
<p>Clang fully implements all published ISO C++ standards (<a
href="#cxx98">C++98 / C++03</a>, <a
diff --git a/gnu/llvm/tools/lld/ELF/SyntheticSections.cpp b/gnu/llvm/tools/lld/ELF/SyntheticSections.cpp
index b227d737987..96ef7cc5cfe 100644
--- a/gnu/llvm/tools/lld/ELF/SyntheticSections.cpp
+++ b/gnu/llvm/tools/lld/ELF/SyntheticSections.cpp
@@ -2001,6 +2001,11 @@ template <class ELFT> void SymbolTableSection<ELFT>::writeTo(uint8_t *Buf) {
ESym->setVisibility(Sym->Visibility);
}
+ // The 3 most significant bits of st_other are used by OpenPOWER ABI.
+ // See getPPC64GlobalEntryToLocalEntryOffset() for more details.
+ if (Config->EMachine == EM_PPC64)
+ ESym->st_other |= Sym->StOther & 0xe0;
+
ESym->st_name = Ent.StrTabOffset;
ESym->st_shndx = getSymSectionIndex(Ent.Sym);
diff --git a/gnu/llvm/tools/lld/ELF/Writer.cpp b/gnu/llvm/tools/lld/ELF/Writer.cpp
index ed783b7f495..b1a13216488 100644
--- a/gnu/llvm/tools/lld/ELF/Writer.cpp
+++ b/gnu/llvm/tools/lld/ELF/Writer.cpp
@@ -549,6 +549,11 @@ static bool shouldKeepInSymtab(SectionBase *Sec, StringRef SymName,
if (Config->Discard == DiscardPolicy::None)
return true;
+ // If -emit-reloc is given, all symbols including local ones need to be
+ // copied because they may be referenced by relocations.
+ if (Config->EmitRelocs)
+ return true;
+
// In ELF assembly .L symbols are normally discarded by the assembler.
// If the assembler fails to do so, the linker discards them if
// * --discard-locals is used.
@@ -2218,17 +2223,6 @@ template <class ELFT> void Writer<ELFT>::setPhdrs() {
}
if (P->p_type == PT_TLS && P->p_memsz) {
- if (!Config->Shared &&
- (Config->EMachine == EM_ARM || Config->EMachine == EM_AARCH64)) {
- // On ARM/AArch64, reserve extra space (8 words) between the thread
- // pointer and an executable's TLS segment by overaligning the segment.
- // This reservation is needed for backwards compatibility with Android's
- // TCB, which allocates several slots after the thread pointer (e.g.
- // TLS_SLOT_STACK_GUARD==5). For simplicity, this overalignment is also
- // done on other operating systems.
- P->p_align = std::max<uint64_t>(P->p_align, Config->Wordsize * 8);
- }
-
// The TLS pointer goes after PT_TLS for variant 2 targets. At least glibc
// will align it, so round up the size to make sure the offsets are
// correct.