summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2016-01-08 01:06:00 +0000
committerDan Gohman <dan433584@gmail.com>2016-01-08 01:06:00 +0000
commit35e4a289478177dcdee6523c024626315757fdc3 (patch)
treecd592c70ab9c5de63f335f396b4a83ddc25269c4 /llvm/lib
parent8633eedb301a8618ddb4387ca4edd32b34bf3796 (diff)
downloadbcm5719-llvm-35e4a289478177dcdee6523c024626315757fdc3.tar.gz
bcm5719-llvm-35e4a289478177dcdee6523c024626315757fdc3.zip
[WebAssembly] Minor code cleanups. NFC.
llvm-svn: 257128
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/WebAssembly/CMakeLists.txt2
-rw-r--r--llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h6
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp6
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp3
4 files changed, 6 insertions, 11 deletions
diff --git a/llvm/lib/Target/WebAssembly/CMakeLists.txt b/llvm/lib/Target/WebAssembly/CMakeLists.txt
index 284a7d91bc6..af8b934718d 100644
--- a/llvm/lib/Target/WebAssembly/CMakeLists.txt
+++ b/llvm/lib/Target/WebAssembly/CMakeLists.txt
@@ -40,5 +40,5 @@ add_llvm_target(WebAssemblyCodeGen
add_dependencies(LLVMWebAssemblyCodeGen intrinsics_gen)
add_subdirectory(InstPrinter)
-add_subdirectory(TargetInfo)
add_subdirectory(MCTargetDesc)
+add_subdirectory(TargetInfo)
diff --git a/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h b/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h
index edb2dbd1cfc..1d3a7078a45 100644
--- a/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h
+++ b/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h
@@ -19,20 +19,14 @@
namespace llvm {
-class formatted_raw_ostream;
class MCAsmBackend;
class MCCodeEmitter;
class MCContext;
class MCInstrInfo;
-class MCRegisterInfo;
class MCObjectWriter;
-class MCStreamer;
class MCSubtargetInfo;
-class MCTargetStreamer;
-class StringRef;
class Target;
class Triple;
-class raw_ostream;
class raw_pwrite_stream;
extern Target TheWebAssemblyTarget32;
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
index 0d2b4d9debb..6c1ef40b0cc 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
@@ -90,9 +90,9 @@ private:
MVT WebAssemblyAsmPrinter::getRegType(unsigned RegNo) const {
const TargetRegisterClass *TRC =
- TargetRegisterInfo::isVirtualRegister(RegNo) ?
- MRI->getRegClass(RegNo) :
- MRI->getTargetRegisterInfo()->getMinimalPhysRegClass(RegNo);
+ TargetRegisterInfo::isVirtualRegister(RegNo)
+ ? MRI->getRegClass(RegNo)
+ : MRI->getTargetRegisterInfo()->getMinimalPhysRegClass(RegNo);
for (MVT T : {MVT::i32, MVT::i64, MVT::f32, MVT::f64})
if (TRC->hasType(T))
return T;
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
index e9671ee07e6..0080dc09e8a 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
@@ -256,7 +256,8 @@ static void SortBlocks(MachineFunction &MF, const MachineLoopInfo &MLI) {
/// code) for a branch instruction to both branch to a block and fallthrough
/// to it, so we check the actual branch operands to see if there are any
/// explicit mentions.
-static bool ExplicitlyBranchesTo(MachineBasicBlock *Pred, MachineBasicBlock *MBB) {
+static bool ExplicitlyBranchesTo(MachineBasicBlock *Pred,
+ MachineBasicBlock *MBB) {
for (MachineInstr &MI : Pred->terminators())
for (MachineOperand &MO : MI.explicit_operands())
if (MO.isMBB() && MO.getMBB() == MBB)
OpenPOWER on IntegriCloud