[PATCH] D88978: [WIP] Attach debug intrinsics to allocas, and use correct address space

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 12 13:33:49 PDT 2020


ABataev added a comment.

In D88978#2325982 <https://reviews.llvm.org/D88978#2325982>, @scott.linder wrote:

> @ABataev Sorry if I'm pulling you in without enough context/work on my end, but I wanted to ask how the Clang codegen for OpenMP locals works at a high level?
>
> Is the idea that instead of an `alloc` the frontend can insert calls into the runtime in some cases, like `__kmpc_alloc` (e.g. for `firstprivate` as in https://reviews.llvm.org/D5140)?

Yes, right.

> If that is the case, I assume there is no equivalent to SROA/Mem2Reg here?

I assume, no.

> I am trying to understand conceptually where the debug info for the source level local should be tied to in the IR, and at least for locals which use `alloc` it has turned out to be much simpler to tie the variable directly to the `alloc` itself rather than bitcasts and things which obscure the relationship.




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88978



More information about the cfe-commits mailing list