[all-commits] [llvm/llvm-project] cce473: [IRSim] Adding commutativity matching to structure...
Andrew Litteken via All-commits
all-commits at lists.llvm.org
Wed Dec 23 13:02:21 PST 2020
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: cce473e0c56408237ea9ac5e24df918afab91ec9
https://github.com/llvm/llvm-project/commit/cce473e0c56408237ea9ac5e24df918afab91ec9
Author: Andrew Litteken <andrew.litteken at gmail.com>
Date: 2020-12-23 (Wed, 23 Dec 2020)
Changed paths:
M llvm/include/llvm/Analysis/IRSimilarityIdentifier.h
M llvm/lib/Analysis/IRSimilarityIdentifier.cpp
A llvm/test/Transforms/IROutliner/outlining-commutative-fp.ll
A llvm/test/Transforms/IROutliner/outlining-commutative.ll
M llvm/unittests/Analysis/IRSimilarityIdentifierTest.cpp
Log Message:
-----------
[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
Commit: 050392660249c70c00e909ae4a7151ba2c766235
https://github.com/llvm/llvm-project/commit/050392660249c70c00e909ae4a7151ba2c766235
Author: Andrew Litteken <andrew.litteken at gmail.com>
Date: 2020-12-23 (Wed, 23 Dec 2020)
Changed paths:
M llvm/include/llvm/Analysis/IRSimilarityIdentifier.h
M llvm/lib/Analysis/IRSimilarityIdentifier.cpp
A llvm/test/Transforms/IROutliner/outlining-isomorphic-predicates.ll
M llvm/unittests/Analysis/IRSimilarityIdentifierTest.cpp
Log Message:
-----------
[IRSim] Adding support for isomorphic predicates
Some predicates, can be considered the same as long as the operands are
flipped. For example, a > b gives the same result as b > a. This maps
instructions in a greater than form, to their appropriate less than
form, swapping the operands in the IRInstructionData only, allowing for
more flexible matching.
Tests:
llvm/test/Transforms/IROutliner/outlining-isomorphic-predicates.ll
llvm/unittests/Analysis/IRSimilarityIdentifierTest.cpp
Reviewers: jroelofs, paquette
Differential Revision: https://reviews.llvm.org/D87310
Compare: https://github.com/llvm/llvm-project/compare/759b8c11c398...050392660249
More information about the All-commits
mailing list