[PATCH] D32006: Mark invariant.group.barrier as inaccessiblememonly
Piotr Padlewski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 25 01:16:43 PDT 2017
Prazek added a comment.
In https://reviews.llvm.org/D32006#736448, @sanjoy wrote:
> Doesn't this conflict with the test case you had for https://reviews.llvm.org/D31531:
>
> void foo() {
> Base *x = new Base{};
> new (x) Derived1{};
> int a = std::launder(x)->foo();
> new (x) Derived2{};
> int b = std::launder(x)->foo();
> }
>
>
> Won't it now be OK to CSE the two `launders` since the only memory changed between the two is visible to the module (and thus not read by an `inaccessiblememonly readonly` function)?
I have to double check that. If this is the case then probably we can remove readonly from the barrier. This way we won't be able to CSE barrier together, but we will be able to DSE through the barrier.
Repository:
rL LLVM
https://reviews.llvm.org/D32006
More information about the llvm-commits
mailing list