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.
@tlively I re-ran update_llc_test_checks.py over this file and it removed all the CHECKs entirely (best kind of correct...). Am I holding it wrong?