[PATCH] D123394: [CodeGen] Late cleanup of redundant address/immediate definitions.
Jonas Paulsson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 30 10:00:33 PST 2022
jonpa added a comment.
> We haven't enabled subreg liveness. What we do have though is a downstream hack in VirtRegMap.cpp that throws away implicit uses of superregisters since we haven't understood what they are good for and they just limit scheduling later.
Ah - yeah have some vague notion of that :-)
> But ok, that explains why those implicit killed uses are missing for us :) I'm still not sure if they are always guaranteed to be there though. Do you know if this is documented somewhere?
Not really - the idea was basically to stop the search backwards also when a use of the reg is found as there is no point in continuing. I then encountered a problem in a case of the extra super-reg operand, and added a handling for that. I guess I was then still assuming that there can't be an earlier kill of the register. Are you seeing a problem here also without the removal of the superregisters-hack you are using? Something like a def of a superregister, and then a kill of a subreg, in which case the search should continue for the other subreg kill?
> Right now, downstream I just made clearKillsForDef continue searhing until it finds a def, and not do the early abort you can do due to the implicit superreg kill. (no idea what compiletime impact this has.)
Makes sense to me - I tried also earlier to store the kills in a map but I found (at least on SystemZ) that this backwards search was actually quicker than that, so I don't think it should be an issue in the normal case...
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123394/new/
https://reviews.llvm.org/D123394
More information about the llvm-commits
mailing list