[PATCH] D127399: [OpenMP] Ensure createXXX functions will always call updateToLocation

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 7 09:54:46 PDT 2022


jdoerfert added a comment.

In D127399#3623611 <https://reviews.llvm.org/D127399#3623611>, @Meinersbur wrote:

> Why the pattern to just return without doing anything without an insert location? IMHO this should be an error instead of silently ignoring things.

Because that is the clang pattern and we want/need to be compatible.

> In D127399#3583537 <https://reviews.llvm.org/D127399#3583537>, @jdoerfert wrote:
>
>> I don't think the Builder should reset to entry. It's an implicit contract that is hard to maintain and arguably useless as there is no reason to believe one would insert two "OpenMP things" at exactly the same point. IPs during codegen generally move and we should make all IPs explicit. These guards were introduced in a single patch (IIRC) and should not serve a purpose.
>
> I completely agree and already encountered problems with the reset location having become invalid between that guard and its dtor.




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127399



More information about the llvm-commits mailing list