[llvm] [SandboxIR] Add BasicBlock and adds functionality to Function and Context (PR #97637)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 8 14:23:54 PDT 2024
================
@@ -278,12 +381,55 @@ class Context {
DenseMap<llvm::Value *, std::unique_ptr<sandboxir::Value>>
LLVMValueToValueMap;
+ /// Take ownership of VPtr and store it in `LLVMValueToValueMap`.
+ Value *registerValue(std::unique_ptr<Value> &&VPtr);
+
+ /// Helper for avoiding recursion loop when creating SBConstants.
+ SmallDenseSet<llvm::Constant *, 8> VisitedConstants;
+
+ Value *getOrCreateValueInternal(llvm::Value *V, int Depth,
+ llvm::User *U = nullptr);
+
+ template <typename SBT, typename LLVMT>
+ SBT *getOrCreateGeneric(LLVMT *LLVMV) {
----------------
vporpo wrote:
OK I will remove the template.
https://github.com/llvm/llvm-project/pull/97637
More information about the llvm-commits
mailing list