MLIR: include/mlir/Interfaces/LoopLikeInterface.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13 #ifndef MLIR_INTERFACES_LOOPLIKEINTERFACE_H_

14 #define MLIR_INTERFACES_LOOPLIKEINTERFACE_H_

15

17

18 namespace mlir {

19 class RewriterBase;

20

21

22

23

24

27

28 namespace detail {

29

31 }

32

33

34

35

36

37 namespace OpTrait {

38

39

40

41

42 template

44 public:

47 }

48 };

49

50 }

51

52

53

54

55 template

57

59

60

63 for (Block &block : region)

65 }

66

69 "expected block to have a terminator");

71 it != e;) {

73 while (it != e && !isa(&*it))

74 ++it;

75 if (it != subBlockStart)

76 subBlocks.emplace_back(subBlockStart, std::prev(it));

77

78 while (it != e && isa(&*it))

80 }

81 }

82 };

83

84 }

85

86

87

88

89

90

91 #include "mlir/Interfaces/LoopLikeInterface.h.inc"

92

93 #endif

Block represents an ordered list of Operations.

OpListType::iterator iterator

This class defines the main interface for locations in MLIR and acts as a non-nullable wrapper around...

This class helps build Operations.

static LogicalResult verifyTrait(Operation *op)

This class provides the API for ops that are known to be terminators.

Helper class for implementing traits.

Operation is the basic unit of execution within MLIR.

bool hasTrait()

Returns true if the operation was registered with a particular trait, e.g.

MutableArrayRef< Region > getRegions()

Returns the regions held by this operation.

This class contains a list of basic blocks and a link to the parent operation it is attached to.

LogicalResult verifyOneRegion(Operation *op)

LogicalResult verifyLoopLikeOpInterface(Operation *op)

Verify invariants of the LoopLikeOpInterface.

Include the generated interface declarations.

std::function< SmallVector< Value >(OpBuilder &b, Location loc, ArrayRef< BlockArgument > newBbArgs)> NewYieldValuesFn

A function that returns the additional yielded values during replaceWithAdditionalYields.

SmallVector< std::pair< Block::iterator, Block::iterator > > subBlocks