Add support for using wizer to handle running initAll()#3655
Add support for using wizer to handle running initAll()#3655dgryski wants to merge 4 commits intotinygo-org:devfrom
Conversation
|
The panic added to syscall is to catch places that might keep the cached libc environment during startup. Otherwise bugs like this would be very hard to track down. Sadly, the functions added to runtime.initAll() don't appear to have debug information associated with them. So figuring out exactly who called |
5033bd9 to
4293862
Compare
|
Something about wizer causes |
|
Thought: without the interp pass, certain variables don't know have concrete types and a later pass in |
|
Maybe I already said this elsewhere, but I'm pretty sure that this is OptimizeReflectImplements. Normally it is able to resolve the Implements calls at compile time but not anymore without the global interp pass. Not sure how to fix that, without actually implementing |
|
Yes, I believe this wizer issue and the pointer tagging one are similar. In both cases, the compiler is unable to figure out the proper type. In one it's because it's a "fake" |
37d17d2 to
4f17c16
Compare
4f17c16 to
659c167
Compare
|
Rebased this onto dev and my failing test program now works. (Maybe due to some fixes that landed in #3737 ?) |
659c167 to
5f5d4a4
Compare
5f5d4a4 to
132cc7b
Compare
|
I've rebased this branch onto |
3ce9cb2 to
124d93b
Compare
124d93b to
6c007b5
Compare
|
Merging #4375 should solve the problem with |
|
We still have the problem of running |
The largest slow down for compiling programs frequently comes from running
interponinitAll(), espcially if there are global variables with complex initializations, such as regular expression or other expensive function calls. This PR allows that phase to be run by wizer instead. This speeds up compilation of a large program from 20+ minutes down to about 2 (including the runtime for wizer).