Skip to content

Commit

Permalink
[TableGen] Clean up Target .td include files
Browse files Browse the repository at this point in the history
Differential Revision: https://reviews.llvm.org/D91483
  • Loading branch information
Paul C. Anagnostopoulos committed Nov 17, 2020
1 parent c25e1ed commit 498859c
Show file tree
Hide file tree
Showing 9 changed files with 573 additions and 571 deletions.
490 changes: 245 additions & 245 deletions llvm/include/llvm/Target/GenericOpcodes.td

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions llvm/include/llvm/Target/GlobalISel/SelectionDAGCompat.td
Expand Up @@ -26,8 +26,8 @@ class GINodeEquiv<Instruction i, SDNode node> {
// SelectionDAG has separate nodes for atomic and non-atomic memory operations
// (ISD::LOAD, ISD::ATOMIC_LOAD, ISD::STORE, ISD::ATOMIC_STORE) but GlobalISel
// stores this information in the MachineMemoryOperand.
bit CheckMMOIsNonAtomic = 0;
bit CheckMMOIsAtomic = 0;
bit CheckMMOIsNonAtomic = false;
bit CheckMMOIsAtomic = false;

// SelectionDAG has one node for all loads and uses predicates to
// differentiate them. GlobalISel on the other hand uses separate opcodes.
Expand Down Expand Up @@ -158,7 +158,7 @@ def : GINodeEquiv<G_STRICT_FSQRT, strict_fsqrt>;
// separate nodes for them. This GINodeEquiv maps the non-atomic loads to
// G_LOAD with a non-atomic MachineMemOperand.
def : GINodeEquiv<G_LOAD, ld> {
let CheckMMOIsNonAtomic = 1;
let CheckMMOIsNonAtomic = true;
let IfSignExtend = G_SEXTLOAD;
let IfZeroExtend = G_ZEXTLOAD;
}
Expand All @@ -174,17 +174,17 @@ def : GINodeEquiv<G_ICMP, setcc> {
// G_STORE handles both atomic and non-atomic stores where as SelectionDAG had
// separate nodes for them. This GINodeEquiv maps the non-atomic stores to
// G_STORE with a non-atomic MachineMemOperand.
def : GINodeEquiv<G_STORE, st> { let CheckMMOIsNonAtomic = 1; }
def : GINodeEquiv<G_STORE, st> { let CheckMMOIsNonAtomic = true; }

def : GINodeEquiv<G_LOAD, atomic_load> {
let CheckMMOIsNonAtomic = 0;
let CheckMMOIsAtomic = 1;
let CheckMMOIsNonAtomic = false;
let CheckMMOIsAtomic = true;
}

// Operands are swapped for atomic_store vs. regular store
def : GINodeEquiv<G_STORE, atomic_store> {
let CheckMMOIsNonAtomic = 0;
let CheckMMOIsAtomic = 1;
let CheckMMOIsNonAtomic = false;
let CheckMMOIsAtomic = true;
}

def : GINodeEquiv<G_ATOMIC_CMPXCHG, atomic_cmp_swap>;
Expand Down
368 changes: 184 additions & 184 deletions llvm/include/llvm/Target/Target.td

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions llvm/include/llvm/Target/TargetCallingConv.td
Expand Up @@ -187,15 +187,15 @@ class CallingConv<list<CCAction> actions> {

/// If true, this calling convention will be emitted as externally visible in
/// the llvm namespaces instead of as a static function.
bit Entry = 0;
bit Entry = false;

bit Custom = 0;
bit Custom = false;
}

/// CustomCallingConv - An instance of this is used to declare calling
/// conventions that are implemented using a custom function of the same name.
class CustomCallingConv : CallingConv<[]> {
let Custom = 1;
let Custom = true;
}

/// CalleeSavedRegs - A list of callee saved registers for a given calling
Expand Down
8 changes: 4 additions & 4 deletions llvm/include/llvm/Target/TargetInstrPredicate.td
Expand Up @@ -11,7 +11,7 @@
// MCInstPredicate definitions are used by target scheduling models to describe
// constraints on instructions.
//
// Here is an example of an MCInstPredicate definition in tablegen:
// Here is an example of an MCInstPredicate definition in TableGen:
//
// def MCInstPredicateExample : CheckAll<[
// CheckOpcode<[BLR]>,
Expand Down Expand Up @@ -319,8 +319,8 @@ class DepBreakingClass<list<Instruction> opcodes, MCInstPredicate pred,
// - A list of subtarget hooks (Delegates) that are called from this function.
//
class STIPredicateDecl<string name, MCInstPredicate default = FalsePred,
bit overrides = 1, bit expandForMC = 1,
bit updatesOpcodeMask = 0,
bit overrides = true, bit expandForMC = true,
bit updatesOpcodeMask = false,
list<STIPredicateDecl> delegates = []> {
string Name = name;

Expand Down Expand Up @@ -355,7 +355,7 @@ class STIPredicate<STIPredicateDecl declaration,

// Convenience classes and definitions used by processor scheduling models to
// describe dependency breaking instructions and move elimination candidates.
let UpdatesOpcodeMask = 1 in {
let UpdatesOpcodeMask = true in {

def IsZeroIdiomDecl : STIPredicateDecl<"isZeroIdiom">;

Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/Target/TargetItinerary.td
Expand Up @@ -8,7 +8,7 @@
//
// This file defines the target-independent scheduling interfaces
// which should be implemented by each target that uses instruction
// itineraries for scheduling. Itineraries are details reservation
// itineraries for scheduling. Itineraries are detailed reservation
// tables for each instruction class. They are most appropriate for
// in-order machine with complicated scheduling or bundling constraints.
//
Expand Down
2 changes: 2 additions & 0 deletions llvm/include/llvm/Target/TargetPfmCounters.td
Expand Up @@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
//
// This file defines the target-independent interfaces for performance counters.
//
//===----------------------------------------------------------------------===//

// Definition of a hardware counters from libpfm identifiers.
class PfmCounter<string counter> {
Expand Down
28 changes: 14 additions & 14 deletions llvm/include/llvm/Target/TargetSchedule.td
Expand Up @@ -87,7 +87,7 @@ class SchedMachineModel {
// Per-cycle resources tables.
ProcessorItineraries Itineraries = NoItineraries;

bit PostRAScheduler = 0; // Enable Post RegAlloc Scheduler pass.
bit PostRAScheduler = false; // Enable Post RegAlloc Scheduler pass.

// Subtargets that define a model for only a subset of instructions
// that have a scheduling class (itinerary class or SchedRW list)
Expand All @@ -96,13 +96,13 @@ class SchedMachineModel {
// be an error. This should only be set during initial bringup,
// or there will be no way to catch simple errors in the model
// resulting from changes to the instruction definitions.
bit CompleteModel = 1;
bit CompleteModel = true;

// Indicates that we should do full overlap checking for multiple InstrRWs
// defining the same instructions within the same SchedMachineModel.
// FIXME: Remove when all in tree targets are clean with the full check
// enabled.
bit FullInstRWOverlapCheck = 1;
bit FullInstRWOverlapCheck = true;

// A processor may only implement part of published ISA, due to either new ISA
// extensions, (e.g. Pentium 4 doesn't have AVX) or implementation
Expand All @@ -118,12 +118,12 @@ class SchedMachineModel {
// field.
list<Predicate> UnsupportedFeatures = [];

bit NoModel = 0; // Special tag to indicate missing machine model.
bit NoModel = false; // Special tag to indicate missing machine model.
}

def NoSchedModel : SchedMachineModel {
let NoModel = 1;
let CompleteModel = 0;
let NoModel = true;
let CompleteModel = false;
}

// Define a kind of processor resource that may be common across
Expand Down Expand Up @@ -254,14 +254,14 @@ class ProcWriteResources<list<ProcResourceKind> resources> {
list<int> ResourceCycles = [];
int Latency = 1;
int NumMicroOps = 1;
bit BeginGroup = 0;
bit EndGroup = 0;
bit BeginGroup = false;
bit EndGroup = false;
// Allow a processor to mark some scheduling classes as unsupported
// for stronger verification.
bit Unsupported = 0;
bit Unsupported = false;
// Allow a processor to mark some scheduling classes as single-issue.
// SingleIssue is an alias for Begin/End Group.
bit SingleIssue = 0;
bit SingleIssue = false;
SchedMachineModel SchedModel = ?;
}

Expand Down Expand Up @@ -317,7 +317,7 @@ class ProcReadAdvance<int cycles, list<SchedWrite> writes = []> {
list<SchedWrite> ValidWrites = writes;
// Allow a processor to mark some scheduling classes as unsupported
// for stronger verification.
bit Unsupported = 0;
bit Unsupported = false;
SchedMachineModel SchedModel = ?;
}

Expand Down Expand Up @@ -395,7 +395,7 @@ class SchedVar<SchedPredicateBase pred, list<SchedReadWrite> selected> {
// SchedModel silences warnings but is ignored.
class SchedVariant<list<SchedVar> variants> {
list<SchedVar> Variants = variants;
bit Variadic = 0;
bit Variadic = false;
SchedMachineModel SchedModel = ?;
}

Expand Down Expand Up @@ -428,7 +428,7 @@ class InstRW<list<SchedReadWrite> rw, dag instrlist> {
dag Instrs = instrlist;
SchedMachineModel SchedModel = ?;
// Allow a subtarget to mark some instructions as unsupported.
bit Unsupported = 0;
bit Unsupported = false;
}

// Map a set of itinerary classes to SchedReadWrite resources. This is
Expand Down Expand Up @@ -535,7 +535,7 @@ class SchedAlias<SchedReadWrite match, SchedReadWrite alias> {

class RegisterFile<int numPhysRegs, list<RegisterClass> Classes = [],
list<int> Costs = [], list<bit> AllowMoveElim = [],
int MaxMoveElimPerCy = 0, bit AllowZeroMoveElimOnly = 0> {
int MaxMoveElimPerCy = 0, bit AllowZeroMoveElimOnly = false> {
list<RegisterClass> RegClasses = Classes;
list<int> RegCosts = Costs;
list<bit> AllowMoveElimination = AllowMoveElim;
Expand Down

0 comments on commit 498859c

Please sign in to comment.