This patch restricts the value of if clause expression to an I1 value.
It also restricts the value of num_threads clause expression to an I32
value.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Any reason to restrict num_threads to be 32-bit specifically? The spec says it must evaluate to a positive integer value, nothing about its size. I would rather keep it as AnyInteger, and maybe even allowed Index.
Comment Actions
I kept it i32 mainly because OpenMP Runtime Library accepts it as i32. I am changing it to IntLikeType as suggested, however I think Index also suits the intent. Let me know if we want to change it to Index type and I will do so.
Comment Actions
LGTM.
You may have some of the tests for num_threads with index, i64 etc.
flang/test/Lower/OpenMP/parallel.f90 | ||
---|---|---|
20 | Nit: Can you add a non-default kind for logical and test that too? |
Nit: Can you add a non-default kind for logical and test that too?