[all-commits] [llvm/llvm-project] d73275: [DebugInstrRef] Substitute debug value numbers to ...

Jeremy Morse via All-commits all-commits at lists.llvm.org
Thu Oct 22 05:06:00 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: d73275993bbc19b38b7818e96953f84decf0653b
      https://github.com/llvm/llvm-project/commit/d73275993bbc19b38b7818e96953f84decf0653b
  Author: Jeremy Morse <jeremy.morse at sony.com>
  Date:   2020-10-22 (Thu, 22 Oct 2020)

  Changed paths:
    M llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
    M llvm/lib/Target/X86/X86FixupLEAs.cpp
    A llvm/test/DebugInfo/MIR/InstrRef/twoaddr-to-threeaddr-sub.mir

  Log Message:
  -----------
  [DebugInstrRef] Substitute debug value numbers to handle optimizations

This patch touches two optimizations, TwoAddressInstruction and X86's
FixupLEAs pass, both of which optimize by re-creating instructions. For
LEAs, various bits of arithmetic are better represented as LEAs on X86,
while TwoAddressInstruction sometimes converts instrs into three address
instructions if it's profitable.

For debug instruction referencing, both of these require substitutions to
be created -- the old instruction number must be pointed to the new
instruction number, as illustrated in the added test. If this isn't done,
any variable locations based on the optimized instruction are
conservatively dropped.

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




More information about the All-commits mailing list