[PATCH] D118227: [OpenMP][IRBuilder] Handle floats for atomic update and fix AllocaIP for update/capture
Shraiysh via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 7 02:14:23 PST 2022
shraiysh added inline comments.
================
Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:3384-3386
+ Builder.restoreIP(AllocaIP);
+ AllocaInst *NewAtomicAddr = Builder.CreateAlloca(XElemTy);
+ NewAtomicAddr->setName(X->getName() + "x.new.val");
----------------
Meinersbur wrote:
> Is this move relevant?
>
> If this is due to `AllocaIP` and `Loc.IP` being the same, you could take the occasion and check that they are different since is would be ambiguous which one is "first". See `isConflictIP` in D117226.
Good point. I have added the check for ambiguous IPs in the `createAtomicUpdate` function now. This move is however unrelated. This is just to do generate all the `ContBB` instructions later without having to switch IPs for creating `alloca`. The move is simply to avoid `RestoreIP` and `SaveIP`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118227/new/
https://reviews.llvm.org/D118227
More information about the llvm-commits
mailing list