diff options
author | Matthias Braun <matze@braunis.de> | 2015-08-24 22:59:52 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2015-08-24 22:59:52 +0000 |
commit | b2b7ef1de8118095963e1c085467fc411bd7e56f (patch) | |
tree | 10da40c76c37d53e59e8197182bd65cfffde9301 /llvm/lib/CodeGen/MachineLICM.cpp | |
parent | 008ff14acf9ce39d855dbeeb622e0598bbad0d93 (diff) | |
download | llvm-b2b7ef1de8118095963e1c085467fc411bd7e56f.zip llvm-b2b7ef1de8118095963e1c085467fc411bd7e56f.tar.gz llvm-b2b7ef1de8118095963e1c085467fc411bd7e56f.tar.bz2 |
MachineBasicBlock: Add liveins() method returning an iterator_range
llvm-svn: 245895
Diffstat (limited to 'llvm/lib/CodeGen/MachineLICM.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineLICM.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/MachineLICM.cpp b/llvm/lib/CodeGen/MachineLICM.cpp index 3a6f9ea..ebef22e 100644 --- a/llvm/lib/CodeGen/MachineLICM.cpp +++ b/llvm/lib/CodeGen/MachineLICM.cpp @@ -534,10 +534,8 @@ void MachineLICM::HoistRegionPostRA() { // Conservatively treat live-in's as an external def. // FIXME: That means a reload that're reused in successor block(s) will not // be LICM'ed. - for (MachineBasicBlock::livein_iterator I = BB->livein_begin(), - E = BB->livein_end(); I != E; ++I) { - unsigned Reg = *I; - for (MCRegAliasIterator AI(Reg, TRI, true); AI.isValid(); ++AI) + for (unsigned LI : BB->liveins()) { + for (MCRegAliasIterator AI(LI, TRI, true); AI.isValid(); ++AI) PhysRegDefs.set(*AI); } |