Heejin Ahn
d5244fb160
[WebAssembly] Use SSAUpdaterBulk in LowerEmscriptenSjLj
...
We update SSA in two steps in Emscripten SjLj:
1. Rewrite uses of `setjmpTable` and `setjmpTableSize` variables and
place `phi`s where necessary, which are updated where we call
`saveSetjmp`.
2. Do a whole function level SSA update for all variables, because we
split BBs where `setjmp` is called and there are possibly variable
uses that are not dominated by a def.
(See 955b91c19c/llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp (L1314-L1324) )
We have been using `SSAUpdater` to do this, but `SSAUpdaterBulk` class
was added after this pass was first created, and for the step 2 it looks
like a better alternative with a possible performance benefit. Not sure
the author is aware of it, but `SSAUpdaterBulk` seems to have a
limitation: it cannot handle a use within the same BB as a def but
before it. For example:
```
... = %a + 1
%a = foo();
```
or
```
%a = %a + 1
```
The uses `%a` in RHS should be rewritten with another SSA variable of
`%a`, most likely one generated from a `phi`. But `SSAUpdaterBulk`
thinks all uses of `%a` are below the def of `%a` within the same BB.
(`SSAUpdater` has two different functions of rewriting because of this:
`RewriteUse` and `RewriteUseAfterInsertions`.) This doesn't affect our
usage in the step 2 because that deals with possibly non-dominated uses
by defs after block splitting. But it does in the step 1, which still
uses `SSAUpdater`.
But this CL also simplifies the step 1 by using `make_early_inc_range`,
removing the need to advance the iterator before rewriting a use.
This is NFC; the test changes are just the order of PHI nodes.
Reviewed By: dschuff
Differential Revision: https://reviews.llvm.org/D108583
2021-08-24 18:23:51 -07:00
..
2021-06-29 20:10:31 +02:00
2020-11-20 17:58:26 -05:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-08-24 17:54:39 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-08-24 17:54:39 -07:00
2021-08-24 17:54:39 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-22 22:07:24 +02:00
2021-07-22 22:07:24 +02:00
2021-08-03 09:20:51 +02:00
2021-08-03 09:20:51 +02:00
2021-07-22 22:07:24 +02:00
2021-07-22 22:07:24 +02:00
2021-07-22 22:07:24 +02:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2020-08-26 09:20:46 +01:00
2021-07-14 11:17:08 -07:00
2021-07-22 22:07:24 +02:00
2021-07-22 22:07:24 +02:00
2021-07-22 22:07:24 +02:00
2021-08-12 13:40:41 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-09 14:07:25 -07:00
2021-05-11 11:47:40 +02:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-06-01 11:31:39 +02:00
2021-06-01 11:31:39 +02:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2020-10-29 13:37:55 -07:00
2020-10-29 13:37:55 -07:00
2020-10-29 13:37:55 -07:00
2021-07-09 14:07:25 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-08-24 17:54:39 -07:00
2021-08-24 17:54:39 -07:00
2021-08-24 17:54:39 -07:00
2021-08-24 17:54:39 -07:00
2021-08-24 17:54:39 -07:00
2021-08-24 17:54:39 -07:00
2021-07-14 11:17:08 -07:00
2021-08-24 18:23:51 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-08-24 17:54:39 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-01-09 02:02:54 -08:00
2021-01-09 02:02:54 -08:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-27 08:41:30 -07:00
2021-07-14 11:17:08 -07:00
2021-08-02 09:52:34 -07:00
2021-07-14 16:15:25 -07:00
2021-07-14 11:31:53 -07:00
2021-07-14 11:17:08 -07:00
2021-08-19 12:07:33 -07:00
2021-08-19 15:37:12 -07:00
2021-07-14 11:17:08 -07:00
2021-08-19 12:07:33 -07:00
2021-07-14 11:17:08 -07:00
2021-08-20 09:21:31 -07:00
2021-07-14 16:15:25 -07:00
2021-07-14 11:17:08 -07:00
2021-08-19 12:07:33 -07:00
2021-07-21 09:02:12 -07:00
2021-07-14 11:17:08 -07:00
2021-08-19 12:07:33 -07:00
2021-08-24 17:24:03 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-21 16:45:54 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2020-07-08 01:02:05 -07:00
2021-05-14 03:48:19 -07:00
2020-10-29 13:37:55 -07:00
2020-10-29 13:37:55 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2020-07-30 10:52:16 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-07-09 14:07:25 -07:00
2021-07-13 14:31:19 -07:00
2021-07-14 11:17:08 -07:00
2021-07-14 11:17:08 -07:00
2021-08-24 17:54:39 -07:00
2021-08-03 21:03:46 -07:00
2021-07-14 11:17:08 -07:00