[PATCH] D79676: [Clang][OpenMP][OMPBuilder] Moving OMP allocation and cache creation code to OMPBuilderCBHelpers

Johannes Doerfert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 14 21:13:33 PDT 2020


jdoerfert accepted this revision.
jdoerfert added a comment.
This revision is now accepted and ready to land.

Interesting that no tests changed but I guess we just start the move to the IRBUilder.

I think there are two minor comments from before that need to be addressed and the alloca thing, otherwise LGTM.



================
Comment at: clang/lib/CodeGen/CodeGenFunction.h:1581
+        ++I;
+
+      return &*I;
----------------
fghanim wrote:
> jdoerfert wrote:
> > What is wrong with `BB->getFirstNonPHIOrDbgOrLifetime()`? If it is to avoid too many test changes, please add a TODO. I think from a functional perspective there is no need to advance it after the first set of allocas that may be separated from the phis by non-allocas?
> Nothing wrong with it. The first while loop, I just came across a case that I don't remember at the moment that had an instruction that wasn't an alloca, and I wanted to skip over that.
> the second while, is to get to the first non-alloca instruction. The purpose is to be able to insert new allocas, after already generated allocas.
There is no need to do that. It is fine to insert allocas anywhere in the block.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79676





More information about the cfe-commits mailing list