[all-commits] [llvm/llvm-project] fffbfe: [WebAssembly] Split WebAssemblyUtils to fix librar...

Craig Topper via All-commits all-commits at lists.llvm.org
Thu Feb 23 23:28:32 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fffbfe7c0ca8f0346348035e24eaf1a06dd4a67f
      https://github.com/llvm/llvm-project/commit/fffbfe7c0ca8f0346348035e24eaf1a06dd4a67f
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2023-02-23 (Thu, 23 Feb 2023)

  Changed paths:
    M llvm/lib/Target/WebAssembly/AsmParser/CMakeLists.txt
    M llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
    M llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp
    M llvm/lib/Target/WebAssembly/Disassembler/CMakeLists.txt
    M llvm/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp
    M llvm/lib/Target/WebAssembly/MCTargetDesc/CMakeLists.txt
    M llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyInstPrinter.cpp
    M llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.cpp
    M llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp
    M llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h
    A llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTypeUtilities.cpp
    A llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTypeUtilities.h
    M llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyTargetStreamer.cpp
    M llvm/lib/Target/WebAssembly/Utils/CMakeLists.txt
    M llvm/lib/Target/WebAssembly/Utils/WebAssemblyTypeUtilities.cpp
    M llvm/lib/Target/WebAssembly/Utils/WebAssemblyTypeUtilities.h
    M llvm/lib/Target/WebAssembly/Utils/WebAssemblyUtilities.cpp
    M llvm/lib/Target/WebAssembly/Utils/WebAssemblyUtilities.h
    M llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp

  Log Message:
  -----------
  [WebAssembly] Split WebAssemblyUtils to fix library layering for MC tools.

WebAssemblyUtils depends on CodeGen which depends on all middle end
optimization libraries.

This component is used by WebAssembly's AsmParser, Disassembler, and
MCTargetDesc libraries. Because of this, any MC layer tool built with
WebAssembly support includes a larger portion of LLVM than it should.

To fix this I've created an MC only version of WebAssemblyTypeUtilities.cpp
in MCTargetDesc to be used by the MC components.

This shrinks llvm-objdump and llvm-mc on my local release+asserts
build by 5-6 MB.

Reviewed By: MaskRay, aheejin

Differential Revision: https://reviews.llvm.org/D144354




More information about the All-commits mailing list