diff options
author | Eugene Zelenko <eugene.zelenko@gmail.com> | 2017-09-13 21:15:20 +0000 |
---|---|---|
committer | Eugene Zelenko <eugene.zelenko@gmail.com> | 2017-09-13 21:15:20 +0000 |
commit | 618c555bbefd2c73a874590deeb952df08a7af8e (patch) | |
tree | 20c165031da3f6927a5a5d63257b681dbac88d2e /llvm/lib/CodeGen/RegisterScavenging.cpp | |
parent | 44550600f295b4bd3486da95507d37c600d1539e (diff) | |
download | bcm5719-llvm-618c555bbefd2c73a874590deeb952df08a7af8e.tar.gz bcm5719-llvm-618c555bbefd2c73a874590deeb952df08a7af8e.zip |
[CodeGen] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 313194
Diffstat (limited to 'llvm/lib/CodeGen/RegisterScavenging.cpp')
-rw-r--r-- | llvm/lib/CodeGen/RegisterScavenging.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/RegisterScavenging.cpp b/llvm/lib/CodeGen/RegisterScavenging.cpp index fc5105aadbf..fdd10edf07f 100644 --- a/llvm/lib/CodeGen/RegisterScavenging.cpp +++ b/llvm/lib/CodeGen/RegisterScavenging.cpp @@ -16,18 +16,20 @@ //===----------------------------------------------------------------------===// #include "llvm/CodeGen/RegisterScavenging.h" - +#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/BitVector.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Statistic.h" +#include "llvm/CodeGen/LiveRegUnits.h" #include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/CodeGen/MachineFunction.h" +#include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineInstr.h" #include "llvm/CodeGen/MachineOperand.h" #include "llvm/CodeGen/MachineRegisterInfo.h" #include "llvm/MC/MCRegisterInfo.h" -#include "llvm/PassSupport.h" +#include "llvm/Pass.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" @@ -40,6 +42,7 @@ #include <iterator> #include <limits> #include <string> +#include <utility> using namespace llvm; @@ -769,13 +772,16 @@ void llvm::scavengeFrameVirtualRegs(MachineFunction &MF, RegScavenger &RS) { } namespace { + /// This class runs register scavenging independ of the PrologEpilogInserter. /// This is used in for testing. class ScavengerTest : public MachineFunctionPass { public: static char ID; + ScavengerTest() : MachineFunctionPass(ID) {} - bool runOnMachineFunction(MachineFunction &MF) { + + bool runOnMachineFunction(MachineFunction &MF) override { const TargetSubtargetInfo &STI = MF.getSubtarget(); const TargetFrameLowering &TFL = *STI.getFrameLowering(); @@ -792,9 +798,10 @@ public: return true; } }; -char ScavengerTest::ID; } // end anonymous namespace +char ScavengerTest::ID; + INITIALIZE_PASS(ScavengerTest, "scavenger-test", "Scavenge virtual registers inside basic blocks", false, false) |