Landerl Young
02/16/2019, 4:46 AMMarkup Sweep
algorithm to detect dead code. But I found that the shrink phase must be operated on bit code instead of IR in order to shrink library code.
However the bitcode contains much more data than simply class and methods (lke java byte code), which makes the shrink phase much hard.
Especially the TypeInfo, OC export, CStubs, etc... That makes Class/Function removal more hard.
And also, it seems impossible to remove virtual methods, since which would change the vtable structure, and make the existing method index invalid.
I’m new to K/N compiler (but experienced on K/N itself), the compiler do steps like SourceCode -> PSI -> IR -> bitcode.
I’m curiousied that what is the IR. Is it LLVM-IR, or just a Jetbrain defined IR shared with Kotlin/JVM?
To sum up, my questions is:
1. How to deal with OCExport,CStubs etc, when a Class/Function is removed.
2. How to remove virtual methods.
3. What is the DFG?
4. To shrink bitcode, can I take advantage of DFG or IR in the Context
?Landerl Young
02/16/2019, 4:56 AMLanderl Young
02/16/2019, 5:39 AMolonho
02/16/2019, 7:31 AMolonho
02/16/2019, 7:33 AMolonho
02/16/2019, 7:35 AMargs0
and debug as usual.Landerl Young
02/16/2019, 7:53 AMolonho
02/16/2019, 8:02 AMLanderl Young
02/16/2019, 8:09 AM