Summary: We had no tests that resulted in `ZERO_EXECUTION_COST`. Let's fix that. Reviewed By: skcho Differential Revision: D20097504 fbshipit-source-id: 56c23fea0master
parent
ef74f3f18d
commit
cbd506011f
@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
void exit_unreachable_zero() {
|
||||
exit(0); // modeled as unreachable
|
||||
}
|
||||
|
||||
// constraint solver resolves all nodes to 0 cost
|
||||
void compute_exit_unreachable_zero() {
|
||||
int k = 0;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void linear(int p) {
|
||||
for (int i = 0; i < p; i++) {
|
||||
}
|
||||
}
|
||||
|
||||
void call_exit_unreachable_zero(int p) {
|
||||
linear(p);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
// constraint solver doesn't behave consistently and gets confused
|
||||
// when resolving constraints and gets linear cost
|
||||
void inline_exit_unreachable_FP(int p) {
|
||||
for (int i = 0; i < p; i++) {
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void call_unreachable_constant() { exit_unreachable_zero(); }
|
Loading…
Reference in new issue