llvm-project/llvm/lib/Target/WebAssembly/MCTargetDesc
Heejin Ahn 0b2bc69ba2 [WebAssembly] Put utility functions in Utils directory (NFC)
This CL
1. Creates Utils/ directory under lib/Target/WebAssembly
2. Moves existing WebAssemblyUtilities.cpp|h into the Utils/ directory
3. Creates Utils/WebAssemblyTypeUtilities.cpp|h and put type
   declarataions and type conversion functions scattered in various
   places into this single place.

It has been suggested several times that it is not easy to share utility
functions between subdirectories (AsmParser, DIsassembler, MCTargetDesc,
...). Sometimes we ended up [[ https://reviews.llvm.org/D92840#2478863 | duplicating ]] the same function because of
this.

There are already other targets doing this: AArch64, AMDGPU, and ARM
have Utils/ subdirectory under their target directory.

This extracts the utility functions into a single directory Utils/ and
make them sharable among all passes in WebAssembly/ and its
subdirectories. Also I believe gathering all type-related conversion
functionalities into a single place makes it more usable. (Actually I
was working on another CL that uses various type conversion functions
scattered in multiple places, which became the motivation for this CL.)

Reviewed By: dschuff, aardappel

Differential Revision: https://reviews.llvm.org/D100995
2021-04-22 15:29:43 -07:00
..
CMakeLists.txt [WebAssembly] Put utility functions in Utils directory (NFC) 2021-04-22 15:29:43 -07:00
WebAssemblyAsmBackend.cpp [MC] Default MCAsmBackend::mayNeedRelaxation() to false 2020-08-02 22:13:59 -07:00
WebAssemblyFixupKinds.h [WebAssembly] Adding 64-bit versions of all load & store ops. 2020-06-15 08:31:56 -07:00
WebAssemblyInstPrinter.cpp [WebAssembly] Put utility functions in Utils directory (NFC) 2021-04-22 15:29:43 -07:00
WebAssemblyInstPrinter.h [WebAssembly] Put utility functions in Utils directory (NFC) 2021-04-22 15:29:43 -07:00
WebAssemblyMCAsmInfo.cpp [WebAssembly] Added R_WASM_FUNCTION_OFFSET_I64 for use with DWARF DW_AT_low_pc 2020-11-13 09:32:31 -08:00
WebAssemblyMCAsmInfo.h
WebAssemblyMCCodeEmitter.cpp [WebAssembly] Support single-floating-point immediate value 2021-02-04 18:05:06 -08:00
WebAssemblyMCTargetDesc.cpp [WebAssembly] Put utility functions in Utils directory (NFC) 2021-04-22 15:29:43 -07:00
WebAssemblyMCTargetDesc.h [WebAssembly] Put utility functions in Utils directory (NFC) 2021-04-22 15:29:43 -07:00
WebAssemblyTargetStreamer.cpp [WebAssembly] Put utility functions in Utils directory (NFC) 2021-04-22 15:29:43 -07:00
WebAssemblyTargetStreamer.h [llvm] Forward-declare formatted_raw_ostream (NFC) 2021-01-28 22:21:13 -08:00
WebAssemblyWasmObjectWriter.cpp [WebAssembly] Add new relocation for location relative data 2021-03-08 11:34:10 -08:00