This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP,MLIR] Translation of parallel operation: num_threads, if clauses 3/n
ClosedPublic

Authored by kiranchandramohan on Jul 28 2020, 1:50 PM.

Details

Summary

This simple patch translates the num_threads and if clauses of the parallel operation. Also includes test cases.

A minor change was made to parsing of the if clause to parse AnyType and return the parsed type. Updates to test cases also.

Diff Detail

Event Timeline

kiranchandramohan requested review of this revision.Jul 28 2020, 1:50 PM

No complaints form my side :)

mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
463–467

Unrelated but FWIW, true is the conservative correct answer here ;)

kiranktp added inline comments.Jul 28 2020, 11:18 PM
mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
212

NIT: Modify default clause to proc_bind in the comment

SouraVX accepted this revision.Jul 29 2020, 7:24 AM

LGTM. Thanks!

This revision is now accepted and ready to land.Jul 29 2020, 7:24 AM
mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
212

Thanks, Will change in the final commit.

mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
463–467

:) Thanks. Is it OK if this is changed when we add support for cancellation?

Looks good to me!