Remove string function attribute and unused module flags to match DXIL which is based on llvm 3.7.
Also move DXILPrepare pass after DXILTranslateMetadata pass because things like "hlsl.numthreads" will be removed by DXILPrepare pass now.
Paths
| Differential D143854
[DirectX backend] remove string function attribute and unused module flags Needs ReviewPublic Authored by python3kgae on Feb 12 2023, 12:16 PM.
Details
Diff Detail
Event Timeline
Comment Actions Only keep debug related module flags which are used by DXIL. python3kgae added inline comments.
Revision Contents
Diff 497029 llvm/lib/Target/DirectX/DXILPrepare.cpp
llvm/lib/Target/DirectX/DirectXTargetMachine.cpp
llvm/test/CodeGen/DirectX/UAVMetadata.ll
llvm/test/CodeGen/DirectX/strip-string-fn-attrs-module-flags.ll
llvm/test/tools/dxil-dis/attribute-filter.ll
llvm/test/tools/dxil-dis/di-compile-unit.ll
llvm/test/tools/dxil-dis/di-subprogram.ll
|
I'm not sure I agree with the approach of having a list of keys to delete. That seems maintenance-intensive and error prone.
Why not instead only maintain a list of valid string attributes for DXIL, and strip everything else?