nak: Move cfg to compiler crate

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30443>
This commit is contained in:
Christian Gmeiner
2024-07-24 14:30:09 +02:00
committed by Marge Bot
parent 05bf03c3db
commit ad4a7e32f3
9 changed files with 8 additions and 7 deletions

View File

@@ -1,7 +1,7 @@
// Copyright © 2023 Collabora, Ltd.
// SPDX-License-Identifier: MIT
use compiler::bitset::BitSet;
use crate::bitset::BitSet;
use std::collections::HashMap;
use std::hash::Hash;
use std::ops::{Deref, DerefMut, Index, IndexMut};

View File

@@ -2,3 +2,4 @@
// SPDX-License-Identifier: MIT
pub mod bitset;
pub mod cfg;

View File

@@ -3,6 +3,7 @@
_compiler_rs_sources = [
'bitset.rs',
'cfg.rs',
]
_compiler_rs_sources = structured_sources([

View File

@@ -6,7 +6,6 @@
use crate::api::GetDebugFlags;
use crate::api::DEBUG;
use crate::builder::*;
use crate::cfg::CFGBuilder;
use crate::ir::*;
use crate::nir::*;
use crate::nir_instr_printer::NirInstrPrinter;
@@ -14,6 +13,7 @@ use crate::sph::{OutputTopology, PixelImap};
use nak_bindings::*;
use compiler::cfg::CFGBuilder;
use std::cmp::max;
use std::collections::{HashMap, HashSet};
use std::ops::Index;

View File

@@ -2,13 +2,13 @@
// SPDX-License-Identifier: MIT
use crate::api::{GetDebugFlags, ShaderBin, DEBUG};
use crate::cfg::CFGBuilder;
use crate::hw_runner::{Runner, CB0};
use crate::ir::*;
use crate::sm50::ShaderModel50;
use crate::sm70::ShaderModel70;
use acorn::Acorn;
use compiler::cfg::CFGBuilder;
use nak_bindings::*;
use std::str::FromStr;
use std::sync::OnceLock;

View File

@@ -8,9 +8,9 @@ use bitview::{BitMutView, BitView};
use nak_bindings::*;
pub use crate::builder::{Builder, InstrBuilder, SSABuilder, SSAInstrBuilder};
use crate::cfg::CFG;
use crate::legalize::LegalizeBuilder;
use crate::sph::{OutputTopology, PixelImap};
use compiler::cfg::CFG;
use nak_ir_proc::*;
use std::cmp::{max, min};
use std::fmt;

View File

@@ -5,7 +5,6 @@ mod api;
mod assign_regs;
mod builder;
mod calc_instr_deps;
mod cfg;
mod from_nir;
mod ir;
mod legalize;

View File

@@ -1,8 +1,8 @@
// Copyright © 2023 Mel Henning
// SPDX-License-Identifier: MIT
use crate::cfg::CFGBuilder;
use crate::ir::*;
use compiler::cfg::CFGBuilder;
use std::collections::HashMap;
fn clone_branch(op: &Op) -> Op {

View File

@@ -2,10 +2,10 @@
// SPDX-License-Identifier: MIT
use crate::api::{GetDebugFlags, DEBUG};
use crate::cfg::CFG;
use crate::ir::*;
use crate::liveness::{BlockLiveness, Liveness, SimpleLiveness};
use compiler::cfg::CFG;
use std::collections::HashMap;
use std::iter::Peekable;