search for: origfunct

Displaying 3 results from an estimated 3 matches for "origfunct".

Did you mean: orig_func
2018 Sep 19
2
Obtaining the origin function for a local var after inlining
...oking 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) { DIScope *Scope = DIL->getScope(); while (Scope && !isa<DISubprogram>(Scope)) Scope = Scope->...
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
...rinsic, 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) { > > DIScope *Scope = DIL->getScope(); > > while (Scope &...