[llvm-dev] Suboptimal code generated by clang+llc in quite a common scenario (?)

Joan Lluch via llvm-dev llvm-dev at lists.llvm.org
Thu Aug 8 10:00:47 PDT 2019


Hi Tim and Alex

Thanks for your replies. 

So just to make it clear for me: does this imply that there’s indeed no way on the current version to tell the compiler or Clang to optimize this?

Thanks,

Joan


> On 8 Aug 2019, at 18:30, Tim Northover via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> On Thu, 8 Aug 2019 at 17:08, Alex Brachet-Mialot via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
>> This might not be the workaround you want because it is only available in C, but you can use restrict to allow such optimizations.
> 
> It also doesn't work in Clang unfortunately. We can only represent
> restrict on function arguments at the moment.
> 
> Cheers.
> 
> Tim.
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev



More information about the llvm-dev mailing list