<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Long compile time due to domain building"
   href="https://llvm.org/bugs/show_bug.cgi?id=26382">26382</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Long compile time due to domain building
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Polly
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Optimizer
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>polly-dev@googlegroups.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>chrisj@codeaurora.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=15758" name="attach_15758" title="Test case">attachment 15758</a> <a href="attachment.cgi?id=15758&action=edit" title="Test case">[details]</a></span>
Test case

Command:
opt  -polly-process-unprofitable -polly-code-generator=isl -polly-scops
-analyze  long_compile.ll 

The attached test is taking a very long time to compile and I noticed it was in
in the below set of complements and coalescing in buildConditionSets
(ScopInfo.cpp)

Function signature:
void buildConditionSets(Scop &S, Value *Condition, TerminatorInst *TI, Loop *L,
                   __isl_keep isl_set *Domain,
                   SmallVectorImpl<__isl_give isl_set *> &ConditionSets)
..
..
  isl_set *AlternativeCondSet =
      isl_set_complement(isl_set_copy(ConsequenceCondSet));

  ConditionSets.push_back(isl_set_coalesce(
      isl_set_intersect(ConsequenceCondSet, isl_set_copy(Domain))));
  ConditionSets.push_back(isl_set_coalesce(
      isl_set_intersect(AlternativeCondSet, isl_set_copy(Domain))));
..
..



The test finally got over after ~132 minutes and the number of sets in
ConsequenceCondSet grew to 2187. In buildDomainsWithBranchConstraints, size of
SuccDomain does cross the limit of 20 (MaxConjunctsInDomain) and we do make it
empty. I was wondering if we could safely bail out from domain building and
invalidate the current Scop in such a case rather than continuing with the
algorithm.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>