Skip to content
This repository was archived by the owner on Dec 20, 2019. It is now read-only.

Commit 013aa03

Browse files
committed
Merge remote-tracking branch 'llvm-mirror/release_80' into ldc-release_80
2 parents b96edf8 + ff8c1be commit 013aa03

File tree

77 files changed

+2834
-359
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+2834
-359
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if(NOT DEFINED LLVM_VERSION_MINOR)
1818
set(LLVM_VERSION_MINOR 0)
1919
endif()
2020
if(NOT DEFINED LLVM_VERSION_PATCH)
21-
set(LLVM_VERSION_PATCH 0)
21+
set(LLVM_VERSION_PATCH 1)
2222
endif()
2323
if(NOT DEFINED LLVM_VERSION_SUFFIX)
2424
set(LLVM_VERSION_SUFFIX "")

cmake/modules/AddLLVM.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,7 @@ if(NOT LLVM_TOOLCHAIN_TOOLS)
855855
llvm-lib
856856
llvm-objdump
857857
llvm-rc
858+
llvm-profdata
858859
)
859860
endif()
860861

cmake/modules/LLVMProcessSources.cmake

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,15 @@ endmacro(add_td_sources)
3030

3131
function(add_header_files_for_glob hdrs_out glob)
3232
file(GLOB hds ${glob})
33-
set(${hdrs_out} ${hds} PARENT_SCOPE)
33+
set(filtered)
34+
foreach(file ${hds})
35+
# Explicit existence check is necessary to filter dangling symlinks
36+
# out. See https://bugs.gentoo.org/674662.
37+
if(EXISTS ${file})
38+
list(APPEND filtered ${file})
39+
endif()
40+
endforeach()
41+
set(${hdrs_out} ${filtered} PARENT_SCOPE)
3442
endfunction(add_header_files_for_glob)
3543

3644
function(find_all_header_files hdrs_out additional_headerdirs)

docs/ReleaseNotes.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,26 @@ updated to use LLJIT.
110110
MCJIT and ExecutionEngine continue to be supported, though ORC should be
111111
preferred for new projects.
112112

113+
Changes to the C++ APIs
114+
-----------------------
115+
116+
Three of the IR library methods related to debugging information for
117+
functions and methods have changed their prototypes:
118+
119+
DIBuilder::createMethod
120+
DIBuilder::createFunction
121+
DIBuilder::createTempFunctionFwdDecl
122+
123+
In all cases, several individual parameters were removed, and replaced
124+
by a single 'SPFlags' (subprogram flags) parameter. The individual
125+
parameters are: 'isLocalToUnit'; 'isDefinition'; 'isOptimized'; and
126+
for 'createMethod', 'Virtuality'. The new 'SPFlags' parameter has a
127+
default value equivalent to passing 'false' for the three 'bool'
128+
parameters, and zero (non-virtual) to the 'Virtuality' parameter. For
129+
any old-style API call that passed 'true' or a non-zero virtuality to
130+
these methods, you will need to substitute the correct 'SPFlags' value.
131+
The helper method 'DISubprogram::toSPFlags()' might be useful in making
132+
this conversion.
113133

114134
Changes to the AArch64 Target
115135
-----------------------------

lib/CodeGen/TargetRegisterInfo.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "llvm/CodeGen/TargetRegisterInfo.h"
1515
#include "llvm/ADT/ArrayRef.h"
1616
#include "llvm/ADT/BitVector.h"
17+
#include "llvm/ADT/SmallSet.h"
1718
#include "llvm/ADT/STLExtras.h"
1819
#include "llvm/ADT/StringExtras.h"
1920
#include "llvm/CodeGen/MachineFrameInfo.h"
@@ -398,6 +399,7 @@ TargetRegisterInfo::getRegAllocationHints(unsigned VirtReg,
398399
const std::pair<unsigned, SmallVector<unsigned, 4>> &Hints_MRI =
399400
MRI.getRegAllocationHints(VirtReg);
400401

402+
SmallSet<unsigned, 32> HintedRegs;
401403
// First hint may be a target hint.
402404
bool Skip = (Hints_MRI.first != 0);
403405
for (auto Reg : Hints_MRI.second) {
@@ -411,6 +413,10 @@ TargetRegisterInfo::getRegAllocationHints(unsigned VirtReg,
411413
if (VRM && isVirtualRegister(Phys))
412414
Phys = VRM->getPhys(Phys);
413415

416+
// Don't add the same reg twice (Hints_MRI may contain multiple virtual
417+
// registers allocated to the same physreg).
418+
if (!HintedRegs.insert(Phys).second)
419+
continue;
414420
// Check that Phys is a valid hint in VirtReg's register class.
415421
if (!isPhysicalRegister(Phys))
416422
continue;

lib/DebugInfo/DWARF/DWARFDebugFrame.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ void CIE::dump(raw_ostream &OS, const MCRegisterInfo *MRI, bool IsEH) const {
301301
OS << format(" Data alignment factor: %d\n", (int32_t)DataAlignmentFactor);
302302
OS << format(" Return address column: %d\n", (int32_t)ReturnAddressRegister);
303303
if (Personality)
304-
OS << format(" Personality Address: %08x\n", *Personality);
304+
OS << format(" Personality Address: %016" PRIx64 "\n", *Personality);
305305
if (!AugmentationData.empty()) {
306306
OS << " Augmentation data: ";
307307
for (uint8_t Byte : AugmentationData)
@@ -320,7 +320,7 @@ void FDE::dump(raw_ostream &OS, const MCRegisterInfo *MRI, bool IsEH) const {
320320
(uint32_t)InitialLocation,
321321
(uint32_t)InitialLocation + (uint32_t)AddressRange);
322322
if (LSDAAddress)
323-
OS << format(" LSDA Address: %08x\n", *LSDAAddress);
323+
OS << format(" LSDA Address: %016" PRIx64 "\n", *LSDAAddress);
324324
CFIs.dump(OS, MRI, IsEH);
325325
OS << "\n";
326326
}

lib/MC/ELFObjectWriter.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,6 +1271,7 @@ void ELFObjectWriter::executePostLayoutBinding(MCAssembler &Asm,
12711271
// This is the first place we are able to copy this information.
12721272
Alias->setExternal(Symbol.isExternal());
12731273
Alias->setBinding(Symbol.getBinding());
1274+
Alias->setOther(Symbol.getOther());
12741275

12751276
if (!Symbol.isUndefined() && !Rest.startswith("@@@"))
12761277
continue;

lib/MC/MCWin64EH.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ static void ARM64EmitUnwindInfo(MCStreamer &streamer, WinEH::FrameInfo *info) {
522522
if (MatchingEpilog) {
523523
assert(EpilogInfo.find(MatchingEpilog) != EpilogInfo.end() &&
524524
"Duplicate epilog not found");
525-
EpilogInfo[EpilogStart] = EpilogInfo[MatchingEpilog];
525+
EpilogInfo[EpilogStart] = EpilogInfo.lookup(MatchingEpilog);
526526
// Clear the unwind codes in the EpilogMap, so that they don't get output
527527
// in the logic below.
528528
EpilogInstrs.clear();

lib/MC/WasmObjectWriter.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,13 @@ void WasmObjectWriter::startCustomSection(SectionBookkeeping &Section,
368368
// Now that the section is complete and we know how big it is, patch up the
369369
// section size field at the start of the section.
370370
void WasmObjectWriter::endSection(SectionBookkeeping &Section) {
371-
uint64_t Size = W.OS.tell() - Section.PayloadOffset;
371+
uint64_t Size = W.OS.tell();
372+
// /dev/null doesn't support seek/tell and can report offset of 0.
373+
// Simply skip this patching in that case.
374+
if (!Size)
375+
return;
376+
377+
Size -= Section.PayloadOffset;
372378
if (uint32_t(Size) != Size)
373379
report_fatal_error("section size does not fit in a uint32_t");
374380

lib/Object/COFFImportFile.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ NewArchiveMember ObjectFactory::createWeakExternal(StringRef Sym,
496496

497497
// COFF Header
498498
coff_file_header Header{
499-
u16(0),
499+
u16(Machine),
500500
u16(NumberOfSections),
501501
u32(0),
502502
u32(sizeof(Header) + (NumberOfSections * sizeof(coff_section))),

0 commit comments

Comments
 (0)