[PATCH] D37051: Model cache size and associativity in TargetTransformInfo

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 24 00:57:16 PDT 2017


fhahn accepted this revision.
fhahn added a comment.
This revision is now accepted and ready to land.

LGTM, just a minor nit about the C-style fallthrough comment



================
Comment at: include/llvm/Analysis/TargetTransformInfoImpl.h:358
+    case TargetTransformInfo::CacheLevel::L1D:
+      /* fallthrough */
+    case TargetTransformInfo::CacheLevel::L2D:
----------------
Are you using the C-style comment to tell GCC that this fallthrough case is intentional?  `LLVM_FALLTHROUGH` provides a slightly more portable and direct way of doing that I think


================
Comment at: lib/Target/X86/X86TargetTransformInfo.cpp:112
+  case TargetTransformInfo::CacheLevel::L1D:
+    /* fallthrough */
+  case TargetTransformInfo::CacheLevel::L2D:
----------------
Same as above


https://reviews.llvm.org/D37051





More information about the llvm-commits mailing list