[PATCH] D66905: [X86] Don't emit unreachable stack adjustments

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 29 14:22:44 PDT 2019


rnk marked 2 inline comments as done.
rnk added a comment.

Thanks!



================
Comment at: llvm/lib/Target/X86/X86FrameLowering.cpp:2555
+// non-meta instructions between MBBI and MBB.end().
+bool blockEndsInUnreachable(const MachineBasicBlock &MBB,
+                            MachineBasicBlock::const_iterator MBBI) {
----------------
hans wrote:
> nit: "blockEndIsUnreachable" feels like a more natural name to me (I almost read the current name like that before my eyes really focused)
Works for me.


================
Comment at: llvm/lib/Target/X86/X86FrameLowering.cpp:2560
+             [](const MachineBasicBlock *Succ) { return Succ->isEHPad(); }) &&
+         std::all_of(MBBI, MBB.end(), [](const MachineInstr &MI) {
+           return MI.isMetaInstruction();
----------------
hans wrote:
> You used llvm::all_of above. Could llvm::all_of or std::all_of be used for both?
The `llvm` variants take ranges. I'd have to standardize on `std` and use begin/end iterator pairs for this one. I'll do that.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D66905





More information about the llvm-commits mailing list