HomePhabricator

[DAG] Refactor DAGCombiner::ReassociateOps

Authored by bjope on Apr 29 2019, 10:50 AM.

Description

[DAG] Refactor DAGCombiner::ReassociateOps

Summary:
Extract the logic for doing reassociations
from DAGCombiner::reassociateOps into a helper
function DAGCombiner::reassociateOpsCommutative,
and use that helper to trigger reassociation
on the original operand order, or the commuted
operand order.

Codegen is not identical since the operand order will
be different when doing the reassociations for the
commuted case. That causes some unfortunate churn in
some test cases. Apart from that this should be NFC.

Reviewers: spatel, craig.topper, tstellar

Reviewed By: spatel

Subscribers: dmgreen, dschuff, jvesely, nhaehnle, javed.absar, sbc100, jgravelle-google, hiraditya, aheejin, llvm-commits

Tags: #llvm

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

llvm-svn: 359476

Details

Committed
bjopeApr 29 2019, 10:50 AM
Reviewer
spatel
Differential Revision
D61199: [DAG] Refactor DAGCombiner::ReassociateOps
Parents
rG15cb1f150104: FileCheck [3/12]: Stricter parsing of @LINE expressions
Branches
Unknown
Tags
Unknown