Skip to content
Snippets Groups Projects
Commit 7bbd402b authored by rarbore2's avatar rarbore2
Browse files

Fix 'Branch' not being a terminator with 'is_terminator'

parent 4f4bcfc2
No related branches found
No related tags found
1 merge request!72Fix 'Branch' not being a terminator with 'is_terminator'
......@@ -412,6 +412,19 @@ impl SInst {
}
}
pub fn is_branch(&self) -> bool {
if let SInst::Branch {
cond: _,
false_target: _,
true_target: _,
} = self
{
true
} else {
false
}
}
pub fn is_partition_exit(&self) -> bool {
if let SInst::PartitionExit { data_outputs: _ } = self {
true
......@@ -429,7 +442,7 @@ impl SInst {
}
pub fn is_terminator(&self) -> bool {
self.is_jump() || self.is_partition_exit() || self.is_return()
self.is_jump() || self.is_branch() || self.is_partition_exit() || self.is_return()
}
pub fn try_thread_id(&self) -> Option<(usize, ForkJoinID)> {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment