[all-commits] [llvm/llvm-project] 6b5afd: [clang][Interp] Add ArrayElemPtr{, Pop} opcode

Timm Bäder via All-commits all-commits at lists.llvm.org
Thu Mar 2 00:45:50 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6b5afda61c4ad6890e62cb8572a13a538316d31c
      https://github.com/llvm/llvm-project/commit/6b5afda61c4ad6890e62cb8572a13a538316d31c
  Author: Timm Bäder <tbaeder at redhat.com>
  Date:   2023-03-02 (Thu, 02 Mar 2023)

  Changed paths:
    M clang/lib/AST/Interp/ByteCodeExprGen.cpp
    M clang/lib/AST/Interp/Interp.h
    M clang/lib/AST/Interp/Opcodes.td

  Log Message:
  -----------
  [clang][Interp] Add ArrayElemPtr{,Pop} opcode

We usually access array elements in the same pattern, which uses
narrow(). Add an extra opcode for this. This saves us quite some
instructions and makes the bytecode easier to read.

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




More information about the All-commits mailing list