[llvm] [SandboxIR] Implement CallBrInst (PR #100823)

Sriraman Tallam via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 29 11:01:17 PDT 2024


================
@@ -177,6 +178,41 @@ class RemoveFromParent : public IRChangeBase {
 #endif // NDEBUG
 };
 
+class CallBrInstSetDefaultDest : public IRChangeBase {
+  CallBrInst *CallBr;
+  BasicBlock *OrigDefaultDest;
+
+public:
+  CallBrInstSetDefaultDest(CallBrInst *CallBr, Tracker &Tracker);
+  void revert() final;
+  void accept() final {}
+#ifndef NDEBUG
+  void dump(raw_ostream &OS) const final {
+    dumpCommon(OS);
+    OS << "CallBrInstSetDefaultDest";
+  }
+  LLVM_DUMP_METHOD void dump() const final;
+#endif
+};
+
+class CallBrInstSetIndirectDest : public IRChangeBase {
----------------
tmsri wrote:

Can you make CallBrInstSetIndirectDest be derived from CallBrInstSetDefaultDest?  It is the same except for idx.  

https://github.com/llvm/llvm-project/pull/100823


More information about the llvm-commits mailing list