[all-commits] [llvm/llvm-project] b915ae: Add method to TargetInfo to get CPU cache line size

Zoe Carver via All-commits all-commits at lists.llvm.org
Wed Mar 25 09:50:57 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b915aec6b591bdd9a9ffef73db241353b5ba2e2c
      https://github.com/llvm/llvm-project/commit/b915aec6b591bdd9a9ffef73db241353b5ba2e2c
  Author: zoecarver <z.zoelec2 at gmail.com>
  Date:   2020-03-25 (Wed, 25 Mar 2020)

  Changed paths:
    M clang/include/clang/Basic/TargetInfo.h
    M clang/lib/Basic/Targets/X86.cpp
    M clang/lib/Basic/Targets/X86.h

  Log Message:
  -----------
  Add method to TargetInfo to get CPU cache line size

Summary:
This patch adds a virtual method `getCPUCacheLineSize()` to `TargetInfo`. Currently, I've only implemented the method in `X86TargetInfo`. It's extremely important that each CPU's cache line size correct (e.g., we can't just define it as `64` across the board) so, it has been a little slow getting to this point.

I'll work on the ARM CPUs next, but that will probably come later in a different patch.

Tags: #clang

Differential Revision: https://reviews.llvm.org/D74918




More information about the All-commits mailing list