Skip to content

Theory test — Chapter 12

61 questions; you pass at 80 %. This page shows the questions only: take the test in the terminal, where every answer is graded and explained.

./course quiz 12                                   # interactive
./course quiz template 12 -o answers/ch12.yaml  # or fill in a file ...
./course quiz grade 12                             # ... and grade it
Question 1 pm-cache-trace · mapping · 1 pt · 01-pass-manager-architectures

A function pipeline runs on one function, starting with an empty cache, under LLVM 23's rules
(Lesson 12.1: DT, PDT, LI are kept by the CFG set; AC and TLI are never invalidated; BasicAA and AA
are stateless and fall only with a dependency; SE depends on AC, DT, LI; MSSA on AA, DT; computing
LI requests DT, SE requests TLI, AC, DT, LI, BasicAA requests AC, DT, TLI, AA requests BasicAA,
MSSA requests AA, DT).

  • P1 requests {SE}, returns preserved = {CFG}
  • P2 requests {AA}, returns all
  • P3 requests {LI}, returns none
  • P4 requests {MSSA}, returns preserved = {CFG}

For each pass, which analyses are computed during it? (Write {} for none.)

Keys: P1, P2, P3, P4
Answer format: one value per key (a set: {x, y})
Question 2 pm-cascade · set · 1 pt · 01-pass-manager-architectures

The cache holds SE, TLI, AC, DT, LI, MSSA, AA and BasicAA for a function. The pass
invalidate<domtree> runs; it reports "everything preserved except DominatorTreeAnalysis". Which
analyses are invalidated? (LLVM 23's invalidate methods, Lesson 12.1.)

Answer format: items separated by commas or spaces, e.g. {a, b}
Question 3 pm-legacy-vs-new · multi · 1 pt · 01-pass-manager-architectures

Which statements about pass managers are true?

  1. The legacy LLVM pass manager learns what a pass preserved from the value the pass returns after running.
  2. The new LLVM pass manager computes analyses lazily, when a pass asks for them, and caches the results.
  3. GCC's pass manager tracks IR properties such as PROP_ssa and runs TODO actions such as TODO_update_ssa after passes.
  4. MLIR anchors each nested pipeline on an operation type, and anchored operations must be IsolatedFromAbove.
  5. In LLVM 23, opt still runs the optimization pipeline with the legacy pass manager when given -enable-new-pm=0.
Answer format: letters, e.g. a, c
Question 4 pm-optional-required · single · 1 pt · 01-pass-manager-architectures

A function has the optnone attribute and opt runs -opt-bisect-limit=0 on
function(pebble-strength,print<pebble-stats>), where pebble-strength derives from
OptionalPassInfoMixin and the printer from RequiredPassInfoMixin. What runs on that function?

  1. Both passes: optnone only affects code generation.
  2. Only the printer: optional passes are skipped by the optnone and opt-bisect instrumentation, required ones never.
  3. Neither: -opt-bisect-limit=0 skips every pass.
  4. Only pebble-strength: printers are skipped under optnone.
Answer format: one letter
Question 5 pm-legacy-declare · single · 1 pt · 01-pass-manager-architectures

Under LLVM's legacy pass manager, a function pass changes the CFG on 1 function in 100 and leaves the other
99 untouched. What must it declare in getAnalysisUsage, and what does that cost?

  1. setPreservesCFG(); nothing is recomputed.
  2. Nothing about the CFG (it cannot promise to preserve it), so every CFG analysis is freed and recomputed after it on all 100 functions.
  3. It returns PreservedAnalyses::none() for the one function only.
  4. The legacy manager detects the change and recomputes on that function only.
Answer format: one letter
Question 6 pm-gcc-properties · single · 1 pt · 01-pass-manager-architectures

A GCC pass has properties_required = PROP_cfg | PROP_ssa, properties_provided = 0,
properties_destroyed = PROP_ssa. Before it runs, the property set is {PROP_cfg, PROP_ssa, PROP_loops}.
What is it afterwards (Algorithm 12.1.13)?

  1. {PROP_cfg, PROP_loops}
  2. {PROP_cfg, PROP_ssa, PROP_loops}
  3. {PROP_loops}
  4. {PROP_cfg}
Answer format: one letter
Question 7 pm-mlir-anchor · single · 1 pt · 01-pass-manager-architectures

Why may MLIR run a func.func pipeline on different functions in parallel?

  1. Because functions never call each other.
  2. Because func.func is IsolatedFromAbove and passes may modify only the operation they run on, so the jobs touch disjoint IR.
  3. Because MLIR copies the whole module for each thread.
  4. Because the pass manager locks the module for every pass.
Answer format: one letter
Question 8 pm-cgscc-order · sequence · 1 pt · 01-pass-manager-architectures

A module has functions main, f, g, h with calls main → f, f → g, g → h (no recursion). In which order does
cgscc(inline) visit the SCCs? Write the function names.

Answer format: items in order, e.g. A B C
Question 9 llvm-where-optnone · text · 1 pt · 01-pass-manager-architectures

In LLVM 23.1.2, open llvm/lib/Passes/StandardInstrumentations.cpp and find how optnone functions are
skipped. Which PassInstrumentationCallbacks registration function does OptNoneInstrumentation::registerCallbacks
call? (the method name)

Answer format: a short answer
Question 10 llvm-where-invalidate-scev · set · 1 pt · 01-pass-manager-architectures

Open llvm/lib/Analysis/ScalarEvolution.cpp at llvmorg-23.1.2 and read ScalarEvolution::invalidate.
Which analyses does it ask the Invalidator about? Answer with AC (AssumptionAnalysis), DT
(DominatorTreeAnalysis), LI (LoopAnalysis), TLI (TargetLibraryAnalysis), AA (AAManager).

Answer format: items separated by commas or spaces, e.g. {a, b}
Question 11 pipe-ep-count · number · 1 pt · 02-pipelines-and-extension-points

With LLVM 23.1.2, opt -passes='default<O2>' -passes-ep-peephole='instnamer' -print-pipeline-passes
shows how many occurrences of instnamer (the Peephole extension point) per function pipeline?

Answer format: a number
Question 12 pipe-o2-not-o1 · set · 1 pt · 02-pipelines-and-extension-points

Which of these passes appear in LLVM 23's default<O2> pipeline but not in default<O1>:
gvn, instcombine, sroa, slp-vectorizer, dse, licm?

Answer format: items separated by commas or spaces, e.g. {a, b}
Question 13 pipe-os · single · 1 pt · 02-pipelines-and-extension-points

What does -Os mean for LLVM 23?

  1. A separate pipeline default<Os> with size-oriented passes.
  2. The O2 pipeline, with the optsize attribute on functions; opt -passes='default<Os>' is an error.
  3. The O1 pipeline without inlining.
  4. The O3 pipeline with unrolling disabled.
Answer format: one letter
Question 14 plugin-ep-parse · single · 1 pt · 02-pipelines-and-extension-points

Why does opt -load-pass-plugin=PebblePasses.so -passes='default<O2>' -passes-ep-peephole=pebble-strength
print "unknown function pass 'pebble-strength'"?

  1. Plugin passes cannot run inside default pipelines.
  2. opt parses the -passes-ep-* texts in registerEPCallbacks before the plugin's parsing callbacks are registered, so the name is unknown at that time.
  3. The Peephole extension point accepts only loop passes.
  4. pebble-strength is a module pass.
Answer format: one letter
Question 15 phase-commute · number · 1 pt · 02-pipelines-and-extension-points

Lesson 12.2 §3 runs all 3! = 6 orders of {mem2reg, early-cse, pebble-strength} on
int f(int a, int b){int x=a*b; int y=a*b; return (x+y)*8;} (clang -O0 IR). In how many of the six
orders does the result have the minimum of 4 instructions?

Answer format: a number
Question 16 phase-search-bound · number · 1 pt · 02-pipelines-and-extension-points

Algorithm 12.2.7 explores pass sequences of length at most L = 3 over |Σ| = 3 passes. In the worst case,
when every pass produces a new program every time, how many pass runs does it perform?

Answer format: a number
Question 17 stats-critical-edges · number · 1 pt · 03-writing-passes

A function's CFG has edges A→B, A→C, B→C, B→D, C→D (one successor slot each). How many critical
edges does print<pebble-stats> report (Definition 12.3.2)?

Answer format: a number
Question 18 stats-invalidate · single · 1 pt · 03-writing-passes

pebble-stats counts instructions and opcodes. Which invalidation behavior is correct for its result?

  1. Invalidate only when the CFG set is not preserved.
  2. The default: invalidated unless the analysis itself (or everything) is preserved, because any instruction change can change the counts.
  3. Never invalidate: statistics are approximate anyway.
  4. Invalidate only when a dependency is invalidated.
Answer format: one letter
Question 19 sr-sdiv-bias · mapping · 1 pt · 03-writing-passes

For i8 values x, give the result of the naive rewrite ashr i8 %x, 3 of sdiv i8 %x, 8, for
x = -9, -8, -1 and 7 (signed decimals).

Keys: -9, -8, -1, 7
Answer format: one value per key
Question 20 sr-nsw-top · single · 1 pt · 03-writing-passes

Which rewrite of %r = mul nsw i8 %x, -128 is correct?

  1. %r = shl nsw i8 %x, 7
  2. %r = shl i8 %x, 7
  3. %r = sdiv i8 %x, -128
  4. %r = ashr i8 %x, 7
Answer format: one letter
Question 21 instr-counters · number · 1 pt · 03-writing-passes

A function's CFG has 6 blocks, 8 edges, one entry and one exit. With the spanning-tree method
(Algorithm 12.3.7, including the virtual exit→entry edge), how many counters suffice?

Answer format: a number
Question 22 instr-reconstruct · mapping · 1 pt · 03-writing-passes

Diamond CFG A→B, A→C, B→D, C→D, with the virtual edge D→A. The spanning tree is {A→B, B→D, C→D};
the instrumented edges measured D→A = 10 and A→C = 3. Give the counts of AB, BD and CD.

Keys: AB, BD, CD
Answer format: one value per key
Question 23 llvm-where-sdiv-pow2 · text · 1 pt · 03-writing-passes

In llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (llvmorg-23.1.2), which DAGCombiner member function
builds the shift sequence for sdiv x, 2^k? (method name only)

Answer format: a short answer
Question 24 fc-next-greedy · single · 1 pt · 04-filecheck-and-lit

Input lines: a, b, a, c. Check file: CHECK: a then CHECK-NEXT: c. What does FileCheck 23 do?

  1. Passes: the second a is followed by c.
  2. Fails at CHECK-NEXT: it matches the first a, finds the first c after it on line 4, and that is not the next line.
  3. Fails at CHECK: a occurs twice.
  4. Passes: CHECK-NEXT only looks at the line after some a.
Answer format: one letter
Question 25 fc-dag-not-order · single · 1 pt · 04-filecheck-and-lit

Input lines: b, a. Check file A: CHECK-DAG: a, CHECK-DAG: b. Check file B: CHECK-DAG: a,
CHECK-NOT: Y, CHECK-DAG: b (no Y anywhere). What happens?

  1. Both pass.
  2. A passes; B fails, because the CHECK-NOT splits the DAG group and the second group must match after the first.
  3. A fails, because DAG patterns must appear in order; B passes.
  4. Both fail.
Answer format: one letter
Question 26 fc-trace · mapping · 1 pt · 04-filecheck-and-lit

Input (numbered lines):

1 | define i32 @f(i32 %x) {
2 |   %b = mul i32 %c, 8
3 |   %a = icmp slt i32 %a, 2
4 |   %b = shl i32 %b, 8
5 |   %x = icmp slt i32 %x, 8
6 |   ret i32 %b
7 |   %x = mul i32 %a, 8
8 | }

Check file: (1) CHECK-DAG: %a =, (2) CHECK-DAG: slt i32 %x,, (3) CHECK: ret, (4) CHECK: },
(5) CHECK-NOT: %b 7. FileCheck passes. On which input line does each of directives 1–4 match?

Keys: 1, 2, 3, 4
Answer format: one value per key
Question 27 fc-first-error · number · 1 pt · 04-filecheck-and-lit

Input lines: b, a. Check file: (1) CHECK-DAG: a, (2) CHECK-NOT: Y, (3) CHECK-DAG: b. Which
directive number does FileCheck report as failing?

Answer format: a number
Question 28 fc-label-recovery · single · 1 pt · 04-filecheck-and-lit

Check file: CHECK-LABEL: f:, CHECK: missing, CHECK-LABEL: g:, CHECK: ret on input f:, ret,
g:, ret. What does FileCheck report?

  1. Only the error at CHECK: missing; the block of g is still checked and passes.
  2. Two errors: missing and the label g:.
  3. Nothing: labels make blocks optional.
  4. It stops at the first error without checking g.
Answer format: one letter
Question 29 lit-verdict · mapping · 1 pt · 04-filecheck-and-lit

Four lit tests: T1 has XFAIL: * and its RUN line fails; T2 has no XFAIL and its RUN line succeeds;
T3 has XFAIL: * and its RUN line succeeds; T4 has REQUIRES: nosuchfeature. Give each verdict
(PASS, FAIL, XFAIL, XPASS or UNSUPPORTED).

Keys: T1, T2, T3, T4
Answer format: one value per key
Question 30 utc-strictness · single · 1 pt · 04-filecheck-and-lit

A test's checks were generated by update_test_checks.py. Which change to the pass output still passes?

  1. An extra instruction inserted in the middle of the function.
  2. Renaming every occurrence of %r to %res consistently.
  3. Swapping two independent instructions.
  4. Adding an nsw flag to one instruction.
Answer format: one letter
Question 31 llvm-where-checkdag · text · 1 pt · 04-filecheck-and-lit

In llvm/lib/FileCheck/FileCheck.cpp (llvmorg-23.1.2), which member function of FileCheckString implements
the non-overlap rule of CHECK-DAG and the checking of CHECK-NOTs between DAG groups? (name only)

Answer format: a short answer
Question 32 diff-ub · single · 1 pt · 05-snapshot-and-differential-testing

int check(int x){ return x + 1 > x; } prints 0 at -O0 and 1 at -O2 for x = INT_MAX. What does the
differential oracle tell you?

  1. One of the two compiler configurations is wrong.
  2. Nothing: the program has undefined behavior (signed overflow), so both results conform (Theorem 12.5.10).
  3. -O2 is wrong because -O0 is the reference.
  4. -O0 is wrong because it did not optimize.
Answer format: one letter
Question 33 diff-prob · number · 1 pt · 05-snapshot-and-differential-testing

Each generated program exposes a certain bug with probability q = 0.001, independently. By Theorem 12.5.11,
what is the smallest number N of programs with e^(−qN) ≤ 0.01?

Answer format: a number
Question 34 diff-matrix · mapping · 1 pt · 05-snapshot-and-differential-testing

In the lab's matrix, bug 5 makes pebble-lab-fold add an unjustified nsw flag (poison only; the same bits under
lli). For the reference checks, does each style detect it? Answer detected or passes for filecheck, snapshot,
difftest.

Keys: filecheck, snapshot, difftest
Answer format: one value per key
Question 35 snap-false-alarm · single · 1 pt · 05-snapshot-and-differential-testing

Bug 4 rewrites add i32 %x, 7 as the equivalent sub i32 %x, -7. Which statement is true?

  1. A snapshot test passes because the program is equivalent.
  2. A snapshot test fails: it compares text, so every benign change is a false alarm (Proposition 12.5.9) — and so do checks generated by update_test_checks.py; a hand-written FileCheck test can accept both spellings.
  3. The differential tester fails.
  4. FileCheck cannot express alternatives.
Answer format: one letter
Question 36 csmith-safe · multi · 1 pt · 05-snapshot-and-differential-testing

How do Csmith and YARPGen avoid undefined behavior in the programs they generate?

  1. Csmith wraps signed arithmetic in safe_* functions that return a defined result instead of overflowing.
  2. Csmith checks pointer dereferences and side effects with analyses performed during generation.
  3. YARPGen computes the value of every expression while generating it and rewrites operations that would be undefined.
  4. Both run the program under a sanitizer and discard it if UB is reported.
Answer format: letters, e.g. a, c
Question 37 yarpgen-values · single · 1 pt · 05-snapshot-and-differential-testing

What does YARPGen's value tracking give it that Csmith's safe-math wrappers do not?

  1. Programs that terminate.
  2. Plain arithmetic operators without wrapper calls, so optimizations see the patterns they look for, while UB is still excluded for the known inputs.
  3. A second compiler to compare with.
  4. Smaller programs.
Answer format: one letter
Question 38 stress-oracle · single · 1 pt · 05-snapshot-and-differential-testing

What is the test oracle when running llvm-stress | opt -O2 | llc?

  1. The output of running the generated function.
  2. That opt and llc do not crash and produce valid output; llvm-stress functions read through pointer arguments and are not meant to run.
  3. A checksum of global variables.
  4. Agreement between -O0 and -O2 executions.
Answer format: one letter
Question 39 diff-agree · single · 1 pt · 05-snapshot-and-differential-testing

GCC and Clang produce the same wrong output for a Csmith program. What does differential testing report?

  1. A bug in both compilers.
  2. Nothing: agreement is not correctness; shared bugs are invisible to a differential oracle (Proposition 12.5.12).
  3. A bug in Csmith.
  4. An undefined behavior.
Answer format: one letter
Question 40 gw-extinction · number · 1 pt · 06-fuzzing-and-metamorphic-testing

Random derivations of the grammar E → E + E | x choose E + E with probability p = 3/4. What is the probability
that a derivation terminates? (Theorem 12.6.7; give two decimals.)

Answer format: a number (±0.01)
Question 41 gw-terminate · single · 1 pt · 06-fuzzing-and-metamorphic-testing

For E → E + E | x with probability p for E + E, which choices of p give derivations that terminate with probability 1?

  1. p ≤ 1/2
  2. p < 1
  3. p ≤ 3/4
  4. p = 0 only
Answer format: one letter
Question 42 cov-waiting · number · 1 pt · 06-fuzzing-and-metamorphic-testing

In Theorem 12.6.8's model, a target checks k = 3 bytes in sequence. What upper bound on the expected number of
executions does the feedback fuzzer get (256·k²)?

Answer format: a number
Question 43 cov-new-reduce · single · 1 pt · 06-fuzzing-and-metamorphic-testing

In libFuzzer's log, what do the NEW and REDUCE events mean?

  1. NEW: an input with a feature not yet in the corpus was added; REDUCE: a shorter input with the same features replaced a corpus input.
  2. NEW: a crash; REDUCE: the crash was minimized.
  3. NEW: a mutation strategy was added; REDUCE: the dictionary shrank.
  4. NEW: a new thread; REDUCE: a thread finished.
Answer format: one letter
Question 44 emi-prune · set · 1 pt · 06-fuzzing-and-metamorphic-testing

A program and the statements executed on input I:

S1: s = 0                      (executed)
S2: for i in 0..4:             (executed)
S3:   if i > 10:               (executed)
S4:     s = s + 100
S5:   else if i == 2:          (executed)
S6:     s = s + 1              (executed)
S7: if s < 0:                  (executed)
S8:   print("neg")
S9: print(s)                   (executed)

Which statements may an EMI variant replace by an empty statement (Definition 12.6.5)?

Answer format: items separated by commas or spaces, e.g. {a, b}
Question 45 llvm-where-fuzzer-loop · text · 1 pt · 06-fuzzing-and-metamorphic-testing

In compiler-rt/lib/fuzzer/FuzzerLoop.cpp (llvmorg-23.1.2), which Fuzzer member function picks a corpus input,
mutates it and runs it once? (name only)

Answer format: a short answer
Question 46 ddmin-trace · sequence · 1 pt · 07-reduction-and-bisection

Eight elements 1..8; the test fails iff the configuration contains both 3 and 6. Run ddmin with the course
conventions (Algorithm 12.7.3). Give the action of every round: s<i>, c<i>, g<m> or done.

Answer format: items in order, e.g. A B C
Question 47 ddmin-tests · number · 1 pt · 07-reduction-and-bisection

For the ddmin-trace instance (8 elements, failure iff {3, 6} ⊆ c), how many distinct tests does ddmin run?

Answer format: a number
Question 48 ddmin-one-minimal · single · 1 pt · 07-reduction-and-bisection

ddmin over lines reduced the lab's crash to 10 lines, but C-Reduce reached 4. Which statement is true?

  1. ddmin has a bug: its result is not 1-minimal.
  2. Both results are 1-minimal; 1-minimality does not imply global minimality: removing int clamp(...) { or its } alone breaks compilation, and ddmin never removes the pair once it works on single lines.
  3. C-Reduce's result is not interesting.
  4. Line granularity always gives the global minimum.
Answer format: one letter
Question 49 ddmin-bound · single · 1 pt · 07-reduction-and-bisection

What does Proposition 12.7.10 say about one failure-inducing element among N?

  1. ddmin needs N tests.
  2. ddmin finds it with at most 2⌈log₂ N⌉ tests, like binary search.
  3. ddmin needs N² tests.
  4. ddmin may fail to find it.
Answer format: one letter
Question 50 creduce-fixpoint · single · 1 pt · 07-reduction-and-bisection

When do C-Reduce and llvm-reduce stop?

  1. Both after one pass over the input.
  2. C-Reduce when a whole round of its passes makes no interesting candidate smaller; llvm-reduce when a round of its delta passes does not lower the complexity score, or after --max-pass-iterations rounds (default 5).
  3. Both after a fixed number of tests.
  4. Both when the input compiles.
Answer format: one letter
Question 51 llvm-reduce-valid · multi · 1 pt · 07-reduction-and-bisection

Which statements about llvm-reduce are true?

  1. Every candidate it tests is valid IR: deltas repair the module so it verifies.
  2. Its deltas work on IR entities (functions, instructions, operands, attributes), with a chunked, ddmin-like search per kind.
  3. It replaced bugpoint, which LLVM 23 removed.
  4. It automatically decides whether a miscompilation happened, without an interestingness test.
Answer format: letters, e.g. a, c
Question 52 bisect-steps · number · 1 pt · 07-reduction-and-bisection

A pipeline performs 1000 optional pass executions; the first bad one is unknown. How many -opt-bisect-limit tests does binary search need in the worst case?

Answer format: a number
Question 53 bisect-limits · sequence · 1 pt · 07-reduction-and-bisection

opt -O2 performs 181 counted pass executions; the program is good for limits < 100 and bad from 100 on.
Starting with lo = 0 (good) and hi = 181 (bad), Algorithm 12.7.7 tests mid = (lo + hi) div 2 each time. List
the tested limits in order.

Answer format: items in order, e.g. A B C
Question 54 llvm-where-optbisect · text · 1 pt · 07-reduction-and-bisection

In llvm/lib/IR/OptBisect.cpp (llvmorg-23.1.2), which OptBisect member function decides whether a pass execution runs? (name only)

Answer format: a short answer
Question 55 tv-refine · mapping · 1 pt · 08-translation-validation

Source %r = sdiv i4 %x, 4, target %r = ashr i4 %x, 2. For x = -7, -4, -1 and 5 (signed), does the target
refine the source on that input? Answer yes or no.

Keys: -7, -4, -1, 5
Answer format: one value per key
Question 56 tv-sound · single · 1 pt · 08-translation-validation

A sound translation validator returns valid for every run of a pass on your test corpus. What follows?

  1. The pass is correct on all programs.
  2. Each validated output refines its input (and a validated pipeline's output refines the pipeline's input); nothing follows for other programs.
  3. The pass terminates on all programs.
  4. The validator is complete.
Answer format: one letter
Question 57 tv-poison-bug · multi · 1 pt · 08-translation-validation

The lab's bug 5 turns (x + 1) + 1 into add nsw i32 %x, 2. Which techniques detect it?

  1. Differential testing with lli
  2. Translation validation (tv.py, Alive2)
  3. A FileCheck line that pins the instruction without flags
  4. A snapshot test
Answer format: letters, e.g. a, c
Question 58 necula-relation · single · 1 pt · 08-translation-validation

What does Necula's validator infer to relate a source and an optimized target with different control flow?

  1. A bijection between instructions.
  2. A simulation relation: pairs of related program points with formulas relating source and target variables, checked path by path with verification conditions.
  3. A profile of executed statements.
  4. A minimal failing input.
Answer format: one letter
Question 59 necula-unknown · single · 1 pt · 08-translation-validation

Necula's validator cannot prove a verification condition. What does it report, and why?

  1. invalid, because an unproved VC is a miscompilation
  2. unknown: the inferred relation or the prover may be too weak, so failure to prove is not a counterexample
  3. valid, because the VC is probably true
  4. it retries with a larger unroll bound
Answer format: one letter
Question 60 alive-flag · number · 1 pt · 08-translation-validation

For i8, what is the largest k such that mul nsw i8 %x, 2^k ⇒ shl nsw i8 %x, k is correct (Alive's flag question)?

Answer format: a number
Question 61 alive2-unroll · single · 1 pt · 08-translation-validation

alive-tv reports "The source program doesn't reach a return instruction" for a loop that runs 4 times,
with --src-unroll=2. What does this mean?

  1. The transformation is wrong.
  2. With 2 unrolled iterations no source execution returns, so the bounded check has nothing to compare; raise the bound (Proposition 12.8.12).
  3. The source has undefined behavior.
  4. Alive2 does not support loops.
Answer format: one letter