Skip to content
Snippets Groups Projects

More rodinia optimization

Merged rarbore2 requested to merge rodinia_opt2 into main
Files
2
+ 10
2
@@ -152,9 +152,13 @@ pub fn predication(editor: &mut FunctionEditor, typing: &Vec<TypeID>) {
&& editor.get_constant(cons).is_false()
{
editor.edit(|mut edit| {
let inv = edit.add_node(Node::Unary {
op: UnaryOperator::Not,
input: first,
});
let node = edit.add_node(Node::Binary {
op: BinaryOperator::And,
left: first,
left: inv,
right: third,
});
edit = edit.replace_all_uses(id, node)?;
@@ -188,9 +192,13 @@ pub fn predication(editor: &mut FunctionEditor, typing: &Vec<TypeID>) {
&& editor.get_constant(cons).is_true()
{
editor.edit(|mut edit| {
let inv = edit.add_node(Node::Unary {
op: UnaryOperator::Not,
input: first,
});
let node = edit.add_node(Node::Binary {
op: BinaryOperator::Or,
left: first,
left: inv,
right: second,
});
edit = edit.replace_all_uses(id, node)?;
Loading