Skip to content

SageInterface::CheckedCanonicalLoopPlan

Immutable, fully checked description of one transformable C/C++ loop.

Synopsis

Declared in <SageIII/sageInterface/sageInterface.h>

class CheckedCanonicalLoopPlan;

Description

Construction validates exact reciprocal ownership for every header/body edge, an acyclic structural owner chain, a side-effect-free and loop- invariant bound/stride surface, a positive nonzero constant stride magnitude, and the absence of induction-variable mutation or escape from the body. Every reference is a borrowed snapshot; transformation commits revalidate the snapshot before changing the AST. Only the checked factory can construct a plan.

Member Functions

Name Description
CheckedCanonicalLoopPlan
CheckedCanonicalLoopPlan() = delete; [constructor]
Constructors
operator=
CheckedCanonicalLoopPlan& operator=(CheckedCanonicalLoopPlan const& other) = delete;
Assignment operators
body
SgStatement& body() const noexcept;
forInit
SgForInitStatement& forInit() const noexcept;
hasInclusiveBound
bool hasInclusiveBound() const noexcept;
incrementExpression
SgExpression& incrementExpression() const noexcept;
induction
SgInitializedName& induction() const noexcept;
inductionIsUnsigned
bool inductionIsUnsigned() const noexcept;
inductionSymbol
SgVariableSymbol& inductionSymbol() const noexcept;
inductionType
SgType& inductionType() const noexcept;
inductionWidth
unsigned int inductionWidth() const noexcept;
initializer
SgStatement& initializer() const noexcept;
initializerIsDeclaration
bool initializerIsDeclaration() const noexcept;
isIncreasing
bool isIncreasing() const noexcept;
loop
SgForStatement& loop() const noexcept;
lowerBound
SgExpression& lowerBound() const noexcept;
stride
CheckedCanonicalLoopStride const& stride() const noexcept;
structuralOwner
SgNode& structuralOwner() const noexcept;
testExpression
SgExpression& testExpression() const noexcept;
testStatement
SgStatement& testStatement() const noexcept;
upperBound
SgExpression& upperBound() const noexcept;

Private Member Functions

Name
CheckedCanonicalLoopPlan
CheckedCanonicalLoopPlan( SgForStatement& loop, SgNode& structural_owner, SgForInitStatement& for_init, SgStatement& initializer, SgStatement& test_statement, SgExpression& test_expression, SgExpression& increment_expression, SgStatement& body, SgInitializedName& induction, SgVariableSymbol& induction_symbol, SgType& induction_type, SgExpression& lower_bound, SgExpression& upper_bound, std::optional<std::reference_wrapper<SgExpression>> explicit_stride, unsigned long long positive_stride_value, unsigned int induction_width, bool induction_is_unsigned, bool increasing, bool inclusive, bool initializer_is_declaration) noexcept; [constructor]

Private Data Members

Name
body_
for_init_
inclusive_
increasing_
increment_expression_
induction_
induction_is_unsigned_
induction_symbol_
induction_type_
induction_width_
initializer_
initializer_is_declaration_
loop_
lower_bound_
stride_
structural_owner_
test_expression_
test_statement_
upper_bound_

Friends

Name Description
SageInterface::requireCheckedCanonicalLoopPlan Build a checked loop plan without modifying or allocating into the AST.

Created with MrDocs