[all-commits] [llvm/llvm-project] 438cc1: [IR] Add getAccessType to Instruction

Luke Lau via All-commits all-commits at lists.llvm.org
Wed Jun 21 08:17:39 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 438cc10b8ed0e54a312fe44dc4234c5231104603
      https://github.com/llvm/llvm-project/commit/438cc10b8ed0e54a312fe44dc4234c5231104603
  Author: Luke Lau <luke at igalia.com>
  Date:   2023-06-21 (Wed, 21 Jun 2023)

  Changed paths:
    M llvm/include/llvm/IR/Instruction.h
    M llvm/lib/IR/Instruction.cpp
    M llvm/lib/Transforms/Scalar/EarlyCSE.cpp
    M llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp

  Log Message:
  -----------
  [IR] Add getAccessType to Instruction

There are multiple places in the code where the type of memory being accessed from an instruction needs to be obtained, including an upcoming patch to improve GEP cost modeling. This deduplicates the logic between them. It's not strictly NFC as EarlyCSE/LoopStrengthReduce may catch more intrinsics now.

Reviewed By: nikic

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




More information about the All-commits mailing list