[PATCH] D123883: [BPF] Fix a bug in BPFMISimplifyPatchable pass
Yonghong Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 19 13:25:32 PDT 2022
yonghong-song added inline comments.
================
Comment at: llvm/lib/Target/BPF/BPFMISimplifyPatchable.cpp:236
unsigned Opcode = Inst->getOpcode();
+ if (Opcode == BPF::LDD || Opcode == BPF::LDW || Opcode == BPF::LDH ||
+ Opcode == BPF::LDB || Opcode == BPF::LDW32 || Opcode == BPF::LDH32 ||
----------------
ast wrote:
> why gate only loads here?
> The hunk below will apply to loads only anyway,
> so this check looks unnecessary.
> If both filter_loads checks (here and line 267) are necessary may be combine them into a helper function?
They are not redundant. We have `SkipInsts.insert(Inst);` here.
But a helper function (here and line 267) is a good idea. I kind of realize it but a little bit lazy, but since you mentioned this. Will do it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123883/new/
https://reviews.llvm.org/D123883
More information about the llvm-commits
mailing list