llvm/lib/IR
Keno Fischer e34d6c6de7 [Cloning] Take another pass at properly cloning debug info
Summary:
In rL302576, DISubprograms gained the constraint that a !dbg attachments to functions must
have a 1:1 mapping to DISubprograms. As part of that change, the function cloning support
was adjusted to attempt to enforce this invariant during cloning. However, there
were several problems with the implementation. Part of these were fixed in rL304079.
However, there was a more fundamental problem with these changes, namely that it
bypasses the matadata value map, causing the cloned metadata to be a mix of metadata
pointing to the new suprogram (where manual code was added to fix those up) and the
old suprogram (where this was not the case). This mismatch could cause a number of
different assertion failures in the DWARF emitter. Some of these are given at
https://github.com/JuliaLang/julia/issues/22069, but some others have been observed
as well. Attempt to rectify this by partially reverting the manual DI metadata fixup,
and instead using the standard value map approach. To retain the desired semantics
of not duplicating the compilation unit and inlined subprograms, explicitly freeze
these in the value map.

Reviewers: dblaikie, aprantl, GorNishanov, echristo

Reviewed By: aprantl

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D33655

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304226 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-30 18:28:30 +00:00
..
AsmWriter.cpp [IR] Allow attributes with global variables 2017-05-11 12:28:08 +00:00
AttributeImpl.h [IR] Switch AttributeList to use an array for O(1) access 2017-05-23 17:01:48 +00:00
Attributes.cpp Silence MSVC warning about unsigned integer overflow, which has defined behavior 2017-05-23 21:35:32 +00:00
AttributesCompatFunc.td
AutoUpgrade.cpp Added missing break. 2017-05-19 20:31:51 +00:00
BasicBlock.cpp [IR] Add an iterator and range accessor for the PHI nodes of a basic 2017-05-26 03:10:00 +00:00
CMakeLists.txt
Comdat.cpp [IR] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-17 00:00:09 +00:00
ConstantFold.cpp ConstantFold: Handle gep nonnull, undef as well 2017-05-08 17:37:33 +00:00
ConstantFold.h
ConstantRange.cpp [ConstantRange] Fix the early out in ConstantRange::multiply for positive numbers to really do what the comment says 2017-05-10 20:01:48 +00:00
Constants.cpp SimplifyLibCalls: Optimize wcslen 2017-05-19 22:37:09 +00:00
ConstantsContext.h [IR] De-virtualize ~Value to save a vptr 2017-05-18 17:24:10 +00:00
Core.cpp Prefer addAttr(Attribute::AttrKind) over the AttributeList overload 2017-04-19 17:28:52 +00:00
DataLayout.cpp [DataLayout] Add llvm_unreachable to the default of a nested switch statement that covers all values given to it by the outer switch. NFC 2017-05-22 19:28:36 +00:00
DebugInfo.cpp [IR] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC). 2017-05-05 22:30:37 +00:00
DebugInfoMetadata.cpp [codeview] Check for a DIExpression offset for local variables 2017-05-09 19:59:29 +00:00
DebugLoc.cpp [Cloning] Take another pass at properly cloning debug info 2017-05-30 18:28:30 +00:00
DiagnosticInfo.cpp IR: Give function GlobalValue::getRealLinkageName() a less misleading name: dropLLVMManglingEscape(). 2017-05-16 00:39:01 +00:00
DiagnosticPrinter.cpp
DIBuilder.cpp Remove line and file from DINamespace. 2017-04-28 22:25:46 +00:00
Dominators.cpp Revert "Do not verify dominator tree if it has no roots" 2017-01-25 17:15:48 +00:00
Function.cpp [IR] De-virtualize ~Value to save a vptr 2017-05-18 17:24:10 +00:00
GCOV.cpp [gcov] Sort file info before printing it 2017-04-26 00:16:10 +00:00
Globals.cpp Add support for handling ifuncs to GlobalValue::getBaseObject 2017-05-15 18:28:29 +00:00
GVMaterializer.cpp
InlineAsm.cpp [IR] De-virtualize ~Value to save a vptr 2017-05-18 17:24:10 +00:00
Instruction.cpp [IR] De-virtualize ~Value to save a vptr 2017-05-18 17:24:10 +00:00
Instructions.cpp Commit AttributeList change that was supposed to be part of r303654 2017-05-23 17:03:28 +00:00
IntrinsicInst.cpp Add constrained intrinsics for some libm-equivalent operations 2017-05-25 21:31:00 +00:00
IRBuilder.cpp Fix vector pass-through value being unused in IRBuilder::CreateMaskedGather 2017-05-19 10:40:18 +00:00
IRPrintingPasses.cpp Implement getPassName() for IR printing passes. 2017-03-10 07:09:20 +00:00
LegacyPassManager.cpp [LTO] Print time-passes information at conclusion of LTO codegen 2017-05-16 09:43:21 +00:00
LLVMBuild.txt
LLVMContext.cpp Add !associated metadata. 2017-03-17 22:17:24 +00:00
LLVMContextImpl.cpp [IR] De-virtualize ~Value to save a vptr 2017-05-18 17:24:10 +00:00
LLVMContextImpl.h [APInt] Give the value union a name so we can remove assumptions on VAL being the larger member 2017-05-03 15:46:24 +00:00
Mangler.cpp Move llvm::emitLinkerFlagsForGlobalCOFF() to Mangler. 2017-03-31 04:46:50 +00:00
MDBuilder.cpp Add function importing info from samplepgo profile to the module summary. 2017-02-28 18:09:44 +00:00
Metadata.cpp [Metadata] Fix typos in comments. NFC 2017-04-27 05:48:29 +00:00
MetadataImpl.h
Module.cpp Support for taking the max of module flags when linking, use for PIE/PIC 2017-05-23 00:08:00 +00:00
ModuleSummaryIndex.cpp Re-apply r302108, "IR: Use pointers instead of GUIDs to represent edges in the module summary. NFCI." 2017-05-04 18:03:25 +00:00
Operator.cpp [IR] Remove some unneeded includes from Operator.h and fix cpp files that were transitively depending on it. NFC 2017-03-20 05:08:41 +00:00
OptBisect.cpp Remove opt-bisect support for "cases" in favor of debug counters 2017-03-11 01:41:03 +00:00
Pass.cpp Cleanup dump() functions. 2017-01-28 02:02:38 +00:00
PassManager.cpp
PassRegistry.cpp [LegacyPassManager] Remove TargetMachine constructors 2017-05-18 17:21:13 +00:00
ProfileSummary.cpp
Statepoint.cpp Rename AttributeSet to AttributeList 2017-03-21 16:57:19 +00:00
SymbolTableListTraitsImpl.h
Type.cpp [IR] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC). 2017-05-12 22:25:07 +00:00
TypeFinder.cpp [IR] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-17 00:00:09 +00:00
Use.cpp
User.cpp [IR] De-virtualize ~Value to save a vptr 2017-05-18 17:24:10 +00:00
Value.cpp [IR] De-virtualize ~Value to save a vptr 2017-05-18 17:24:10 +00:00
ValueSymbolTable.cpp [IR] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-17 00:00:09 +00:00
ValueTypes.cpp [MVT] add v1i1 MVT 2017-05-18 11:29:41 +00:00
Verifier.cpp Add constrained intrinsics for some libm-equivalent operations 2017-05-25 21:31:00 +00:00