|
FLANG
|
#include <flang/Lower/PFTBuilder.h>
Public Types | |
| enum class | ControlFlow { Structured , StructuredWithUnstructuredInternals , Unstructured } |
Public Member Functions | |
| template<typename A> | |
| Evaluation (const A &a, const PftNode &parent, const parser::CharBlock &position, const std::optional< parser::Label > &label) | |
| General ctor. | |
| template<typename A> | |
| Evaluation (const A &a, const PftNode &parent) | |
| Construct and Directive ctor. | |
| constexpr bool | isActionStmt () const |
| Evaluation classification predicates. | |
| constexpr bool | isOtherStmt () const |
| constexpr bool | isConstructStmt () const |
| constexpr bool | isEndStmt () const |
| constexpr bool | isConstruct () const |
| constexpr bool | isDirective () const |
| constexpr bool | isNopConstructStmt () const |
| constexpr bool | isExecutableDirective () const |
| constexpr bool | isOpenMPDirective () const |
| constexpr bool | isIntermediateConstructStmt () const |
| LLVM_DUMP_METHOD void | dump () const |
| Evaluation & | nonNopSuccessor () const |
| bool | hasNestedEvaluations () const |
| Return true if this Evaluation has at least one nested evaluation. | |
| EvaluationList & | getNestedEvaluations () |
| Return nested evaluation list. | |
| Evaluation & | getFirstNestedEvaluation () |
| Evaluation & | getLastNestedEvaluation () |
| FunctionLikeUnit * | getOwningProcedure () const |
| Return the FunctionLikeUnit containing this evaluation (or nullptr). | |
| void | markControlFlow (ControlFlow kind) |
| void | markUnstructured () |
| void | weakenControlFlow (ControlFlow kind) |
| bool | isUnstructured () const |
| bool | hasUnstructuredInternals () const |
| bool | lowerBodyAsWrappedRegion () const |
| bool | lowerAsStructured () const |
| bool | lowerAsUnstructured () const |
| bool | forceAsUnstructured () const |
Public Attributes | |
| PftNode | parent |
| parser::CharBlock | position {} |
| std::optional< parser::Label > | label {} |
| std::unique_ptr< EvaluationList > | evaluationList |
| llvm::SmallVector< const parser::CompilerDirective *, 1 > | dirs |
| Evaluation * | parentConstruct {nullptr} |
| Evaluation * | lexicalSuccessor {nullptr} |
| Evaluation * | controlSuccessor {nullptr} |
| llvm::SmallVector< Evaluation *, 0 > | extraControlSuccessors |
| Evaluation * | constructExit {nullptr} |
| bool | isNewBlock {false} |
| ControlFlow | controlFlow {ControlFlow::Structured} |
| bool | negateCondition {false} |
| bool | activeConstruct {false} |
| bool | skipNextLowering {false} |
| mlir::Block * | block {nullptr} |
| int | printIndex {0} |
Function-like units contain lists of evaluations. These can be simple statements or constructs, where a construct contains its own evaluations.
|
strong |
How this evaluation's control flow is lowered. Ordered by how much it constrains lowering so that classification can only strengthen; see markControlFlow.
|
inlineconstexpr |
Return the predicate: "This is a non-initial, non-terminal construct statement." For an IfConstruct, this is ElseIfStmt and ElseStmt.
|
inline |
True only for fully unstructured control flow, which is lowered as raw CFG blocks.
| bool Fortran::lower::pft::Evaluation::lowerBodyAsWrappedRegion | ( | ) | const |
True when this construct is lowered structurally, yet its body holds unstructured control flow that has to be folded into an scf.execute_region.
|
inline |
Strengthen the classification to kind; it never weakens. This is what makes the analysis order-independent: a construct marked Unstructured by any one child stays Unstructured whatever its siblings contribute.
|
inline |
Return the first non-nop successor of an evaluation, possibly exiting from one or more enclosing constructs.
|
inline |
Lower the classification to kind. Only for an analysis that has proven a stronger classification unnecessary; every other caller wants markControlFlow, which never weakens.