Commit aea67ab9 authored by Matthias Braun's avatar Matthias Braun
Browse files

irop: Keep name as const char* instead of ident*

parent 4fec3351
......@@ -64,9 +64,6 @@ typedef enum {
} irop_flags;
ENUM_BITSET(irop_flags)
/** Returns the ident for the opcode name */
FIRM_API ident *get_op_ident(const ir_op *op);
/** Returns the string for the opcode. */
FIRM_API const char *get_op_name(const ir_op *op);
......
......@@ -56,7 +56,7 @@ ir_op *new_ir_op(unsigned code, const char *name, op_pin_state p,
ir_op *res = XMALLOCZ(ir_op);
res->code = code;
res->name = new_id_from_str(name);
res->name = name;
res->pin_state = p;
res->attr_size = attr_size;
res->flags = flags;
......@@ -133,7 +133,7 @@ void ir_op_set_fragile_indices(ir_op *op, unsigned pn_x_regular,
const char *get_op_name (const ir_op *op)
{
return get_id_str(op->name);
return op->name;
}
unsigned (get_op_code)(const ir_op *op)
......@@ -141,11 +141,6 @@ unsigned (get_op_code)(const ir_op *op)
return get_op_code_(op);
}
ident *(get_op_ident)(const ir_op *op)
{
return get_op_ident_(op);
}
const char *get_op_pin_state_name(op_pin_state s)
{
switch (s) {
......
......@@ -18,7 +18,6 @@
#include "tv.h"
#define get_op_code(op) get_op_code_(op)
#define get_op_ident(op) get_op_ident_(op)
#define get_op_pinned(op) get_op_pinned_(op)
#define set_op_tag(op, tag) set_op_tag_((op), (tag))
#define get_op_tag(op) get_op_tag_(op)
......@@ -55,7 +54,7 @@ typedef struct {
/** The type of an ir_op. */
struct ir_op {
unsigned code; /**< The unique opcode of the op. */
ident *name; /**< The name of the op. */
const char *name; /**< The name of the op. */
size_t attr_size; /**< Space needed in memory for private
attributes */
op_pin_state pin_state; /**< How to deal with the node in CSE, PRE. */
......@@ -150,11 +149,6 @@ static inline unsigned get_op_code_(const ir_op *op)
return op->code;
}
static inline ident *get_op_ident_(const ir_op *op)
{
return op->name;
}
static inline op_pin_state get_op_pinned_(const ir_op *op)
{
return op->pin_state;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment