blob: bcb0fffbcb86a2ed6e33f6baafdd965fcb247e2e [file] [log] [blame]
// Copyright (c) 2020, the R8 project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.android.tools.r8.ir.code;
import com.android.tools.r8.ir.code.DominatorTree.Assumption;
import com.android.tools.r8.utils.Box;
public class LazyDominatorTree extends Box<DominatorTree> {
private final IRCode code;
public LazyDominatorTree(IRCode code) {
this.code = code;
}
@Override
public DominatorTree get() {
return computeIfAbsent(() -> new DominatorTree(code, Assumption.MAY_HAVE_UNREACHABLE_BLOCKS));
}
}