[PATCH] D82892: [NFC] Added comparision for all types in haveSameSpecialState() of Instruction.cpp
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 31 11:28:59 PDT 2020
nikic added a comment.
Please take a look at how `Instruction::clone()` is implemented, using a protected `cloneImpl()` method on each instruction type. I would suggest to follow the same pattern, and make these type-specific methods protected (and drop the redundant doc comment on each one of them).
It would be nice to also use the HANDLE_INST pattern to avoid the long list of instructions, but I guess that might be a bit complicated by the IgnoreAlignment/IgnoreMetaData flags. Maybe you just want to keep these as flags passed down to all the functions, regardless of whether they need them or not. I'm not sure on this.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82892/new/
https://reviews.llvm.org/D82892
More information about the llvm-commits
mailing list