<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Gabor,<div><br></div><div>I had to revert this patch. It was causing build failures during an "Apple-style build". (It does a full build and also cross-compiling.) Here are the errors I'm seeing. Could you take a look please?</div><div><br></div><div><span class="Apple-style-span" style="font-family: Times; "><pre><span class="stdout" style="font-family: 'Courier New', courier, monotype; ">g++ -m32 -c -g -O2 -mdynamic-no-pic -DIN_GCC -W -Wall -Wwrite-strings -pedantic -Wno-long-long -Wno-variadic-macros -Wmissing-format-attribute -Werror -mdynamic-no-pic -DHAVE_CONFIG_H -Wno-unused -DTARGET_NAME=\"i686-apple-darwin10\" -frandom-seed=0 -DNDEBUG -I. -I. -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/llvmgcc42.roots/llvmgcc42~obj/src/gcc -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/llvmgcc42.roots/llvmgcc42~obj/src/gcc/. -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/llvmgcc42.roots/llvmgcc42~obj/src/gcc/../include -I./../intl -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/llvmgcc42.roots/llvmgcc42~obj/src/gcc/../libcpp/include  -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/llvmgcc42.roots/llvmgcc42~obj/src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/llvmCore.roots/llvmCore~dst/Developer/usr/local/include -DENABLE_LLVM -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/llvmCore.roots/llvmCore~dst/Developer/usr/local/include  -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DLLVM_VERSION_INFO='"9999"' -DBUILD_LLVM_APPLE_STYLE   -I. -I. -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/llvmgcc42.roots/llvmgcc42~obj/src/gcc -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/llvmgcc42.roots/llvmgcc42~obj/src/gcc/. -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/llvmgcc42.roots/llvmgcc42~obj/src/gcc/../include -I./../intl -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/llvmgcc42.roots/llvmgcc42~obj/src/gcc/../libcpp/include  -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/llvmgcc42.roots/llvmgcc42~obj/src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/llvmCore.roots/llvmCore~dst/Developer/usr/local/include /Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/llvmgcc42.roots/llvmgcc42~obj/src/gcc/llvm-backend.cpp -o llvm-backend.o
In file included from ./config.h:9,
                 from /Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/llvmgcc42.roots/llvmgcc42~obj/src/gcc/llvm-backend.cpp:58:
./auto-host.h:1004:1: error: "HAVE_MMAP_FILE" redefined
In file included from /Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/llvmCore.roots/llvmCore~dst/Developer/usr/local/include/llvm/ADT/ilist.h:42,
                 from /Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/llvmCore.roots/llvmCore~dst/Developer/usr/local/include/llvm/SymbolTableListTraits.h:28,
                 from /Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/llvmCore.roots/llvmCore~dst/Developer/usr/local/include/llvm/BasicBlock.h:18,
                 from /Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/llvmCore.roots/llvmCore~dst/Developer/usr/local/include/llvm/Instructions.h:22,
                 from /Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/llvmCore.roots/llvmCore~dst/Developer/usr/local/include/llvm/Support/IRBuilder.h:19,
                 from /Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/llvmgcc42.roots/llvmgcc42~obj/src/gcc/llvm-internal.h:41,
                 from /Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/llvmgcc42.roots/llvmgcc42~obj/src/gcc/llvm-backend.cpp:23:
/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/llvmCore.roots/llvmCore~dst/Developer/usr/local/include/llvm/Config/config.h:248:1: error: this is the location of the previous definition
In file included from ./config.h:9,
                 from /Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/llvmgcc42.roots/llvmgcc42~obj/src/gcc/llvm-backend.cpp:58:
./auto-host.h:1245:1: error: "PACKAGE_BUGREPORT" redefined
</span></pre><div><font class="Apple-style-span" face="'Courier New', courier, monotype"><span class="Apple-style-span" style="white-space: pre;">...</span></font></div><div><font class="Apple-style-span" face="'Courier New', courier, monotype"><span class="Apple-style-span" style="white-space: pre;"><br></span></font></div><div><font class="Apple-style-span" face="'Courier New', courier, monotype"><span class="Apple-style-span" style="white-space: pre;">-bw</span></font></div><div><font class="Apple-style-span" face="'Courier New', courier, monotype"><span class="Apple-style-span" style="white-space: pre;"><br></span></font></div></span><div><div>On Aug 24, 2009, at 2:34 PM, Gabor Greif wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Author: ggreif<br>Date: Mon Aug 24 16:34:17 2009<br>New Revision: 79938<br><br>URL: <a href="http://llvm.org/viewvc/llvm-project?rev=79938&view=rev">http://llvm.org/viewvc/llvm-project?rev=79938&view=rev</a><br>Log:<br>Resubmit an earlier patch of mine:<br>reduce the size of relevant "ghostly" sentinels<br>by a pointer.<br><br>This attempt now makes the compactification dependent<br>on the configure variable LLVM_COMPACT_SENTINELS<br>and should not cause any bootstrap failures for<br>llvm-gcc any more.<br><br>Please note that this is not yet the final version,<br>and (as settled with Chris) I shall take out the<br>autofoo/cmake portions in the next days.<br><br>This will also lose the assertability on sentinel<br>dereferencing and operator++, but that seems<br>an acceptable price to pay for the simplified<br>build logic.<br><br>Modified:<br>    llvm/trunk/include/llvm/ADT/ilist.h<br>    llvm/trunk/include/llvm/ADT/ilist_node.h<br>    llvm/trunk/include/llvm/BasicBlock.h<br>    llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h<br>    llvm/trunk/include/llvm/CodeGen/MachineFunction.h<br>    llvm/trunk/include/llvm/CodeGen/SelectionDAG.h<br>    llvm/trunk/include/llvm/Function.h<br><br>Modified: llvm/trunk/include/llvm/ADT/ilist.h<br>URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ilist.h?rev=79938&r1=79937&r2=79938&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ilist.h?rev=79938&r1=79937&r2=79938&view=diff</a><br><br>==============================================================================<br>--- llvm/trunk/include/llvm/ADT/ilist.h (original)<br>+++ llvm/trunk/include/llvm/ADT/ilist.h Mon Aug 24 16:34:17 2009<br>@@ -39,8 +39,15 @@<br> #define LLVM_ADT_ILIST_H<br><br> #include "llvm/ADT/iterator.h"<br>+#include "llvm/Config/config.h"<br> #include <cassert><br><br>+#if defined(LLVM_COMPACT_SENTINELS) && LLVM_COMPACT_SENTINELS<br>+#   define sentinel_tail_assert(COND)<br>+#else<br>+#   define sentinel_tail_assert(COND) assert(COND)<br>+#endif<br>+<br> namespace llvm {<br><br> template<typename NodeTy, typename Traits> class iplist;<br>@@ -189,12 +196,12 @@<br><br>   // Accessors...<br>   operator pointer() const {<br>-    assert(Traits::getNext(NodePtr) != 0 && "Dereferencing end()!");<br>+    sentinel_tail_assert(Traits::getNext(NodePtr) != 0 && "Dereferencing end()!");<br>     return NodePtr;<br>   }<br><br>   reference operator*() const {<br>-    assert(Traits::getNext(NodePtr) != 0 && "Dereferencing end()!");<br>+    sentinel_tail_assert(Traits::getNext(NodePtr) != 0 && "Dereferencing end()!");<br>     return *NodePtr;<br>   }<br>   pointer operator->() const { return &operator*(); }<br>@@ -215,7 +222,7 @@<br>   }<br>   ilist_iterator &operator++() {      // preincrement - Advance<br>     NodePtr = Traits::getNext(NodePtr);<br>-    assert(NodePtr && "++'d off the end of an ilist!");<br>+    sentinel_tail_assert(NodePtr && "++'d off the end of an ilist!");<br>     return *this;<br>   }<br>   ilist_iterator operator--(int) {    // postdecrement operators...<br><br>Modified: llvm/trunk/include/llvm/ADT/ilist_node.h<br>URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ilist_node.h?rev=79938&r1=79937&r2=79938&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ilist_node.h?rev=79938&r1=79937&r2=79938&view=diff</a><br><br>==============================================================================<br>--- llvm/trunk/include/llvm/ADT/ilist_node.h (original)<br>+++ llvm/trunk/include/llvm/ADT/ilist_node.h Mon Aug 24 16:34:17 2009<br>@@ -15,33 +15,56 @@<br> #ifndef LLVM_ADT_ILIST_NODE_H<br> #define LLVM_ADT_ILIST_NODE_H<br><br>+#include "llvm/Config/config.h"<br>+<br> namespace llvm {<br><br> template<typename NodeTy><br>-struct ilist_nextprev_traits;<br>+struct ilist_traits;<br><br>+/// ilist_half_node - Base class that provides prev services for sentinels.<br>+///<br> template<typename NodeTy><br>-struct ilist_traits;<br>+class ilist_half_node {<br>+  friend struct ilist_traits<NodeTy>;<br>+  NodeTy *Prev;<br>+protected:<br>+  NodeTy *getPrev() { return Prev; }<br>+  const NodeTy *getPrev() const { return Prev; }<br>+  void setPrev(NodeTy *P) { Prev = P; }<br>+  ilist_half_node() : Prev(0) {}<br>+};<br>+<br>+template<typename NodeTy><br>+struct ilist_nextprev_traits;<br><br> /// ilist_node - Base class that provides next/prev services for nodes<br> /// that use ilist_nextprev_traits or ilist_default_traits.<br> ///<br> template<typename NodeTy><br>-class ilist_node {<br>-private:<br>+class ilist_node : ilist_half_node<NodeTy> {<br>   friend struct ilist_nextprev_traits<NodeTy>;<br>   friend struct ilist_traits<NodeTy>;<br>-  NodeTy *Prev, *Next;<br>-  NodeTy *getPrev() { return Prev; }<br>+  NodeTy *Next;<br>   NodeTy *getNext() { return Next; }<br>-  const NodeTy *getPrev() const { return Prev; }<br>   const NodeTy *getNext() const { return Next; }<br>-  void setPrev(NodeTy *N) { Prev = N; }<br>   void setNext(NodeTy *N) { Next = N; }<br> protected:<br>-  ilist_node() : Prev(0), Next(0) {}<br>+  ilist_node() : Next(0) {}<br> };<br><br>+/// When assertions are off, the Next field of sentinels<br>+/// will not be accessed. So it is not necessary to allocate<br>+/// space for it. The following macro selects the most<br>+/// efficient traits class. The LLVM_COMPACT_SENTINELS<br>+/// configuration variable controls this.<br>+///<br>+#if defined(LLVM_COMPACT_SENTINELS) && LLVM_COMPACT_SENTINELS<br>+#   define ILIST_NODE ilist_half_node<br>+#else<br>+#   define ILIST_NODE ilist_node<br>+#endif<br>+<br> } // End llvm namespace<br><br> #endif<br><br>Modified: llvm/trunk/include/llvm/BasicBlock.h<br>URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/BasicBlock.h?rev=79938&r1=79937&r2=79938&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/BasicBlock.h?rev=79938&r1=79937&r2=79938&view=diff</a><br><br>==============================================================================<br>--- llvm/trunk/include/llvm/BasicBlock.h (original)<br>+++ llvm/trunk/include/llvm/BasicBlock.h Mon Aug 24 16:34:17 2009<br>@@ -47,7 +47,7 @@<br>   Instruction *ensureHead(Instruction*) const { return createSentinel(); }<br>   static void noteHead(Instruction*, Instruction*) {}<br> private:<br>-  mutable ilist_node<Instruction> Sentinel;<br>+  mutable ILIST_NODE<Instruction> Sentinel;<br> };<br><br> /// This represents a single basic block in LLVM. A basic block is simply a<br><br>Modified: llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h<br>URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h?rev=79938&r1=79937&r2=79938&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h?rev=79938&r1=79937&r2=79938&view=diff</a><br><br>==============================================================================<br>--- llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h (original)<br>+++ llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h Mon Aug 24 16:34:17 2009<br>@@ -26,7 +26,7 @@<br> template <><br> struct ilist_traits<MachineInstr> : public ilist_default_traits<MachineInstr> {<br> private:<br>-  mutable ilist_node<MachineInstr> Sentinel;<br>+  mutable ILIST_NODE<MachineInstr> Sentinel;<br><br>   // this is only set by the MachineBasicBlock owning the LiveList<br>   friend class MachineBasicBlock;<br><br>Modified: llvm/trunk/include/llvm/CodeGen/MachineFunction.h<br>URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineFunction.h?rev=79938&r1=79937&r2=79938&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineFunction.h?rev=79938&r1=79937&r2=79938&view=diff</a><br><br>==============================================================================<br>--- llvm/trunk/include/llvm/CodeGen/MachineFunction.h (original)<br>+++ llvm/trunk/include/llvm/CodeGen/MachineFunction.h Mon Aug 24 16:34:17 2009<br>@@ -38,7 +38,7 @@<br> template <><br> struct ilist_traits<MachineBasicBlock><br>     : public ilist_default_traits<MachineBasicBlock> {<br>-  mutable ilist_node<MachineBasicBlock> Sentinel;<br>+  mutable ILIST_NODE<MachineBasicBlock> Sentinel;<br> public:<br>   MachineBasicBlock *createSentinel() const {<br>     return static_cast<MachineBasicBlock*>(&Sentinel);<br><br>Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAG.h<br>URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAG.h?rev=79938&r1=79937&r2=79938&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAG.h?rev=79938&r1=79937&r2=79938&view=diff</a><br><br>==============================================================================<br>--- llvm/trunk/include/llvm/CodeGen/SelectionDAG.h (original)<br>+++ llvm/trunk/include/llvm/CodeGen/SelectionDAG.h Mon Aug 24 16:34:17 2009<br>@@ -37,7 +37,7 @@<br><br> template<> struct ilist_traits<SDNode> : public ilist_default_traits<SDNode> {<br> private:<br>-  mutable ilist_node<SDNode> Sentinel;<br>+  mutable ILIST_NODE<SDNode> Sentinel;<br> public:<br>   SDNode *createSentinel() const {<br>     return static_cast<SDNode*>(&Sentinel);<br><br>Modified: llvm/trunk/include/llvm/Function.h<br>URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Function.h?rev=79938&r1=79937&r2=79938&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Function.h?rev=79938&r1=79937&r2=79938&view=diff</a><br><br>==============================================================================<br>--- llvm/trunk/include/llvm/Function.h (original)<br>+++ llvm/trunk/include/llvm/Function.h Mon Aug 24 16:34:17 2009<br>@@ -45,7 +45,7 @@<br><br>   static ValueSymbolTable *getSymTab(Function *ItemParent);<br> private:<br>-  mutable ilist_node<BasicBlock> Sentinel;<br>+  mutable ILIST_NODE<BasicBlock> Sentinel;<br> };<br><br> template<> struct ilist_traits<Argument><br>@@ -62,7 +62,7 @@<br><br>   static ValueSymbolTable *getSymTab(Function *ItemParent);<br> private:<br>-  mutable ilist_node<Argument> Sentinel;<br>+  mutable ILIST_NODE<Argument> Sentinel;<br> };<br><br> class Function : public GlobalValue,<br><br><br>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits<br></div></blockquote></div><br></div></body></html>