search for: init_gloabals

Displaying 5 results from an estimated 5 matches for "init_gloabals".

2016 Dec 13
0
Enabling statistics in release builds / static constructors
...to be pure constexpr and do not run any code > > static void init_globals() { > NumBlips.init(); > MyOpt.init(); > AnotherOpt.init(); > } > // Note that the init_globals() function is pretty mechanical so hopefully easy to understand and maintain. > > We have to call init_gloabals somewhere early: > - Put an init_globals() call into code that runs early. > - We already have a lot of early running functions called initializeXXXPass() which we can use for this > - For the remaining files we probably have to export init_globals() and call it from some common place of t...
2016 Dec 13
3
Enabling statistics in release builds / static constructors
...f Statistic and cl::opt would be reworked to be pure constexpr and do not run any code static void init_globals() { NumBlips.init(); MyOpt.init(); AnotherOpt.init(); } // Note that the init_globals() function is pretty mechanical so hopefully easy to understand and maintain. We have to call init_gloabals somewhere early: - Put an init_globals() call into code that runs early. - We already have a lot of early running functions called initializeXXXPass() which we can use for this - For the remaining files we probably have to export init_globals() and call it from some common place of the library. If...
2016 Dec 13
2
Enabling statistics in release builds / static constructors
...un any code >> >> static void init_globals() { >> NumBlips.init(); >> MyOpt.init(); >> AnotherOpt.init(); >> } >> // Note that the init_globals() function is pretty mechanical so hopefully easy to understand and maintain. >> >> We have to call init_gloabals somewhere early: >> - Put an init_globals() call into code that runs early. >> - We already have a lot of early running functions called initializeXXXPass() which we can use for this >> - For the remaining files we probably have to export init_globals() and call it from some commo...
2016 Dec 13
0
Enabling statistics in release builds / static constructors
Given that LLVM has so many auto-registration systems (cl::opt, target registry, pass registry, statistics, I'm sure there's more), maybe we should spend the time to build an auto-registration system that doesn't involve static constructors? It needs custom code for every supported object file format, and is hard to get right when DSOs are involved, but in the long run it's
2016 Dec 13
0
Enabling statistics in release builds / static constructors
...t; static void init_globals() { >>> NumBlips.init(); >>> MyOpt.init(); >>> AnotherOpt.init(); >>> } >>> // Note that the init_globals() function is pretty mechanical so hopefully easy to understand and maintain. >>> >>> We have to call init_gloabals somewhere early: >>> - Put an init_globals() call into code that runs early. >>> - We already have a lot of early running functions called initializeXXXPass() which we can use for this >>> - For the remaining files we probably have to export init_globals() and call it fro...