[Cpp] Mapping dataflow nodes to their basic blocks. #21074
Unanswered
jackfromeast
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to map
Dataflow::Nodeinstances to their correspondingBasicBlockin C++.My initial approach was to convert nodes using
node.asExpr().getBasicBlock(),node.asParameter().getBasicBlock(), ornode.asDefiningArgument().getBasicBlock(), but many dataflow nodes returnnonefornode.asExpr()(>85%), making this unreliable as I would loss a lot of unmapped nodes.I then discovered that
Dataflow::Nodefromsemmle/code/cpp/ir/IR.qllhas agetBasicBlock()predicate returning anIRBlock, which works for most nodes except function parameters. However, I'm now stuck on how to convert anIRBlockto aBasicBlock, as other information is more accessible from the BasicBlock.Overall, I am wondering is there a better approach to reliably map all dataflow nodes to their corresponding basic blocks?
Beta Was this translation helpful? Give feedback.
All reactions