Page MenuHomePhabricator

[X86] remove derived method w/ same impl as base
ClosedPublic

Authored by nickdesaulniers on May 31 2019, 1:49 PM.

Details

Summary

While looking into issues with IfConverter, I noticed that
X86InstrInfo::isUnpredicatedTerminator matched its overriden
implementation in TargetInstrInfo::isUnpredicatedTerminator.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptMay 31 2019, 1:49 PM

Adding @hfinkel for review because I think we can go further. The only other override of TargetInstrInfo::isUnpredicatedTerminator is PPCInstrInfo::isUnpredicatedTerminator and it almost matches, modulo a check for whether the MachineInstr isPredicable. I'm not sure if that's intentional, or bug, but adding return TargetInstrInfo::isUnpredicatedTerminator(MI); as the first statement in PPCInstrInfo::isUnpredicatedTerminator doesn't cause any failures in existing tests.

echristo accepted this revision.Apr 27 2020, 3:19 PM

This is ok. I think the other change is also fine, feel free to upload a diff. :)

This revision is now accepted and ready to land.Apr 27 2020, 3:19 PM
MaskRay accepted this revision.Apr 27 2020, 3:43 PM

Typo in the description:

matched its override base class'

overridden

nickdesaulniers edited the summary of this revision. (Show Details)Apr 27 2020, 4:09 PM
This revision was automatically updated to reflect the committed changes.