[PATCH] D72787: [BPF] Adjust optimizations to generate kernel verifier friendly codes

Alexei Starovoitov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 17 19:25:51 PST 2020


ast added inline comments.


================
Comment at: llvm/lib/Target/BPF/BPFMIAdjustOpt.cpp:78
+bool BPFMIAdjustOpt::adjustOpt(MachineFunction &MF) {
+  // Find patterns like below:
+  //     %9:gpr32 = COPY $w0
----------------
I'm not sure that is correct. Reading lower 32-bit doesn't clear upper bits. I think pattern matching would need to consider the origin of w0. It's not a guarantee that it came as return from a function.
I think teaching verifier to understand this is a better option. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72787/new/

https://reviews.llvm.org/D72787





More information about the llvm-commits mailing list