aboutsummaryrefslogtreecommitdiff
path: root/flow.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-11-27 12:02:33 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:05:05 -0700
commit2c3d706dc9f83397584eb76f728d3d8e6fae6a78 (patch)
tree9b25d31a2e4df0075a00b52f2441a0fd12cae4d4 /flow.c
parentFix check for "local" symbols. (diff)
downloadsparse-2c3d706dc9f83397584eb76f728d3d8e6fae6a78.tar.gz
sparse-2c3d706dc9f83397584eb76f728d3d8e6fae6a78.tar.bz2
sparse-2c3d706dc9f83397584eb76f728d3d8e6fae6a78.zip
Export the load instruction conversion functions.
And clean up naming while at it ("insn" -> "instruction"). Shorthand is fine for local things, but when we expose them globally we're better off typing a few extra characters.
Diffstat (limited to 'flow.c')
-rw-r--r--flow.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/flow.c b/flow.c
index 23e2e3a..4255546 100644
--- a/flow.c
+++ b/flow.c
@@ -149,7 +149,7 @@ void convert_instruction_target(struct instruction *insn, pseudo_t src)
target->users = NULL;
}
-static void convert_load_insn(struct instruction *insn, pseudo_t src)
+void convert_load_instruction(struct instruction *insn, pseudo_t src)
{
convert_instruction_target(insn, src);
/* Turn the load into a no-op */
@@ -266,7 +266,7 @@ found_dominator:
* We should probably sort the phi list just to make it easier to compare
* later for equality.
*/
-static void rewrite_load_instruction(struct instruction *insn, struct pseudo_list *dominators)
+void rewrite_load_instruction(struct instruction *insn, struct pseudo_list *dominators)
{
pseudo_t new, phi;
@@ -288,7 +288,7 @@ static void rewrite_load_instruction(struct instruction *insn, struct pseudo_lis
FOR_EACH_PTR(dominators, phi) {
phi->def->bb = NULL;
} END_FOR_EACH_PTR(phi);
- convert_load_insn(insn, new);
+ convert_load_instruction(insn, new);
return;
complex_phi:
@@ -347,7 +347,7 @@ found:
return 0;
if (dom) {
- convert_load_insn(insn, dom->target);
+ convert_load_instruction(insn, dom->target);
return 1;
}
@@ -362,7 +362,7 @@ found:
if (!dominators) {
if (!local)
return 0;
- convert_load_insn(insn, value_pseudo(0));
+ convert_load_instruction(insn, value_pseudo(0));
return 1;
}
@@ -545,7 +545,7 @@ static void simplify_one_symbol(struct entrypoint *ep, struct symbol *sym)
FOR_EACH_PTR(pseudo->users, pp) {
struct instruction *insn = container(pp, struct instruction, src);
if (insn->opcode == OP_LOAD)
- convert_load_insn(insn, src);
+ convert_load_instruction(insn, src);
} END_FOR_EACH_PTR(pp);
/* Turn the store into a no-op */