[PATCH] D37076: [LICM] Allow sinking when foldable in loop

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 12 14:04:06 PDT 2017


hfinkel added inline comments.


================
Comment at: include/llvm/Analysis/TargetTransformInfoImpl.h:826
                                            I->value_op_end());
-    if (getUserCost(I, Operands) == TTI::TCC_Free)
+    SmallVector<const User *, 4> Users(I->user_begin(),
+                                       I->user_end());
----------------
Can you add an overload of getUserCost that does not take a users array and composes the list and then you don't need to change this?


================
Comment at: lib/Target/ARM/ARMTargetTransformInfo.cpp:614
                                           I.value_op_end());
-    Cost += getUserCost(&I, Operands);
+    SmallVector<const User*, 4> Users(I.user_begin(),
+                                      I.user_end());
----------------
And then also don't need this modification?


https://reviews.llvm.org/D37076





More information about the llvm-commits mailing list