llvm-project/llvm/lib
Vedant Kumar 9649c2095f [InstCombine] Drop debug loc in TryToSinkInstruction (reland)
Summary:
The advice in HowToUpdateDebugInfo.rst is to "... preserve the debug
location of an instruction if the instruction either remains in its
basic block, or if its basic block is folded into a predecessor that
branches unconditionally".

TryToSinkInstruction doesn't seem to satisfy the criteria as it's
sinking an instruction to some successor block. Preserving the debug loc
can make single-stepping appear to go backwards, or make a breakpoint
hit on that location happen "too late" (since single-stepping from that
breakpoint can cause the function to return unexpectedly).

So, drop the debug location.

This was reverted in ee3620643d because it removed source locations
from inlinable calls, breaking a verifier rule. I've added an exception
for calls because the alternative (setting a line 0 location) is not
better. I tested the updated patch by completing a stage2 RelWithDebInfo
build.

Reviewers: aprantl, davide

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D82487
2020-06-26 17:18:15 -07:00
..
Analysis [Alignment][NFC] Migrate TTI::isLegalToVectorize{Load,Store}Chain to Align 2020-06-26 14:14:27 +00:00
AsmParser LLParser: Accept align(N) as new syntax for parameter attribute 2020-06-26 18:10:21 -04:00
BinaryFormat [WebAssembly] Adding 64-bit version of R_WASM_MEMORY_ADDR_* relocs 2020-06-15 10:07:42 -07:00
Bitcode Remove references to the 4.0 release as a major breaking (NFC) 2020-06-25 23:49:07 +00:00
Bitstream [Bitcode] reserve in front of push_back loops. NFCI. 2020-05-01 15:52:53 +02:00
CodeGen GlobalISel: Don't fail translate on weak cmpxchg 2020-06-26 17:52:18 -04:00
DWARFLinker [Clang] Restore replace_path_prefix instead of startswith 2020-05-13 13:49:14 -04:00
DebugInfo [DebugInfo/DWARF] - Do not hang when CFI are truncated. 2020-06-23 14:39:24 +03:00
Demangle Give microsoftDemangle() an outparam for how many input bytes were consumed. 2020-05-20 16:17:31 -04:00
ExecutionEngine [JITLink] Display host -> target address mapping in debugging output. 2020-06-19 10:05:02 -07:00
Extensions Update compiler extension integration into the build system 2020-04-24 09:40:14 +02:00
Frontend [openmp] Base of tablegen generated OpenMP common declaration 2020-06-23 10:32:32 -04:00
FuzzMutate [SVE] Remove calls to VectorType::getNumElements from FuzzMutate 2020-06-23 11:02:20 -07:00
Fuzzer
IR Improve LegacyPassManager API to correctly report modified status 2020-06-26 14:21:02 +02:00
IRReader Infer alignment of unmarked loads in IR/bitcode parsing. 2020-05-14 13:03:50 -07:00
LTO Remove GlobalValue::getAlignment(). 2020-06-23 19:13:42 -07:00
LineEditor
Linker [SVE] Eliminate calls to default-false VectorType::get() from Linker 2020-05-29 17:43:15 -07:00
MC Revert rGf0bab7875e78e01c149d12302dcc4b6d4c43e25c - "Triple.h - reduce Twine.h include to forward declarations. NFC." 2020-06-26 14:46:40 +01:00
MCA [MCA][InstrBuilder] Correctly mark reserved resources in initializeUsedResources. 2020-05-10 19:25:54 +01:00
Object Remove GlobalValue::getAlignment(). 2020-06-23 19:13:42 -07:00
ObjectYAML [DWARFYAML][debug_info] Teach yaml2obj emit correct DWARF64 unit header. 2020-06-26 19:25:26 +08:00
Option
Passes [MemorySSA] Update comment in PassBuilder 2020-06-26 14:55:31 -07:00
ProfileData Revert "[PGO] Extend the value profile buckets for mem op sizes." 2020-06-25 11:13:49 -07:00
Remarks YAMLRemarkParser.cpp - remove duplicate RemarkParser.h include. NFC. 2020-06-08 13:59:05 +01:00
Support Revert "[clang driver] Move default module cache from system temporary directory" 2020-06-26 13:25:45 -04:00
TableGen Fix ubsan error in tblgen with signed left shift 2020-06-16 11:15:09 -07:00
Target AMDGPU/GlobalISel: Fix some legalization of < dword vector stores 2020-06-26 18:07:39 -04:00
Testing
TextAPI [TextAPI/MachO] Fix style issues. NFC 2020-06-24 14:43:45 -07:00
ToolDrivers [COFF] Use Expected in COFFObjectFile creation 2020-05-08 14:22:28 -07:00
Transforms [InstCombine] Drop debug loc in TryToSinkInstruction (reland) 2020-06-26 17:18:15 -07:00
WindowsManifest
XRay [xray] Add llvm-xray extract support for 32 bit ARM 2020-05-28 18:41:11 -04:00
CMakeLists.txt Update compiler extension integration into the build system 2020-04-24 09:40:14 +02:00
LLVMBuild.txt Update compiler extension integration into the build system 2020-04-24 09:40:14 +02:00