[LLVMdev] Inter-procedural program flow analysis
Stephen Schiffli
sschiffli at gmail.com
Tue Oct 2 16:29:34 PDT 2012
Is there any inter-procedural analysis that could tell me if some
BasicBlock Y is guaranteed to execute based on my knowledge that BasicBlock
X will execute? For example:
extern int x;
void foo() { }
int main() {
if (x) {
foo();
} else {
foo();
}
}
I want to be told that the entry block of foo is guaranteed to be executed
since I know the entry block of main is guaranteed to be executed.
Basically that all paths from X to program termination go through Y at
some point. Please ignore the folding of identical branches and
function in-lining, I want to use this type of analysis in the general case.
Thanks,
-Stephen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121002/f6e83713/attachment.html>
More information about the llvm-dev
mailing list