tvm icon indicating copy to clipboard operation
tvm copied to clipboard

[TIR] Expand debug symbol output for CodeGenLLVM

Open Lunderberg opened this issue 1 year ago • 2 comments

Prior to this commit, the CodeGenLLVM would include DWARF symbols specifying the function signature of each TIR function. This commit expands the information exposed in the debug symbols.

  • Name functions based on the name of the corresponding TIR function. This is taken either from the attr::kGlobalSymbol if present, or the PrimFunc's GlobalVar otherwise.

  • Name function parameter based on their TIR variable name.

  • Annotate the name, the type signature, and parameter names for the private function produced by the tir::attr::compute_scope attribute.

  • Name local variables based on the name and type of the corresponding TIR variable.

Lunderberg avatar Feb 08 '24 01:02 Lunderberg

This came about while debugging the implementation of https://github.com/apache/tvm/pull/16542, but is otherwise unrelated.

Lunderberg avatar Feb 08 '24 01:02 Lunderberg

Merged from main to PR branch, to resolve CI breakage that was fixed in https://github.com/apache/tvm/pull/16546.

Lunderberg avatar Feb 09 '24 20:02 Lunderberg