[PATCH] D147968: [TTI][BPF]: Undo specific transform-preventing passes and add TTI hooks

Yonghong Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 17 20:31:56 PDT 2023


yonghong-song added a comment.

@davidxl Thanks for your suggestions. Adding a single TTI->needsPreserveRangeInfoInVerification() sounds a reasonable idea. Legalization of IR for BPF verification is a great idea but it requires more thought, e.g., how IR will be enhanced to encode verification requirement and how middle end optimization reacts to such requirement as typically it is not clear whether a particular optimization will hurt bpf verification or not unless running though bpf verifier or having a deep knowledge of bpf verifier. We can continue to think and discuss 'legalization of IR for BPF verification' idea, but it could be great we can have current TTI->needsPreserveRangeInfoInVerification() approach which gcc community intends to do the same.

Also as you mentioned, bpf verifier is a moving target as well and we are constantly improving verifier as well. Yes, once we fixed verifier, after some times, old kernels are considered not important, we might undo some hooks in llvm.

I will post another version of the patch soon.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147968



More information about the llvm-commits mailing list