This is an archive of the discontinued LLVM Phabricator instance.

[mips] Refactor saved-registers bitmask creation in MipsAsmPrinter::printSavedRegsBitmask. NFC.
ClosedPublic

Authored by tomatabacu on Mar 3 2015, 6:12 AM.

Details

Summary

Make the code more readable by fusing the for-loops together and explicitly checking for each register class.

Also, this version is more straightforward because it doesn't assume that FPU registers always come before CPU registers in the CalleeSavedInfo vector.

Diff Detail

Event Timeline

tomatabacu updated this revision to Diff 21099.Mar 3 2015, 6:12 AM
tomatabacu retitled this revision from to [mips] Refactor saved-registers bitmask creation in MipsAsmPrinter::printSavedRegsBitmask. NFC..
tomatabacu updated this object.
tomatabacu edited the test plan for this revision. (Show Details)
tomatabacu added a reviewer: dsanders.
tomatabacu added a subscriber: Unknown Object (MLST).
dsanders accepted this revision.Apr 7 2015, 3:38 AM
dsanders edited edge metadata.

LGTM with a style nit

lib/Target/Mips/MipsAsmPrinter.cpp
272

Nit: Please use 'else if' instead of continue.

This revision is now accepted and ready to land.Apr 7 2015, 3:38 AM
tomatabacu updated this revision to Diff 23419.Apr 8 2015, 8:59 AM
tomatabacu edited edge metadata.

Used 'else if' instead of 'continue'.
Rebased.

tomatabacu updated this revision to Diff 23469.Apr 9 2015, 2:44 AM

Missed a 'continue'.

tomatabacu closed this revision.Apr 9 2015, 3:57 AM