Displaying 3 results from an estimated 3 matches for "dbg_intrinsic".
2018 Sep 19
2
Obtaining the origin function for a local var after inlining
...K]MSAN we need to figure out which inlined function a local var
> > originally belonged to in the source file.
>
> If you are looking at a llvm.dbg.declar/value/addr intrinsic, then the DILocation attached to the intrinsic indirectly points there:
>
> DIScope *Scope = DILocation(dbg_intrinsic.getDebugLoc()).getScope();
> while (!isa<DISubprogram>(Scope))
> Scope = Scope->getScope();
> auto *origFunction = cast<DIFunction>(Scope);
This works, thank you!
(I had to slightly modify the code FWIW:
DILocation *DIL = dbg_intrinsic.getDebugLoc();
if (DIL...
2018 Sep 17
3
Obtaining the origin function for a local var after inlining
(I think I've asked a similar question off-list a couple of times, but
never got an answer)
Hi folks,
For [K]MSAN we need to figure out which inlined function a local var
originally belonged to in the source file.
E.g. when a local buffer %buf is declared in @bar(), but @bar() is
inlined into @foo(), then there's a local %buf.i in @foo(), but we
need to determine that the local came from
2018 Sep 25
1
Obtaining the origin function for a local var after inlining
...function a local var
> >>> originally belonged to in the source file.
> >>
> >> If you are looking at a llvm.dbg.declar/value/addr intrinsic, then the DILocation attached to the intrinsic indirectly points there:
> >>
> >> DIScope *Scope = DILocation(dbg_intrinsic.getDebugLoc()).getScope();
> >> while (!isa<DISubprogram>(Scope))
> >> Scope = Scope->getScope();
> >> auto *origFunction = cast<DIFunction>(Scope);
> > This works, thank you!
> >
> > (I had to slightly modify the code FWIW:
> >...