This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Async: add alwaysinline/noinline attributes to parallel-for functions
AbandonedPublic

Authored by ezhulenev on Feb 16 2022, 1:48 PM.

Details

Reviewers
cota
Summary

Depends On D119959

+ fix numUnrollableLoops calculation

Diff Detail

Event Timeline

ezhulenev created this revision.Feb 16 2022, 1:48 PM
ezhulenev requested review of this revision.Feb 16 2022, 1:48 PM
ezhulenev retitled this revision from [mlir] Async: add alwaysinline/noinlile attributes to parallel-for functions to [mlir] Async: add alwaysinline/noinline attributes to parallel-for functions.Feb 16 2022, 1:49 PM
ezhulenev edited the summary of this revision. (Show Details)
ezhulenev added a reviewer: cota.
mehdi_amini added inline comments.Feb 16 2022, 4:00 PM
mlir/lib/Dialect/Async/Transforms/AsyncParallelFor.cpp
268

Can you elaborate the comment on why?

"alwaysinline" is a "correctness" kind of attribute, it forces inlining even at O0 in LLVM, is this the case here?

cota added inline comments.Feb 17 2022, 9:32 AM
mlir/lib/Dialect/Async/Transforms/AsyncParallelFor.cpp
804–806

IIUC if we had just one loop we'd miss the unroll entirely (since getNumLoops() - 2 == -1, and this patch fixes that.
Is my understanding correct? If so, could you add a small test to show this now working as intended?

ezhulenev abandoned this revision.Feb 17 2022, 10:07 AM
ezhulenev added inline comments.
mlir/lib/Dialect/Async/Transforms/AsyncParallelFor.cpp
804–806

Turned out it was WAI, I'll revert this change, and will send a separate chance once I'll figure out what's going with inlining,