<p>
I have a MachineFunctionPass plugged into llc during LLVMTargetMachine::addPreRegAlloc. In this Pass I need to extend calls (i. e. CALL32m, CALL32r) iff they call function within the program.
</p>

<p>
CALL32m has, I think, ten different possibilities for the four operands giving the target address. At the moment I have excluded calls that give the displacement as GlobalAddress or JumpTableIndex (although I am not sure whether this is actually right or whether I exclude to many calls this way).
</p>

<p>
But there appear to be CALL32r instructions that also call locations outside the program.<br />
Is there any way to determine the location of the call target more precisely? I tried
</p>

<pre>
for (MachineBasicBlock::succ_iterator SI = BB->succ_begin(), SE = BB->succ_end(); SI != SE; ++SI) {
        MachineBasicBlock *SBB = *SI;
        if (SBB->getParent()->getFunction()->isDeclaration())
                skip = true;
}
</pre>

but it seems not to do what I intended.
<br><hr align="left" width="300">
View this message in context: <a href="http://www.nabble.com/How-to-differentiate-between-external-and-internal-calls-in-llc--tp25316545p25316545.html">How to differentiate between external and internal calls in llc?</a><br>
Sent from the <a href="http://www.nabble.com/LLVM---Dev-f692.html">LLVM - Dev mailing list archive</a> at Nabble.com.<br>