-
Notifications
You must be signed in to change notification settings - Fork 14.4k
TableGen: Allow defining sets of runtime libraries #144978
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
0dfcc26
4d28251
dd4c942
30f59f5
7b2be62
d877333
a461a23
b5f9a53
970e379
3da4609
3a6ce48
41a5c3b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
//===- SetTheory.td - DAG set operator declarations --------*- tablegen -*-===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
// FIXME: This is not used everywhere, and different files declare | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is this file used for? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Declaring the recognized dag operators. These have always been "forward declared" in tablegen, but that's not actually a feature tablegen has |
||
// different subsets of used operators. | ||
// | ||
// It just happens TargetSelectionDAG.td defines records with the same | ||
// names as the tablegen DAG operators for SelectionDAG operators. | ||
|
||
// Target.td separately declares the special set operators. | ||
|
||
def add; // Forward declare | ||
def sub; | ||
def and; | ||
def shl; | ||
// def trunc; // FIXME: Name collision | ||
def rotl; | ||
def rotr; | ||
|
||
def sequence; | ||
def decimate; | ||
def interleave; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// 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) | ||
>; | ||
|
Uh oh!
There was an error while loading. Please reload this page.