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

Bardia Mahjour via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 10 11:41:44 PDT 2022


bmahjour 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
+
----------------
congzhe wrote:
> 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=`?
Good point. I guess the only way to test the default would be if we actually use a triple that's known to have 0 size cache line, so I don't think we can test it reliably. Ok, let's leave it out then.


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

https://reviews.llvm.org/D127342



More information about the llvm-commits mailing list