[llvm] [utils/TableGen/X86CompressEVEXTablesEmitter.cpp] Make sure the tablegen output for the `checkPredicate` function is deterministic (PR #84533)
Shengchen Kan via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 8 19:10:01 PST 2024
KanRobert wrote:
> It's non-deterministic because the keys are pointer values, so ordering for them is not stable between runs.
I see. Could we change the type of `PredicateInstMap` to
```
std::map<StringRef, std::vector<const CodeGenInstruction *>>
PredicateInstMap;
```
where the `StringRef` is the `CondString` of the predicate. So that we don't have to resort it after the map is constructed.
https://github.com/llvm/llvm-project/pull/84533
More information about the llvm-commits
mailing list