diff options
author | Alexandros Lamprineas <alexandros.lamprineas@arm.com> | 2023-07-25 11:09:52 +0100 |
---|---|---|
committer | Alexandros Lamprineas <alexandros.lamprineas@arm.com> | 2023-07-25 11:58:42 +0100 |
commit | 59a5c582dc35aa4e50a66bdf18fe7e3a35802fd4 (patch) | |
tree | 8eca1c852e2f94bb3003a66f81b024c0a6c95b2c | |
parent | d664541788c18890b7befd3f3beb12dc36858538 (diff) | |
download | llvm-59a5c582dc35aa4e50a66bdf18fe7e3a35802fd4.zip llvm-59a5c582dc35aa4e50a66bdf18fe7e3a35802fd4.tar.gz llvm-59a5c582dc35aa4e50a66bdf18fe7e3a35802fd4.tar.bz2 |
[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.
-rw-r--r-- | llvm/lib/Transforms/IPO/FunctionSpecialization.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/FunctionSpecialization.cpp b/llvm/lib/Transforms/IPO/FunctionSpecialization.cpp index cae0fc7..3d6c501 100644 --- a/llvm/lib/Transforms/IPO/FunctionSpecialization.cpp +++ b/llvm/lib/Transforms/IPO/FunctionSpecialization.cpp @@ -877,6 +877,9 @@ Cost FunctionSpecializer::getSpecializationBonus(Argument *A, Constant *C, // The below heuristic is only concerned with exposing inlining // opportunities via indirect call promotion. If the argument is not a // (potentially casted) function pointer, give up. + // + // TODO: Perhaps we should consider checking such inlining opportunities + // while traversing the users of the specialization arguments ? Function *CalledFunction = dyn_cast<Function>(C->stripPointerCasts()); if (!CalledFunction) return TotalCost; |