This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAG] Refactor code by adding RegsForValue::getRegsAndSizes(). NFCI
ClosedPublic

Authored by bjope on May 2 2018, 10:29 AM.

Details

Summary

Added a helper method in RegsForValue to get a list with
all the <RegNumber, RegSize> pairs that we want to iterate
over in SelectionDAGBuilder::EmitFuncArgumentDbgValue and
in SelectionDAGBuilder::visitIntrinsicCall.

Diff Detail

Repository
rL LLVM

Event Timeline

bjope created this revision.May 2 2018, 10:29 AM
vsk accepted this revision.May 2 2018, 11:25 AM

Thanks! I can't wait until we're able to use C++17 structured bindings in llvm. It'd be really nice to write 'auto [Reg, Size] = ...', or 'auto [Count, VT] = ...'

lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
1057 ↗(On Diff #144901)

Maybe just 'Return a list ...'?

This revision is now accepted and ready to land.May 2 2018, 11:25 AM
bjope updated this revision to Diff 145061.May 3 2018, 11:52 AM

Rebased after rL331464

This revision was automatically updated to reflect the committed changes.