This is an archive of the discontinued LLVM Phabricator instance.

[Statepoint] Remove redundant clear of call target on register
ClosedPublic

Authored by skatkov on Feb 12 2020, 12:23 AM.

Details

Summary

Patchable statepoint is lowered into sequence of nops, so zeroed call target
should not be on register. It is better to use getTargetConstant instead
of getConstant to select zero constant for call target.

Diff Detail

Event Timeline

skatkov created this revision.Feb 12 2020, 12:23 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 12 2020, 12:23 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
reames accepted this revision.Feb 12 2020, 8:45 AM

LGTM. Looking through the code, it really looks like the null callee value isn't even really being used by the lowering. It's an operand on the MachineInst and thus gets emitted, but in the nop-padding case it doesn't appear to make into the MC Stream. We could, arguably should, restructure to remove it. Your patch appears to be correct, and a step in the right direction, so go for it.

This revision is now accepted and ready to land.Feb 12 2020, 8:45 AM
This revision was automatically updated to reflect the committed changes.