title: How to get optimization level (O0,O1,O2 etc) from a llvm pass?
body: <p>I am writing a llvm pass. I want to bail out my pass if optimization level is O0 or O1. I am not able to find the right API to query the optimization level from a function pass. I tried to search this option in codebase and doc, but could not locate one.</p>