
Add a way to define a SystemLibrary for a complete set of libcalls, subdivided by a predicate based on the triple. Libraries can be defined using dag set operations, and the prior default set can be subtracted from and added to (though I think eventually all targets should move to explicit opt-ins. We're still doing things like reporting ppcf128 libcalls as available dy default on all targets). Start migrating some of the easier targets to only use the new system. Targets that don't define a SystemLibrary are still manually mutating a table set to the old defaults.
18 lines
606 B
TableGen
18 lines
606 B
TableGen
// RUN: not llvm-tblgen -gen-runtime-libcalls -I %p/../../include %s 2>&1 | FileCheck %s
|
|
|
|
include "llvm/IR/RuntimeLibcallsImpl.td"
|
|
|
|
def SOME_FUNC : RuntimeLibcall;
|
|
def func_a : RuntimeLibcallImpl<SOME_FUNC>;
|
|
|
|
def isTargetArchA : RuntimeLibcallPredicate<[{isTargetArchA()}]>;
|
|
|
|
// CHECK: [[@LINE+4]]:5: error: entry for SystemLibrary is not a RuntimeLibcallImpl
|
|
// CHECK-NEXT: def TheSystemLibraryA : SystemRuntimeLibrary<isTargetArchA,
|
|
// CHECK: note: invalid entry `SOME_FUNC`
|
|
// CHECK-NEXT: def SOME_FUNC : RuntimeLibcall;
|
|
def TheSystemLibraryA : SystemRuntimeLibrary<isTargetArchA,
|
|
(add SOME_FUNC)
|
|
>;
|
|
|