[PATCH] D138496: [OMPIRBuilder] Add OpenMPDefaultSimdAlignment field to TargetMachine class
Dominik Adamski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 29 03:42:18 PST 2022
domada updated this revision to Diff 478500.
domada retitled this revision from "[WIP][OMPIRBuilder] Add OpenMPDefaultSimdAlignment field to TargetMachine class" to "[OMPIRBuilder] Add OpenMPDefaultSimdAlignment field to TargetMachine class".
domada edited the summary of this revision.
domada added reviewers: kiranktp, skatrak, NimishMishra, TIFitis, raghavendhra, dpalermo, ashpande, RogerV-AMD.
domada added a comment.
Herald added subscribers: pmatos, asb, aheejin, jgravelle-google, sbc100, dschuff.
1. Refactored OMPIRBuilder method which calculates SIMD alignment. Added optional parameter Type *AlignedValueTy which can be used to define optimal alignment. If this parameter is not specified then, we return the maximal SIMD alignment for given target.
2. Clang still uses suboptimal value because there is no link between clang TargetInfo and LLVM-Type. More information about this decision can be found in previous review which introduced original `getSimdDefaultAlign` function: https://reviews.llvm.org/D10597?id=28205#inline-85925
3. TargetInfo class contains method: `getMaxVectorAlign` . This method returns maximal vector alignment for given target. The only difference between original: `getMaxVectorAlign` and `getSimdDefaultAlign` is that `getSimdDefaultAlign` returns 0 alignment for ARM target. I don't know if it is ok, that we assume 0 alignment for ARM targets.
4. Removed `getSimdDefaultAlign` function.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138496/new/
https://reviews.llvm.org/D138496
Files:
clang/include/clang/Basic/TargetInfo.h
clang/lib/AST/ASTContext.cpp
clang/lib/Basic/TargetInfo.cpp
clang/lib/Basic/Targets/PPC.h
clang/lib/Basic/Targets/WebAssembly.h
clang/lib/Basic/Targets/X86.cpp
lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
llvm/include/llvm/Target/TargetMachine.h
llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
llvm/lib/Target/X86/X86TargetMachine.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138496.478500.patch
Type: text/x-patch
Size: 10806 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221129/163113b8/attachment.bin>
More information about the llvm-commits
mailing list