This is an archive of the discontinued LLVM Phabricator instance.

Refactor the multiply-accumulate combines to act on ARMISD::ADD[CE] nodes, instead of the generic ISD::ADD[CE].
ClosedPublic

Authored by tyomitch on Feb 27 2017, 4:11 AM.

Details

Summary

This allows for some simplification because the combines
are no longer limited to just one go at the node before
it gets legalized into an ARM target-specific one.

Diff Detail

Repository
rL LLVM

Event Timeline

tyomitch created this revision.Feb 27 2017, 4:11 AM
tyomitch retitled this revision from Refactor the multiply-accumulate combines to act on ARMISD::ADD[CE] nodes, instead of the generic ISD::ADD[CE]. to Refactor the multiply-accumulate combines to act on ARMISD::ADD[CE] nodes, instead of the generic ISD::ADD[CE]..Feb 27 2017, 4:22 AM
tyomitch added reviewers: aschwaighofer, samparker.
samparker edited edge metadata.Feb 27 2017, 5:42 AM

Hi Artyom,

Thanks for working on this, it really cleans up the code. Just a couple of inline comments from me.

cheers,
sam

lib/Target/ARM/ARMISelLowering.cpp
9451 ↗(On Diff #89862)

I think it would be a good idea to update this comment with the new pattern.

9563 ↗(On Diff #89862)

just another small comment update required.

tyomitch added inline comments.Feb 28 2017, 7:14 AM
lib/Target/ARM/ARMISelLowering.cpp
9451 ↗(On Diff #89862)

The pattern remains unchanged; it's the namespace of ADDC and ADDE nodes (which isn't reflected in this comment) which changed.

9563 ↗(On Diff #89862)

Thanks for pointing my attention to this one! Indeed, with the new arrangement, ARMTargetLowering::PerformDAGCombine can do all necessary combines, so that the "second pass" in ARMDAGToDAGISel::Select would no longer be necessary.

tyomitch updated this revision to Diff 90029.Feb 28 2017, 7:15 AM

Patch updated

samparker added inline comments.Mar 1 2017, 1:28 AM
lib/Target/ARM/ARMISelDAGToDAG.cpp
3098 ↗(On Diff #90029)

Its great you moved this to DAGCombine, but just remove the comment too.

tyomitch updated this revision to Diff 90166.Mar 1 2017, 5:31 AM

Deleting the comment which is no longer relevant

samparker accepted this revision.Mar 1 2017, 5:50 AM

LGTM, thanks!

This revision is now accepted and ready to land.Mar 1 2017, 5:50 AM
tyomitch updated this revision to Diff 91281.Mar 10 2017, 1:01 AM

Updated to match the final revision of D30400

This revision was automatically updated to reflect the committed changes.