[PATCH] D62164: [PowerPC] Enable MachinePipeliner for P9 with -ppc-enable-pipeliner

Jinsong Ji via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 4 10:33:23 PDT 2019


jsji marked 2 inline comments as done.
jsji added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCInstrInfo.cpp:3947
+      return &I;
+  assert(0 && "Can NOT find MTCTR in preheader\n");
+  return nullptr;
----------------
hfinkel wrote:
> Two things:
> 
>  1. Never use assert(0 && ...), that's what llvm_unreachable is for.
> 
>  2. Don't assert here, just return nullptr. This is not actually an error, it *could* happen, and the compiler shouldn't crash. If you'd like, add a STATISTIC to count the number of times this happens.
> 
You are right, I should have removed this before posting it. Thanks.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62164/new/

https://reviews.llvm.org/D62164





More information about the llvm-commits mailing list