[PATCH] D138238: [SROA] For non-speculatable `load`s of `select`s -- split block, insert then/else blocks, form two-entry PHI node

Mikael Holmén via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 13 22:11:52 PST 2022


uabelho added a comment.

In D138238#3991889 <https://reviews.llvm.org/D138238#3991889>, @lebedev.ri wrote:

> In D138238#3991171 <https://reviews.llvm.org/D138238#3991171>, @uabelho wrote:
>
>> Hello,
>>
>> I noticed that when compiling with gcc I get the following new warning with this patch:
>>
>>   00:14:51 ../include/llvm/Transforms/Scalar/SROA.h:95:7: warning: 'llvm::SROAPass' declared with greater visibility than the type of its field 'llvm::SROAPass::SelectsToRewrite' [-Wattributes]
>>   00:14:51    95 | class SROAPass : public PassInfoMixin<SROAPass> {
>>   00:14:51       |       ^~~~~~~~
>>
>> I guess it's because
>>
>>   using PossiblySpeculatableLoad =
>>       PointerIntPair<LoadInst *, 2, sroa::SelectHandSpeculativity>;
>>   using PossiblySpeculatableLoads = SmallVector<PossiblySpeculatableLoad, 2>;
>>
>> are declared inside
>>
>>   namespace sroa LLVM_LIBRARY_VISIBILITY {
>>
>> but then PossiblySpeculatableLoads is used in the SROAPass member
>>
>>   SmallMapVector<SelectInst *, sroa::PossiblySpeculatableLoads, 8>
>>       SelectsToRewrite;
>>
>> I've no idea if this is anythinig to care about though?
>
> Yeah, @arsenm told me about that. I'm not sure about this diagnostic.
> What really worries me though, is that we don't appear to have GCC `-Werror` bots?

Yeah, llvm isn't clean of gcc warnings.
We compile with gcc downstream and used -Werror at first but had to give up that since there are no public bots running with it.
Now we just notice when new warnings pop up instead.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138238/new/

https://reviews.llvm.org/D138238



More information about the llvm-commits mailing list