The RemoveDeadValuesPass previously emitted an error and skipped optimization when the IR contained non-function symbol ops, non-call symbol user ops, or branch ops. This restriction was later removed, but the comments in RemoveDeadValues.cpp and Passes.td still described the pass as operating "iff the IR doesn't have any non-function symbol ops, non-call symbol user ops and branch ops." Remove the stale restriction text from both the .cpp file comment and the Passes.td description. Also add a test that verifies dead function arguments are correctly removed inside a module that defines a symbol (has a sym_name attribute), which was the original failure case reported in issue #98700. Fixes #98700 Assisted-by: Claude Code
33 KiB
33 KiB