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
0a1461dc
Commit
0a1461dc
authored
Dec 15, 2006
by
Christian Würdig
Browse files
changed structure if interface
parent
74d50906
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/beilpsched.h
View file @
0a1461dc
...
...
@@ -6,7 +6,8 @@
#include "bemachine.h"
#include "beirg.h"
typedef
struct
_ilp_sched_selector_t
ilp_sched_selector_t
;
typedef
struct
_ilp_sched_selector_t
ilp_sched_selector_t
;
typedef
struct
_ilp_sched_selector_if_t
ilp_sched_selector_if_t
;
/**
* A selector interface which is used by the ILP schedule framework.
...
...
@@ -14,7 +15,7 @@ typedef struct _ilp_sched_selector_t ilp_sched_selector_t;
* from the backend or they pass back information to the backend about
* the state of scheduling.
*/
struct
_ilp_sched_selector_t
{
struct
_ilp_sched_selector_
if_
t
{
/**
* This function is called before the scheduling of the irg.
...
...
@@ -67,23 +68,33 @@ struct _ilp_sched_selector_t {
void
(
*
node_scheduled
)(
const
void
*
self
,
ir_node
*
irn
,
unsigned
cycle
,
void
*
block_env
);
};
#define BE_ILP_SCHED_CALL(func, self, obj, env) \
do { \
if ((self) && (self)->func) \
(self)->func((self), (obj), (env)); \
/**
* The actual ILP schedule selector.
*/
struct
_ilp_sched_selector_t
{
ilp_sched_selector_if_t
*
impl
;
};
/**
* Some helper macros.
*/
#define BE_ILP_SCHED_CALL(func, self, obj, env) \
do { \
if ((self) && (self)->impl->func) \
(self)->impl->func((self), (obj), (env)); \
} while (0)
#define BE_ILP_SCHED_CALL2(func, self, obj, obj2, env) \
do { \
if ((self) && (self)->func) \
(self)->func((self), (obj), (obj2), (env)); \
#define BE_ILP_SCHED_CALL2(func, self, obj, obj2, env)
\
do {
\
if ((self) && (self)->
impl->
func) \
(self)->
impl->
func((self), (obj), (obj2), (env)); \
} while (0)
#define BE_ILP_SCHED_CALL_ENVRET(func, self, obj, defret) \
((self) && (self)->func ? (self)->func((self), (obj)) : (defret))
((self) && (self)->
impl->
func ? (self)->
impl->
func((self), (obj)) : (defret))
#define BE_ILP_SCHED_CALL_RET(func, self, obj, env, defret) \
((self) && (self)->func ? (self)->func((self), (obj), (env)) : (defret))
((self) && (self)->
impl->
func ? (self)->
impl->
func((self), (obj), (env)) : (defret))
/**
* Convenience macros for all functions.
...
...
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