[SR-9573] [QoI] IRGen doesn't fold dead BBs #52020
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
IRGen
LLVM IR generation
performance
Additional Detail from JIRA
md5: fc926d4189f88886ee9fc53d5c8709fc
Issue Description:
Noted when debugging SILOptimizer.let_properties_opts_runtime which compiles with optimization ({{-O}}). I noticed that at multiple sites, we do not collapse the dead paths:
{{ retq}}
.LBB0_10:
{{ #APP}}
{{ #NO_APP}}
{{ ud2}}
{{ ud2}}
.LBB0_11:
{{ #APP}}
{{ #NO_APP}}
{{ ud2}}
{{ ud2}}
.LBB0_12:
{{ #APP}}
{{ #NO_APP}}
{{ ud2}}
{{ ud2}}
.LBB0_13:
{{ #APP}}
{{ #NO_APP}}
{{ ud2}}
{{ ud2}}
.LBB0_14:
{{ #APP}}
{{ #NO_APP}}
{{ ud2}}
{{ ud2}}
.LBB0_15:
{{ #APP}}
{{ #NO_APP}}
{{ ud2}}
{{ ud2}}
While this can be helpful in normal debugging for recovering code flow, it seems that in optimized mode, we should be collapsing the dead paths.
The text was updated successfully, but these errors were encountered: