[llvm-commits] [polly] r160261 - /polly/trunk/lib/Analysis/ScopDetection.cpp
Tobias Grosser
grosser at fim.uni-passau.de
Mon Jul 16 03:57:32 PDT 2012
Author: grosser
Date: Mon Jul 16 05:57:32 2012
New Revision: 160261
URL: http://llvm.org/viewvc/llvm-project?rev=160261&view=rev
Log:
Allow cast instructions within scops
Cast instruction do not have side effects and can consequently be part of a
scop. We special cased them earlier, as they may be problematic within array
subscripts or loop bounds. However, the scalar evolution validator already
checks for them such that there is no need to also check the instructions within
the basic blocks. Checking them is actually overly conservative as the precence
of casts may invalidate a scop, even though scalar evolution is not influenced
by it.
Modified:
polly/trunk/lib/Analysis/ScopDetection.cpp
Modified: polly/trunk/lib/Analysis/ScopDetection.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopDetection.cpp?rev=160261&r1=160260&r2=160261&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopDetection.cpp (original)
+++ polly/trunk/lib/Analysis/ScopDetection.cpp Mon Jul 16 05:57:32 2012
@@ -324,10 +324,6 @@
}
if (!Inst.mayWriteToMemory() && !Inst.mayReadFromMemory()) {
- // Handle cast instruction.
- if (isa<IntToPtrInst>(Inst) || isa<BitCastInst>(Inst))
- INVALID(Other, "Cast instruction: " << Inst);
-
if (isa<AllocaInst>(Inst))
INVALID(Other, "Alloca instruction: " << Inst);
More information about the llvm-commits
mailing list