[PATCH] D40577: Clang support for simd functions
Alexey Bataev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 12 11:56:26 PDT 2019
ABataev added inline comments.
================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:9615
+
+ std::string Buffer;
+ if (Fn->hasFnAttribute("vector-variants")) {
----------------
mmasten wrote:
> ABataev wrote:
> > 1. Why this change is required?
> > 2. Why not a `SmallString`?
> This change is required to more clearly indicate which function names represent simd function variants of the original scalar function. Previously, these function names were just represented as individual strings. Example: "_ZGVbM4l8__Z5add_1Pf", "_ZGVbN4l8__Z5add_1Pf", ... The attributes are now represented as a key/value pair: "vector-variants"="_ZGVbM4l8__Z5add_1Pf, _ZGVbN4l8__Z5add_1Pf, ...". Because the length of the string can now be quite a bit longer, I used std::string. Is SmallString still appropriate?
1. I would suggest to try to change this part of the compiler only after the LLVM part is accepted to avoid double work here.
2. Yes, SmallString, SmallVector, etc. are dynamically resized if the preallocated space is not enough.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D40577/new/
https://reviews.llvm.org/D40577
More information about the cfe-commits
mailing list