[PATCH] D122245: [Disassember][NFCI] Use strong type for instruction decoder
Kan Shengchen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 23 19:17:14 PDT 2022
skan added a comment.
In D122245#3403187 <https://reviews.llvm.org/D122245#3403187>, @maksfb wrote:
> In D122245#3401920 <https://reviews.llvm.org/D122245#3401920>, @foad wrote:
>
>> Can you explain which ones are removed? In the AMDGPU backend it looks like they are all still required, to cast from `MCDisassembler *` to `AMDGPUDisassembler *`.
>
> Right, I removed casts where no further code changes were required. E.g., if the pointer was used to call an `AMDGPUDisassembler`-specific function, we still need to cast. It's possible I've missed some cases. Please let me know.
I think most of the removed casts are `const void *`->`const MCDisassembler *` b/c we use `MCDisassembler` as parameters explicitly in this patch , which seems reasonable to me. From the logs, I believe `FixedLenDecoderEmitter.cpp` defined the function prototype first, and then all the targets had to follow it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122245/new/
https://reviews.llvm.org/D122245
More information about the llvm-commits
mailing list