This is an archive of the discontinued LLVM Phabricator instance.

[llvm][MIRVRegNamerUtils] Adding hashing on CImm / FPImm MachineOperands.
ClosedPublic

Authored by plotfi on Dec 16 2019, 10:30 AM.

Details

Summary

This patch makes it so that cases where multiple instructions that differ only in their ConstantInt or ConstantFP MachineOperand values no longer collide. For instance:

%0:_(s1) = G_CONSTANT i1 true
%1:_(s1) = G_CONSTANT i1 false
%2:_(s32) = G_FCONSTANT float 1.0
%3:_(s32) = G_FCONSTANT float 0.0

Prior to this patch the first two instructions would collide together. Also, the last two G_FCONSTANT instructions would also collide. Now they will no longer collide.

Diff Detail

Event Timeline

plotfi created this revision.Dec 16 2019, 10:30 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 16 2019, 10:30 AM
This revision is now accepted and ready to land.Dec 16 2019, 10:52 AM
This revision was automatically updated to reflect the committed changes.