[PATCH] D55909: [ARMISelLowering] Recompute liveins after introducing new MBBs.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 20 12:44:00 PST 2018


fhahn added a comment.

In D55909#1338002 <https://reviews.llvm.org/D55909#1338002>, @efriedma wrote:

> I'm a little concerned computeAndAddLiveIns is more expensive than checkAndUpdateCPSRKill. In theory, they're both quadratic, but in practice I would expect checkAndUpdateCPSRKill is much cheaper: it only tracks one register, and quits immediately when it finds a def of CPSR.


Right, but don't we have to handle all relevant physical registers, e.g. if we would have a use of a physical register after tMOVCCr_pseudo in test_slt_not ? It might not be very likely in practice, but it seems like there is nothing preventing that from happening (it is quite easy to construct a MIR test that fails the machine verifier after expand-isel-pseudos). But maybe I am missing some constraint here?

The way we iterate over the instructions in ExpandISelPesudos also means that we end up doing more work than necessary if we have multiple pseudos introducing new MBBs in the original MBB, but we might be able to visit instructions in reverse order or something like that.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55909/new/

https://reviews.llvm.org/D55909





More information about the llvm-commits mailing list