
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.
19 lines
678 B
TableGen
19 lines
678 B
TableGen
// RUN: not llvm-tblgen -gen-runtime-libcalls -I %p/../../include %s 2>&1 | FileCheck -check-prefix=ERR %s
|
|
|
|
include "llvm/IR/RuntimeLibcallsImpl.td"
|
|
|
|
def FUNC0 : RuntimeLibcall;
|
|
def FUNC1 : RuntimeLibcall;
|
|
|
|
def isFoo : RuntimeLibcallPredicate<[{isFoo()}]>;
|
|
def isBar : RuntimeLibcallPredicate<[{isBar()}]>;
|
|
def isTargetArch : RuntimeLibcallPredicate<[{isTargetArch()}]>;
|
|
|
|
def func0 : RuntimeLibcallImpl<FUNC0>;
|
|
def func1 : RuntimeLibcallImpl<FUNC1>;
|
|
|
|
// ERR: :[[@LINE+2]]:8: error: combining nested libcall set predicates currently unhandled
|
|
def TheSystemLibrary : SystemRuntimeLibrary<isTargetArch,
|
|
(add LibcallImpls<(add func0, LibcallImpls<(add func1), isBar>), isFoo>)
|
|
>;
|