Eliminate dead code for clj-nil and types that don't admit falsey

Description

If the test of an if has a tag of clj-nil then the else branch will always be taken so we can replace such code with the else branch.

Likewise if the test of an if has a tag that cannot yield a falsey value (for example #{number string}), then the then branch will always be taken and we can replace such code with the then branch.

We already have dead code elimination for constants, this ticket asks that we extend it to cases where we can definitely determine a branch will be taken based on inferred types.

Environment

None

Assignee

Mike Fikes

Reporter

Mike Fikes

Labels

None

Approval

None

Patch

Code and Test

Priority

Major
Configure