Changes

Summary

  1. [MC][CodeGen] Emit constant pools earlier (details)
  2. [WebAssembly] Misc. cosmetic changes in EH (NFC) (details)
  3. [mlir] Fix broken build in pass_manager.py (details)
Commit ad253446208a06902d3bc4939ac7a64f8026cc84 by aeubanks
[MC][CodeGen] Emit constant pools earlier

Previously we would emit constant pool entries for ldr inline asm at the
very end of AsmPrinter::doFinalization(). However, if we're emitting
dwarf aranges, that would end all sections with aranges. Then if we have
constant pool entries to be emitted in those same sections, we'd hit an
assert that the section has already been ended.

We want to emit constant pool entries before emitting dwarf aranges.
This patch splits out arm32/64's constant pool entry emission into its
own MCTargetStreamer virtual method.

Fixes PR51208

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D107314
The file was modifiedllvm/include/llvm/MC/MCStreamer.h
The file was modifiedllvm/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp
The file was modifiedllvm/lib/Target/AArch64/MCTargetDesc/AArch64TargetStreamer.cpp
The file was modifiedllvm/lib/Target/AArch64/MCTargetDesc/AArch64TargetStreamer.h
The file was modifiedllvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
The file was addedllvm/test/CodeGen/ARM/arange-ldr.ll
The file was modifiedllvm/lib/MC/MCStreamer.cpp
The file was modifiedllvm/lib/MC/MCParser/AsmParser.cpp
Commit 9bd02c433b5ee0235f263dab4e2f307a5ceb5b0d by aheejin
[WebAssembly] Misc. cosmetic changes in EH (NFC)

- Rename `wasm.catch` intrinsic to `wasm.catch.exn`, because we are
  planning to add a separate `wasm.catch.longjmp` intrinsic which
  returns two values.
- Rename several variables
- Remove an unnecessary parameter from `canLongjmp` and `isEmAsmCall`
  from LowerEmscriptenEHSjLj pass
- Add `-verify-machineinstrs` in a test for a safety measure
- Add more comments + fix some errors in comments
- Replace `std::vector` with `SmallVector` for cases likely with small
  number of elements
- Renamed `EnableEH`/`EnableSjLj` to `EnableEmEH`/`EnableEmSjLj`: We are
  soon going to add `EnableWasmSjLj`, so this makes the distincion
  clearer

Reviewed By: tlively

Differential Revision: https://reviews.llvm.org/D107405
The file was modifiedllvm/test/CodeGen/WebAssembly/lower-em-ehsjlj.ll
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
The file was modifiedllvm/test/CodeGen/WebAssembly/wasmehprepare.ll
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
The file was modifiedllvm/lib/CodeGen/WasmEHPrepare.cpp
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
The file was modifiedllvm/include/llvm/IR/IntrinsicsWebAssembly.td
Commit faeb7ec68bc18215667dc6fe31531b703670158d by springerm
[mlir] Fix broken build in pass_manager.py

This test ensures that an error is generated from the Python side when running a module pass on a function. The test used to instantiate ViewOpGraph, however, this pass was changed into a general "any op" pass in D106253. Therefore, a different pass must be used in this test.

Differential Revision: https://reviews.llvm.org/D107424
The file was modifiedmlir/test/python/pass_manager.py