<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Trebuchet MS; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Trebuchet MS; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Trebuchet MS; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; ">This patch adds a string attribute to each function which enables GC codegen and selects the metadata format to generate. In order to avoid adding a word to each </span><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-variant: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><font class="Apple-style-span" face="Courier">Function</font></span><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Trebuchet MS; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "> for programs which do not use garbage collection (e.g. llvm-gcc, clang), this value is stored in an on-the-side table.</span></span></div><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><br></div></span></div><div><div apple-content-edited="true"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">— Gordon</div></div><div><br></div><div><br class="webkit-block-placeholder"></div><div><div><b>gc-5a-funattr.patch (+222 -22):</b></div><div><br class="webkit-block-placeholder"></div><div><i>  docs/LangRef.html (+22 -3)</i></div><div><i>  test/CodeGen/Generic/GC/alloc_loop.ll (+1 -1)</i></div><div><i>  test/Assembler/2007-09-29-GC.ll (+12)</i></div><div><i>  include/llvm/Function.h (+7)</i></div><div><i>  lib/VMCore/Function.cpp (+33)</i></div><div><i>  include/llvm/Support/ManagedStatic.h (+4)</i></div><div><i>  lib/Support/ManagedStatic.cpp (+20)</i></div><div><i>  include/llvm/Bitcode/LLVMBitCodes.h (+3 -1)</i></div><div><i>  lib/Bitcode/Reader/BitcodeReader.cpp (+14 -1)</i></div><div><i>  lib/Bitcode/Writer/BitcodeWriter.cpp (+23 -10)</i></div><div><i>  lib/VMCore/AsmWriter.cpp (+2)</i></div><div><i>  lib/AsmParser/llvmAsmParser.y (+13 -3)</i></div><div><i>  lib/AsmParser/LLLexer.cpp (+1)</i></div><div><i>  lib/Transforms/Utils/CloneModule.cpp (+2)</i></div><div><i>  include/llvm-c/Core.h (+2)</i></div><div><i>  lib/VMCore/Core.cpp (+13)</i></div><div><i>  bindings/ocaml/llvm/llvm.ml (+2)</i></div><div><i>  bindings/ocaml/llvm/llvm_ocaml.c (+23)</i></div><div><i>  bindings/ocaml/llvm/llvm.mli (+9)</i></div><div><i>  test/Bindings/Ocaml/vmcore.ml (+16 -3)</i></div><div><br class="webkit-block-placeholder"></div><div>Adds these methods to <font class="Apple-style-span" face="Courier">Function</font> and makes corresponding changes to assembly and bitcode:</div><div><br class="webkit-block-placeholder"></div></div></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><span class="Apple-style-span" style="font-family: Courier; ">bool hasCollector() const;</span><br><span class="Apple-style-span" style="font-family: Courier; ">const char *getCollector() const;</span><br><span class="Apple-style-span" style="font-family: Courier; ">void setCollector(const char *);</span><br><span class="Apple-style-span" style="font-family: Courier; ">void clearCollector();</span></blockquote><div><div><div><br class="webkit-block-placeholder"></div><div>The assembly representation is as such:</div><div><br class="webkit-block-placeholder"></div></div></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><span class="Apple-style-span" style="font-family: Courier; ">define void @f() gc "shadow-stack" { ...</span></blockquote><div><div><div><br class="webkit-block-placeholder"></div><div>Uses <font class="Apple-style-span" face="Courier">StringPool</font> to unique collector names, which are extremely likely to be unique per process.</div><div><br class="webkit-block-placeholder"></div><div><br></div><div><b>gc-5b-regen.patch (+1245 -1209):</b></div><div><br class="webkit-block-placeholder"></div><div><i>  lib/AsmParser/llvmAsmParser.cpp.cvs (+1221 -1197)</i></div><div><i>  lib/AsmParser/llvmAsmParser.h.cvs (+11 -9)</i></div><div><i>  lib/AsmParser/llvmAsmParser.y.cvs (+13 -3)</i></div><div><br class="webkit-block-placeholder"></div><div>Regenerate.</div><div><br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div></div></div><div></div></body></html>