[PATCH] D94308: [MachineSink] SinkIntoLoop: analyse stores and aliases in between

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 17 02:13:35 PST 2021


dmgreen added a comment.

> I will look into this separately:
>
>> Can this set the HasStoreCache for the block if it hasn't seen all the instructions in it yet?

hasStoreBetween is called by SinkInstruction, and we can't break the existing code even if the rest is currently not enabled by default.



================
Comment at: llvm/lib/CodeGen/MachineSink.cpp:1205
+// "zombie" define of that preg. E.g., EFLAGS. (<rdar://problem/8030636>)
+static bool HasInstrSideEffects(MachineInstr &MI, MachineBasicBlock *SinkTo) {
+  for (unsigned I = 0, E = MI.getNumOperands(); I != E; ++I) {
----------------
This doesn't seem to have anything to do with side effects. I'm surprised there isn't more needed for clobbering physical registers. Because we are sinking into the start of a block, we only need to check the live-in, not any other instructions along the way?


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

https://reviews.llvm.org/D94308



More information about the llvm-commits mailing list