From 9edb66bfe6e6f5bcecdd5a3e9c0d161079c6f92f Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Mon, 5 Feb 2007 12:08:59 +0000 Subject: [PATCH] add an is_Quot function [r8591] --- ir/ir/irnode.c | 5 +++++ ir/ir/irnode.h | 2 ++ ir/ir/irnode_t.h | 7 +++++++ 3 files changed, 14 insertions(+) diff --git a/ir/ir/irnode.c b/ir/ir/irnode.c index 695a3465d..d42d3b613 100644 --- a/ir/ir/irnode.c +++ b/ir/ir/irnode.c @@ -2458,6 +2458,11 @@ int return _is_DivMod(node); } +int +(is_Quot)(const ir_node *node) { + return _is_Quot(node); +} + int (is_Start)(const ir_node *node) { return _is_Start(node); diff --git a/ir/ir/irnode.h b/ir/ir/irnode.h index 43a3bb709..4858cedff 100644 --- a/ir/ir/irnode.h +++ b/ir/ir/irnode.h @@ -1142,6 +1142,8 @@ int is_Mod(const ir_node *node); int is_Div(const ir_node *node); /** return true if node is a DivMod node. */ int is_DivMod(const ir_node *node); +/** return true if node is a Quot node. */ +int is_Quot(const ir_node *node); /** returns true if the node is not a Block */ int is_no_Block(const ir_node *node); /** returns true if the node is a Block */ diff --git a/ir/ir/irnode_t.h b/ir/ir/irnode_t.h index 9601cb7c4..5eb12b79b 100644 --- a/ir/ir/irnode_t.h +++ b/ir/ir/irnode_t.h @@ -652,6 +652,12 @@ _is_DivMod(const ir_node *node) { return (_get_irn_op(node) == op_DivMod); } +static INLINE int +_is_Quot(const ir_node *node) { + assert(node); + return (_get_irn_op(node) == op_Quot); +} + static INLINE int _is_Start(const ir_node *node) { assert(node); @@ -994,6 +1000,7 @@ static INLINE unsigned _get_irn_idx(const ir_node *node) { #define is_Mod(node) _is_Mod(node) #define is_Div(node) _is_Div(node) #define is_DivMod(node) _is_DivMod(node) +#define is_Quot(node) _is_Quot(node) #define is_no_Block(node) _is_no_Block(node) #define is_Block(node) _is_Block(node) #define get_Block_n_cfgpreds(node) _get_Block_n_cfgpreds(node) -- 2.20.1