[IRSim][IROutliner] Canonicalizing commutative value numbering between…

Authored by AndrewLitteken on Aug 27 2021, 2:01 PM.


[IRSim][IROutliner] Canonicalizing commutative value numbering between similarity sections.

When the initial relationship between two pairs of values between
similar sections is ambiguous to commutativity, arguments to the
outlined functions can be passed in such that the order is incorrect,
causing miscompilations. This adds a canonical mapping to each
similarity section, so that we can maintain the relationship of global
value numbering from one section to another.

Added Tests:
unittests/Analysis/IRSimilarityIdentifierTest.cpp - IRSimilarityCandidate:CanonicalNumbering

Reviewers: jroelofs, jpaquette, yroux

Differential Revision: https://reviews.llvm.org/D104143