Skip to content

Commit

Permalink
Fix killPointedAt() in SsaOptimizer (again) (#305)
Browse files Browse the repository at this point in the history
  • Loading branch information
titzer authored Nov 24, 2024
1 parent d076309 commit 37ee6ff
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion aeneas/src/main/Version.v3
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

// Updated by VCS scripts. DO NOT EDIT.
component Version {
def version: string = "III-7.1772";
def version: string = "III-7.1773";
var buildData: string;
}
5 changes: 4 additions & 1 deletion aeneas/src/ssa/SsaOptimizer.v3
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ class SsaBlockState {
var v = impure_loads, i = 0;
for (j < v.length) {
var t = v[i];
if (t.1.facts.F_POINTED_AT) {
if (!t.1.facts.F_POINTED_AT) {
if (i != j) v[i] = t;
i++;
}
Expand Down Expand Up @@ -1025,6 +1025,9 @@ class SsaInstrReducer(context: SsaContext) extends SsaInstrMatcher {
if (Bool.unbox(xval)) return addThrow(i.source, exception);
else return killInstr(i);
}
PtrStore, PtrCmpSwp => {
if (optimize_loads) state.killPointedAt();
}
_ => ;
}
return i;
Expand Down
3 changes: 3 additions & 0 deletions test/common.bash
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ function check_cached_target_tests() {
function execute_target_tests() {
target=$1
R=$OUT/$target/run.out
FAIL=0
if [ -d "$TEST_CACHE/$SUITE/$target" ]; then
print_status " cached" ""
ext=""
Expand All @@ -362,6 +363,7 @@ function execute_target_tests() {
if [ -x $runner ]; then
print_status " running" "${r/test-$target/}"
$runner $OUT/$target $TORUN | tee $OUT/$target/run.out | $PROGRESS
FAIL=$(($FAIL | $?))
RAN=1
fi
done
Expand All @@ -372,6 +374,7 @@ function execute_target_tests() {
printf "$count ${YELLOW}no runners found${NORM}\n"
fi
fi
return $FAIL
}

function execute_tests() {
Expand Down

0 comments on commit 37ee6ff

Please sign in to comment.