ML icon indicating copy to clipboard operation
ML copied to clipboard

Use `if __name__ == '__main__':` as an entry point

Open khatchad opened this issue 3 years ago • 2 comments

I suspect that if __name__ == '__main__': is not being considered as an entry point. Using it and not using it on the same examples gives me a different IR and CFGs. Seems related to https://github.com/wala/ML/issues/17.

khatchad avatar Jan 27 '23 19:01 khatchad

On the example I tried, by removing if __name__ == main:, I am getting four more basic blocks than I had previously. The corresponding call graph node is that of import() (very early in the CG).

khatchad avatar Jan 27 '23 19:01 khatchad