[PATCH] D127342: [TargetTransformInfo] Added an option for the cache line size

Congzhe Cao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 10 11:22:35 PDT 2022


congzhe added inline comments.


================
Comment at: llvm/test/Analysis/LoopCacheAnalysis/compute-cost.ll:2
+; RUN: opt < %s  -opaque-pointers -cache-line-size=32 -passes='print<loop-cache-cost>' -disable-output 2>&1 | FileCheck -check-prefix=SMALLER-CACHELINE %s
+; RUN: opt < %s  -opaque-pointers -cache-line-size=256 -passes='print<loop-cache-cost>' -disable-output 2>&1 | FileCheck -check-prefix=LARGER-CACHELINE %s
+
----------------
bmahjour wrote:
> We still need a RUN line (and corresponding checks) without `-cache-line-size=` to test the default value case (in the absence of target triple).
Thanks, I did think about it. The reason I did not add this RUN line is that in the absence of target triple, the cache line size returned from `TTI.getCacheLineSize()` would depend on the test machine, given that the machine has a valid `getCacheLineSize()` implemented. So we would get different cache line size numbers on different test machines, which might make it difficult to check a RUN line without `-cache-line-size=`?


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

https://reviews.llvm.org/D127342



More information about the llvm-commits mailing list