Add proper getAnalysisUsage() implementations to each Pass.

Change-Id: I2db9201dbfe5e8d705a873212f1f69f1fb7b5c20
diff --git a/lib/Renderscript/RSEmbedInfo.cpp b/lib/Renderscript/RSEmbedInfo.cpp
index 06fe547..fdcaaaf 100644
--- a/lib/Renderscript/RSEmbedInfo.cpp
+++ b/lib/Renderscript/RSEmbedInfo.cpp
@@ -57,6 +57,10 @@
         M(nullptr) {
   }
 
+  virtual void getAnalysisUsage(llvm::AnalysisUsage &AU) const override {
+    AU.setPreservesAll();
+  }
+
   static std::string getRSInfoString(const llvm::Module *module) {
     std::string str;
     llvm::raw_string_ostream s(str);
diff --git a/lib/Renderscript/RSForEachExpand.cpp b/lib/Renderscript/RSForEachExpand.cpp
index 6127291..4816b79 100644
--- a/lib/Renderscript/RSForEachExpand.cpp
+++ b/lib/Renderscript/RSForEachExpand.cpp
@@ -348,6 +348,11 @@
 
   }
 
+  virtual void getAnalysisUsage(llvm::AnalysisUsage &AU) const override {
+    // This pass does not use any other analysis passes, but it does
+    // add/wrap the existing functions in the module (thus altering the CFG).
+  }
+
   /* Performs the actual optimization on a selected function. On success, the
    * Module will contain a new function of the name "<NAME>.expand" that
    * invokes <NAME>() in a loop with the appropriate parameters.
diff --git a/lib/Renderscript/RSInvokeHelperPass.cpp b/lib/Renderscript/RSInvokeHelperPass.cpp
index a0c7c39..58a1e62 100644
--- a/lib/Renderscript/RSInvokeHelperPass.cpp
+++ b/lib/Renderscript/RSInvokeHelperPass.cpp
@@ -63,6 +63,11 @@
 
     }
 
+  virtual void getAnalysisUsage(llvm::AnalysisUsage &AU) const override {
+    // This pass does not use any other analysis passes, but it does
+    // modify the existing functions in the module (thus altering the CFG).
+  }
+
   virtual bool doInitialization(llvm::Module &M) override {
     llvm::FunctionType * SetObjType = nullptr;
     llvm::SmallVector<llvm::Type*, 4> rsBaseObj;
diff --git a/lib/Renderscript/RSScreenFunctionsPass.cpp b/lib/Renderscript/RSScreenFunctionsPass.cpp
index 9830d29..7da5e83 100644
--- a/lib/Renderscript/RSScreenFunctionsPass.cpp
+++ b/lib/Renderscript/RSScreenFunctionsPass.cpp
@@ -71,6 +71,10 @@
       std::sort(whiteList.begin(), whiteList.end());
   }
 
+  virtual void getAnalysisUsage(llvm::AnalysisUsage &AU) const override {
+    AU.setPreservesAll();
+  }
+
   bool runOnModule(llvm::Module &M) override {
     bool failed = false;