[PATCH] D52904: [hot-cold-split] fix static analysis of cold regions

Orivej Desh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 15 15:37:31 PDT 2018


orivej added inline comments.


================
Comment at: llvm/trunk/lib/Transforms/IPO/HotColdSplitting.cpp:153
+static bool returnsOrHasSideEffects(const BasicBlock &BB) {
+  const TerminatorInst *I = BB.getTerminator();
+  if (isa<ReturnInst>(I) || isa<IndirectBrInst>(I) || isa<InvokeInst>(I))
----------------
This line fails to compile with g++ 5.4.0 with:
```
error: invalid conversion from 'const llvm::Instruction*' to 'const llvm::TerminatorInst*' [-fpermissive]
```
Did you mean `const Instruction *I = BB.getTerminator();`.


Repository:
  rL LLVM

https://reviews.llvm.org/D52904





More information about the llvm-commits mailing list