[all-commits] [llvm/llvm-project] ff171a: [WebAssembly] Track frame registers through VReg a...

Derek Schuff via All-commits all-commits at lists.llvm.org
Fri Jan 17 17:24:58 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ff171acf84204c03f67a46d16ef6adb1b83c4e9b
      https://github.com/llvm/llvm-project/commit/ff171acf84204c03f67a46d16ef6adb1b83c4e9b
  Author: Derek Schuff <dschuff at chromium.org>
  Date:   2020-01-17 (Fri, 17 Jan 2020)

  Changed paths:
    M lld/test/wasm/debuginfo.test
    M llvm/include/llvm/CodeGen/TargetFrameLowering.h
    M llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
    M llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp
    M llvm/lib/Target/NVPTX/NVPTXFrameLowering.cpp
    M llvm/lib/Target/NVPTX/NVPTXFrameLowering.h
    M llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.h
    M llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h
    M llvm/lib/Target/WebAssembly/WebAssemblyOptimizeLiveIntervals.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyRegisterInfo.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyReplacePhysRegs.cpp
    M llvm/test/CodeGen/WebAssembly/multi-return.ll
    M llvm/test/MC/WebAssembly/debug-info.ll
    A llvm/test/MC/WebAssembly/debug-localvar.ll
    M llvm/test/MC/WebAssembly/dwarfdump.ll

  Log Message:
  -----------
  [WebAssembly] Track frame registers through VReg and local allocation

This change has 2 components:

Target-independent: add a method getDwarfFrameBase to TargetFrameLowering. It
describes how the Dwarf frame base will be encoded.  That can be a register (the
default), the CFA (which replaces NVPTX-specific logic in DwarfCompileUnit), or
a DW_OP_WASM_location descriptr.

WebAssembly: Allow WebAssemblyFunctionInfo::getFrameRegister to return the
correct virtual register instead of FP32/SP32 after WebAssemblyReplacePhysRegs
has run.  Make WebAssemblyExplicitLocals store the local it allocates for the
frame register. Use this local information to implement getDwarfFrameBase

The result is that the DW_AT_frame_base attribute is correctly encoded for each
subprogram, and each param and local variable has a correct DW_AT_location that
uses DW_OP_fbreg to refer to the frame base.

This is a reland of rG3a05c3969c18 with fixes for the expensive-checks
and Windows builds

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




More information about the All-commits mailing list