[PATCH] D38325: [AMDGPU] Set fast-math flags on functions given the options
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 29 15:32:00 PDT 2017
rampitec added inline comments.
================
Comment at: lib/Target/AMDGPU/AMDGPUTargetMachine.cpp:375
PassManagerBuilder::EP_EarlyAsPossible,
- [AMDGPUAA, LibCallSimplify](const PassManagerBuilder &,
- legacy::PassManagerBase &PM) {
+ [AMDGPUAA, LibCallSimplify, this](const PassManagerBuilder &,
+ legacy::PassManagerBase &PM) {
----------------
rampitec wrote:
> dfukalov wrote:
> > It possible would be better to create temporary ref for `Options` member and capture it instead of whole `this` pointer
> It is just a pointer, not the whole content under it.
I.e. it will be one line of code more:
```
const auto &Opt = Options;
Builder.addExtension(
PassManagerBuilder::EP_EarlyAsPossible,
[AMDGPUAA, LibCallSimplify, &Opt](const PassManagerBuilder &,
legacy::PassManagerBase &PM) {
if (AMDGPUAA) {
PM.add(createAMDGPUAAWrapperPass());
PM.add(createAMDGPUExternalAAWrapperPass());
}
PM.add(llvm::createAMDGPUUseNativeCallsPass());
if (LibCallSimplify)
PM.add(llvm::createAMDGPUSimplifyLibCallsPass(Opt));
});
```
but the capture size is still the same sizeof(void*).
https://reviews.llvm.org/D38325
More information about the llvm-commits
mailing list