[PATCH] D61809: [BPF] Preserve debuginfo array/union/struct type/access index

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 27 18:50:06 PDT 2019


efriedma added a comment.

The new approach to tracking expressions inside of __builtin_preserve_access_index seems okay.

Please let @rsmith comment since he looked at this before.



================
Comment at: docs/LanguageExtensions.rst:1958
+array subscript access and structure/union member access are preserved with
+IR intrinsics ``preserve_array_access_index``, ``preserve_union_access_index``
+and ``preserve_struct_access_index``, instead of IR GetElementPtr instructions.
----------------
"preserved with the IR intrinsics" isn't really useful; this is the user's manual, not a developer guide to LLVM internals. Probably better to say what it enables from the user's perspective: the CO-RE feature for BPF targets.


================
Comment at: docs/LanguageExtensions.rst:1960
+and ``preserve_struct_access_index``, instead of IR GetElementPtr instructions.
+``__builtin_preserve_access_index`` takes effect only when debuginfo (typically
+with ``-g``) is available since debuginfo is used as IR intrinsic metadata
----------------
I would rather not have __builtin_preserve_access_index fail to do anything when debug info is disabled. If it's hard to fix, making it a hard error is probably okay.


Repository:
  rC Clang

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

https://reviews.llvm.org/D61809





More information about the cfe-commits mailing list