[PATCH] D138496: [OpenMP][OMPContext] Move SIMD alignment calculation to LLVM Frontend
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 15 11:07:04 PST 2022
jdoerfert added a comment.
I think this is fine, with two nits. @jsjodin Please finish the review as you see fit.
================
Comment at: clang/include/clang/AST/ASTContext.h:460
+ /// to define the default OpenMP SIMD alignment which is target specific
+ llvm::TargetMachineCache OpenMPTargets;
+
----------------
Move it into the OpenMPIRBuilder please.
================
Comment at: llvm/lib/Frontend/OpenMP/OMPContext.cpp:587
+ if (!TargetsIter->getValue())
+ return 0;
+
----------------
You lookup Key in Targets 3 times. Maybe we can reduce that a little. Can the pointer ever be nullptr (the one returned by `createTargetMachine`?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138496/new/
https://reviews.llvm.org/D138496
More information about the llvm-commits
mailing list