[PATCH] D58115: [Codegen] Remove dead flags on Physical Defs in machine cse
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 19 15:32:44 PST 2019
efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.
It's odd nobody has run into this before, but LGTM with minor nits.
================
Comment at: lib/CodeGen/MachineCSE.cpp:279
MachineBasicBlock::const_iterator I = MI; I = std::next(I);
- for (const MachineOperand &MO : MI->operands()) {
+ for (unsigned Idx = 0; Idx < MI->getNumOperands(); ++Idx) {
+ const MachineOperand &MO = MI->getOperand(Idx);
----------------
You could use llvm::enumerate here; maybe more readable. Otherwise, please use an "I < E" loop (http://llvm.org/docs/CodingStandards.html#don-t-evaluate-end-every-time-through-a-loop) .
================
Comment at: test/CodeGen/Thumb/machine-cse-deadreg.mir:1
+# RUN: llc -mtriple thumbv6m-arm-none-eabi -run-pass=machine-cse -o - %s | FileCheck %s
+
----------------
-verify-machine-instrs
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58115/new/
https://reviews.llvm.org/D58115
More information about the llvm-commits
mailing list