[WebAssembly] Declare that WebAssemblyPeephole does not modify the CFG.
authorDan Gohman <dan433584@gmail.com>
Thu, 10 Dec 2015 14:12:04 +0000 (14:12 +0000)
committerDan Gohman <dan433584@gmail.com>
Thu, 10 Dec 2015 14:12:04 +0000 (14:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255251 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/WebAssembly/WebAssemblyPeephole.cpp

index 11f4477..77514bb 100644 (file)
@@ -26,6 +26,11 @@ class WebAssemblyPeephole final : public MachineFunctionPass {
     return "WebAssembly late peephole optimizer";
   }
 
+  void getAnalysisUsage(AnalysisUsage &AU) const override {
+    AU.setPreservesCFG();
+    MachineFunctionPass::getAnalysisUsage(AU);
+  }
+
   bool runOnMachineFunction(MachineFunction &MF) override;
 
 public: