[PATCH] D41860: [CallSiteSplitting] Support splitting of blocks with instrs before call.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 7 03:41:13 PST 2018
fhahn added a comment.
> If getUserCost is supposed to represent only the code size (I believe so), then we may need to introduce a new target hook to handle sdiv properly in getOperationCost(). @hfinkel might have better idea about it.
I am not entirely sure, but it looks like for most instructions, `getUserCost` delegates to `getOperationCost`, which per default marks sdiv & co as expensive. In any case, the patch uses
TTI.getInstructionCost(&InstBeforeCall,
TargetTransformInfo::TCK_CodeSize);
so in case the code size cost becomes more accurate, we should pick it up.
================
Comment at: lib/Transforms/Scalar/CallSiteSplitting.cpp:85
+ "their cost is below DuplicationThreshold"),
+ cl::init(50));
+
----------------
junbuml wrote:
> Considering that TCC_Basic is 1, don't you think 50 is too aggressive? For me, the conservative enough default should be TCC_Expensive.
Yeah, that was left over from testing, sorry about that!
https://reviews.llvm.org/D41860
More information about the llvm-commits
mailing list