view tools/spesh-bisect.pl @ 42:dc42e7eb1adf

delte '-fno-optimize-sibling-calls' optin to use use clang in compilation
author Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Thu, 29 Nov 2018 19:43:32 +0900
parents 2cf249471370
children
line wrap: on
line source

#!/usr/bin/perl

use 5.10.0;

chomp $prog;
my $min = 1;
my $max = 100000;
my $l = 50000;
while ($min < $l and $l < $max) {
    $ENV{MVM_SPESH_LIMIT} = $l;
    say "Trying $l";
    if (system(@ARGV) != 0) {
        $max = $l - 1;
    }
    else {
        $min = $l + 1
    };
    $l = $min + int(($max - $min) / 2);
};
say "MVM_SPESH_LIMIT=$l";