Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dxcompiler.dll has duplicate static initializers via DxcOptToggles.h #6896

Open
chrdavis opened this issue Sep 4, 2024 · 1 comment · May be fixed by #6949
Open

dxcompiler.dll has duplicate static initializers via DxcOptToggles.h #6896

chrdavis opened this issue Sep 4, 2024 · 1 comment · May be fixed by #6949
Labels
bug Bug, regression, crash
Milestone

Comments

@chrdavis
Copy link
Member

chrdavis commented Sep 4, 2024

Static initializers impact performance at load time.

Building latest from github and looking at static initializers shows the same TOGGLE* globals that are getting replicated in multiple compilands from the include/dxc/Support/DxcOptToggles.h header.

D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\dxcassembler.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_DEBUG_NOPS'' D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\dxcassembler.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_ENABLE_AGGRESSIVE_REASSOCIATION''
D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\dxcassembler.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_GVN'' D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\dxcassembler.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_LICM''
D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\dxcassembler.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_LIFETIME_MARKERS'' D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\dxcassembler.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_PARTIAL_LIFETIME_MARKERS''
D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\dxcassembler.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_SINK'' D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\dxcassembler.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_STRUCTURIZE_LOOP_EXITS_FOR_UNROLL''
D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\dxcassembler.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_STRUCTURIZE_RETURNS'' D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\dxcompilerobj.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_DEBUG_NOPS''
D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\dxcompilerobj.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_ENABLE_AGGRESSIVE_REASSOCIATION'' D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\dxcompilerobj.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_GVN''
D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\dxcompilerobj.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_LICM'' D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\dxcompilerobj.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_LIFETIME_MARKERS''
D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\dxcompilerobj.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_PARTIAL_LIFETIME_MARKERS'' D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\dxcompilerobj.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_SINK''
D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\dxcompilerobj.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_STRUCTURIZE_LOOP_EXITS_FOR_UNROLL'' D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\dxcompilerobj.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_STRUCTURIZE_RETURNS''
D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\DXCompiler.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_DEBUG_NOPS'' D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\DXCompiler.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_ENABLE_AGGRESSIVE_REASSOCIATION''
D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\DXCompiler.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_GVN'' D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\DXCompiler.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_LICM''
D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\DXCompiler.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_LIFETIME_MARKERS'' D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\DXCompiler.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_PARTIAL_LIFETIME_MARKERS''
D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\DXCompiler.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_SINK'' D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\DXCompiler.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_STRUCTURIZE_LOOP_EXITS_FOR_UNROLL''
D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\DXCompiler.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_STRUCTURIZE_RETURNS'' D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\dxcfilesystem.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_DEBUG_NOPS''
D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\dxcfilesystem.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_ENABLE_AGGRESSIVE_REASSOCIATION'' D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\dxcfilesystem.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_GVN''
D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\dxcfilesystem.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_LICM'' D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\dxcfilesystem.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_LIFETIME_MARKERS''
D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\dxcfilesystem.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_PARTIAL_LIFETIME_MARKERS'' D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\dxcfilesystem.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_SINK''
D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\dxcfilesystem.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_STRUCTURIZE_LOOP_EXITS_FOR_UNROLL'' D:\DirectXShaderCompiler\VS\tools\clang\tools\dxcompiler\dxcompiler.dir\Release\dxcfilesystem.obj: [size = 40] hlsl::options::dynamic initializer for 'TOGGLE_STRUCTURIZE_RETURNS''

Truncating output due to size limit

@chrdavis chrdavis added bug Bug, regression, crash needs-triage Awaiting triage labels Sep 4, 2024
@damyanp
Copy link
Member

damyanp commented Sep 10, 2024

While this is true, I'm going to mark this as dormant since the team is focused on adding hlsl support to clang. We'd welcome PRs that address this issue.

@damyanp damyanp changed the title DXCompiler.dll contains a large number of static initializers dxcompiler.dll has duplicate static initializers via DxcOptToggles.ht Sep 10, 2024
@damyanp damyanp changed the title dxcompiler.dll has duplicate static initializers via DxcOptToggles.ht dxcompiler.dll has duplicate static initializers via DxcOptToggles.h Sep 10, 2024
@damyanp damyanp removed the needs-triage Awaiting triage label Sep 10, 2024
@damyanp damyanp moved this to Triaged in HLSL Triage Sep 10, 2024
@damyanp damyanp added this to the Dormant milestone Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug, regression, crash
Projects
Status: Triaged
2 participants