[PATCH] D34188: Don't check side effects for functions outside of SCoP

Singapuram Sanjay Srivallabh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 13 23:54:59 PDT 2017


singam-sanjay added inline comments.


================
Comment at: lib/Support/SCEVValidator.cpp:121
 bool polly::isConstCall(llvm::CallInst *Call) {
   if (Call->mayReadOrWriteMemory())
     return false;
----------------
For polyhedral analysis, do we also need the function to evaluate to the same value always (not just side effect free) inside the Scop ? I got this notion from the name of the function.

If that's the case, is it possible to check for that ? ( I have a feeling that it's not feasible )


================
Comment at: lib/Support/SCEVValidator.cpp:125
   for (auto &Operand : Call->arg_operands())
     if (!isa<ConstantInt>(&Operand))
       return false;
----------------
Can we consider `llvm::ConstantFP` as well ? Or any constant type ?


================
Comment at: lib/Support/SCEVValidator.cpp:396
 
   ValidatorResult visitUnknown(const SCEVUnknown *Expr) {
     Value *V = Expr->getValue();
----------------
How is this function called ? I don't find any explicit call to this function and the code [[ http://llvm.org/reports/coverage/tools/polly/lib/Support/SCEVValidator.cpp.gcov.html | coverage reports ]] are a month old.


Repository:
  rL LLVM

https://reviews.llvm.org/D34188





More information about the llvm-commits mailing list