This is an archive of the discontinued LLVM Phabricator instance.

[mips] Fix compact branch hazard detection
ClosedPublic

Authored by sdardis on Nov 29 2016, 5:52 AM.

Details

Summary

In certain cases it is possible that transient instructions such as
%reg = IMPLICIT_DEF as a single instruction in a basic block to reach
the MipsHazardSchedule pass. This patch teaches MipsHazardSchedule to
properly look through such cases.

Diff Detail

Repository
rL LLVM

Event Timeline

sdardis updated this revision to Diff 79551.Nov 29 2016, 5:52 AM
sdardis retitled this revision from to [mips] Fix compact branch hazard detection.
sdardis updated this object.
sdardis added a reviewer: vkalintiris.
sdardis set the repository for this revision to rL LLVM.
sdardis added a subscriber: llvm-commits.

Zoran, could you take a look at this?

Thanks.

zoran.jovanovic accepted this revision.Dec 12 2016, 6:57 AM
zoran.jovanovic edited edge metadata.

LGTM with a nit.

test/CodeGen/Mips/compactbranches/compact-branch-implicit-def.mir
11 ↗(On Diff #79551)

Nit: Unnecessary white space.
There are some other unnecessary white spaces in the test case.

This revision is now accepted and ready to land.Dec 12 2016, 6:57 AM
This revision was automatically updated to reflect the committed changes.

Thanks for the review.