diff options
author | Andrew Litteken <andrew.litteken@gmail.com> | 2020-08-21 22:20:12 -0500 |
---|---|---|
committer | Andrew Litteken <andrew.litteken@gmail.com> | 2020-12-23 15:02:00 -0600 |
commit | cce473e0c56408237ea9ac5e24df918afab91ec9 (patch) | |
tree | 8a0e5c11748818d2f1b9c826b27a75cd167d6275 /clang/lib/Basic/Module.cpp | |
parent | 759b8c11c398c20f12503356f8aef604e0bf82be (diff) | |
download | llvm-cce473e0c56408237ea9ac5e24df918afab91ec9.zip llvm-cce473e0c56408237ea9ac5e24df918afab91ec9.tar.gz llvm-cce473e0c56408237ea9ac5e24df918afab91ec9.tar.bz2 |
[IRSim] Adding commutativity matching to structure checking
Certain instructions, such as adds and multiplies can have the operands
flipped and still be considered the same. When we are analyzing
structure, this gives slightly more flexibility to create a mapping from
one region to another. We can add both operands in a corresponding
instruction to an operand rather than just the exact match. We then try
to eliminate items from the set, until there is only one valid mapping
between the regions of code.
We do this for adds, multiplies, and equality checking. However, this is
not done for floating point instructions, since the order can still
matter in some cases.
Tests:
llvm/test/Transforms/IROutliner/outlining-commutative-fp.ll
llvm/test/Transforms/IROutliner/outlining-commutative.ll
llvm/unittests/Analysis/IRSimilarityIdentifierTest.cpp
Reviewers: jroelofs, paquette
Differential Revision: https://reviews.llvm.org/D87311
Diffstat (limited to 'clang/lib/Basic/Module.cpp')
0 files changed, 0 insertions, 0 deletions