This is an archive of the discontinued LLVM Phabricator instance.

[VirtRegMap] Further optimize emitting KILL for copy
Needs ReviewPublic

Authored by cdevadas on Feb 10 2023, 8:04 AM.

Details

Summary

Do not emit KILL when the identical register copy
instruction has the implicit operands which are
only reserved registers as there is no liveness
info to be tracked for reserved registers.

Diff Detail

Event Timeline

cdevadas created this revision.Feb 10 2023, 8:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 10 2023, 8:04 AM
cdevadas requested review of this revision.Feb 10 2023, 8:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 10 2023, 8:04 AM
qcolombet added inline comments.Feb 16 2023, 12:13 AM
llvm/lib/CodeGen/VirtRegMap.cpp
441

Instead of not emitting the KILL could we just drop the implicit reserved registers?

foad added a subscriber: foad.Feb 16 2023, 9:01 AM
foad added inline comments.Feb 17 2023, 1:35 AM
llvm/lib/CodeGen/VirtRegMap.cpp
441

If COPYs can have arbitrary implicit operands at this point, it seems like we need a much more precise check for an implicit-def of a super-register of the result?

qcolombet added inline comments.Feb 17 2023, 3:00 AM
llvm/lib/CodeGen/VirtRegMap.cpp
441

Good point.