[PATCH] D45151: [LICM] Hoisting invariant.group loads

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 14 17:21:26 PDT 2018


hfinkel added a comment.

In https://reviews.llvm.org/D45151#1199948, @sanjoy wrote:

> I'm sorry I can't be more decisive here since I wasn't deeply involved with the devirtualization work early on and so lack a lot of context.  The general direction here seems fine to me -- given that we use metadata to express a large range of things, it seems ok to have metadata specific MD dropping policies.  However, given that Hal originally objected to this, we should make sure he is on board.


I understand the motivation, thanks. The problem here is that, while we might want to avoid hoisting so that we don't strip the metadata, that only is better if we happen to inline into a function that then provides a concrete type. Otherwise, we should have hoisted.  How about this: Add a parameter to LICM to control this choice: We can choose not to hoist during the early runs on LICM (which happen during inlining), and then hoist later (during the LICM invocation that runs after loop unrolling).


Repository:
  rL LLVM

https://reviews.llvm.org/D45151





More information about the llvm-commits mailing list