RFR: 8253757: Add LLVM-based backend for hsdis [v2]

Xin Liu xliu at openjdk.java.net
Wed Sep 30 07:29:52 UTC 2020


On Wed, 30 Sep 2020 00:58:41 GMT, Ludovic Henry <luhenry at openjdk.org> wrote:

>> When bringing up Hotspot onto new platforms, it is not always possible to compile hsdis because gcc is not yet
>> available. For example, for Windows-AArch64 and macOS-AArch64.
>> For some such platforms, it is possible to use LLVM as an alternative backend as it also supports a disassembler
>> feature.
>
> Ludovic Henry has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Merge LLVM backend into hsdis and add Makefile support

src/utils/hsdis/Makefile line 198:

> 196: 		$(TARGET_DIR)/libiberty/libiberty.a
> 197: else
> 198: LIBRARIES/amd64 = LLVMX86Disassembler LLVMX86AsmParser LLVMX86CodeGen LLVMCFGuard LLVMGlobalISel LLVMSelectionDAG \

To disassemble code, I don't think we have to link so many libraries.  It looks like code only explicitly depends
LLVMMCDisassembler and LLVMTarget here.

If we do need to link those libraries,  how about we just use `llvm-config --libs`. If we declare so many names here,
the Makefile is subject to LLVM.  In history, LLVM refactored a lot.

-------------

PR: https://git.openjdk.java.net/jdk/pull/392


More information about the hotspot-compiler-dev mailing list