[NNC] Use New PassManager for LLVM >= 15 (#89978)
This is needed because TargetMachine::adjustPassManager was removed in https://reviews.llvm.org/D137796. However, we need to keep around the old pass manager implementation for LLVM < 12.
Based on this: https://llvm.org/docs/NewPassManager.html
Tests: `./build/bin/test_tensorexpr` passes.
RUN_TORCHBENCH: nvfuser
Differential Revision: [D41636445](https://our.internmc.facebook.com/intern/diff/D41636445)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/89978
Approved by: https://github.com/bertmaher