Skip to content

Commit 59a5c58

Browse files
committed
[FuncSpec][NFC] Leave a comment for future improvements.
Adds a TODO for checking inlinining opportunities while traversing the users of the specialization arguments. This was brought up in the review of D154852.
1 parent d664541 commit 59a5c58

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/Transforms/IPO/FunctionSpecialization.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,9 @@ Cost FunctionSpecializer::getSpecializationBonus(Argument *A, Constant *C,
877877
// The below heuristic is only concerned with exposing inlining
878878
// opportunities via indirect call promotion. If the argument is not a
879879
// (potentially casted) function pointer, give up.
880+
//
881+
// TODO: Perhaps we should consider checking such inlining opportunities
882+
// while traversing the users of the specialization arguments ?
880883
Function *CalledFunction = dyn_cast<Function>(C->stripPointerCasts());
881884
if (!CalledFunction)
882885
return TotalCost;

0 commit comments

Comments
 (0)