Commit 7d2d908
committed
Order a preprocessing storage's element types deterministically
The storage type's element list was built by inserting into a DenseSet<Type>
and then copying the set out. Type is a pointer wrapper, so the set hands its
elements back in the order of their addresses, and that order is not stable
from one run to the next.
The order is not cosmetic: the element list is part of the __preprocessing
function's signature and fixes which memref each store and load site indexes,
so permuting it produces a different module for the same input. A storage with
one element type could not show this; a storage holding several -- plaintexts
next to prepared linear transformations -- can.
Collect the types in first-occurrence order instead, which is what the nearby
uniqueElementTypes() helper already documents as the intended contract.1 parent ffd79eb commit 7d2d908
1 file changed
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
381 | | - | |
| 381 | + | |
| 382 | + | |
382 | 383 | | |
383 | | - | |
384 | | - | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
385 | 387 | | |
386 | | - | |
387 | | - | |
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
| |||
0 commit comments