[polly][ScheduleOptimizer] Reland Fix long compile time(hang) reported in polly (#77280)

There is no upper cap set on current Schedule Optimizer to compute
schedule. In some cases a very long compile time taken to compute the
schedule resulting in hang kind of behavior. This patch introduces a
flag 'polly-schedule-computeout' to pass the capwhich is initialized to
300000. This patch handles the compute out cases by bailing out and
exiting gracefully.

Fixed the test that failed in previous commit.

Fixes #69090

GitOrigin-RevId: 61968286f9a39815040b0d94299c3732834661bf
2 files changed