tvm
tvm copied to clipboard
[TIR] Expand debug symbol output for CodeGenLLVM
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::kGlobalSymbolif present, or the PrimFunc'sGlobalVarotherwise. -
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_scopeattribute. -
Name local variables based on the name and type of the corresponding TIR variable.
This came about while debugging the implementation of https://github.com/apache/tvm/pull/16542, but is otherwise unrelated.
Merged from main to PR branch, to resolve CI breakage that was fixed in https://github.com/apache/tvm/pull/16546.