fix reordering of inlines (#17557)
Summary:
See comment inside of code. This fixes a bug where sometimes we would try to avoid printing long lines but would inadvertently reorder the expressions, which can change the semantics of the program
Pull Request resolved: https://github.com/pytorch/pytorch/pull/17557
Differential Revision: D14250608
Pulled By: zdevito
fbshipit-source-id: d44996af4e90fe9ab9508d13cd04adbfc7bb5d1c