[PATCH] D127705: [DirectX] Support opaque ptr for ValueAsMetadata in DXILBitcodeWriter

Justin Bogner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 21 10:19:29 PDT 2022


bogner accepted this revision.
bogner added a comment.
This revision is now accepted and ready to land.

LGTM with a comment about the test



================
Comment at: llvm/test/tools/dxil-dis/opaque-value_as_metadata.ll:28
+!7 = !{[2 x i32] [i32 0, i32 1]}
+; CHECK-DAG:!{{[0-9]}} = !{void ()* @main
+!8 = !{ptr @main, !"main", null, !4, null}
----------------
Is it worth trying to anchor this to the dx metadata (ie, capture the "!8" from "!dx.entryPoints" rather than using the regex...)? I think that'd make what the test is doing a little clearer, but I guess this will be reliable enough as is based on looking for @CBV/@main, so it's probably not a big deal if that's more complicated than it's worth.

Aside, the regex should be `{{[0-9]+}}` just in cast this ends up being `!10`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127705



More information about the llvm-commits mailing list