[PATCH] D119475: [AMDGPU] Add scheduler pass to rematerialize trivial defs

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 15 15:26:08 PST 2022


rampitec added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp:830
+      // not need to check RegionEnd since it can only be a call or terminator
+      // instruction and we do not touch those type of instructions.
+      for (unsigned DefI = 0, DefE = Regions.size(); DefI != DefE; ++DefI) {
----------------
rampitec wrote:
> You actually need to update RegionEnd because there can be a fallthrough without a terminator.
And actually remember that region is not the same as basic block. It may start and end in the middle of a block.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119475/new/

https://reviews.llvm.org/D119475



More information about the llvm-commits mailing list