Lines Matching defs:AllocationState
54 enum class AllocationState {
59 /// no AllocationState stored for a particular SSA value
115 /// Maps SSA values to their AllocationState at a particular program point.
119 llvm::SmallDenseMap<mlir::Value, AllocationState, 1> stateMap;
138 mlir::ChangeResult set(mlir::Value value, AllocationState state);
145 std::optional<AllocationState> get(mlir::Value val) const;
241 static void print(llvm::raw_ostream &os, AllocationState state) {
243 case AllocationState::Unknown:
246 case AllocationState::Freed:
249 case AllocationState::Allocated:
257 static AllocationState join(AllocationState lhs, AllocationState rhs) {
265 return AllocationState::Unknown;
277 AllocationState myState = it->second;
278 AllocationState newState = ::join(myState, rhsState);
307 mlir::ChangeResult LatticePoint::set(mlir::Value value, AllocationState state) {
310 AllocationState &oldState = stateMap[value];
325 if (state == AllocationState::Freed)
330 std::optional<AllocationState> LatticePoint::get(mlir::Value val) const {
376 changed |= after->set(result, AllocationState::Allocated);
387 std::optional<AllocationState> operandState = before.get(operand);
388 if (operandState && *operandState == AllocationState::Allocated) {
391 changed |= after->set(operand, AllocationState::Freed);