projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix bug where compound_graph_pathe were consider null
[libfirm]
/
ir
/
be
/
beinsn.c
diff --git
a/ir/be/beinsn.c
b/ir/be/beinsn.c
index
1756564
..
167a2b2
100644
(file)
--- a/
ir/be/beinsn.c
+++ b/
ir/be/beinsn.c
@@
-23,18
+23,16
@@
* @author Sebastian Hack
* @version $Id$
*/
* @author Sebastian Hack
* @version $Id$
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
#include "config.h"
-#endif
#include "irgraph_t.h"
#include "irmode_t.h"
#include "irnode_t.h"
#include "iredges.h"
#include "irgraph_t.h"
#include "irmode_t.h"
#include "irnode_t.h"
#include "iredges.h"
-#include "besched
_t
.h"
+#include "besched.h"
#include "beinsn_t.h"
#include "beinsn_t.h"
-#include "beirg
_t
.h"
+#include "beirg.h"
#include "beabi.h"
#include "raw_bitset.h"
#include "beabi.h"
#include "raw_bitset.h"
@@
-45,7
+43,8
@@
* @param insn the be_insn that is build
* @param mach_op the machine operand for which uses are added
*/
* @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) {
+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;
struct obstack *obst = env->obst;
int i, n;
@@
-87,8
+86,7
@@
be_insn_t *be_scan_insn(const be_insn_env_t *env, ir_node *irn)
int i, n;
int pre_colored = 0;
int i, n;
int pre_colored = 0;
- insn = obstack_alloc(obst, sizeof(insn[0]));
- memset(insn, 0, sizeof(insn[0]));
+ insn = OALLOCZ(obst, be_insn_t);
insn->irn = irn;
insn->next_insn = sched_next(irn);
insn->irn = irn;
insn->next_insn = sched_next(irn);
@@
-107,7
+105,7
@@
be_insn_t *be_scan_insn(const be_insn_env_t *env, ir_node *irn)
if (arch_irn_consider_in_reg_alloc(env->cls, p)) {
/* found a def: create a new operand */
if (arch_irn_consider_in_reg_alloc(env->cls, p)) {
/* found a def: create a new operand */
- o.req = arch_get_register_req
(p, -1
);
+ o.req = arch_get_register_req
_out(p
);
o.carrier = p;
o.irn = irn;
o.pos = -(get_Proj_proj(p) + 1);
o.carrier = p;
o.irn = irn;
o.pos = -(get_Proj_proj(p) + 1);
@@
-121,7
+119,7
@@
be_insn_t *be_scan_insn(const be_insn_env_t *env, ir_node *irn)
}
} else if (arch_irn_consider_in_reg_alloc(env->cls, irn)) {
/* only one def, create one operand */
}
} else if (arch_irn_consider_in_reg_alloc(env->cls, irn)) {
/* only one def, create one operand */
- o.req = arch_get_register_req
(irn, -1
);
+ o.req = arch_get_register_req
_out(irn
);
o.carrier = irn;
o.irn = irn;
o.pos = -1;
o.carrier = irn;
o.irn = irn;
o.pos = -1;
@@
-195,7
+193,6
@@
be_insn_env_t *be_insn_env_init(be_insn_env_t *ie, const be_irg_t *birg,
const arch_register_class_t *cls,
struct obstack *obst)
{
const arch_register_class_t *cls,
struct obstack *obst)
{
- ie->aenv = be_get_birg_arch_env(birg);
ie->cls = cls;
ie->obst = obst;
ie->ignore_colors = bitset_obstack_alloc(obst, cls->n_regs);
ie->cls = cls;
ie->obst = obst;
ie->ignore_colors = bitset_obstack_alloc(obst, cls->n_regs);