LoopScope.xcc
Benoit Dupont de Dinechin (Benoit.Dupont-de-Dinechin@st.com).
Copyright 2002 - 2007 STMicroelectronics. Copyright 1995 - 1998 Commissariat a l'Energie Atomique.
This program is free software; you can redistribute it and/or modify it under the terms of either (at your option): the GNU General Public License (GPL) version 2; the GNU Lesser General Public License (LGPL) version 2.1; any later version of these licences as published by the Free Software Foundation.
LoopScope_Factory— IndexedFactory for LoopScope(s).
extern IndexedFactory_ LoopScope_Factory[1];
LoopScopeFlag— Enumerates the LoopScope flags.
typedef enum { LoopScopeFlag_Inner = 0x1, // LoopScope of inner loop. LoopScopeFlag_Simple = 0x2, // LoopScope of simple loop. LoopScopeFlag_Hardware = 0x4, // LoopScope of hardware loop. LoopScopeFlag_Remainder = 0x8, // LoopScope of remainder loop. } enum_LoopScopeFlag; typedef uint8_t LoopScopeFlags;
LoopScope— Persistent loop scope information.
A LoopScope maintains loop scope information accross optimizations, in particular dependences between memory access operations, user loop pragma, and diagnostics.
struct LoopScope_ { //@args Memory memory, BasicBlock headerBlock, Configure configure Indexed_ __; // A LoopScope_ ISA Indexed_. //@access IDENTITY Indexed_IDENTITY(LoopScope____(this)) //@access INDEX Indexed_INDEX(LoopScope____(this)) //@mutate INDEX Indexed__INDEX(LoopScope____(this)) Memory MEMORY; // This LoopScope Memory. BasicBlock HEADERBLOCK; // The loop header BasicBlock. Temporary TRIPCOUNT; // The Temporary that holds the loop trip count. struct LoopScope_ *PARENT; // The parent of this LoopScope. DependenceTable DEPENDENCETABLE; // The supplied dependences between operations. Configure_ CONFIGURE[1]; // Configure of this LoopScope. //@access PROCESSOR Configure_PROCESSOR(LoopScope_configure(this)) //@access COMPENSATION Configure_COMPENSATION(LoopScope_configure(this)) //@access SPECULATION Configure_SPECULATION(LoopScope_configure(this)) //@access RELAXATION Configure_RELAXATION(LoopScope_configure(this)) //@access RENAMING Configure_RENAMING(LoopScope_configure(this)) //@access BOOSTING Configure_BOOSTING(LoopScope_configure(this)) //@access ALIASING Configure_ALIASING(LoopScope_configure(this)) //@access TRIPMODULUS Configure_TRIPMODULUS(LoopScope_configure(this)) //@access TRIPRESIDUE Configure_TRIPRESIDUE(LoopScope_configure(this)) //@access LOGPREPAD Configure_LOGPREPAD(LoopScope_configure(this)) //@access LOGPOSTPAD Configure_LOGPOSTPAD(LoopScope_configure(this)) //@access PIPELINING Configure_PIPELINING(LoopScope_configure(this)) //@access PRELOADING Configure_PRELOADING(LoopScope_configure(this)) //@access L1MISSEXTRA Configure_L1MISSEXTRA(LoopScope_configure(this)) LoopScopeFlags FLAGS; // This LoopScope flags. //@access isInner ((LoopScope_flags(this) & LoopScopeFlag_Inner) != 0) //@access isSimple ((LoopScope_flags(this) & LoopScopeFlag_Simple) != 0) //@access isHardware ((LoopScope_flags(this) & LoopScopeFlag_Hardware) != 0) //@access isRemainder ((LoopScope_flags(this) & LoopScopeFlag_Remainder) != 0) //@access isCounted (LoopScope_tripCount(this) != NULL) int16_t NESTING; // Nesting level of this LoopScope. int16_t BLOCKCOUNT; // Count of BasicBlocks(s) with same HEADERBLOCK. int16_t PEELCOUNT; // The amount of loop peeling applied. int16_t UNROLLED; // The amount of loop unrolling applied. int16_t KUNROLL; // The amount of kernel unrolling applied. int16_t LAMBDA; // II after loop scheduling or pipelining. int16_t LENGTH; // Makespan after loop scheduling or pipelining. int16_t LATENCY; // Critical cycle latency in cycles. int16_t DISTANCE; // Critical cycle distance in iterations. };
LoopScope_identity— This LoopScope identity.
static inline uint32_t LoopScope_identity(const_LoopScope this) { return LoopScope_IDENTITY(this); }
LoopScope_headerBlock— This LoopScope loop head block.
static inline BasicBlock LoopScope_headerBlock(const_LoopScope this) { return LoopScope_HEADERBLOCK(this); }
LoopScope_tripCount— The loop tripcount Temporary when known, else NULL.
static inline Temporary LoopScope_tripCount(const_LoopScope this) { return LoopScope_TRIPCOUNT(this); }
LoopScope_setTripCount— Set the loop tripcount.
static inline void LoopScope_setTripCount(LoopScope this, Temporary tripCount) { *LoopScope__TRIPCOUNT(this) = tripCount; }
LoopScope_configure— The loop configure.
static inline Configure LoopScope_configure(LoopScope this) { return LoopScope_CONFIGURE(this); }
LoopScope_flags— This LoopScope flags.
static inline LoopScopeFlags LoopScope_flags(const_LoopScope this) { return LoopScope_FLAGS(this); }
LoopScope_setFlags— Set this LoopScope flags.
static inline void LoopScope_setFlags(LoopScope this, LoopScopeFlags flags) { *LoopScope__FLAGS(this) |= flags; }
LoopScope_clearFlags— Reset this LoopScope flags.
static inline void LoopScope_clearFlags(LoopScope this, LoopScopeFlags flags) { *LoopScope__FLAGS(this) &= ~flags; }
LoopScope_nesting— Nesting of this LoopScope.
static inline int LoopScope_nesting(const_LoopScope this) { return LoopScope_NESTING(this); }
LoopScope_blockCount— Count of BasicBlock(s) with same header block as this LoopScope.
static inline int LoopScope_blockCount(const_LoopScope this) { return LoopScope_BLOCKCOUNT(this); }
LoopScope_peelCount— The amount of loop peeling applied.
static inline int LoopScope_peelCount(const_LoopScope this) { return LoopScope_PEELCOUNT(this); }
LoopScope_unrolled— The amount of loop unrolling applied.
static inline int LoopScope_unrolled(const_LoopScope this) { return LoopScope_UNROLLED(this); }
LoopScope_setUnrolled— Set the amount of loop unrolling.
static inline void LoopScope_setUnrolled(LoopScope this, int unrolled) { *LoopScope__UNROLLED(this) = unrolled; }
LoopScope_updateUnrolled— Update the amount of loop unrolling.
static inline void LoopScope_updateUnrolled(LoopScope this, int kunroll) { int unrolled = LoopScope_UNROLLED(this); Except_CHECK(kunroll > 0); if (unrolled > 0) { *LoopScope__UNROLLED(this) = unrolled*kunroll; } else { *LoopScope__UNROLLED(this) = kunroll; } }
LoopScope_parent— This LoopScope parent.
static inline LoopScope LoopScope_parent(const_LoopScope this) { return LoopScope_PARENT(this); }
LoopScope_makeDependenceTable— Make a DependenceTable for this LoopScope.
DependenceTable LoopScope_makeDependenceTable(LoopScope this);
LoopScope_killDependenceTable— Kill the DependenceTable of this LoopScope.
void LoopScope_killDependenceTable(LoopScope this);
LoopScope_dependenceTable— This LoopScope dependenceTable.
static inline DependenceTable LoopScope_dependenceTable(const_LoopScope this) { return LoopScope_DEPENDENCETABLE(this); }
LoopScope_transfer— Transfer the contents of that LoopScope to this LoopScope.
void LoopScope_transfer(LoopScope this, LoopScope that);
LoopScope_update— Update this LoopScope after control-flow change.
void LoopScope_update(LoopScope this, LoopScope parent_scope, int blockCount, bool isSimpleLoop, bool isInnerLoop);
LoopScope_pretty— Pretty-print this LoopScope.
bool LoopScope_pretty(const_LoopScope this, FILE *file);