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

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 3 11:24:02 PDT 2016


chandlerc added inline comments.


> danielcdh wrote in LICM.cpp:520
> 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?

(sorry, crossing replies)

I think making it more clear that the difference is between *hoisting* and *sinking* would really help. That explains the reason you don't need to call isSafeToExecuteUnconditionally at all.

https://reviews.llvm.org/D24168





More information about the llvm-commits mailing list