carbon-lang
carbon-lang copied to clipboard
Replace `FoldingSet` with `DenseMap` for instruction canonicalization.
Switch from recursing into non-canonical instruction fields to separately canonicalizing those fields. This means we now form canonical InstBlockIds, TypeBlockIds, IntIds, FloatIds, and BindNameIds at least in the cases when they're referenced by a constant instruction.
This reduces the overall runtime for @chandlerc's 10MLoC example by 27.5% on my machine.
(approving to unblock)