[PATCH] D77576: [globalisel] Add lost debug locations verifier
Daniel Sanders via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 10 17:47:50 PDT 2020
dsanders added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/LostDebugLocObserver.cpp:83
+ if (MI.getOpcode() != TargetOpcode::G_CONSTANT &&
+ MI.getOpcode() != TargetOpcode::G_FCONSTANT) {
+ PotentialMIsForDebugLocs.erase(&MI);
----------------
vsk wrote:
> Please have this return early, ideally like 'if (MI.isConstant()) return;'
>
> I don't mean to suggest that you make tangential changes, it's just that it seems like there's a need for such a predicate (e.g. https://llvm.org/doxygen/AMDGPUInstructionSelector_8cpp_source.html#l01470 defines isConstant for MIs but leaves out G_FCONSTANT).
I looked at this again and found I'd missed G_IMPLICIT_DEF and G_GLOBAL_VALUE which also have their debug locations removed by the IRTranslator to avoid 'jumpy' behaviour in the debugger. I've added a predicate so we don't have two copies of the code in this file but it's not really meaningful for other code.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77576/new/
https://reviews.llvm.org/D77576
More information about the llvm-commits
mailing list