'As a general "advanced assembly", what is the memory model of llvm IR?

Recently, I hope to write GC for llvm. After reading about GC in llvm IR in a fragmented way, I want to know what is behind llvm IR. If you want to write a garbage collector for llvm, you should be familiar with the memory allocation of llvm. As a general "advanced assembly", what is the memory model of llvm IR and how to combine your understanding of it when writing a garbage collector, The alloca instruction, the @ malloc function and the new operator in C + + have their mapping to llvm IR with the help of clang, but I don't know the details of their memory application, so it's difficult to realize garbage collection similar to mark and tidy



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source