[PATCH] D24168: Refactor LICM pass in preparation for LoopSink pass.

Dehao Chen via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 3 11:19:48 PDT 2016


danielcdh added inline comments.


> hfinkel wrote in LICM.cpp:520
> Why is this not returning a conservative answer?

SafetyInfo will be non-null for LICM, and will be nullptr for LoopSink, which is always safe. Basically, I used this pointer to distinguish between LICM and LoopSink usage to reuse the code as much as possible without introduce new parameter to the API. Let me know if you think that is confusing:

- Shall I add comment to clarify here?
- Or shall I simply add a new parameter to indicate if it's for hoisting or sinking?

https://reviews.llvm.org/D24168





More information about the llvm-commits mailing list