[PATCH] D78947: [GlobalISel] Remove debug locations when emitting constants

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 27 13:29:47 PDT 2020


vsk added a subscriber: dsanders.
vsk added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp:293
   auto Const = buildInstr(TargetOpcode::G_CONSTANT);
+  Const->setDebugLoc(DebugLoc());
   Res.addDefToMIB(*getMRI(), Const);
----------------
@davide It looks like there are a number of sites in this file which require the same fix (e.g; the `isVector` case, the `G_FCONSTANT` case).

What's the plan for tackling that? @dsanders introduced a lost location observer for GISel; we could use that + -mir-debugify to find issues.

For this file in particular, I think we should consider introducing a `buildInstrNoLoc` method and using that where appropriate.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78947/new/

https://reviews.llvm.org/D78947





More information about the llvm-commits mailing list