[PATCH] D58231: [LICM] Support of widenable condition guards in LICM

Alina Sbirlea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 20 14:45:01 PST 2019


asbirlea added a comment.

FWIW, I looked briefly at the first test, and this could be addressed with enabling MemorySSA.

1. We don't look carefully at Calls in canSinkOrHoist. The same handling that I added on the branch for store instructions, can be used for call instructions (i.e. no clobbering definitions and no interfering uses). With this change I see `@llvm.experimental.widenable.condition()` is hoisted.
2. The load is still not hoisted, due to failing the condition `isSafeToExecuteUnconditionally`, but it is optimized to `; MemoryUse(liveOnEntry)`.  But new unswitch seems to pick it up afterwards, the load is hoisted to `entry.split` with `bin/opt -enable-mssa-loop-dependency=true -basicaa -licm -simple-loop-unswitch`.

This may not be the immediate solution you're looking for, but I hope this will become the preferred alternative reasonably soon.


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

https://reviews.llvm.org/D58231





More information about the llvm-commits mailing list