This is an archive of the discontinued LLVM Phabricator instance.

[MIRVRegNamerUtils] Add additional hashing on MachineInstr flags.
ClosedPublic

Authored by plotfi on Nov 20 2019, 12:39 AM.

Details

Summary

How does this idea sound? I'd also add the inline asm stuff, but I know that is not useful atm.

TODO: Will post test before any landing.

Diff Detail

Event Timeline

plotfi created this revision.Nov 20 2019, 12:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 20 2019, 12:39 AM
plotfi edited the summary of this revision. (Show Details)Nov 20 2019, 12:39 AM
llvm/lib/CodeGen/MIRVRegNamerUtils.cpp
99

I'd probably just do

if (unsigned Flag = MI.getFlags())
  MIOperands.push_back(Flag);

That should be equivalent to what you're doing above.
In fact, I'd just simplify it to

MIOperands.push_back(MI.getFlags());

with 0 (no flags) being also valid enough to contribute to the hash.

plotfi updated this revision to Diff 233017.Dec 10 2019, 1:44 AM

Adding test case.

plotfi marked 2 inline comments as done.Dec 10 2019, 1:44 AM
plotfi added inline comments.
llvm/lib/CodeGen/MIRVRegNamerUtils.cpp
99

ditto

This revision is now accepted and ready to land.Dec 10 2019, 12:23 PM
This revision was automatically updated to reflect the committed changes.
plotfi marked an inline comment as done.