[PATCH] D83289: [BPF] Emit unknown types as byte arrays

Yonghong Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 10 14:25:29 PDT 2020


yonghong-song added a comment.

For structs with >64k members, currently, it is ignored (with type id 0), no compilation error. That is why I recommend to issue a warning. I worried maybe some codes there with such huge struct/enum (esp. enum), which is not used by bpf program directly, but present in the bpf code. The fatal error may break them. But I agree such cases should be really rare, so maybe fatal error is okay.

Using hole instead of representing float as another type may make it complicated to handle cases like

  const float ...
  float * ...
  float a[100];

some may be struct members, some other may be pointee's, some may be function arguments, etc....
Or we only care about float member in a structure, which is the motivation for this patch, and all
other potential use of float should be ignored (as of today)?

     


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83289





More information about the llvm-commits mailing list