Hi Chris,> I think this change is fine and should go into the normal apple GCC as > well. Setting TREE_READONLY means that it can go into the "constant" > section of the executable, go in ROM, etc. This is the same as the > llvm constant bit on globals.for this I think it has to be static as well as readonly. Ciao, Duncan.
I did mark it as TREE_CONSTANT. Is that enough? -bw On Jan 5, 2009, at 2:03 AM, Duncan Sands <baldrick at free.fr> wrote:> Hi Chris, > >> I think this change is fine and should go into the normal apple GCC >> as >> well. Setting TREE_READONLY means that it can go into the "constant" >> section of the executable, go in ROM, etc. This is the same as the >> llvm constant bit on globals. > > for this I think it has to be static as well as readonly. > > Ciao, > > Duncan. > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
On Monday 05 January 2009 12:42:16 Bill Wendling wrote:> I did mark it as TREE_CONSTANT. Is that enough?No idea - if it works I guess it was enough :) I was actually thinking of TREE_STATIC: /* In a VAR_DECL, nonzero means allocate static storage. In a FUNCTION_DECL, nonzero if function has been defined. In a CONSTRUCTOR, nonzero means allocate static storage. ??? This is also used in lots of other nodes in unclear ways which should be cleaned up some day. */ #define TREE_STATIC(NODE) ((NODE)->common.static_flag) Ciao, Duncan.