[PATCH] D149889: [TTI] Use users of GEP to guess access type in getGEPCost

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 17 05:47:54 PDT 2023


ABataev added inline comments.


================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfoImpl.h:1009
+        }))
+      return !BaseGV ? TTI::TCC_Free : TTI::TCC_Basic;
+
----------------
Shall we use getArithmeticInstrCost(ADD) instead of TCC_Basic?


================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfoImpl.h:1057
+
+    return IsFoldable ? TTI::TCC_Free : TTI::TCC_Basic;
   }
----------------
Same question, cost of int add instead of basic?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149889



More information about the llvm-commits mailing list