[PATCH] D41858: [CallSiteSplitting] Pass list of (BB, Conditions) pairs to splitCallSite.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 16 06:45:17 PST 2018
fhahn marked an inline comment as done.
fhahn added inline comments.
================
Comment at: lib/Transforms/Scalar/CallSiteSplitting.cpp:112
+typedef std::pair<ICmpInst *, unsigned> ConditionTy;
+typedef SmallVector<ConditionTy, 3> ConditionsTy;
+
----------------
junbuml wrote:
> Why don't we use 2 instead of 3?
We potentially record more than 2 conditions now I think and I thought 3 might be better suited to avoid dynamic allocations. I am happy to change it to 2 if you prefer that.
================
Comment at: lib/Transforms/Scalar/CallSiteSplitting.cpp:152
+static void addConditions(CallSite CS,
+ const SmallVectorImpl<ConditionTy> &Conditions) {
for (auto &Cond : Conditions) {
----------------
junbuml wrote:
> Why not use ConditionsTy here ?
This function does not require knowing the size of the SmallVector, so I thought there is no need to make the type more restrictive. I am happy to change it if you prefer that
https://reviews.llvm.org/D41858
More information about the llvm-commits
mailing list