[llvm] [llubi] Add basic support for icmp, terminators and function calls (PR #181393)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 14 01:15:51 PST 2026
================
@@ -17,7 +17,29 @@ namespace llvm::ubi {
Context::Context(Module &M)
: Ctx(M.getContext()), M(M), DL(M.getDataLayout()),
- TLIImpl(M.getTargetTriple()) {}
+ TLIImpl(M.getTargetTriple()) {
+ // Register all valid function and block targets.
+ for (Function &F : M) {
+ auto FuncObj = allocate(0, F.getPointerAlignment(DL).value(), F.getName(),
+ DL.getProgramAddressSpace(), MemInitKind::Zeroed);
+ assert(FuncObj && "Failed to allocate memory for function object.");
----------------
nikic wrote:
I'd expect this assert can be triggered by specifying a memory limit of 1 or something.
https://github.com/llvm/llvm-project/pull/181393
More information about the llvm-commits
mailing list