added macros in jit logging to check whether loggings are enabled; replaced similar checks in LLVM codegen with such macros (#49121)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/49121
Test Plan: Imported from OSS
Reviewed By: ZolotukhinM
Differential Revision: D25445971
Pulled By: huiguoo
fbshipit-source-id: 980775a94159aa0b3b66fae938962761b38703d5