[PATCH] D144659: [DirectX backend] remove hlsl.* FnAttr after use.

Xiang Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 6 13:58:49 PST 2023


python3kgae added inline comments.


================
Comment at: llvm/lib/Target/DirectX/DXILMetadata.cpp:99
+  EntryProps(Function &F, Attribute &EntryAttr,
+             Triple::EnvironmentType ModuleShaderKind)
       : ShaderKind(ModuleShaderKind) {
----------------
beanz wrote:
> I'm not sure I understand this refactoring... It looks like you're trying to avoid looking up the attribute more than once, but it means you're keeping track of the Attribute and passing it around through layers... I'm not convinced that is beneficial.
How about send the Entry shader kind for library directly?
Then we can remove the if (ShaderKind == Triple::EnvironmentType::Library) and no extra Attribute needs to be sent down.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144659



More information about the llvm-commits mailing list