[all-commits] [llvm/llvm-project] 0b2bc6: [WebAssembly] Put utility functions in Utils direc...
Heejin Ahn via All-commits
all-commits at lists.llvm.org
Thu Apr 22 15:30:34 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0b2bc69ba29b340903a0edc4545409791bab0010
https://github.com/llvm/llvm-project/commit/0b2bc69ba29b340903a0edc4545409791bab0010
Author: Heejin Ahn <aheejin at gmail.com>
Date: 2021-04-22 (Thu, 22 Apr 2021)
Changed paths:
M llvm/lib/Target/WebAssembly/AsmParser/CMakeLists.txt
M llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
M llvm/lib/Target/WebAssembly/CMakeLists.txt
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/WebAssemblyInstPrinter.h
M llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp
M llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h
M llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyTargetStreamer.cpp
A llvm/lib/Target/WebAssembly/Utils/CMakeLists.txt
A llvm/lib/Target/WebAssembly/Utils/WebAssemblyTypeUtilities.cpp
A llvm/lib/Target/WebAssembly/Utils/WebAssemblyTypeUtilities.h
A llvm/lib/Target/WebAssembly/Utils/WebAssemblyUtilities.cpp
A llvm/lib/Target/WebAssembly/Utils/WebAssemblyUtilities.h
M llvm/lib/Target/WebAssembly/WebAssemblyArgumentMove.cpp
M llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
M llvm/lib/Target/WebAssembly/WebAssemblyCFGSort.cpp
M llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
M llvm/lib/Target/WebAssembly/WebAssemblyDebugFixup.cpp
M llvm/lib/Target/WebAssembly/WebAssemblyExceptionInfo.cpp
M llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
M llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp
M llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
M llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
M llvm/lib/Target/WebAssembly/WebAssemblyLateEHPrepare.cpp
M llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp
M llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.cpp
M llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h
M llvm/lib/Target/WebAssembly/WebAssemblyPrepareForLiveIntervals.cpp
M llvm/lib/Target/WebAssembly/WebAssemblyRegNumbering.cpp
M llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp
R llvm/lib/Target/WebAssembly/WebAssemblyUtilities.cpp
R llvm/lib/Target/WebAssembly/WebAssemblyUtilities.h
Log Message:
-----------
[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
More information about the All-commits
mailing list