using namespace llvm;
#ifndef LLVM_BUILD_GLOBAL_ISEL
-AArch64RegisterBankInfo::AArch64RegisterBankInfo(const TargetRegisterInfo &TRI)
- : RegisterBankInfo() {
- llvm_unreachable("This API shouldn't be useful outside of GlobalISel");
-}
+#error You shouldn't build this
+#endif
-unsigned AArch64RegisterBankInfo::copyCost(const RegisterBank &A,
- const RegisterBank &B) const {
- return 0;
-}
-#else
AArch64RegisterBankInfo::AArch64RegisterBankInfo(const TargetRegisterInfo &TRI)
: RegisterBankInfo(AArch64::NumRegisterBanks) {
// Initialize the GPR bank.
// * build_sequence cost.
return 0;
}
-#endif
tablegen(LLVM AArch64GenDisassemblerTables.inc -gen-disassembler)
add_public_tablegen_target(AArch64CommonTableGen)
+# List of all GlobalISel files.
set(GLOBAL_ISEL_FILES
- AArch64RegisterBankInfo.cpp
- )
+ AArch64RegisterBankInfo.cpp
+ )
-if(NOT LLVM_BUILD_GLOBAL_ISEL)
- set(LLVM_OPTIONAL_SOURCES ${GLOBAL_ISEL_FILES})
- set(GLOBAL_ISEL_FILES)
+# Add GlobalISel files to the dependencies if the user wants to build it.
+if(LLVM_BUILD_GLOBAL_ISEL)
+ set(GLOBAL_ISEL_BUILD_FILES ${GLOBAL_ISEL_FILES})
+else()
+ set(GLOBAL_ISEL_BUILD_FILES"")
+ set(LLVM_OPTIONAL_SOURCES LLVMGlobalISel ${GLOBAL_ISEL_FILES})
endif()
-set(LLVM_OPTIONAL_SOURCES AArch64RegisterBankInfo.cpp)
-
add_llvm_target(AArch64CodeGen
AArch64A57FPLoadBalancing.cpp
AArch64AddressTypePromotion.cpp
AArch64TargetMachine.cpp
AArch64TargetObjectFile.cpp
AArch64TargetTransformInfo.cpp
- ${GLOBAL_ISEL_FILES}
+ ${GLOBAL_ISEL_BUILD_FILES}
)
add_dependencies(LLVMAArch64CodeGen intrinsics_gen)