Lines Matching full:operation

15 #include "mlir/IR/Operation.h"
40 for (Operation *useOp : value.getUsers()) { in BlockInfoBuilder()
63 for (Operation &operation : *block) in BlockInfoBuilder()
64 for (Value result : operation.getResults()) in BlockInfoBuilder()
67 // Mark all nested operation results as defined, and nested operation in BlockInfoBuilder()
70 block->walk([&](Operation *op) { in BlockInfoBuilder()
129 static void buildBlockMapping(Operation *operation, in buildBlockMapping() argument
133 operation->walk<WalkOrder::PreOrder>([&](Block *block) { in buildBlockMapping()
161 Liveness::Liveness(Operation *op) : operation(op) { build(); } in Liveness()
167 buildBlockMapping(operation, builders); in build()
188 if (Operation *defOp = value.getDefiningOp()) in resolveLiveness()
209 Operation *start = blockInfo->getStartOperation(value); in resolveLiveness()
210 Operation *end = blockInfo->getEndOperation(value, start); in resolveLiveness()
244 /// Returns true if `value` is not live after `operation`.
245 bool Liveness::isDeadAfter(Value value, Operation *operation) const { in isDeadAfter()
246 Block *block = operation->getBlock(); in isDeadAfter()
253 Operation *endOperation = blockInfo->getEndOperation(value, operation); in isDeadAfter()
254 // If the operation is a real user of `value` the first check is sufficient. in isDeadAfter()
255 // If not, we will have to test whether the end operation is executed before in isDeadAfter()
256 // the given operation in the block. in isDeadAfter()
257 return endOperation == operation || endOperation->isBeforeInBlock(operation); in isDeadAfter()
269 DenseMap<Operation *, size_t> operationIds; in print()
271 operation->walk<WalkOrder::PreOrder>([&](Block *block) { in print()
275 for (Operation &operation : *block) { in print()
276 operationIds.insert({&operation, operationIds.size()}); in print()
277 for (Value result : operation.getResults()) in print()
304 operation->walk<WalkOrder::PreOrder>([&](Block *block) { in print()
315 for (Operation &op : *block) { in print()
324 llvm::sort(liveOperations, [&](Operation *left, Operation *right) { in print()
327 for (Operation *operation : liveOperations) { in print()
329 operation->print(os); in print()
337 for (Operation &op : *block) { in print()
366 /// Gets the start operation for the given value (must be referenced in this
368 Operation *LivenessBlockInfo::getStartOperation(Value value) const { in getStartOperation()
369 Operation *definingOp = value.getDefiningOp(); in getStartOperation()
377 /// Gets the end operation for the given value using the start operation
379 Operation *LivenessBlockInfo::getEndOperation(Value value, in getEndOperation()
380 Operation *startOperation) const { in getEndOperation()
385 // Resolve the last operation (must exist by definition). in getEndOperation()
386 Operation *endOperation = startOperation; in getEndOperation()
387 for (Operation *useOp : value.getUsers()) { in getEndOperation()
388 // Find the associated operation in the current block (if any). in getEndOperation()
391 // operation. in getEndOperation()
398 /// Return the values that are currently live as of the given operation.
400 LivenessBlockInfo::currentlyLiveValues(Operation *op) const { in currentlyLiveValues()
407 Operation *startOfLiveRange = value.getDefiningOp(); in currentlyLiveValues()
408 Operation *endOfLiveRange = nullptr; in currentlyLiveValues()
443 for (Operation &walkOp : in currentlyLiveValues()