[OpenMPOpt] Make the combination of `ident_t*` deterministic
authorJohannes Doerfert <johannes@jdoerfert.de>
Mon, 20 Apr 2020 23:25:24 +0000 (18:25 -0500)
committerJohannes Doerfert <johannes@jdoerfert.de>
Tue, 21 Apr 2020 04:27:08 +0000 (23:27 -0500)
commitdc3b5b00fea104f231ae70fecab9d625fe14158c
tree02d729e1e0e006463a895128880d7d07de2f6d2f
parent8855fec37e7cabdfbfd9645c069a272545ba04d3
[OpenMPOpt] Make the combination of `ident_t*` deterministic

Before we kept the first applicable `ident_t*` during deduplication of
runtime calls. The problem is that "first" is dependent on the iteration
order of a DenseMap. Since the proper solution, which is to combine the
information from all `ident_t*`, should be deterministic on its own, we
will not try to make the iteration order deterministic. Instead, we will
create a fresh `ident_t*` if there is not a unique existing `ident_t*`
to pick.
llvm/lib/Transforms/IPO/OpenMPOpt.cpp
llvm/test/Transforms/OpenMP/deduplication.ll