From 1a52e13cf6a219fd79bd4e600eb70ab6220bc056 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Mon, 20 Apr 2020 14:33:21 +0100 Subject: [PATCH] MIRVRegNamerUtils.h - remove unnecessary includes. NFC. Replace with forward declarations or push down to MIRVRegNamerUtils.cpp where necessary. --- lib/CodeGen/MIRVRegNamerUtils.cpp | 2 ++ lib/CodeGen/MIRVRegNamerUtils.h | 18 +++++++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/lib/CodeGen/MIRVRegNamerUtils.cpp b/lib/CodeGen/MIRVRegNamerUtils.cpp index 004abc8a6ab..9b45a0d5669 100644 --- a/lib/CodeGen/MIRVRegNamerUtils.cpp +++ b/lib/CodeGen/MIRVRegNamerUtils.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// #include "MIRVRegNamerUtils.h" +#include "llvm/CodeGen/MachineRegisterInfo.h" +#include "llvm/IR/Constants.h" #include "llvm/Support/Debug.h" using namespace llvm; diff --git a/lib/CodeGen/MIRVRegNamerUtils.h b/lib/CodeGen/MIRVRegNamerUtils.h index 0c0a71a1324..a059bc5333c 100644 --- a/lib/CodeGen/MIRVRegNamerUtils.h +++ b/lib/CodeGen/MIRVRegNamerUtils.h @@ -17,15 +17,18 @@ #ifndef LLVM_LIB_CODEGEN_MIRVREGNAMERUTILS_H #define LLVM_LIB_CODEGEN_MIRVREGNAMERUTILS_H -#include "llvm/ADT/PostOrderIterator.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/CodeGen/MachineFunctionPass.h" -#include "llvm/CodeGen/MachineInstrBuilder.h" -#include "llvm/CodeGen/MachineRegisterInfo.h" -#include "llvm/CodeGen/Passes.h" -#include "llvm/Support/raw_ostream.h" +#include "llvm/CodeGen/Register.h" +#include +#include +#include namespace llvm { + +class MachineBasicBlock; +class MachineInstr; +class MachineRegisterInfo; +class StringRef; + /// VRegRenamer - This class is used for renaming vregs in a machine basic /// block according to semantics of the instruction. class VRegRenamer { @@ -71,6 +74,7 @@ class VRegRenamer { /// Create a vreg with name and return it. unsigned createVirtualRegisterWithLowerName(unsigned VReg, StringRef Name); + /// Linearly traverse the MachineBasicBlock and rename each instruction's /// vreg definition based on the semantics of the instruction. /// Names are as follows bb_hash_[0-9]+