[GlobalISel] Make LegalizerInfo accessible in LegalizerHelper

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


[GlobalISel] Make LegalizerInfo accessible in LegalizerHelper

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.

Reviewers: qcolombet, aditya_nandakumar, dsanders, ab, t.p.northover, kristof.beyls

Reviewed By: qcolombet

Subscribers: dberris, llvm-commits, rovka

Differential Revision: https://reviews.llvm.org/D30838

llvm-svn: 297491


Event Timeline

lisa6jones6 raised a concern with this commit.Aug 13 2019, 9:46 AM
lisa6jones6 added a subscriber: lisa6jones6.
This comment was removed by asl.
This commit now has outstanding concerns.Aug 13 2019, 9:46 AM
asl removed a subscriber: lisa6jones6.
This commit no longer requires audit.Aug 13 2019, 2:15 PM
asl added a subscriber: asl.Aug 13 2019, 2:15 PM