This is an archive of the discontinued LLVM Phabricator instance.

RegisterCoalescer: Forcibly leave SSA to avoid MIR test errors
ClosedPublic

Authored by arsenm on Jul 25 2023, 3:54 PM.

Details

Summary

Not sure how to produce a test that demonstrates the problem
today. The coalescer would have to introduce a verifier caught SSA
violation, like multiple defs of a virtual register. I'm not sure what
would do that now, but an upcoming patch will.

Diff Detail

Event Timeline

arsenm created this revision.Jul 25 2023, 3:54 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 25 2023, 3:54 PM
Herald added subscribers: tpr, hiraditya. · View Herald Transcript
arsenm requested review of this revision.Jul 25 2023, 3:54 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 25 2023, 3:54 PM
Herald added a subscriber: wdng. · View Herald Transcript
MatzeB accepted this revision.Jul 25 2023, 4:21 PM

LGTM

This revision is now accepted and ready to land.Jul 25 2023, 4:21 PM
MatzeB added a comment.EditedJul 25 2023, 4:25 PM

FWIW: There is a getClearedProperties() API that you can implement for a pass to get things cleared too. Though I remember that I personally always found that API a bit artificial as you can also just clear the bits within the pass as you do here. So no complaints about this patch from my side :)

FWIW: There is a getClearedProperties() API that you can implement for a pass to get things cleared too. Though I remember that I personally always found that API a bit artificial as you can also just clear the bits within the pass as you do here. So no complaints about this patch from my side :)

Right I tried that first, but that’s a post-pass adjustment. I could try moving it before

MatzeB added a comment.EditedJul 25 2023, 4:41 PM

Right I tried that first, but that’s a post-pass adjustment. I could try moving it before

I remember proposing to just not have the getClearedProperties API in code-review but people didn't like that. Either way I'm fine with the change as-is.