You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I want to traverse all basic blocks of a function as well as its sub-procedures, and check if a block is dominator of another. Currently I'm using ICFG, but 1) it's instruction-level so it's too inefficient 2) still need to get to basic block to get dominator info.
I've looked at the implementation of CFBasicBlockG, and it really looks like a block-level ICFG.
However, it confuses me to see CFBasicBlockNode contains a vector of ICFGNode, instead of SVFBasicBlock. I found that it's intentional in #1227, which remove getSVFBasicBlock for CFBasicBlockNode, but getFunction remains. Does that mean a CFBasicBlockNode can contain instructions across multiple blocks?
Did I miss something or misunderstanding what this graph is for?
Thank you!
The text was updated successfully, but these errors were encountered:
The cfbasicblocknode does not contain instructions across basic blocks. If a basicblock does not contain a call instruction, it is represented as a single cfbasicblocknode. Otherwise, the basicblock is split by each call in the block and each call basicblock connects to its callee.
Oh, that makes sense. I thought br is the only instruction that causes control flow to move to another block. Indeed CFBasicBlockNode should not contain a whole basic block.
Hi, I want to traverse all basic blocks of a function as well as its sub-procedures, and check if a block is dominator of another. Currently I'm using ICFG, but 1) it's instruction-level so it's too inefficient 2) still need to get to basic block to get dominator info.
I've looked at the implementation of
CFBasicBlockG
, and it really looks like a block-level ICFG.However, it confuses me to see
CFBasicBlockNode
contains a vector ofICFGNode
, instead ofSVFBasicBlock
. I found that it's intentional in #1227, which removegetSVFBasicBlock
forCFBasicBlockNode
, butgetFunction
remains. Does that mean aCFBasicBlockNode
can contain instructions across multiple blocks?Did I miss something or misunderstanding what this graph is for?
Thank you!
The text was updated successfully, but these errors were encountered: