Initial project import
This commit is contained in:
commit
23f2d29e32
11957 files changed
+1754577
No files matched your search
@@ -0,0 +1,29 @@
|
||||
// Copyright (c) 2026 Alexander Medvednikov. All rights reserved.
|
||||
// Use of this source code is governed by an MIT license
|
||||
// that can be found in the LICENSE file.
|
||||
|
||||
module ssa
|
||||
|
||||
pub type BlockID = int
|
||||
|
||||
pub fn (id BlockID) str() string {
|
||||
return int(id).str()
|
||||
}
|
||||
|
||||
pub struct BasicBlock {
|
||||
pub:
|
||||
id BlockID
|
||||
val_id ValueID
|
||||
name string
|
||||
parent int // Function ID
|
||||
pub mut:
|
||||
instrs []ValueID
|
||||
|
||||
// Control Flow Graph
|
||||
preds []BlockID
|
||||
succs []BlockID
|
||||
|
||||
// Dominators
|
||||
idom BlockID
|
||||
dom_tree []BlockID
|
||||
}
|
||||
Reference in new issue
Block a user