In this change enabled LoopVersioning utility to add runtime check
when input check is NULL. Earlier clients of loop versioning needs to
always pass runtime check. Now made this optional.
If user does not provide runtime check, LoopVersioning will use default
LoopAccessAnalysis runtime check.
Details
- Reviewers
anemet
Diff Detail
- Repository
- rL LLVM
Event Timeline
include/llvm/Transforms/Utils/LoopVersioning.h | ||
---|---|---|
33–44 | How about adding another constructor that does not take Checks instead? Then you should be able to initialize Checks with LAI.getRuntimePointerChecking()->getChecks(). I like the fact that LoopVersioning owns the checks. That keeps things simple. |
lib/Transforms/Utils/LoopVersioning.cpp | ||
---|---|---|
34–40 | Can't we initialize Checks in the constructor initializer list, i.e. Checks(LAI.getRuntimePointerChecking()->getChecks())? Is the reason that getChecks return SmallVectorImpl rather than SmallVector<.., 4> ? If yes then I think we should probably change getChecks to return SmallVector rather than SmallVectorImpl. What do you think? |
lib/Transforms/Utils/LoopVersioning.cpp | ||
---|---|---|
34–40 | Yes, that's the reason that getChecks return SmallVectorImpl rather than SmallVector<.., 4> ? Will modify getChecks to return SmallVector rather than SmallVectorImpl. Thanks, |
lib/Transforms/Utils/LoopVersioning.cpp | ||
---|---|---|
25–30 | Please don't change the order of the member variables. It was nice how the required analyses were grouped all together. I understand that you can't use LAI, the member, before you initialize it but you should be able to fix that by naming the parameter to the constructor differently, e.g., LAInfo or something and then use LAInfo when calling getChecks(). |
Thanks Adam.
I don’t have check in access, if possible can you please check in this change.
Regards,
Ashutosh
How about adding another constructor that does not take Checks instead? Then you should be able to initialize Checks with LAI.getRuntimePointerChecking()->getChecks().
I like the fact that LoopVersioning owns the checks. That keeps things simple.