aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/WasmObjectFile.cpp
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2017-05-09 16:58:28 +0000
committerDavide Italiano <davide@freebsd.org>2017-05-09 16:58:28 +0000
commitd6bb8cab0315018dd13b42fb25709dee0ca30471 (patch)
tree8852562b9b20010b6dfe02fb65dfb5a650f21eac /llvm/lib/Object/WasmObjectFile.cpp
parent0acb6654d365508a2732d83134dff22daae1abee (diff)
downloadllvm-d6bb8cab0315018dd13b42fb25709dee0ca30471.zip
llvm-d6bb8cab0315018dd13b42fb25709dee0ca30471.tar.gz
llvm-d6bb8cab0315018dd13b42fb25709dee0ca30471.tar.bz2
[NewGVN] Fix a consistent order for phi nodes operands.
The way we currently define congruency for two PHIExpression(s) is: 1) The operands to the phi functions are congruent 2) The PHIs are defined in the same BasicBlock. NewGVN works under the assumption that phi operands are in predecessor order, or at least in some consistent order. OTOH, is valid IR: patatino: %meh = phi i16 [ %0, %winky ], [ %conv1, %tinky ] %banana = phi i16 [ %0, %tinky ], [ %conv1, %winky ] br label %end and the in-memory representations of the two SSA registers have an inconsistent order. This violation of NewGVN assumptions results into two PHIs found congruent when they're not. While we think it's useful to have always a consistent order enforced, let's fix this in NewGVN sorting uses in predecessor order before creating a PHI expression. Differential Revision: https://reviews.llvm.org/D32990 llvm-svn: 302552
Diffstat (limited to 'llvm/lib/Object/WasmObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions