[all-commits] [llvm/llvm-project] 76f040: [BOLT] Provide generic implementations for isLoad/...

Job Noorman via All-commits all-commits at lists.llvm.org
Fri Sep 1 00:36:21 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 76f040bda6d0b8709c8c1539dac5b430b51de1b7
      https://github.com/llvm/llvm-project/commit/76f040bda6d0b8709c8c1539dac5b430b51de1b7
  Author: Job Noorman <jnoorman at igalia.com>
  Date:   2023-09-01 (Fri, 01 Sep 2023)

  Changed paths:
    M bolt/include/bolt/Core/MCPlusBuilder.h
    A bolt/test/RISCV/load-store.s

  Log Message:
  -----------
  [BOLT] Provide generic implementations for isLoad/isStore

`MCInstrDesc` provides the `mayLoad` and `mayStore` flags that seem
appropriate to use as a target-independent way to implement `isLoad` and
`isStore`.

I believe this is currently good enough to use for the RISC-V target as
well. I've provided a test for this that checks the generated dyno
stats (which seems to be the only thing both `isLoad` and `isStore` are
used for).

Reviewed By: maksfb

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


  Commit: eafe4ee2e8447d7daf4aaeabcfaf8f8854dd9575
      https://github.com/llvm/llvm-project/commit/eafe4ee2e8447d7daf4aaeabcfaf8f8854dd9575
  Author: Job Noorman <jnoorman at igalia.com>
  Date:   2023-09-01 (Fri, 01 Sep 2023)

  Changed paths:
    M bolt/include/bolt/Core/MCPlusBuilder.h
    M bolt/lib/Core/DynoStats.cpp
    M bolt/lib/Passes/ShrinkWrapping.cpp
    M bolt/lib/Passes/StokeInfo.cpp
    M bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp
    M bolt/lib/Target/X86/X86MCPlusBuilder.cpp

  Log Message:
  -----------
  [BOLT] Rename isLoad/isStore to mayLoad/mayStore

As discussed in D159266, for some instructions it's impossible to know
statically if they will load/store (e.g., predicated instructions).
Therefore, mayLoad/mayStore are more appropriate names.


Compare: https://github.com/llvm/llvm-project/compare/9f5335487ae5...eafe4ee2e844


More information about the All-commits mailing list