[PATCH] D65019: [ARM] push LR before __gnu_mcount_nc

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 12 13:30:51 PDT 2019


nickdesaulniers added inline comments.


================
Comment at: llvm/lib/Target/ARM/ARMISelLowering.cpp:3485
+      cast<ConstantSDNode>(
+          Op.getOperand(Op.getOperand(0).getValueType() == MVT::Other ? 1 : 0))
+          ->getZExtValue();
----------------
`Op.getOperand(0).getValueType() == MVT::Other ? 1 : 0` could be replaced with `Op.getOperand(0).getValueType() == MVT::Other`


================
Comment at: llvm/lib/Target/ARM/ARMISelLowering.cpp:3487
+          ->getZExtValue();
+  SDLoc dl(Op);
+  switch (IntNo) {
----------------
Why construct `dl` if we don't use it in the default case, or under certain conditions below? Maybe move the definition closer to its use below. Though I see temporary `SDLoc(Op)` below, which should be sufficient (so you can remove `dl`).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65019





More information about the cfe-commits mailing list