Create a region in this IR instance at the top-most level.
(&mut self, abi: Option<ABI>)
| 99 | |
| 100 | /// Create a region in this IR instance at the top-most level. |
| 101 | pub fn new_region<ABI: Abi + 'static>(&mut self, abi: Option<ABI>) -> RegionIdx { |
| 102 | let mut r = Region::new(); |
| 103 | r.live = true; |
| 104 | r.abi = abi.map(|a| (box a) as Box<dyn Abi>); |
| 105 | let r_x = self.regions.add_node(r); |
| 106 | { self.regions.node_weight_mut(r_x).unwrap().idx = r_x; } |
| 107 | self.regions.add_edge(self.master_region, r_x, ()); |
| 108 | r_x |
| 109 | } |
| 110 | |
| 111 | pub fn add_function<const A: usize, const O: usize>(&mut self, f: NodeVariant::Function<A, O>) { |
| 112 | let mut owner = self.owner.take().unwrap(); |