[PATCH] D47188: Intel SVML calling conventions

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 22 02:30:52 PDT 2018


lebedev.ri added inline comments.


================
Comment at: lib/Analysis/TargetLibraryInfo.cpp:55
+  std::string FullName = FnName;
+  return IsFast ? FullName : FullName + "_ha";
+}
----------------
dvnagorny wrote:
> lebedev.ri wrote:
> > This memory allocation looks unfortunate :/
> Could you explain your comment more detailed please. svmlMangle() returns not a reference but the std::string.
Not much to explain, that already summarizes it quite well.

It will return a `std::string`, not a reference, 
so unless small string optimization within `std::string`
happens, every call to `svmlMangle()` will cause an allocation.

And this also caused `getVectorizedFunction()` to return
the `std:;string`, and so on.


Repository:
  rL LLVM

https://reviews.llvm.org/D47188





More information about the llvm-commits mailing list