This patch introduce files that just enough for lib/Target/CSKY to compile.
Notably a basic CSKYTargetMachine and CSKYTargetInfo.
Details
Diff Detail
Event Timeline
Gentle ping...
BTW, @lattner would you know who is the decision maker that can approve a new target and review related commit?
The general process is here: https://llvm.org/docs/DeveloperPolicy.html#adding-a-new-target
I'm sorry that I'm preoccupied with the devmtg this week, but please ping me next week if you're not getting traction, thanks!
Mostly boilerplate that looks fine, a few minor nits.
llvm/lib/Target/CSKY/CSKYTargetMachine.cpp | ||
---|---|---|
31 | Minor nit, but hopefully anyone reading this knows what e means from reading the LangRef. It would be more useful for this comment to give a summary of what is happening here specifically, for example 'CSky is always little endian with a 4-byte aligned stack' | |
35 | If the endian and stack alignment are the same for every instance of this back end, you don't need to add them separately. The same is true for all of the things after the mangling flag. | |
37 | Does CSky really support all of the manglings that this can return? Including Windows x86 mangling? If not, please add some asserts to validate that it's a sane value. | |
70 | Why make this a separate function instead of just writing this on line 84: (RM.hasValue() ? *RM : Reloc::Static), |
The general process is clear but there is not info about who is main reviewer can approve threading patches.
I lost track of the mailing list discussions, but assuming that there is consensus to accept this back end I am happy with the structure of the initial code, the size of the contributed diffs, and the engagement from the maintainer.
llvm/lib/Target/CSKY/TargetInfo/CSKYTargetInfo.cpp | ||
---|---|---|
19 | This needs LLVM_EXTERNAL_VISIBILITY: extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeCSKYTargetInfo() { To avoid error: FAILED: lib/libLTO.so.12 : && /usr/bin/x86_64-pc-linux-gnu-g++ -m32 -fPIC -march=native -O2 -pipe -fPIC -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -fuse-ld=bfd -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,--gc-sections -Wl,--sort-common -Wl,-z,now -Wl,-z,defs -Wl,-z,nodelete -Wl,-rpath-link,/var/tmp/portage/sys-devel/llvm-12.0.0.9999/work/llvm_build-abi_x86_32.x86/./lib -Wl,-O3 -Wl,--gc-sections -Wl,--version-script,"/var/tmp/portage/sys-devel/llvm-12.0.0.9999/work/llvm_build-abi_x86_32.x86/tools/lto/LTO.exports" -shared -Wl,-soname,libLTO.so.12 -o lib/libLTO.so.12 tools/lto/CMakeFiles/LTO.dir/LTODisassembler.cpp.o tools/lto/CMakeFiles/LTO.dir/lto.cpp.o -Wl,-rpath,"\$ORIGIN/../lib" lib/libLLVM-12git.so && : /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld.bfd: tools/lto/CMakeFiles/LTO.dir/lto.cpp.o: in function `lto_initialize()': lto.cpp:(.text._ZL14lto_initializev+0x7e): undefined reference to `LLVMInitializeCSKYTargetInfo' /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld.bfd: lto.cpp:(.text._ZL14lto_initializev+0xe2): undefined reference to `LLVMInitializeCSKYTargetInfo' /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld.bfd: tools/lto/CMakeFiles/LTO.dir/LTODisassembler.cpp.o: in function `lto_initialize_disassembler': LTODisassembler.cpp:(.text.lto_initialize_disassembler+0x49): undefined reference to `LLVMInitializeCSKYTargetInfo' collect2: error: ld returned 1 exit status |
llvm/lib/Target/CSKY/TargetInfo/CSKYTargetInfo.cpp | ||
---|---|---|
19 |
Sorry to miss the notify. |
Minor nit, but hopefully anyone reading this knows what e means from reading the LangRef. It would be more useful for this comment to give a summary of what is happening here specifically, for example 'CSky is always little endian with a 4-byte aligned stack'