Scops that only read seem generally uninteresting and scops that only write are
most likely initializations where there is also little to optimize. To not
waste compile time we bail early.
Details
- Reviewers
sebpop simbuerg dpeixott jdoerfert - Commits
- rGd1e33e706112: ScopDetection: Only detect scops that have at least one read and one write
rPLO229820: ScopDetection: Only detect scops that have at least one read and one write
rL229820: ScopDetection: Only detect scops that have at least one read and one write
Diff Detail
- Repository
- rL LLVM
Event Timeline
Good catch to speed up compile time.
LGTM.
lib/Analysis/ScopDetection.cpp | ||
---|---|---|
881 ↗ | (On Diff #20215) | I always questioned the necessity of double negatives: "not unprofitable" = "profitable". |
lib/Analysis/ScopDetection.cpp | ||
---|---|---|
881 ↗ | (On Diff #20215) | 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. |
Hey Tobias,
do you kow how much we actually gain by your change? Why shouldn't we
keep (and delete) SCoPs that have no stores (or at least delete the
loads and let the other passes delete the rest)? Why shouldn't we look at
generating memset intrinsics for loops that only write?
Regarding the patch, could you please comment your member variables
(even though it's pretty obvious).
- Johannes