[PATCH] D53736: [BTF] Add BTF DebugInfo
Yonghong Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 26 16:27:02 PDT 2018
yonghong-song added a comment.
I did not use DebugInfoFinder or refactor Verifier.cpp to type visiting. There are a couple of reasons for this.
. DebugInfoFinder tries to collect all information for a module and process them together.
. The BTF type processing is very similar to Dwarf and Codeview.
In Dwarf, getDIE() is used to check whether a type->DIE has been done or not. If it has,
that type will not be processed further.
Similarly, for CodeView, TypeIndices variable is used to check whether a type -> Index has
been done or not. If it has, that type will be skipped.
. The current BTF type processing may skip some types during traversal. With DebugInfoFinder approach,
it will be hard to find which type should be skipped without recursive traversing again.... It may be
just some space waste, but not ideal.
. With DebugInfoFinder, the type information will need to be collected before the first subprogram
is processed. Not sure whether all type information is available or not.
I feel refactoring Verifier.cpp to provide a common interface for visiting the type hierarchy is better.
But it looks like complicated and it probably should be done in a different patch. This common
interface could be used by BTF, CodeView and Dwarf as all of them have such a code pattern.
@aprantl what do you think? Maybe I missed something here?
Repository:
rL LLVM
https://reviews.llvm.org/D53736
More information about the llvm-commits
mailing list