-
Notifications
You must be signed in to change notification settings - Fork 36
Description
Hello,
I have used TypeChef to generate call graphs of C program files containing Ifdef (option --dumpcfg). In cases of C files having loops (like the attached C file), the #if expressions might be very complex. One of these complex expressions generated by TypeChef in the attached file (there are some longer expressions, you can see the C file's generated cfg):
#if (definedEx(CONFIG_PPC_64K_PAGES) && definedEx(CONFIG_LOCKDEP) && (!definedEx(CONFIG_PPC_16K_PAGES) || definedEx(CONFIG_PPC_256K_PAGES) || definedEx(CONFIG_PPC_64K_PAGES)) && !definedEx(CONFIG_PPC_256K_PAGES) && (definedEx(CONFIG_PPC_16K_PAGES) || definedEx(CONFIG_PPC_256K_PAGES) || definedEx(CONFIG_PPC_64K_PAGES)) && (!definedEx(CONFIG_LOCKDEP) || !definedEx(CONFIG_PPC_256K_PAGES)))
I think it is possible to simplify these expressions, and you might consider this feature.
Thanks,
Son
complex_if_expressions.zip