[llvm] [SandboxIR][Tracker] Track creation of instructions (PR #102013)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 5 09:53:35 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>(
----------------
vporpo wrote:
done
https://github.com/llvm/llvm-project/pull/102013
More information about the llvm-commits
mailing list