On Mon, Jun 08, 2020 at 05:20:16PM +0200, Tobias Burnus wrote: > how about the following patch, which is kind of a combination of the > two? Namely, avoiding of the output of artificial,read-only nonglobal > variables – and marking all remaining variables and all functions with > node->force_output. As the LTO writing happens earlier, I only do it > there. TobiasOn 6/8/20 1:11 PM, Jakub Jelinek wrote:
I really don't see what is special exactly on TREE_READONLY DECL_ARTIFICIAL function-scope vars and why they should be treated that way, that is not really some property that should imply special behavior. There are dozens of reasons why a variable can be DECL_ARTIFICIAL and dozens of reasons why it can be TREE_READONLY, and FUNCTION_DECL context can have both automatic variables and static variables etc. Jakub