[PATCH] D41858: [CallSiteSplitting] Pass list of (BB, Conditions) pairs to splitCallSite.
Jun Bum Lim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 15 12:37:29 PST 2018
junbuml added a comment.
Sorry for the late response. Just minor comments.
================
Comment at: lib/Transforms/Scalar/CallSiteSplitting.cpp:112
+typedef std::pair<ICmpInst *, unsigned> ConditionTy;
+typedef SmallVector<ConditionTy, 3> ConditionsTy;
+
----------------
Why don't we use 2 instead of 3?
================
Comment at: lib/Transforms/Scalar/CallSiteSplitting.cpp:152
+static void addConditions(CallSite CS,
+ const SmallVectorImpl<ConditionTy> &Conditions) {
for (auto &Cond : Conditions) {
----------------
Why not use ConditionsTy here ?
================
Comment at: lib/Transforms/Scalar/CallSiteSplitting.cpp:282-283
+
+ for (auto P : Splits)
+ CallPN->addIncoming(P.CallInst, P.BB);
+ Instr->replaceAllUsesWith(CallPN);
----------------
It appears that this loop can be merged into the above loop (line 251), and then we can remove SplitInfo.
https://reviews.llvm.org/D41858
More information about the llvm-commits
mailing list