carbon-lang icon indicating copy to clipboard operation
carbon-lang copied to clipboard

Replace `FoldingSet` with `DenseMap` for instruction canonicalization.

Open zygoloid opened this issue 1 year ago • 1 comments

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.

zygoloid avatar May 22 '24 21:05 zygoloid

(approving to unblock)

jonmeow avatar May 22 '24 22:05 jonmeow