[PATCH] D54742: [CodeMetrics] Don't let extends of i1 be free.
Hal Finkel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 18 13:14:09 PST 2018
hfinkel added a comment.
In D54742#1334276 <https://reviews.llvm.org/D54742#1334276>, @jonpa wrote:
> ping! @eastig? @RKSimon? @chandlerc?
> , CostModel will not call getUserCost(), but instead getCastInstrCost() for the zext. So my patch does not affect this test, and I don't know how to make a direct test that calls getUserCost() like you propose.
Sure it does. Run the -cost-model analysis with -cost-kind=code-size and it will call getUserCost(). Note the implementation of:
int getInstructionCost(const Instruction *I, enum TargetCostKind kind) const {
switch (kind){
case TCK_RecipThroughput:
return getInstructionThroughput(I);
case TCK_Latency:
return getInstructionLatency(I);
case TCK_CodeSize:
return getUserCost(I);
}
llvm_unreachable("Unknown instruction cost kind");
}
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54742/new/
https://reviews.llvm.org/D54742
More information about the llvm-commits
mailing list