This is an archive of the discontinued LLVM Phabricator instance.

[GlobalISel] Make LegalizerInfo accessible in LegalizerHelper
ClosedPublic

Authored by volkan on Mar 10 2017, 10:40 AM.

Details

Summary

We don’t actually use LegalizerInfo in Legalizer pass, it’s just passed
as an argument.

In order to check if an instruction is legal or not, we need to get LegalizerInfo
by calling MI.getParent()->getParent()->getSubtarget().getLegalizerInfo().
Instead, make LegalizerInfo accessible in LegalizerHelper.

Diff Detail

Event Timeline

volkan created this revision.Mar 10 2017, 10:40 AM
qcolombet accepted this revision.Mar 10 2017, 10:44 AM

Make sense to me.
The helper is already bound to a MachineFunction, so having the LegalizerInfo directly accessible is sensible IMHO.

LGTM.

This revision is now accepted and ready to land.Mar 10 2017, 10:44 AM
volkan closed this revision.Mar 10 2017, 10:46 AM