projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
604206b
)
MachineCSE.cpp - use auto const& iterator in for-range loop to avoid copies. NFCI.
author
Simon Pilgrim
<llvm-dev@redking.me.uk>
Mon, 21 Sep 2020 15:38:44 +0000
(16:38 +0100)
committer
Simon Pilgrim
<llvm-dev@redking.me.uk>
Mon, 21 Sep 2020 15:54:26 +0000
(16:54 +0100)
llvm/lib/CodeGen/MachineCSE.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/CodeGen/MachineCSE.cpp
b/llvm/lib/CodeGen/MachineCSE.cpp
index
0953127
..
d3eca3a
100644
(file)
--- a/
llvm/lib/CodeGen/MachineCSE.cpp
+++ b/
llvm/lib/CodeGen/MachineCSE.cpp
@@
-777,11
+777,11
@@
bool MachineCSE::isPRECandidate(MachineInstr *MI) {
MI->getNumExplicitDefs() != 1)
return false;
- for (
auto
def : MI->defs())
+ for (
const auto &
def : MI->defs())
if (!Register::isVirtualRegister(def.getReg()))
return false;
- for (
auto
use : MI->uses())
+ for (
const auto &
use : MI->uses())
if (use.isReg() && !Register::isVirtualRegister(use.getReg()))
return false;