[PATCH] D116145: [FuncSpec] Improve specializing direct constant

Chuanqi Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 22 00:27:15 PST 2021


ChuanqiXu added a comment.

The case should be intended to be forwarded to IPSCCP pass to handle by design. Although I am odd for the design too, I thought Function Specialization should be able to cover IPSCCP once it is mature enough. @SjoerdMeijer may I ask what's the reason and plan for this restriction?



================
Comment at: llvm/lib/Transforms/IPO/FunctionSpecialization.cpp:621-622
     // already be constant.
-    if (!Solver.getLatticeValueFor(A).isOverdefined()) {
+    if (!EnableSpecializationForLiteralConstant &&
+        !Solver.getLatticeValueFor(A).isOverdefined()) {
       LLVM_DEBUG(dbgs() << "FnSpecialization: nothing to do, arg is already "
----------------
This might not be accurate. This doesn't just enable literal constant.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116145/new/

https://reviews.llvm.org/D116145



More information about the llvm-commits mailing list