[PATCH] ScopDetection: Only detect scops that have at least one read and one write
tobias at grosser.es
Wed Feb 18 21:44:49 PST 2015
Comment at: lib/Analysis/ScopDetection.cpp:881
@@ +880,3 @@
+ // data.
+ if (!DetectUnprofitable && (!Context.hasStores || !Context.hasLoads))
+ invalid<ReportUnprofitable>(Context, /*Assert=*/true);
> I always questioned the necessity of double negatives: "not unprofitable" = "profitable".
> I find "profitable" easier to read.
Yes, the alternative would be to call this only-profitable, but then the option would need to be '-polly-detect-only-profitable=false', which seems rather long to me.
For now, I left it as it is. Please feel free to suggest a better option.
More information about the llvm-commits