aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/simplify.c
diff options
context:
space:
mode:
Diffstat (limited to 'simplify.c')
-rw-r--r--simplify.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/simplify.c b/simplify.c
index 584078dd..207af8ed 100644
--- a/simplify.c
+++ b/simplify.c
@@ -83,7 +83,7 @@ static struct basic_block *phi_parent(struct basic_block *source, pseudo_t pseud
// number of element, a positive number if there was
// more than expected and a negative one if less.
//
-// :note: we can't reuse a function like linearize_ptr_list()
+// :note: we can't reuse ptr_list_to_array() for the phi-sources
// because any VOIDs in the phi-list must be ignored here
// as in this context they mean 'entry has been removed'.
static int get_phisources(struct instruction *sources[], int nbr, struct instruction *insn)
@@ -108,7 +108,7 @@ static int get_phisources(struct instruction *sources[], int nbr, struct instruc
static int if_convert_phi(struct instruction *insn)
{
struct instruction *array[2];
- struct basic_block *parents[3];
+ struct basic_block *parents[2];
struct basic_block *bb, *bb1, *bb2, *source;
struct instruction *br;
pseudo_t p1, p2;
@@ -116,7 +116,7 @@ static int if_convert_phi(struct instruction *insn)
bb = insn->bb;
if (get_phisources(array, 2, insn))
return 0;
- if (linearize_ptr_list((struct ptr_list *)bb->parents, (void **)parents, 3) != 2)
+ if (ptr_list_to_array(bb->parents, parents, 2) != 2)
return 0;
p1 = array[0]->phi_src;
bb1 = array[0]->bb;