forked from OSchip/llvm-project
[TableGen] Clean up more .td files
Differential Revision: https://reviews.llvm.org/D91431
This commit is contained in:
parent
6861d938e5
commit
c044709b8f
|
@ -35,10 +35,10 @@ class DirectiveLanguage {
|
|||
|
||||
// Make the enum values available in the namespace. This allows us to
|
||||
// write something like Enum_X if we have a `using namespace cppNamespace`.
|
||||
bit makeEnumAvailableInNamespace = 0;
|
||||
bit makeEnumAvailableInNamespace = false;
|
||||
|
||||
// Generate include and macro to enable LLVM BitmaskEnum.
|
||||
bit enableBitmaskEnumInNamespace = 0;
|
||||
bit enableBitmaskEnumInNamespace = false;
|
||||
|
||||
// Header file included in the implementation code generated. Ususally the
|
||||
// output file of the declaration code generation. Can be left blank.
|
||||
|
@ -63,7 +63,7 @@ class ClauseVal<string n, int v, bit uv> {
|
|||
bit isUserValue = uv;
|
||||
|
||||
// Set clause value used by default when unknown.
|
||||
bit isDefault = 0;
|
||||
bit isDefault = false;
|
||||
}
|
||||
|
||||
// Information about a specific clause.
|
||||
|
@ -87,27 +87,27 @@ class Clause<string c> {
|
|||
// Optional class holding value of the clause in flang AST.
|
||||
string flangClassValue = "";
|
||||
|
||||
// If set to 1, value is optional. Not optional by default.
|
||||
bit isValueOptional = 0;
|
||||
// If set to true, value is optional. Not optional by default.
|
||||
bit isValueOptional = false;
|
||||
|
||||
// Name of enum when there is a list of allowed clause values.
|
||||
string enumClauseValue = "";
|
||||
|
||||
// List of allowed clause values
|
||||
list<ClauseVal> allowedClauseValues = [];
|
||||
// If set to 1, value class is part of a list. Single class by default.
|
||||
bit isValueList = 0;
|
||||
// If set to true, value class is part of a list. Single class by default.
|
||||
bit isValueList = false;
|
||||
|
||||
// Define a default value such as "*".
|
||||
string defaultValue = "";
|
||||
|
||||
// Is clause implicit? If clause is set as implicit, the default kind will
|
||||
// be return in get<LanguageName>ClauseKind instead of their own kind.
|
||||
bit isImplicit = 0;
|
||||
bit isImplicit = false;
|
||||
|
||||
// Set clause used by default when unknown. Function returning the kind
|
||||
// of enumeration will use this clause as the default.
|
||||
bit isDefault = 0;
|
||||
bit isDefault = false;
|
||||
}
|
||||
|
||||
// Hold information about clause validity by version.
|
||||
|
@ -148,5 +148,5 @@ class Directive<string d> {
|
|||
list<VersionedClause> requiredClauses = [];
|
||||
|
||||
// Set directive used by default when unknown.
|
||||
bit isDefault = 0;
|
||||
bit isDefault = false;
|
||||
}
|
||||
|
|
|
@ -21,8 +21,8 @@ def OpenACC : DirectiveLanguage {
|
|||
let cppNamespace = "acc"; // final namespace will be llvm::acc
|
||||
let directivePrefix = "ACCD_";
|
||||
let clausePrefix = "ACCC_";
|
||||
let makeEnumAvailableInNamespace = 1;
|
||||
let enableBitmaskEnumInNamespace = 1;
|
||||
let makeEnumAvailableInNamespace = true;
|
||||
let enableBitmaskEnumInNamespace = true;
|
||||
let includeHeader = "llvm/Frontend/OpenACC/ACC.h.inc";
|
||||
let clauseEnumSetClass = "AccClauseSet";
|
||||
let flangClauseBaseClass = "AccClause";
|
||||
|
@ -35,7 +35,7 @@ def OpenACC : DirectiveLanguage {
|
|||
// 2.16.1
|
||||
def ACCC_Async : Clause<"async"> {
|
||||
let flangClassValue = "ScalarIntExpr";
|
||||
let isValueOptional = 1;
|
||||
let isValueOptional = true;
|
||||
}
|
||||
|
||||
// 2.9.6
|
||||
|
@ -123,8 +123,8 @@ def ACCC_DeviceResident : Clause<"device_resident"> {
|
|||
def ACCC_DeviceType : Clause<"device_type"> {
|
||||
let flangClassValue = "ScalarIntExpr";
|
||||
let defaultValue = "*";
|
||||
let isValueOptional = 1;
|
||||
let isValueList = 1;
|
||||
let isValueOptional = true;
|
||||
let isValueList = true;
|
||||
}
|
||||
|
||||
// 2.6.6
|
||||
|
@ -138,7 +138,7 @@ def ACCC_FirstPrivate : Clause<"firstprivate"> {
|
|||
// 2.9.2
|
||||
def ACCC_Gang : Clause<"gang"> {
|
||||
let flangClassValue = "AccGangArgument";
|
||||
let isValueOptional = 1;
|
||||
let isValueOptional = true;
|
||||
}
|
||||
|
||||
// 2.14.4
|
||||
|
@ -211,7 +211,7 @@ def ACCC_Reduction : Clause<"reduction"> {
|
|||
// 2.5.5
|
||||
def ACCC_Self : Clause<"self"> {
|
||||
let flangClassValue = "ScalarLogicalExpr";
|
||||
let isValueOptional = 1;
|
||||
let isValueOptional = true;
|
||||
}
|
||||
|
||||
// 2.9.5
|
||||
|
@ -220,7 +220,7 @@ def ACCC_Seq : Clause<"seq"> {}
|
|||
// 2.9.4
|
||||
def ACCC_Vector : Clause<"vector"> {
|
||||
let flangClassValue = "ScalarIntExpr";
|
||||
let isValueOptional = 1;
|
||||
let isValueOptional = true;
|
||||
}
|
||||
|
||||
// 2.5.10
|
||||
|
@ -231,20 +231,20 @@ def ACCC_VectorLength : Clause<"vector_length"> {
|
|||
// 2.16.2
|
||||
def ACCC_Wait : Clause<"wait"> {
|
||||
let flangClassValue = "AccWaitArgument";
|
||||
let isValueOptional = 1;
|
||||
let isValueOptional = true;
|
||||
}
|
||||
|
||||
// 2.9.3
|
||||
def ACCC_Worker: Clause<"worker"> {
|
||||
let flangClassValue = "ScalarIntExpr";
|
||||
let isValueOptional = 1;
|
||||
let isValueOptional = true;
|
||||
}
|
||||
|
||||
// 2.12
|
||||
def ACCC_Write : Clause<"write"> {}
|
||||
|
||||
def ACCC_Unknown : Clause<"unknown"> {
|
||||
let isDefault = 1;
|
||||
let isDefault = true;
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -614,5 +614,5 @@ def ACC_SerialLoop : Directive<"serial loop"> {
|
|||
}
|
||||
|
||||
def ACC_Unknown : Directive<"unknown"> {
|
||||
let isDefault = 1;
|
||||
let isDefault = true;
|
||||
}
|
||||
|
|
|
@ -21,8 +21,8 @@ def OpenMP : DirectiveLanguage {
|
|||
let cppNamespace = "omp"; // final namespace will be llvm::omp
|
||||
let directivePrefix = "OMPD_";
|
||||
let clausePrefix = "OMPC_";
|
||||
let makeEnumAvailableInNamespace = 1;
|
||||
let enableBitmaskEnumInNamespace = 1;
|
||||
let makeEnumAvailableInNamespace = true;
|
||||
let enableBitmaskEnumInNamespace = true;
|
||||
let includeHeader = "llvm/Frontend/OpenMP/OMP.h.inc";
|
||||
let clauseEnumSetClass = "OmpClauseSet";
|
||||
let flangClauseBaseClass = "OmpClause";
|
||||
|
@ -103,7 +103,7 @@ def OMP_PROC_BIND_master : ClauseVal<"master",2,1> {}
|
|||
def OMP_PROC_BIND_close : ClauseVal<"close",3,1> {}
|
||||
def OMP_PROC_BIND_spread : ClauseVal<"spread",4,1> {}
|
||||
def OMP_PROC_BIND_default : ClauseVal<"default",5,0> {}
|
||||
def OMP_PROC_BIND_unknown : ClauseVal<"unknown",6,0> { let isDefault = 1; }
|
||||
def OMP_PROC_BIND_unknown : ClauseVal<"unknown",6,0> { let isDefault = true; }
|
||||
def OMPC_ProcBind : Clause<"proc_bind"> {
|
||||
let clangClass = "OMPProcBindClause";
|
||||
let flangClass = "OmpProcBindClause";
|
||||
|
@ -123,7 +123,7 @@ def OMPC_Schedule : Clause<"schedule"> {
|
|||
def OMPC_Ordered : Clause<"ordered"> {
|
||||
let clangClass = "OMPOrderedClause";
|
||||
let flangClassValue = "ScalarIntConstantExpr";
|
||||
let isValueOptional = 1;
|
||||
let isValueOptional = true;
|
||||
}
|
||||
def OMPC_NoWait : Clause<"nowait"> {
|
||||
let clangClass = "OMPNowaitClause";
|
||||
|
@ -187,7 +187,7 @@ def OMPC_DistSchedule : Clause<"dist_schedule"> {
|
|||
let clangClass = "OMPDistScheduleClause";
|
||||
let flangClass = "OmpDistScheduleClause";
|
||||
let flangClassValue = "ScalarIntExpr";
|
||||
let isValueOptional = 1;
|
||||
let isValueOptional = true;
|
||||
}
|
||||
def OMPC_DefaultMap : Clause<"defaultmap"> {
|
||||
let clangClass = "OMPDefaultmapClause";
|
||||
|
@ -204,12 +204,12 @@ def OMPC_From : Clause<"from"> {
|
|||
def OMPC_UseDevicePtr : Clause<"use_device_ptr"> {
|
||||
let clangClass = "OMPUseDevicePtrClause";
|
||||
let flangClassValue = "Name";
|
||||
let isValueList = 1;
|
||||
let isValueList = true;
|
||||
}
|
||||
def OMPC_IsDevicePtr : Clause<"is_device_ptr"> {
|
||||
let clangClass = "OMPIsDevicePtrClause";
|
||||
let flangClassValue = "Name";
|
||||
let isValueList = 1;
|
||||
let isValueList = true;
|
||||
}
|
||||
def OMPC_TaskReduction : Clause<"task_reduction"> {
|
||||
let clangClass = "OMPTaskReductionClause";
|
||||
|
@ -265,25 +265,25 @@ def OMPC_UseDeviceAddr : Clause<"use_device_addr"> {
|
|||
}
|
||||
def OMPC_Uniform : Clause<"uniform"> {
|
||||
let flangClassValue = "Name";
|
||||
let isValueList = 1;
|
||||
let isValueList = true;
|
||||
}
|
||||
def OMPC_DeviceType : Clause<"device_type"> {}
|
||||
def OMPC_Match : Clause<"match"> {}
|
||||
def OMPC_Depobj : Clause<"depobj"> {
|
||||
let clangClass = "OMPDepobjClause";
|
||||
let isImplicit = 1;
|
||||
let isImplicit = true;
|
||||
}
|
||||
def OMPC_Flush : Clause<"flush"> {
|
||||
let clangClass = "OMPFlushClause";
|
||||
let isImplicit = 1;
|
||||
let isImplicit = true;
|
||||
}
|
||||
def OMPC_ThreadPrivate : Clause<"threadprivate"> {
|
||||
let alternativeName = "threadprivate or thread local";
|
||||
let isImplicit = 1;
|
||||
let isImplicit = true;
|
||||
}
|
||||
def OMPC_Unknown : Clause<"unknown"> {
|
||||
let isImplicit = 1;
|
||||
let isDefault = 1;
|
||||
let isImplicit = true;
|
||||
let isDefault = true;
|
||||
}
|
||||
def OMPC_Link : Clause<"link"> {
|
||||
let flangClassValue = "OmpObjectList";
|
||||
|
@ -1585,5 +1585,5 @@ def OMP_EndSections : Directive<"end sections"> {}
|
|||
def OMP_EndSingle : Directive<"end single"> {}
|
||||
def OMP_EndWorkshare : Directive<"end workshare"> {}
|
||||
def OMP_Unknown : Directive<"unknown"> {
|
||||
let isDefault = 1;
|
||||
let isDefault = true;
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
// Define the kinds of options.
|
||||
|
||||
class OptionKind<string name, int precedence = 0, bit sentinel = 0> {
|
||||
class OptionKind<string name, int precedence = 0, bit sentinel = false> {
|
||||
string Name = name;
|
||||
// The kind precedence, kinds with lower precedence are matched first.
|
||||
int Precedence = precedence;
|
||||
|
@ -24,9 +24,9 @@ class OptionKind<string name, int precedence = 0, bit sentinel = 0> {
|
|||
// An option group.
|
||||
def KIND_GROUP : OptionKind<"Group">;
|
||||
// The input option kind.
|
||||
def KIND_INPUT : OptionKind<"Input", 1, 1>;
|
||||
def KIND_INPUT : OptionKind<"Input", 1, true>;
|
||||
// The unknown option kind.
|
||||
def KIND_UNKNOWN : OptionKind<"Unknown", 2, 1>;
|
||||
def KIND_UNKNOWN : OptionKind<"Unknown", 2, true>;
|
||||
// A flag with no values.
|
||||
def KIND_FLAG : OptionKind<"Flag">;
|
||||
// An option which prefixes its (single) value.
|
||||
|
@ -99,7 +99,7 @@ class Option<list<string> prefixes, string name, OptionKind kind> {
|
|||
list<string> AliasArgs = [];
|
||||
code KeyPath = ?;
|
||||
code DefaultValue = ?;
|
||||
bit ShouldAlwaysEmit = 0;
|
||||
bit ShouldAlwaysEmit = false;
|
||||
code NormalizerRetTy = ?;
|
||||
code NormalizedValuesScope = "";
|
||||
code Normalizer = "";
|
||||
|
@ -175,7 +175,7 @@ class MarshallingInfoBitfieldFlag<code keypath, code value>
|
|||
class IsNegative {
|
||||
// todo: create & apply a normalizer for negative flags
|
||||
}
|
||||
class AlwaysEmit { bit ShouldAlwaysEmit = 1; }
|
||||
class AlwaysEmit { bit ShouldAlwaysEmit = true; }
|
||||
class Normalizer<code normalizer> { code Normalizer = normalizer; }
|
||||
class Denormalizer<code denormalizer> { code Denormalizer = denormalizer; }
|
||||
class NormalizedValuesScope<code scope> { code NormalizedValuesScope = scope; }
|
||||
|
|
|
@ -103,7 +103,7 @@ class GenericTable {
|
|||
string PrimaryKeyName;
|
||||
|
||||
// See SearchIndex.EarlyOut
|
||||
bit PrimaryKeyEarlyOut = 0;
|
||||
bit PrimaryKeyEarlyOut = false;
|
||||
}
|
||||
|
||||
// Define a record derived from this class to generate an additional search
|
||||
|
@ -124,7 +124,7 @@ class SearchIndex {
|
|||
// instructions.
|
||||
//
|
||||
// Can only be used when the first field is an integral (non-string) type.
|
||||
bit EarlyOut = 0;
|
||||
bit EarlyOut = false;
|
||||
}
|
||||
|
||||
// Legacy table type with integrated enum.
|
||||
|
|
Loading…
Reference in New Issue