[PATCH] D55243: [mir] Serialize DILocation inline when not possible to use a metadata reference
Daniel Sanders via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 3 17:20:35 PST 2018
dsanders created this revision.
dsanders added reviewers: aprantl, vsk, arphaman.
Sometimes MIR-level passes create DILocations that were not present in the
LLVM-IR. For example, it may merge two DILocations together to produce a
DILocation that points to line 0.
Previously, the address of these DILocations were printed which prevented the
MIR from being read back into LLVM. With this patch, DILocations will use
metadata references where possible and fall back on serializing them inline like so:
MOV32mr %stack.0.x.addr, 1, _, 0, _, %0, debug-location !DILocation(line: 1, scope: !15)
Repository:
rL LLVM
https://reviews.llvm.org/D55243
Files:
lib/CodeGen/MIRParser/MILexer.cpp
lib/CodeGen/MIRParser/MILexer.h
lib/CodeGen/MIRParser/MIParser.cpp
lib/IR/AsmWriter.cpp
test/CodeGen/Hexagon/packetize-debug-loc.mir
test/CodeGen/MIR/X86/instructions-debug-location.mir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55243.176520.patch
Type: text/x-patch
Size: 10107 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181204/30ab178d/attachment.bin>
More information about the llvm-commits
mailing list