[PATCH] D100995: [WebAssembly] Put utility functions in Utils directory (NFC)
Heejin Ahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 26 15:59:36 PDT 2021
aheejin added a comment.
In D100995#2710758 <https://reviews.llvm.org/D100995#2710758>, @thakis wrote:
> Also, similar to aarch64, this is a bit awkward from a dependency perspective: The files in Utils include headers in Target/WebAssembly which include headers in Target/WebAssembly/MCTargetDesc, which include tablegen-generated headers. So Utils depends on generated headers, and kind of depends on MCTargetDesc, but MCTargetDesc also depends on Utils. It happens to work out, but it's a bit awkward.
Didn't that header file dependency already exist before: WebAssembly/MCTargetDesc/ depends on tablegen-generated headers in WebAssembly/ and WebAssembly/ depends on methods in WebAssembly/MCTargetDesc. So we already had header-file dependency of WebAssembly/ <-> WebAssembly/MCTargetDesc/. This worked, but we couldn't make this cyclic dependency work for linking, so this CL takes the linking dependency out to Utils/.
================
Comment at: llvm/lib/Target/WebAssembly/Utils/CMakeLists.txt:7
+ CodeGen
+ Core
+ MC
----------------
thakis wrote:
> Is this one needed?
Yes. We have a function that uses core methods: https://github.com/llvm/llvm-project/blob/254e289d45337ec1da930ef93b4b1dd92f791153/llvm/lib/Target/WebAssembly/Utils/WebAssemblyUtilities.cpp#L68-L76
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100995/new/
https://reviews.llvm.org/D100995
More information about the llvm-commits
mailing list