[llvm] [SandboxIR][Tracker] Track creation of instructions (PR #102013)
Thorsten Schütt via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 5 09:42:22 PDT 2024
================
@@ -1359,6 +1359,13 @@ std::unique_ptr<Value> Context::detach(Value *V) {
Value *Context::registerValue(std::unique_ptr<Value> &&VPtr) {
assert(VPtr->getSubclassID() != Value::ClassID::User &&
"Can't register a user!");
+
+ // Track creation of instructions.
+ auto &Tracker = getTracker();
+ if (Tracker.isTracking() && isa<Instruction>(VPtr.get()))
+ Tracker.track(std::make_unique<CreateAndInsertInst>(
----------------
tschuett wrote:
verbose version with dyn_cast instead of isa+cast
https://github.com/llvm/llvm-project/pull/102013
More information about the llvm-commits
mailing list