summaryrefslogtreecommitdiff
path: root/compiler_and_linker/unsorted/UseDefChains.c
diff options
context:
space:
mode:
authorAsh Wolf <ninji@wuffs.org>2023-01-13 01:38:15 +0000
committerAsh Wolf <ninji@wuffs.org>2023-01-13 01:38:15 +0000
commit08d21a052b9afc37292ec3fad390502610e2cb32 (patch)
tree270737c790f5d1bb05f68498f8233640ada6a0c5 /compiler_and_linker/unsorted/UseDefChains.c
parent54628993e0038c7bea9c064491974985b6699502 (diff)
parent9d985413ce2b60a1a8cf001913ee8dac81c03aac (diff)
downloadMWCC-08d21a052b9afc37292ec3fad390502610e2cb32.tar.gz
MWCC-08d21a052b9afc37292ec3fad390502610e2cb32.zip
Merge remote-tracking branch 'origin/main'
Diffstat (limited to 'compiler_and_linker/unsorted/UseDefChains.c')
-rw-r--r--compiler_and_linker/unsorted/UseDefChains.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler_and_linker/unsorted/UseDefChains.c b/compiler_and_linker/unsorted/UseDefChains.c
index 7d87fa9..3ad955b 100644
--- a/compiler_and_linker/unsorted/UseDefChains.c
+++ b/compiler_and_linker/unsorted/UseDefChains.c
@@ -295,7 +295,7 @@ static void computeusedeflists(int flag) {
def->v.arg = 0;
def->v.u.object = object;
list = oalloc(sizeof(RegUseOrDef));
- list->id = useID;
+ list->id = defID;
tmp = findobjectusedef(object);
list->next = tmp->defs;
tmp->defs = list;
@@ -427,7 +427,7 @@ static void computelocalusedefinfo(void) {
bitvectorclearbit(list->id, defvec0);
}
} else if (def->v.arg == 0) {
- oud = findobjectusedef(use->v.u.object);
+ oud = findobjectusedef(def->v.u.object);
for (list = oud->uses; list; list = list->next) {
if (may_alias(pcode, Uses[list->id].pcode)) {
if (Uses[list->id].pcode->block != block)