This is an archive of the discontinued LLVM Phabricator instance.

Enhance machine CSE to capture more opportunities
ClosedPublic

Authored by Jiangning on Jul 30 2014, 8:02 PM.

Details

Reviewers
hfinkel
Group Reviewers
deleted
Summary

Hi,

Attached patch of fixing machine CSE changes TrivialCopyCoalescing to TrivialCopyPropagation, and essentially the change allows multi-users of a COPY machine instruction to propagate the source register. This way we would be able to catch more common subexpressions opportunities.

This patch has very good performance impact to a couple of spec benchmarks.

Thanks,
-Jiangning

Diff Detail

Event Timeline

Jiangning updated this revision to Diff 12053.Jul 30 2014, 8:02 PM
Jiangning retitled this revision from to Enhance machine CSE to capture more opportunities.
Jiangning updated this object.
Jiangning edited the test plan for this revision. (Show Details)
Jiangning added a reviewer: deleted.
Jiangning added a subscriber: Unknown Object (MLST).
hfinkel accepted this revision.Jul 31 2014, 7:22 AM
hfinkel added a reviewer: hfinkel.
hfinkel added a subscriber: hfinkel.

LGTM, thanks!

lib/CodeGen/MachineCSE.cpp
116

of COPY -> of a COPY

117

the users -> its users

118

subexpression -> subexpressions

158

srcreg -> SrcReg

This revision is now accepted and ready to land.Jul 31 2014, 7:22 AM
Eugene.Zelenko added a subscriber: Eugene.Zelenko.

Committed in rL215344.