Adding a collector name attribute to Function in the IR. These
authorGordon Henriksen <gordonhenriksen@mac.com>
Mon, 10 Dec 2007 03:18:06 +0000 (03:18 +0000)
committerGordon Henriksen <gordonhenriksen@mac.com>
Mon, 10 Dec 2007 03:18:06 +0000 (03:18 +0000)
commit80a75bfae980df96f969f1c05b0c4a80ce975240
treeb17b6964d35ffeaa66a62793e9cb123e67b69310
parentafba8fe662d65b25b4baf46bb26cc18e1f9cc0a5
Adding a collector name attribute to Function in the IR. These
methods are new to Function:

  bool hasCollector() const;
  const std::string &getCollector() const;
  void setCollector(const std::string &);
  void clearCollector();

The assembly representation is as such:

  define void @f() gc "shadow-stack" { ...

The implementation uses an on-the-side table to map Functions to
collector names, such that there is no overhead. A StringPool is
further used to unique collector names, which are extremely
likely to be unique per process.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44769 91177308-0d34-0410-b5e6-96231b3b80d8
21 files changed:
bindings/ocaml/llvm/llvm.ml
bindings/ocaml/llvm/llvm.mli
bindings/ocaml/llvm/llvm_ocaml.c
docs/LangRef.html
include/llvm-c/Core.h
include/llvm/Bitcode/LLVMBitCodes.h
include/llvm/Function.h
lib/AsmParser/LLLexer.cpp
lib/AsmParser/llvmAsmParser.cpp.cvs
lib/AsmParser/llvmAsmParser.h.cvs
lib/AsmParser/llvmAsmParser.y
lib/AsmParser/llvmAsmParser.y.cvs
lib/Bitcode/Reader/BitcodeReader.cpp
lib/Bitcode/Writer/BitcodeWriter.cpp
lib/Transforms/Utils/CloneModule.cpp
lib/VMCore/AsmWriter.cpp
lib/VMCore/Core.cpp
lib/VMCore/Function.cpp
test/Assembler/2007-09-29-GC.ll [new file with mode: 0644]
test/Bindings/Ocaml/vmcore.ml
test/CodeGen/Generic/GC/alloc_loop.ll