Disable most IR-level transform passes on functions marked 'optnone'.
[oota-llvm.git] / lib / Transforms / Scalar / LICM.cpp
index 1ce0cbc1c4a89cb423ebaa669757fb018a0aa997..24ef1727941758aca3d5e5a105ce5b038f45e1d5 100644 (file)
@@ -209,6 +209,9 @@ Pass *llvm::createLICMPass() { return new LICM(); }
 /// times on one loop.
 ///
 bool LICM::runOnLoop(Loop *L, LPPassManager &LPM) {
+  if (skipOptnoneFunction(L))
+    return false;
+
   Changed = false;
 
   // Get our Loop and Alias Analysis information...