[polly] r229253 - Do not try to optimize empty SCoPs.
Johannes Doerfert
doerfert at cs.uni-saarland.de
Sat Feb 14 04:02:25 PST 2015
Author: jdoerfert
Date: Sat Feb 14 06:02:24 2015
New Revision: 229253
URL: http://llvm.org/viewvc/llvm-project?rev=229253&view=rev
Log:
Do not try to optimize empty SCoPs.
Modified:
polly/trunk/lib/Transform/ScheduleOptimizer.cpp
Modified: polly/trunk/lib/Transform/ScheduleOptimizer.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Transform/ScheduleOptimizer.cpp?rev=229253&r1=229252&r2=229253&view=diff
==============================================================================
--- polly/trunk/lib/Transform/ScheduleOptimizer.cpp (original)
+++ polly/trunk/lib/Transform/ScheduleOptimizer.cpp Sat Feb 14 06:02:24 2015
@@ -473,6 +473,14 @@ bool IslScheduleOptimizer::isProfitableS
}
bool IslScheduleOptimizer::runOnScop(Scop &S) {
+
+ // Skip empty SCoPs but still allow code generation as it will delete the
+ // loops present but not needed.
+ if (S.getSize() == 0) {
+ S.markAsOptimized();
+ return false;
+ }
+
Dependences *D = &getAnalysis<Dependences>();
if (!D->hasValidDependences())
More information about the llvm-commits
mailing list