[polly] r334166 - Fix a missing lambda return type that tripped the builders

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 11 14:51:54 PDT 2018


const by-value return types tend to inhibit optimizations (means the return
value can't be moved-from or have non-const operations called on it) - did
you mean const string ref return type? (or plain non-const value return
type?)

On Thu, Jun 7, 2018 at 12:55 AM Philip Pfaffe via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: pfaffe
> Date: Thu Jun  7 00:50:55 2018
> New Revision: 334166
>
> URL: http://llvm.org/viewvc/llvm-project?rev=334166&view=rev
> Log:
> Fix a missing lambda return type that tripped the builders
>
> Modified:
>     polly/trunk/lib/CodeGen/PPCGCodeGeneration.cpp
>
> Modified: polly/trunk/lib/CodeGen/PPCGCodeGeneration.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/PPCGCodeGeneration.cpp?rev=334166&r1=334165&r2=334166&view=diff
>
> ==============================================================================
> --- polly/trunk/lib/CodeGen/PPCGCodeGeneration.cpp (original)
> +++ polly/trunk/lib/CodeGen/PPCGCodeGeneration.cpp Thu Jun  7 00:50:55 2018
> @@ -1408,7 +1408,7 @@ const std::map<std::string, std::string>
>  ///
>  /// Return "" if we are not compiling for CUDA.
>  std::string getCUDALibDeviceFuntion(Function *F) {
> -  const std::string FnName = [&] {
> +  auto FnName = [&] () -> const std::string {
>      auto It = IntrinsicToLibdeviceFunc.find(F->getName());
>      if (It != IntrinsicToLibdeviceFunc.end())
>        return It->second;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180611/d923aaa5/attachment.html>


More information about the llvm-commits mailing list