[PATCH] D46992: [AMDGPU] Add perf hints to functions
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 17 17:51:30 PDT 2018
rampitec added inline comments.
================
Comment at: lib/Target/AMDGPU/AMDGPUPerfHint.cpp:289
+ }
+ FIM[&F] = FI;
+}
----------------
t-tye wrote:
> Should this be done at the beginning of the visit to ensure will terminate for mutual recursive functions?
Thank you!
================
Comment at: lib/Target/AMDGPU/AMDGPUPerfHint.cpp:392
+ MAI.Base = llvm::GetPointerBaseWithConstantOffset(MO, MAI.Offset, *DL);
+ return std::move(MAI);
+}
----------------
t-tye wrote:
> Does having the std::move() prevent named return value optimization (which can happen for the return above)? Returning a prvalue (eg by directly returning a constructor) would get guaranteed copy elision in C++17.
After the port it is trivially copyable, so move is not required any more.
https://reviews.llvm.org/D46992
More information about the llvm-commits
mailing list