Besides adding the intrinsic handlers, also added some version querying boilerplate based on how Clang does it.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
There's something wonky about this patch. I was unable to apply it against the latest sources. Can you please rebase?
Is there a test you could add to this patch to show that the changes work as expected?
flang/lib/Lower/IntrinsicCall.cpp | ||
---|---|---|
747 | F'2018 subclause "10.1.12 Constant expression" reads: A constant expression is an expression with limitations that make it suitable for use as a kind type parameter, initializer, or named constant. It is an expression in which each operation is intrinsic, and each primary is ... ... (6) a reference to a standard intrinsic function that is transformational, other than COMMAND_ARGUMENT_COUNT, GET_TEAM, NULL, NUM_IMAGES, TEAM_NUMBER, THIS_IMAGE, or TRANSFER, where each argument is a constant expression, 16.10.2.7 COMPILER_VERSION ( ) A reference to COMPILER_VERSION() is a primary that is a reference to a standard intrinsic transformational function other than COMMAND_ARGUMENT_COUNT, GET_TEAM, NULL, NUM_IMAGES, TEAM_NUMBER, THIS_IMAGE, or TRANSFER, and it has no argument that is not a constant expression, so it satisfies the requirements of point (6) in the definition of a constant expression, and so it is a constant expression. |