This is an archive of the discontinued LLVM Phabricator instance.

[X86] Move findDeadCallerSavedReg() into X86RegisterInfo
ClosedPublic

Authored by sconstab on Oct 6 2020, 1:57 PM.

Details

Summary

The findDeadCallerSavedReg() function has utility outside of X86FrameLowering.cpp

Diff Detail

Event Timeline

sconstab created this revision.Oct 6 2020, 1:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 6 2020, 1:57 PM
sconstab requested review of this revision.Oct 6 2020, 1:57 PM
craig.topper added inline comments.Oct 6 2020, 4:41 PM
llvm/lib/Target/X86/X86RegisterInfo.cpp
797

I was going to ask if you could just use the Is64Bit member in X86RegisterInfo. But it doesn't look like this argument is used at all.

sconstab updated this revision to Diff 296583.Oct 6 2020, 8:06 PM

Removed the Is64Bit parameter, which was redundant and unneeded.

sconstab marked an inline comment as done.Oct 6 2020, 8:07 PM
sconstab added inline comments.
llvm/lib/Target/X86/X86RegisterInfo.cpp
797

Well, the parameter isn't used, but I did notice that the member is used in the call to getGPRsForTailCall().

This revision is now accepted and ready to land.Oct 6 2020, 8:24 PM
sconstab accepted this revision.Oct 7 2020, 4:05 PM
sconstab marked an inline comment as done.

LGTM.

This revision was automatically updated to reflect the committed changes.