return info;
}
-/**
- * Filter function to select all nodes for which liveness is computed.
- * @param irn A node.
- * @return 1 if the node shall be considered in liveness, 0 if not.
- */
-static inline int is_liveness_node(const ir_node *irn)
-{
- switch (get_irn_opcode(irn)) {
- case iro_Block:
- case iro_Bad:
- case iro_End:
- case iro_Anchor:
- return 0;
- default:
- break;
- }
-
- return 1;
-}
-
/**
* Compute the transitive closure on the reduced graph.
* The reduced graph is the original graph without back edges.
#include "irgraph.h"
#include "irnode.h"
+#include <stdbool.h>
typedef enum {
lv_chk_state_in = 1,
typedef struct lv_chk_t lv_chk_t;
+/**
+ * Filter out some nodes for which we never need liveness.
+ *
+ * @param irn the node t check
+ * @return 0 if no liveness info is needed, 1 else
+ */
+static inline bool is_liveness_node(const ir_node *irn)
+{
+ switch (get_irn_opcode(irn)) {
+ case iro_Block:
+ case iro_Bad:
+ case iro_End:
+ case iro_Anchor:
+ case iro_NoMem:
+ return 0;
+ default:
+ return 1;
+ }
+}
+
/**
* Make a new liveness check environment.
* @param irg The graph.
#define LV_STD_SIZE 64
-/**
- * Filter out some nodes for which we never need liveness.
- *
- * @param irn the node t check
- * @return 0 if no liveness info is needed, 1 else
- */
-static inline int is_liveness_node(const ir_node *irn)
-{
- switch (get_irn_opcode(irn)) {
- case iro_Block:
- case iro_Bad:
- case iro_End:
- case iro_Anchor:
- case iro_NoMem:
- return 0;
- default:
- return 1;
- }
-}
-
int (be_is_live_in)(const be_lv_t *lv, const ir_node *block, const ir_node *irn)
{
return _be_is_live_xxx(lv, block, irn, be_lv_state_in);