[all-commits] [llvm/llvm-project] 00255f: [AMDGPU] Fix access beyond the end of the basic bl...

Valery via All-commits all-commits at lists.llvm.org
Fri Oct 23 09:19:51 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 00255f419298b93c812324a257ff057e57ab5c04
      https://github.com/llvm/llvm-project/commit/00255f419298b93c812324a257ff057e57ab5c04
  Author: vpykhtin <valery.pykhtin at gmail.com>
  Date:   2020-10-23 (Fri, 23 Oct 2020)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
    M llvm/unittests/Target/AMDGPU/CMakeLists.txt
    A llvm/unittests/Target/AMDGPU/ExecMayBeModifiedBeforeAnyUse.cpp

  Log Message:
  -----------
  [AMDGPU] Fix access beyond the end of the basic block in execMayBeModifiedBeforeAnyUse.

I was wrong in thinking that MRI.use_instructions return unique instructions and mislead Jay in his previous patch D64393.

First loop counted more instructions than it was in reality and the second loop went beyond the basic block with that counter.

I used Jay's previous code that relied on MRI.use_operands to constrain the number of instructions to check among.
modifiesRegister is inlined to reduce the number of passes over instruction operands and added assert on BB end boundary.

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




More information about the All-commits mailing list