reduce num_nonlocals to take just src instrs
tgt instructions can either return a repeated pointer or poison if they want to create an extra ptr
MODIFY
tools/transform.cpp
tools/transform.cpp
@@ -667,14 +667,7 @@ static void calculateAndInitConstants(Transform &t) {
has_null_block = num_ptrinputs > 0 || nullptr_is_used || has_malloc ||
has_ptr_load || has_fncall;
- // + 1 is sufficient to give 1 degree of freedom for the target to trigger UB
- // in case a different pointer from source is produced.
- auto num_max_nonlocals_inst
- = max(num_nonlocals_inst_src, num_nonlocals_inst_tgt);
- if (num_nonlocals_inst_src && num_nonlocals_inst_tgt)
- ++num_max_nonlocals_inst;
-
- num_nonlocals_src = num_globals_src + num_ptrinputs + num_max_nonlocals_inst +
+ num_nonlocals_src = num_globals_src + num_ptrinputs + num_nonlocals_inst_src +
has_null_block;
// Allow at least one non-const global for calls to change

reduce num_nonlocals to take just src instrs
tgt instructions can either return a repeated pointer or poison if they want to create an extra ptr