This is an archive of the discontinued LLVM Phabricator instance.

R600/SI: Add getInstrInfo helper
AbandonedPublic

Authored by arsenm on Aug 5 2014, 6:42 PM.

Details

Reviewers
None
Summary

Having static_cast<const SIInstrInfo *>(getTargetMachine().getSubtargetImpl()->getInstrInfo()) littered everywhere is horrible, so add a wrapper for it.

Diff Detail

Event Timeline

arsenm updated this revision to Diff 12219.Aug 5 2014, 6:42 PM
arsenm retitled this revision from to R600/SI: Add getInstrInfo helper .
arsenm updated this object.
arsenm edited the test plan for this revision. (Show Details)
arsenm added subscribers: echristo, Unknown Object (MLST).

This could also be written as
getTargetMachine().getSubtarget<R600Subtarget>().getInstrInfo() and
then it's shorter but still leaves the full line. It's going to keep
changing for a bit so a helper function might be a bit premature.

-eric

arsenm abandoned this revision.Apr 22 2015, 10:15 AM