Page MenuHomePhabricator

vangthao (Vang Thao)
User

Projects

User does not belong to any projects.

User Details

User Since
Mar 29 2021, 2:52 PM (70 w, 5 d)

Recent Activity

Mon, Aug 1

vangthao added inline comments to D128073: [SROA] Try harder to find a vector promotion viable type when rewriting.
Mon, Aug 1, 1:49 PM · Restricted Project, Restricted Project
vangthao committed rG7fc52d7c8b11: [AMDGPU] Fix DGEMM hazard for GFX90a (authored by vangthao).
[AMDGPU] Fix DGEMM hazard for GFX90a
Mon, Aug 1, 11:59 AM · Restricted Project, Restricted Project
vangthao closed D130677: [AMDGPU] Fix DGEMM hazard for GFX90a.
Mon, Aug 1, 11:59 AM · Restricted Project, Restricted Project

Fri, Jul 29

vangthao added inline comments to D130677: [AMDGPU] Fix DGEMM hazard for GFX90a.
Fri, Jul 29, 4:52 PM · Restricted Project, Restricted Project
vangthao updated the diff for D130677: [AMDGPU] Fix DGEMM hazard for GFX90a.

Hoisted MRI and hazard check function out of loop. Simplififed hazard check to only keep track if we saw a DGEMM instruction on reverse traversal path to reg def.

Fri, Jul 29, 4:47 PM · Restricted Project, Restricted Project
vangthao updated the diff for D130677: [AMDGPU] Fix DGEMM hazard for GFX90a.

Remove feature bit and check hasGFX90AInsts() && !hasGFX940Insts() instead. Combine check with previous loop. Check for fallthrough blocks and added tests for fallthrough blocks.

Fri, Jul 29, 10:06 AM · Restricted Project, Restricted Project

Thu, Jul 28

vangthao added inline comments to D130677: [AMDGPU] Fix DGEMM hazard for GFX90a.
Thu, Jul 28, 1:10 PM · Restricted Project, Restricted Project
vangthao added inline comments to D130677: [AMDGPU] Fix DGEMM hazard for GFX90a.
Thu, Jul 28, 12:16 PM · Restricted Project, Restricted Project

Wed, Jul 27

vangthao added reviewers for D130677: [AMDGPU] Fix DGEMM hazard for GFX90a: rampitec, bcahoon.
Wed, Jul 27, 5:57 PM · Restricted Project, Restricted Project
vangthao updated the diff for D130677: [AMDGPU] Fix DGEMM hazard for GFX90a.

Fix test name.

Wed, Jul 27, 5:56 PM · Restricted Project, Restricted Project
vangthao requested review of D130677: [AMDGPU] Fix DGEMM hazard for GFX90a.
Wed, Jul 27, 5:54 PM · Restricted Project, Restricted Project

Tue, Jul 26

vangthao updated the diff for D128073: [SROA] Try harder to find a vector promotion viable type when rewriting.

Update a test and move checkVectorTypeForPromotion check after array handling.

Tue, Jul 26, 6:07 PM · Restricted Project, Restricted Project

Mon, Jul 25

vangthao updated the diff for D128073: [SROA] Try harder to find a vector promotion viable type when rewriting.

Add more tests and change some test names to what they are testing.

Mon, Jul 25, 1:03 PM · Restricted Project, Restricted Project

Fri, Jul 22

vangthao updated the diff for D128073: [SROA] Try harder to find a vector promotion viable type when rewriting.

Add more test cases and fix function name.

Fri, Jul 22, 10:05 AM · Restricted Project, Restricted Project

Fri, Jul 15

vangthao updated the diff for D128073: [SROA] Try harder to find a vector promotion viable type when rewriting.

Reuse dyn_cast<VectorType> value for SliceTy and TypePartionTy.

Fri, Jul 15, 2:47 PM · Restricted Project, Restricted Project
vangthao committed rG67357739c6d3: [AMDGPU] Add remarks to output some resource usage (authored by vangthao).
[AMDGPU] Add remarks to output some resource usage
Fri, Jul 15, 11:02 AM · Restricted Project, Restricted Project, Restricted Project
vangthao closed D123878: [AMDGPU] Add remarks to output some resource usage.
Fri, Jul 15, 11:02 AM · Restricted Project, Restricted Project, Restricted Project

Thu, Jul 14

vangthao updated the diff for D123878: [AMDGPU] Add remarks to output some resource usage.

Change auto &&Argument to auto Argument.

Thu, Jul 14, 4:45 PM · Restricted Project, Restricted Project, Restricted Project
vangthao updated the diff for D123878: [AMDGPU] Add remarks to output some resource usage.

Change "Kernel Name" to "Function Name" and rebased patch.

Thu, Jul 14, 12:03 PM · Restricted Project, Restricted Project, Restricted Project
vangthao added inline comments to D123878: [AMDGPU] Add remarks to output some resource usage.
Thu, Jul 14, 10:15 AM · Restricted Project, Restricted Project, Restricted Project

Mon, Jul 11

vangthao added a comment to D128073: [SROA] Try harder to find a vector promotion viable type when rewriting.

ping

Mon, Jul 11, 8:15 AM · Restricted Project, Restricted Project

Jul 8 2022

vangthao accepted D129328: [NFC] Fix cvt_f32_ubyte.ll test..

LGTM

Jul 8 2022, 10:32 AM · Restricted Project, Restricted Project

Jul 6 2022

vangthao updated the diff for D128073: [SROA] Try harder to find a vector promotion viable type when rewriting.

Addressed review comments.

Jul 6 2022, 11:54 AM · Restricted Project, Restricted Project
vangthao added a comment to D123878: [AMDGPU] Add remarks to output some resource usage.

ping

Jul 6 2022, 10:32 AM · Restricted Project, Restricted Project, Restricted Project

Jun 27 2022

vangthao updated the diff for D123878: [AMDGPU] Add remarks to output some resource usage.

Remove "--------" delimiter. Change ScratchSize [bytes/thread] to ScratchSize [bytes/lane]. Use lambda expression to emit remarks. Do not output yaml if specific remark is not enabled. Add indentation to make it easier to tell which resource usage remark belong to which kernel.

Jun 27 2022, 5:46 PM · Restricted Project, Restricted Project, Restricted Project
vangthao added a comment to D128073: [SROA] Try harder to find a vector promotion viable type when rewriting.

I'm not sure I understand how this change works. isVectorPromotionViable() doesn't seem to use SliceTy at all, it computes its own candidate types. Why does the picked slice type matter for vector promotion?

Jun 27 2022, 10:51 AM · Restricted Project, Restricted Project
vangthao added a comment to D128073: [SROA] Try harder to find a vector promotion viable type when rewriting.

ping

Jun 27 2022, 9:00 AM · Restricted Project, Restricted Project

Jun 21 2022

vangthao added a comment to D127923: [Diagnostics] Accept newline and format diag opts on first line.

Is there a reason the remarks can't use individual diagnostic emissions to simulate newlines? Or is this perhaps a demonstration that the remarks should not be using the diagnostic engine at all and should be emitting their output to a user-controllable stream (or file)?

An issue with using multiple diagnostic emissions to simulate newlines is that there are repeated information such as diagnostic location and diagopts reprinted for each line. This creates a lot of noise and makes the output harder to read. Accepting newlines in diagnostics would allow for a lot more flexibility but I do see your point on how it would also encourage longer diagnostics.

Jun 21 2022, 3:58 PM · Restricted Project, Restricted Project

Jun 17 2022

vangthao updated the diff for D128073: [SROA] Try harder to find a vector promotion viable type when rewriting.

Move test to test/Transforms/SROA

Jun 17 2022, 11:09 AM · Restricted Project, Restricted Project
vangthao added reviewers for D128073: [SROA] Try harder to find a vector promotion viable type when rewriting: arsenm, nikic, lebedev.ri, efriedma, reames, chandlerc, Carrot, nlopes.
Jun 17 2022, 10:50 AM · Restricted Project, Restricted Project
vangthao requested review of D128073: [SROA] Try harder to find a vector promotion viable type when rewriting.
Jun 17 2022, 10:48 AM · Restricted Project, Restricted Project

Jun 16 2022

vangthao updated the summary of D127923: [Diagnostics] Accept newline and format diag opts on first line.
Jun 16 2022, 10:20 AM · Restricted Project, Restricted Project
vangthao updated the diff for D127923: [Diagnostics] Accept newline and format diag opts on first line.

Update commit message to include the motivation behind the patch.

Jun 16 2022, 10:20 AM · Restricted Project, Restricted Project

Jun 15 2022

vangthao added reviewers for D127923: [Diagnostics] Accept newline and format diag opts on first line: aeubanks, arsenm, scott.linder, dexonsmith, rsmith, aaron.ballman.
Jun 15 2022, 5:18 PM · Restricted Project, Restricted Project
vangthao requested review of D127923: [Diagnostics] Accept newline and format diag opts on first line.
Jun 15 2022, 5:16 PM · Restricted Project, Restricted Project
vangthao added a comment to D126908: [VerifyDiagnosticConsumer] Fix last line being discarded when parsing newline.

Ping..

Jun 15 2022, 1:05 PM · Restricted Project, Restricted Project

Jun 2 2022

vangthao added reviewers for D126908: [VerifyDiagnosticConsumer] Fix last line being discarded when parsing newline: rsmith, jansvoboda11, jkorous.
Jun 2 2022, 12:37 PM · Restricted Project, Restricted Project
vangthao requested review of D126908: [VerifyDiagnosticConsumer] Fix last line being discarded when parsing newline.
Jun 2 2022, 12:36 PM · Restricted Project, Restricted Project

May 11 2022

vangthao added a comment to D123878: [AMDGPU] Add remarks to output some resource usage.

I am not sure if allowing clang to accept newlines is a good idea. It seems like clang wants to know what type of message is being outputted. For example whether this is a remark, warning, etc. but allowing for a diagnostic to output their own newline makes it ambiguous where exactly that output is coming from.

May 11 2022, 2:05 PM · Restricted Project, Restricted Project, Restricted Project

Apr 29 2022

vangthao added inline comments to D123878: [AMDGPU] Add remarks to output some resource usage.
Apr 29 2022, 2:00 PM · Restricted Project, Restricted Project, Restricted Project
vangthao abandoned D123622: [AMDGPU] Allow sinking defs with multiple uses in PreRARemterialize scheduling stage.

Looking to see if we can fix this issue in register allocation as suggested by @kerbowa

Apr 29 2022, 9:54 AM · Restricted Project, Restricted Project

Apr 21 2022

vangthao added inline comments to D123878: [AMDGPU] Add remarks to output some resource usage.
Apr 21 2022, 5:40 PM · Restricted Project, Restricted Project, Restricted Project
vangthao updated the diff for D123878: [AMDGPU] Add remarks to output some resource usage.

Move remarks into its own function. Skip if !ORE. Add clang frontend test. Remove LDSSpillSize.

Apr 21 2022, 5:33 PM · Restricted Project, Restricted Project, Restricted Project

Apr 15 2022

vangthao added a comment to D123878: [AMDGPU] Add remarks to output some resource usage.

This feature is based on https://reviews.llvm.org/D95063

Apr 15 2022, 3:21 PM · Restricted Project, Restricted Project, Restricted Project
vangthao added reviewers for D123878: [AMDGPU] Add remarks to output some resource usage: arsenm, rampitec, yaxunl, t-tye, scott.linder, b-sumner.
Apr 15 2022, 3:21 PM · Restricted Project, Restricted Project, Restricted Project
vangthao requested review of D123878: [AMDGPU] Add remarks to output some resource usage.
Apr 15 2022, 3:19 PM · Restricted Project, Restricted Project, Restricted Project

Apr 12 2022

vangthao added a comment to D123622: [AMDGPU] Allow sinking defs with multiple uses in PreRARemterialize scheduling stage.

Is there a real usecase? I do not like scheduler going that way.

This fixes the regression in SWDEV-316487. I agree that this is making the scheduler too complex. We really need to a way to calculate register pressure before hoisting trivially rematerializable defs in MachineLICM or make this its own pass.

Is that still a problem? Wasn't it fixed by the first commit?

Apr 12 2022, 10:29 AM · Restricted Project, Restricted Project
vangthao added a comment to D123622: [AMDGPU] Allow sinking defs with multiple uses in PreRARemterialize scheduling stage.

Is there a real usecase? I do not like scheduler going that way.

Apr 12 2022, 10:16 AM · Restricted Project, Restricted Project
vangthao added reviewers for D123622: [AMDGPU] Allow sinking defs with multiple uses in PreRARemterialize scheduling stage: rampitec, vpykhtin, kerbowa, foad.
Apr 12 2022, 10:09 AM · Restricted Project, Restricted Project
vangthao requested review of D123622: [AMDGPU] Allow sinking defs with multiple uses in PreRARemterialize scheduling stage.
Apr 12 2022, 10:08 AM · Restricted Project, Restricted Project

Apr 8 2022

vangthao committed rG311edc6b5b05: [AMDGPU] Enable PreRARematerialize scheduling pass with multiple high RP regions (authored by vangthao).
[AMDGPU] Enable PreRARematerialize scheduling pass with multiple high RP regions
Apr 8 2022, 1:09 PM · Restricted Project, Restricted Project
vangthao closed D122501: [AMDGPU] Enable PreRARematerialize scheduling pass with multiple high RP regions.
Apr 8 2022, 1:08 PM · Restricted Project, Restricted Project
vangthao updated the diff for D122501: [AMDGPU] Enable PreRARematerialize scheduling pass with multiple high RP regions.

Rebase

Apr 8 2022, 1:01 PM · Restricted Project, Restricted Project
vangthao committed rGcd1071171c5c: [AMDGPU] Fix inline asm causing assert during PreRARematerialize stage in… (authored by vangthao).
[AMDGPU] Fix inline asm causing assert during PreRARematerialize stage in…
Apr 8 2022, 9:24 AM · Restricted Project, Restricted Project
vangthao closed D123348: [AMDGPU] Fix inline asm causing assert during PreRARematerialize stage in scheduler pass.
Apr 8 2022, 9:24 AM · Restricted Project, Restricted Project
vangthao added inline comments to D123348: [AMDGPU] Fix inline asm causing assert during PreRARematerialize stage in scheduler pass.
Apr 8 2022, 8:27 AM · Restricted Project, Restricted Project
vangthao updated the diff for D123348: [AMDGPU] Fix inline asm causing assert during PreRARematerialize stage in scheduler pass.

Remove redundant null check and use MachineOperand from getOneDef.

Apr 8 2022, 8:26 AM · Restricted Project, Restricted Project

Apr 7 2022

vangthao added reviewers for D123348: [AMDGPU] Fix inline asm causing assert during PreRARematerialize stage in scheduler pass: kerbowa, rampitec.
Apr 7 2022, 5:52 PM · Restricted Project, Restricted Project
vangthao requested review of D123348: [AMDGPU] Fix inline asm causing assert during PreRARematerialize stage in scheduler pass.
Apr 7 2022, 5:51 PM · Restricted Project, Restricted Project

Apr 4 2022

vangthao added inline comments to D122501: [AMDGPU] Enable PreRARematerialize scheduling pass with multiple high RP regions.
Apr 4 2022, 1:17 PM · Restricted Project, Restricted Project
vangthao updated the diff for D122501: [AMDGPU] Enable PreRARematerialize scheduling pass with multiple high RP regions.

Rebase and address review comments.

Apr 4 2022, 1:13 PM · Restricted Project, Restricted Project
vangthao committed rG45c2371c0d31: [AMDGPU] Ignore debug use during PreRARematerialize stage in scheduling pass (authored by vangthao).
[AMDGPU] Ignore debug use during PreRARematerialize stage in scheduling pass
Apr 4 2022, 11:16 AM · Restricted Project, Restricted Project
vangthao closed D123048: [AMDGPU] Ignore debug use during PreRARematerialize stage in scheduling pass.
Apr 4 2022, 11:16 AM · Restricted Project, Restricted Project
vangthao added reviewers for D123048: [AMDGPU] Ignore debug use during PreRARematerialize stage in scheduling pass: rampitec, kerbowa, vpykhtin.
Apr 4 2022, 9:54 AM · Restricted Project, Restricted Project
vangthao requested review of D123048: [AMDGPU] Ignore debug use during PreRARematerialize stage in scheduling pass.
Apr 4 2022, 9:53 AM · Restricted Project, Restricted Project

Mar 31 2022

vangthao added inline comments to D122501: [AMDGPU] Enable PreRARematerialize scheduling pass with multiple high RP regions.
Mar 31 2022, 6:44 PM · Restricted Project, Restricted Project
vangthao updated the diff for D122501: [AMDGPU] Enable PreRARematerialize scheduling pass with multiple high RP regions.

Fix formatting and comments.
Reduce required copies of cached Pressure and Liveins.
Update Pressure and Liveins for all regions where the reg is live-in when sinking.

Mar 31 2022, 6:32 PM · Restricted Project, Restricted Project

Mar 25 2022

vangthao added reviewers for D122501: [AMDGPU] Enable PreRARematerialize scheduling pass with multiple high RP regions: rampitec, kerbowa, vpykhtin.
Mar 25 2022, 12:37 PM · Restricted Project, Restricted Project
vangthao requested review of D122501: [AMDGPU] Enable PreRARematerialize scheduling pass with multiple high RP regions.
Mar 25 2022, 12:35 PM · Restricted Project, Restricted Project

Mar 21 2022

vangthao accepted D121903: [MachineCopyPropagation] More robust isForwardableRegClassCopy.

LGTM.

Mar 21 2022, 9:22 AM · Restricted Project, Restricted Project

Mar 17 2022

vangthao committed rG27e193150811: [AMDGPU] Fix PreRARematerialize scheduler pass sinking subreg defs (authored by vangthao).
[AMDGPU] Fix PreRARematerialize scheduler pass sinking subreg defs
Mar 17 2022, 11:40 AM · Restricted Project
vangthao closed D121874: [AMDGPU] Fix PreRARematerialize scheduler pass sinking subreg defs.
Mar 17 2022, 11:40 AM · Restricted Project, Restricted Project
vangthao retitled D121874: [AMDGPU] Fix PreRARematerialize scheduler pass sinking subreg defs from [AMDGPU] Fix PreRARematerialize scheduler pass sinking undef instruction to [AMDGPU] Fix PreRARematerialize scheduler pass sinking subreg defs.
Mar 17 2022, 11:37 AM · Restricted Project, Restricted Project
vangthao updated the diff for D121874: [AMDGPU] Fix PreRARematerialize scheduler pass sinking subreg defs.

Changed title and pass subreg to reMaterialze()

Mar 17 2022, 11:36 AM · Restricted Project, Restricted Project
vangthao updated the diff for D121874: [AMDGPU] Fix PreRARematerialize scheduler pass sinking subreg defs.

Skip all defs containing subregs instead of just undefs.

Mar 17 2022, 11:26 AM · Restricted Project, Restricted Project
vangthao added a comment to D121874: [AMDGPU] Fix PreRARematerialize scheduler pass sinking subreg defs.

I thought we do not rematerialize subreg defs at all?

Mar 17 2022, 11:12 AM · Restricted Project, Restricted Project
vangthao added a comment to D121903: [MachineCopyPropagation] More robust isForwardableRegClassCopy.

Would this disallow AGPR to AGPR copy propagation completely on sub-targets with no AGPR->AGPR copy capability? I think in some cases we can still propagate an AGPR. For example:

liveins: $agpr0
  $agpr1 = COPY $agpr0
  $agpr2 = COPY $agpr1
  $agpr3 = COPY $agpr2

$agpr0 can be propagated and we would not require more than 1 set of v_accvgpr_read/write when expanding the copys.

Mar 17 2022, 10:28 AM · Restricted Project, Restricted Project

Mar 16 2022

vangthao added reviewers for D121874: [AMDGPU] Fix PreRARematerialize scheduler pass sinking subreg defs: rampitec, kerbowa, vpykhtin.
Mar 16 2022, 6:00 PM · Restricted Project, Restricted Project
vangthao requested review of D121874: [AMDGPU] Fix PreRARematerialize scheduler pass sinking subreg defs.
Mar 16 2022, 5:58 PM · Restricted Project, Restricted Project

Mar 9 2022

vangthao committed rG28322c25148e: [AMDGPU] Add scheduler pass to rematerialize trivial defs (authored by vangthao).
[AMDGPU] Add scheduler pass to rematerialize trivial defs
Mar 9 2022, 9:35 AM · Restricted Project
vangthao closed D119475: [AMDGPU] Add scheduler pass to rematerialize trivial defs.
Mar 9 2022, 9:35 AM · Restricted Project, Restricted Project

Mar 8 2022

vangthao updated the diff for D119475: [AMDGPU] Add scheduler pass to rematerialize trivial defs.

Rebase

Mar 8 2022, 12:42 PM · Restricted Project, Restricted Project

Mar 4 2022

vangthao added a comment to D119475: [AMDGPU] Add scheduler pass to rematerialize trivial defs.

PSDB passes.

Mar 4 2022, 8:56 AM · Restricted Project, Restricted Project
vangthao updated the diff for D119475: [AMDGPU] Add scheduler pass to rematerialize trivial defs.

Address review comments.

Mar 4 2022, 8:55 AM · Restricted Project, Restricted Project

Mar 3 2022

vangthao updated the diff for D119475: [AMDGPU] Add scheduler pass to rematerialize trivial defs.

Rebased

Mar 3 2022, 8:36 AM · Restricted Project, Restricted Project

Feb 24 2022

vangthao added inline comments to D119475: [AMDGPU] Add scheduler pass to rematerialize trivial defs.
Feb 24 2022, 8:51 PM · Restricted Project, Restricted Project
vangthao updated the diff for D119475: [AMDGPU] Add scheduler pass to rematerialize trivial defs.

Check register size when calculating if we have enough instructions to sink to improve occupancy. Added tests for 64bit defs sinking and address other review comments.

Feb 24 2022, 6:02 PM · Restricted Project, Restricted Project

Feb 22 2022

vangthao added inline comments to D119475: [AMDGPU] Add scheduler pass to rematerialize trivial defs.
Feb 22 2022, 1:46 PM · Restricted Project, Restricted Project
vangthao updated the diff for D119475: [AMDGPU] Add scheduler pass to rematerialize trivial defs.

Moved update of region boundaries to its own function. Added test case for occupancy not improved. Removed redundant vector containing NewMIs. Added comments.

Feb 22 2022, 1:41 PM · Restricted Project, Restricted Project

Feb 21 2022

vangthao added inline comments to D119475: [AMDGPU] Add scheduler pass to rematerialize trivial defs.
Feb 21 2022, 3:17 PM · Restricted Project, Restricted Project
vangthao updated the diff for D119475: [AMDGPU] Add scheduler pass to rematerialize trivial defs.

Rebase on top of pre-committed tests. Add subreg test.

Feb 21 2022, 3:15 PM · Restricted Project, Restricted Project
vangthao committed rG3a17a8177357: [AMDGPU] Regenerate tests to include -NEXT. NFC. (authored by vangthao).
[AMDGPU] Regenerate tests to include -NEXT. NFC.
Feb 21 2022, 2:37 PM

Feb 17 2022

vangthao added inline comments to D119475: [AMDGPU] Add scheduler pass to rematerialize trivial defs.
Feb 17 2022, 11:39 AM · Restricted Project, Restricted Project

Feb 16 2022

vangthao added inline comments to D119475: [AMDGPU] Add scheduler pass to rematerialize trivial defs.
Feb 16 2022, 4:01 PM · Restricted Project, Restricted Project
vangthao updated the diff for D119475: [AMDGPU] Add scheduler pass to rematerialize trivial defs.

If the def we are sinking maps to a live-in set in BBLiveInMap then erase it since it is now sinked to another MBB and the entry is currently invalid.

Feb 16 2022, 4:00 PM · Restricted Project, Restricted Project
vangthao added inline comments to D119475: [AMDGPU] Add scheduler pass to rematerialize trivial defs.
Feb 16 2022, 3:33 PM · Restricted Project, Restricted Project
vangthao updated the diff for D119475: [AMDGPU] Add scheduler pass to rematerialize trivial defs.

Address review comments.

Feb 16 2022, 3:04 PM · Restricted Project, Restricted Project
vangthao added inline comments to D119475: [AMDGPU] Add scheduler pass to rematerialize trivial defs.
Feb 16 2022, 12:21 PM · Restricted Project, Restricted Project
vangthao updated the diff for D119475: [AMDGPU] Add scheduler pass to rematerialize trivial defs.

Added static_assert requring that PreRARematerialize is the last pass. Check RegionEnd for region we are sinking from. Added two tests to check for RegionIdx being incremented correctly when a region is reduced to size 0 or 1. Erase high rp region from MBBLiveIns after sinking since it is now invalid.

Feb 16 2022, 12:16 PM · Restricted Project, Restricted Project

Feb 15 2022

vangthao added a comment to D119475: [AMDGPU] Add scheduler pass to rematerialize trivial defs.

Actually you also need to update RegionBegin and RegionEnd for the block where you are erasing def in case if def was the first or the last instruction (do you have a test like this?)

Feb 15 2022, 2:22 PM · Restricted Project, Restricted Project