Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
c2e55800
Commit
c2e55800
authored
Nov 10, 2011
by
Matthias Braun
Browse files
remove unused op_machine, op_machine_op stuff
parent
3f1d2fb0
Changes
7
Hide whitespace changes
Inline
Side-by-side
include/libfirm/irnode.h
View file @
c2e55800
...
@@ -633,21 +633,6 @@ FIRM_API int is_irn_keep(const ir_node *node);
...
@@ -633,21 +633,6 @@ FIRM_API int is_irn_keep(const ir_node *node);
*/
*/
FIRM_API
int
is_irn_start_block_placed
(
const
ir_node
*
node
);
FIRM_API
int
is_irn_start_block_placed
(
const
ir_node
*
node
);
/**
* Returns non-zero for nodes that are machine operations.
*/
FIRM_API
int
is_irn_machine_op
(
const
ir_node
*
node
);
/**
* Returns non-zero for nodes that are machine operands.
*/
FIRM_API
int
is_irn_machine_operand
(
const
ir_node
*
node
);
/**
* Returns non-zero for nodes that have the n'th user machine flag set.
*/
FIRM_API
int
is_irn_machine_user
(
const
ir_node
*
node
,
unsigned
n
);
/**
/**
* Returns non-zero for nodes that are CSE neutral to its users.
* Returns non-zero for nodes that are CSE neutral to its users.
*/
*/
...
...
include/libfirm/irop.h
View file @
c2e55800
...
@@ -73,14 +73,11 @@ typedef enum {
...
@@ -73,14 +73,11 @@ typedef enum {
irop_flag_uses_memory
=
1U
<<
10
,
/**< This operation has a memory input and may change the memory state. */
irop_flag_uses_memory
=
1U
<<
10
,
/**< This operation has a memory input and may change the memory state. */
irop_flag_dump_noblock
=
1U
<<
11
,
/**< node should be dumped outside any blocks */
irop_flag_dump_noblock
=
1U
<<
11
,
/**< node should be dumped outside any blocks */
irop_flag_dump_noinput
=
1U
<<
12
,
/**< node is a placeholder for "no input" */
irop_flag_dump_noinput
=
1U
<<
12
,
/**< node is a placeholder for "no input" */
irop_flag_machine
=
1U
<<
13
,
/**< This operation is a machine operation. */
irop_flag_cse_neutral
=
1U
<<
13
,
/**< This operation is CSE neutral to its users. */
irop_flag_machine_op
=
1U
<<
14
,
/**< This operation is a machine operand. */
irop_flag_cse_neutral
=
1U
<<
15
,
/**< This operation is CSE neutral to its users. */
/** This operation jumps to an unknown destination. The CFG is a
/** This operation jumps to an unknown destination. The CFG is a
* conservative aproximation in this case. You cannot change the destination
* conservative aproximation in this case. You cannot change the destination
* of an unknown_jump */
* of an unknown_jump */
irop_flag_unknown_jump
=
1U
<<
16
,
irop_flag_unknown_jump
=
1U
<<
14
,
irop_flag_user
=
1U
<<
17
,
/**< This flag and all higher ones are free for machine user. */
}
irop_flags
;
}
irop_flags
;
/** Returns the ident for the opcode name */
/** Returns the ident for the opcode name */
...
...
ir/be/beinsn.c
View file @
c2e55800
...
@@ -35,40 +35,6 @@
...
@@ -35,40 +35,6 @@
#include "beabi.h"
#include "beabi.h"
#include "raw_bitset.h"
#include "raw_bitset.h"
/**
* Add machine operands to the instruction uses.
*
* @param env the insn construction environment
* @param insn the be_insn that is build
* @param mach_op the machine operand for which uses are added
*/
static
void
add_machine_operands
(
const
be_insn_env_t
*
env
,
be_insn_t
*
insn
,
ir_node
*
mach_op
)
{
struct
obstack
*
obst
=
env
->
obst
;
int
i
,
n
;
for
(
i
=
0
,
n
=
get_irn_arity
(
mach_op
);
i
<
n
;
++
i
)
{
ir_node
*
op
=
get_irn_n
(
mach_op
,
i
);
if
(
is_irn_machine_operand
(
op
))
{
add_machine_operands
(
env
,
insn
,
op
);
}
else
if
(
arch_irn_consider_in_reg_alloc
(
env
->
cls
,
op
))
{
be_operand_t
o
;
/* found a register use, create an operand */
o
.
req
=
arch_get_irn_register_req_in
(
mach_op
,
i
);
o
.
carrier
=
op
;
o
.
irn
=
insn
->
irn
;
o
.
pos
=
i
;
o
.
partner
=
NULL
;
o
.
has_constraints
=
arch_register_req_is
(
o
.
req
,
limited
);
obstack_grow
(
obst
,
&
o
,
sizeof
(
o
));
insn
->
n_ops
++
;
insn
->
in_constraints
|=
o
.
has_constraints
;
}
}
}
/**
/**
* Create a be_insn_t for an IR node.
* Create a be_insn_t for an IR node.
*
*
...
@@ -140,9 +106,7 @@ be_insn_t *be_scan_insn(const be_insn_env_t *env, ir_node *irn)
...
@@ -140,9 +106,7 @@ be_insn_t *be_scan_insn(const be_insn_env_t *env, ir_node *irn)
for
(
i
=
0
,
n
=
get_irn_arity
(
irn
);
i
<
n
;
++
i
)
{
for
(
i
=
0
,
n
=
get_irn_arity
(
irn
);
i
<
n
;
++
i
)
{
ir_node
*
op
=
get_irn_n
(
irn
,
i
);
ir_node
*
op
=
get_irn_n
(
irn
,
i
);
if
(
is_irn_machine_operand
(
op
))
{
if
(
arch_irn_consider_in_reg_alloc
(
env
->
cls
,
op
))
{
add_machine_operands
(
env
,
insn
,
op
);
}
else
if
(
arch_irn_consider_in_reg_alloc
(
env
->
cls
,
op
))
{
/* found a register use, create an operand */
/* found a register use, create an operand */
o
.
req
=
arch_get_irn_register_req_in
(
irn
,
i
);
o
.
req
=
arch_get_irn_register_req_in
(
irn
,
i
);
o
.
carrier
=
op
;
o
.
carrier
=
op
;
...
...
ir/be/scripts/generate_new_opcodes.pl
View file @
c2e55800
...
@@ -676,7 +676,7 @@ EOF
...
@@ -676,7 +676,7 @@ EOF
"
none
",
"
labeled
",
"
commutative
",
"
cfopcode
",
"
unknown_jump
",
"
fragile
",
"
none
",
"
labeled
",
"
commutative
",
"
cfopcode
",
"
unknown_jump
",
"
fragile
",
"
forking
",
"
highlevel
",
"
constlike
",
"
always_opt
",
"
keep
",
"
forking
",
"
highlevel
",
"
constlike
",
"
always_opt
",
"
keep
",
"
start_block
",
"
uses_memory
",
"
dump_noblock
",
"
dump_noinput
",
"
start_block
",
"
uses_memory
",
"
dump_noblock
",
"
dump_noinput
",
"
machine
",
"
machine_op
",
"
cse_neutral
"
"
cse_neutral
"
);
);
my
$is_fragile
=
0
;
my
$is_fragile
=
0
;
foreach
my
$flag
(
@
{
$n
{"
op_flags
"}})
{
foreach
my
$flag
(
@
{
$n
{"
op_flags
"}})
{
...
@@ -697,7 +697,7 @@ EOF
...
@@ -697,7 +697,7 @@ EOF
$n_opcodes
++
;
$n_opcodes
++
;
$temp
=
"
\t
op_
$op
= new_ir_op(cur_opcode + iro_
$op
,
\"
$op
\"
, op_pin_state_
"
.
$n
{"
state
"}
.
"
,
$op_flags
";
$temp
=
"
\t
op_
$op
= new_ir_op(cur_opcode + iro_
$op
,
\"
$op
\"
, op_pin_state_
"
.
$n
{"
state
"}
.
"
,
$op_flags
";
$temp
.=
"
|irop_flag_machine
,
"
.
translate_arity
(
$arity
)
.
"
, 0,
${attr_size}
, &ops);
\n
";
$temp
.=
"
,
"
.
translate_arity
(
$arity
)
.
"
, 0,
${attr_size}
, &ops);
\n
";
push
(
@obst_new_irop
,
$temp
);
push
(
@obst_new_irop
,
$temp
);
if
(
$is_fragile
)
{
if
(
$is_fragile
)
{
push
(
@obst_new_irop
,
"
\t
ir_op_set_fragile_indices(op_
${op}
, n_
${op}
_mem, pn_
${op}
_X_regular, pn_
${op}
_X_except);
\n
");
push
(
@obst_new_irop
,
"
\t
ir_op_set_fragile_indices(op_
${op}
, n_
${op}
_mem, pn_
${op}
_X_regular, pn_
${op}
_X_except);
\n
");
...
...
ir/ir/irnode.c
View file @
c2e55800
...
@@ -1590,24 +1590,6 @@ int (is_irn_start_block_placed)(const ir_node *node)
...
@@ -1590,24 +1590,6 @@ int (is_irn_start_block_placed)(const ir_node *node)
return
is_irn_start_block_placed_
(
node
);
return
is_irn_start_block_placed_
(
node
);
}
}
/* Returns non-zero for nodes that are machine operations. */
int
(
is_irn_machine_op
)(
const
ir_node
*
node
)
{
return
is_irn_machine_op_
(
node
);
}
/* Returns non-zero for nodes that are machine operands. */
int
(
is_irn_machine_operand
)(
const
ir_node
*
node
)
{
return
is_irn_machine_operand_
(
node
);
}
/* Returns non-zero for nodes that have the n'th user machine flag set. */
int
(
is_irn_machine_user
)(
const
ir_node
*
node
,
unsigned
n
)
{
return
is_irn_machine_user_
(
node
,
n
);
}
/* Returns non-zero for nodes that are CSE neutral to its users. */
/* Returns non-zero for nodes that are CSE neutral to its users. */
int
(
is_irn_cse_neutral
)(
const
ir_node
*
node
)
int
(
is_irn_cse_neutral
)(
const
ir_node
*
node
)
{
{
...
...
ir/ir/irnode_t.h
View file @
c2e55800
...
@@ -481,21 +481,6 @@ static inline int is_irn_start_block_placed_(const ir_node *node)
...
@@ -481,21 +481,6 @@ static inline int is_irn_start_block_placed_(const ir_node *node)
return
is_op_start_block_placed
(
get_irn_op_
(
node
));
return
is_op_start_block_placed
(
get_irn_op_
(
node
));
}
}
static
inline
int
is_irn_machine_op_
(
const
ir_node
*
node
)
{
return
is_op_machine
(
get_irn_op_
(
node
));
}
static
inline
int
is_irn_machine_operand_
(
const
ir_node
*
node
)
{
return
is_op_machine_operand
(
get_irn_op_
(
node
));
}
static
inline
int
is_irn_machine_user_
(
const
ir_node
*
node
,
unsigned
n
)
{
return
is_op_machine_user
(
get_irn_op_
(
node
),
n
);
}
static
inline
int
is_irn_cse_neutral_
(
const
ir_node
*
node
)
static
inline
int
is_irn_cse_neutral_
(
const
ir_node
*
node
)
{
{
return
is_op_cse_neutral
(
get_irn_op_
(
node
));
return
is_op_cse_neutral
(
get_irn_op_
(
node
));
...
@@ -672,9 +657,6 @@ void init_irnode(void);
...
@@ -672,9 +657,6 @@ void init_irnode(void);
#define is_irn_always_opt(node) is_irn_always_opt_(node)
#define is_irn_always_opt(node) is_irn_always_opt_(node)
#define is_irn_keep(node) is_irn_keep_(node)
#define is_irn_keep(node) is_irn_keep_(node)
#define is_irn_start_block_placed(node) is_irn_start_block_placed_(node)
#define is_irn_start_block_placed(node) is_irn_start_block_placed_(node)
#define is_irn_machine_op(node) is_irn_machine_op_(node)
#define is_irn_machine_operand(node) is_irn_machine_operand_(node)
#define is_irn_machine_user(node, n) is_irn_machine_user_(node, n)
#define is_irn_cse_neutral(node) is_irn_cse_neutral_(node)
#define is_irn_cse_neutral(node) is_irn_cse_neutral_(node)
#define get_Cond_jmp_pred(node) get_Cond_jmp_pred_(node)
#define get_Cond_jmp_pred(node) get_Cond_jmp_pred_(node)
#define set_Cond_jmp_pred(node, pred) set_Cond_jmp_pred_(node, pred)
#define set_Cond_jmp_pred(node, pred) set_Cond_jmp_pred_(node, pred)
...
...
ir/ir/irop_t.h
View file @
c2e55800
...
@@ -129,30 +129,12 @@ static inline bool is_op_start_block_placed(const ir_op *op)
...
@@ -129,30 +129,12 @@ static inline bool is_op_start_block_placed(const ir_op *op)
return
op
->
flags
&
irop_flag_start_block
;
return
op
->
flags
&
irop_flag_start_block
;
}
}
/** Returns non-zero if operation is a machine operation */
static
inline
bool
is_op_machine
(
const
ir_op
*
op
)
{
return
op
->
flags
&
irop_flag_machine
;
}
/** Returns non-zero if operation is a machine operand */
static
inline
bool
is_op_machine_operand
(
const
ir_op
*
op
)
{
return
op
->
flags
&
irop_flag_machine_op
;
}
/** Returns non-zero if operation is CSE neutral */
/** Returns non-zero if operation is CSE neutral */
static
inline
bool
is_op_cse_neutral
(
const
ir_op
*
op
)
static
inline
bool
is_op_cse_neutral
(
const
ir_op
*
op
)
{
{
return
op
->
flags
&
irop_flag_cse_neutral
;
return
op
->
flags
&
irop_flag_cse_neutral
;
}
}
/** Returns non-zero if operation is a machine user op number n */
static
inline
bool
is_op_machine_user
(
const
ir_op
*
op
,
unsigned
n
)
{
return
op
->
flags
&
(
irop_flag_user
<<
n
);
}
static
inline
unsigned
get_op_code_
(
const
ir_op
*
op
)
static
inline
unsigned
get_op_code_
(
const
ir_op
*
op
)
{
{
return
op
->
code
;
return
op
->
code
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment