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
19b28796
Commit
19b28796
authored
May 10, 2006
by
Adam Szalkowski
Browse files
moved get_inverse_op to bearch
parent
766ec847
Changes
3
Hide whitespace changes
Inline
Side-by-side
ir/be/bearch.c
View file @
19b28796
...
...
@@ -107,6 +107,16 @@ entity *arch_get_frame_entity(const arch_env_t *env, ir_node *irn)
return
ops
->
impl
->
get_frame_entity
(
ops
,
irn
);
}
arch_inverse_t
*
arch_get_inverse
(
const
arch_env_t
*
env
,
const
ir_node
*
irn
,
int
i
,
arch_inverse_t
*
inverse
,
struct
obstack
*
obstack
)
{
const
arch_irn_ops_t
*
ops
=
get_irn_ops
(
env
,
irn
);
if
(
ops
->
impl
->
get_inverse
)
{
return
ops
->
impl
->
get_inverse
(
ops
,
irn
,
i
,
inverse
,
obstack
);
}
else
{
return
NULL
;
}
}
int
arch_get_allocatable_regs
(
const
arch_env_t
*
env
,
const
ir_node
*
irn
,
int
pos
,
bitset_t
*
bs
)
{
...
...
ir/be/bearch.h
View file @
19b28796
...
...
@@ -187,6 +187,19 @@ typedef enum _arch_irn_class_t {
arch_irn_class_const
,
}
arch_irn_class_t
;
/**
* An inverse operation returned by the backend
*/
typedef
struct
_arch_inverse_t
{
int
n
;
/**< count of nodes returned in nodes array */
int
costs
;
/**< costs of this remat */
/**> nodes for this inverse operation. shall be in
* schedule order. last element is the target value
*/
ir_node
**
nodes
;
}
arch_inverse_t
;
/**
* Some flags describing a node in more detail.
*/
...
...
@@ -271,6 +284,19 @@ struct _arch_irn_ops_if_t {
* @param offset The offset of the node's stack frame entity.
*/
void
(
*
set_frame_offset
)(
const
void
*
self
,
ir_node
*
irn
,
int
offset
);
/**
* Returns an inverse operation which yields the i-th argument
* of the given node as result.
*
* @param irn The original operation
* @param i Index of the argument we want the inverse oparation to yield
* @param inverse struct to be filled with the resulting inverse op
* @param obstack The obstack to use for allocation of the returned nodes array
* @return The inverse operation or NULL if operation invertible
*/
arch_inverse_t
*
(
*
get_inverse
)(
const
void
*
self
,
const
ir_node
*
irn
,
int
i
,
arch_inverse_t
*
inverse
,
struct
obstack
*
obstack
);
};
/**
...
...
@@ -284,6 +310,8 @@ extern void arch_set_frame_offset(const arch_env_t *env, ir_node *irn, int bias)
extern
entity
*
arch_get_frame_entity
(
const
arch_env_t
*
env
,
ir_node
*
irn
);
extern
arch_inverse_t
*
arch_get_inverse
(
const
arch_env_t
*
env
,
const
ir_node
*
irn
,
int
i
,
arch_inverse_t
*
inverse
,
struct
obstack
*
obstack
);
/**
* Get the register requirements for a node.
* @param env The architecture environment.
...
...
ir/be/beinverse.h
deleted
100644 → 0
View file @
766ec847
/**
* Inverse operations
* @author Adam Szalkowski
* @date 2006-05-08
* @cvs-id $Id$
*/
#ifndef BE_INVERSE_H_
#define BE_INVERSE_H_
typedef
struct
be_inverse_t_
{
int
n
;
int
costs
;
/** nodes for this inverse operation. shall be in
* schedule order. last element is the target value
*/
ir_node
**
nodes
;
}
be_inverse_t
;
/**
* Returns an inverse operation which yields the i-th argument
* of the given node as result.
*
* @param irn The original operation
* @param i Index of the argument we want the inverse oparation to yield
* @param inverse struct to be filled with the resulting inverse op
* @param obstack The obstack to use for allocation of the returned nodes array
*/
be_inverse_t
*
be_get_inverse
(
ir_node
*
irn
,
int
i
,
be_inverse_t
*
inverse
,
struct
obstack
*
obstack
);
#endif
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