[all-commits] [llvm/llvm-project] 0af754: Reapply "[WebAssembly] Fix phi handling for Wasm S...

Heejin Ahn via All-commits all-commits at lists.llvm.org
Wed Jul 24 17:01:42 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0af754213507972a0d0301bc195d65414d8dc193
      https://github.com/llvm/llvm-project/commit/0af754213507972a0d0301bc195d65414d8dc193
  Author: Heejin Ahn <aheejin at gmail.com>
  Date:   2024-07-25 (Thu, 25 Jul 2024)

  Changed paths:
    M llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
    A llvm/test/CodeGen/WebAssembly/lower-wasm-ehsjlj-phi.ll

  Log Message:
  -----------
  Reapply "[WebAssembly] Fix phi handling for Wasm SjLj (#99730)"

This reapplies #99730. #99730 contained a nondeterministic iteration
which failed the reverse-iteration bot
(https://lab.llvm.org/buildbot/#/builders/110/builds/474) and reverted
in
https://github.com/llvm/llvm-project/commit/f3f0d9928f982cfd302351f418bcc5b63cc1bb9d.

The fix is make the order of iteration of new predecessors
determintistic by using `SmallSetVector`.
```diff
--- a/llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
@@ -1689,7 +1689,7 @@ void WebAssemblyLowerEmscriptenEHSjLj::handleLongjmpableCallsForWasmSjLj(
     }
   }

-  SmallDenseMap<BasicBlock *, SmallPtrSet<BasicBlock *, 4>, 4>
+  SmallDenseMap<BasicBlock *, SmallSetVector<BasicBlock *, 4>, 4>
       UnwindDestToNewPreds;
   for (auto *CI : LongjmpableCalls) {
     // Even if the callee function has attribute 'nounwind', which is true for
```



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list