1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/test
Heejin Ahn af019c3b48 [WebAssembly] Fix more ExceptionInfo grouping bugs
This fixes two bugs in `WebAssemblyExceptionInfo` grouping, created by
D97247. These two bugs are not easy to split into two different CLs,
because tests that fail for one also tend to fail for the other.

- In D97247, when fixing `ExceptionInfo` grouping by taking out
  the unwind destination' exception from the unwind src's exception, we
  just iterated the BBs in the function order, but this was incorrect;
  this changes it to dominator tree preorder. Please refer to the
  comments in the code for the reason and an example.

- After this subexception-taking-out fix, there still can be remaining
  BBs we have to take out. When Exception B is taken out of Exception A
  (because EHPad B is the unwind destination of EHPad A), there can
  still be BBs within Exception A that are reachable from Exception B,
  which also should be taken out. Please refer to the comments in the
  code for more detailed explanation on why this can happen. To make
  this possible, this splits `WebAssemblyException::addBlock` into two
  parts: adding to a set and adding to a vector. We need to iterate on
  BBs within a `WebAssemblyException` to fix this, so we add BBs to sets
  first. But we add BBs to vectors later after we fix all incorrectness
  because deleting BBs from vectors is expensive. I considered removing
  the vector from `WebAssemblyException`, but it was not easy because
  this class has to maintain a similar interface with `MachineLoop` to
  be wrapped into a single interface `SortRegion`, which is used in
  CFGSort.

Other misc. drive-by fixes:
- Make `WebAssemblyExceptionInfo` do not even run when wasm EH is not
  used or the function doesn't have any EH pads, not to waste time
- Add `LLVM_DEBUG` lines for easy debugging
- Fix `preds` comments in cfg-stackify-eh.ll
- Fix `__cxa_throw`'s signature in cfg-stackify-eh.ll

Fixes https://github.com/emscripten-core/emscripten/issues/13554.

Reviewed By: dschuff, tlively

Differential Revision: https://reviews.llvm.org/D97677
2021-03-02 13:44:09 -08:00
..
Analysis [TTI] Consider select form of and/or i1 as having arithmetic cost 2021-03-02 02:18:19 +09:00
Assembler
Bindings
Bitcode
BugPoint
CodeGen [WebAssembly] Fix more ExceptionInfo grouping bugs 2021-03-02 13:44:09 -08:00
DebugInfo Revert "Use the default seed value for djb hash for StringMap" 2021-03-01 14:00:39 +01:00
Demangle
Examples Revert "patch" it wass my mistake inusing git 2021-02-24 11:06:16 +05:30
ExecutionEngine [Orc] Extend lli debug support tests to JITLink 2021-03-02 15:07:36 +01:00
Feature
FileCheck
Instrumentation [InstrProfiling] Place __llvm_prf_vnodes and __llvm_prf_names in llvm.used on ELF 2021-03-01 13:43:23 -08:00
Integer
JitListener
Linker
LTO
MachineVerifier GlobalISel: Verify G_CONCAT_VECTORS has at least 2 sources 2021-03-01 09:10:36 -05:00
MC [AMDGPU] Make OMod explicit for V_CVT_{U,I}* 2021-03-02 13:32:06 -05:00
Object
ObjectYAML Add more historic DWARF vendor extensions 2021-02-25 15:09:42 -08:00
Other Move EntryExitInstrumentation pass location 2021-03-01 10:08:10 -08:00
Reduce
SafepointIRVerifier
Support
SymbolRewriter
TableGen [TableGen] Add IntrNoMerge as intrinsic property 2021-03-02 09:04:50 -08:00
ThinLTO/X86 [WPD] Fix handling of pure virtual base class 2021-02-23 16:07:09 -08:00
tools Revert "Use the default seed value for djb hash for StringMap" 2021-03-01 14:00:39 +01:00
Transforms [Instcombine][NFC]Simplify logical reductions tests, NFC. 2021-03-02 08:27:42 -08:00
Unit
Verifier
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg.py
lit.site.cfg.py.in
TestRunner.sh