[llvm] [llubi] Add basic support for icmp, terminators and function calls (PR #181393)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 15 04:05:50 PST 2026
================
@@ -204,6 +206,39 @@ class InstExecutor : public InstVisitor<InstExecutor, void> {
});
}
+ void jumpTo(Instruction &Terminator, BasicBlock *DestBB) {
+ if (!Handler.onBBJump(Terminator, *DestBB))
+ return;
+ BasicBlock *From = CurrentFrame->BB;
+ CurrentFrame->BB = DestBB;
+ CurrentFrame->PC = DestBB->begin();
+ // Update PHI nodes in batch to avoid the interference between PHI nodes.
+ // We need to store the incoming values into a temporary buffer.
+ // Otherwise, the incoming value may be overwritten before it is
+ // used by other PHI nodes.
+ SmallVector<std::pair<PHINode *, AnyValue>> IncomingValues;
+ PHINode *PHI = nullptr;
+ while ((PHI = dyn_cast<PHINode>(CurrentFrame->PC))) {
+ Value *Incoming = PHI->getIncomingValueForBlock(From);
+ // Bail out on the self-referential value.
----------------
dtcxzyw wrote:
Dropped.
https://github.com/llvm/llvm-project/pull/181393
More information about the llvm-commits
mailing list