[flang-commits] [PATCH] D134860: [flang] Add platform-specific intrinsic lowering

Diana Picus via Phabricator via flang-commits flang-commits at lists.llvm.org
Thu Sep 29 01:23:09 PDT 2022


rovka added a comment.

I'm planning to add more tests (see TODO), but I thought it would be good to get some general feedback on the approach first. @Meinersbur had also suggested adding a `hypotf` to the runtime when compiling for Windows, but this approach seems more flexible and straightforward to me. Other opinions welcome, thanks!



================
Comment at: flang/lib/Lower/IntrinsicCall.cpp:1248
+  using PlatformAvailability = bool (*)(llvm::Triple);
+  PlatformAvailability specificTo = nullptr;
+
----------------
Alternatively we could just set a default lambda that returns true, and then we wouldn't need a helper to check for nullptr. I wasn't sure if people would consider that simpler and if it's worth going through a call every time, as opposed to a nullptr check in most cases.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134860/new/

https://reviews.llvm.org/D134860



More information about the flang-commits mailing list