guy-david wrote:

> I just got a case:
> 
> ```
> class A {
> public:
>    class B {
>    public:
>          B(A *);
> 
>          // some non static data fields
>    };
> 
>    B b(this);
> };
> ```
> 
> Does this a valid prove that this optimization is not valid ?

This example is fine because `this` is passed directly to `B`'s constructor, so 
alias analysis can still succesfully track when it might alias other pointers 
and stop certain optimizations, despite the `noalias`.

https://github.com/llvm/llvm-project/pull/136792
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to