From db46bec410ba0dd04c8371195e1080eb1104ca8d Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Mon, 6 Feb 2012 10:19:29 +0000 Subject: [PATCH] Hexagon: Remove forbidden iostream includes (it introduces static initializers) Reorder includes while at it. llvm-svn: 149863 --- lib/Target/Hexagon/HexagonCFGOptimizer.cpp | 15 +++----- .../Hexagon/HexagonExpandPredSpillCode.cpp | 22 ++++------- lib/Target/Hexagon/HexagonFrameLowering.cpp | 31 ++++++++-------- lib/Target/Hexagon/HexagonInstrInfo.cpp | 9 ++--- lib/Target/Hexagon/HexagonRegisterInfo.cpp | 17 ++++----- lib/Target/Hexagon/HexagonRemoveSZExtArgs.cpp | 11 ++---- .../Hexagon/HexagonSplitTFRCondSets.cpp | 37 ++++++++----------- lib/Target/Hexagon/HexagonTargetMachine.cpp | 5 +-- 8 files changed, 60 insertions(+), 87 deletions(-) diff --git a/lib/Target/Hexagon/HexagonCFGOptimizer.cpp b/lib/Target/Hexagon/HexagonCFGOptimizer.cpp index 38000e7806c..433d71c9380 100644 --- a/lib/Target/Hexagon/HexagonCFGOptimizer.cpp +++ b/lib/Target/Hexagon/HexagonCFGOptimizer.cpp @@ -6,27 +6,22 @@ // //===----------------------------------------------------------------------===// - #define DEBUG_TYPE "hexagon_cfg" -#include "llvm/CodeGen/Passes.h" +#include "HexagonTargetMachine.h" +#include "HexagonSubtarget.h" +#include "HexagonMachineFunctionInfo.h" #include "llvm/CodeGen/MachineDominators.h" #include "llvm/CodeGen/MachineFunctionPass.h" +#include "llvm/CodeGen/MachineInstrBuilder.h" #include "llvm/CodeGen/MachineLoopInfo.h" #include "llvm/CodeGen/MachineRegisterInfo.h" +#include "llvm/CodeGen/Passes.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetRegisterInfo.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" -#include "llvm/ADT/Statistic.h" #include "llvm/Support/MathExtras.h" -#include "llvm/CodeGen/MachineInstrBuilder.h" -#include "HexagonTargetMachine.h" -#include "HexagonSubtarget.h" -#include "HexagonMachineFunctionInfo.h" -#include - -#include "llvm/Support/CommandLine.h" using namespace llvm; diff --git a/lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp b/lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp index 965d482acfe..f2f60c56e48 100644 --- a/lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp +++ b/lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp @@ -1,4 +1,4 @@ -//===--- HexagonExpandPredSpillCode.cpp - Expand Predicate Spill Code ----===// +//===- HexagonExpandPredSpillCode.cpp - Expand Predicate Spill Code -------===// // // The LLVM Compiler Infrastructure // @@ -17,31 +17,25 @@ // //===----------------------------------------------------------------------===// - -#include "llvm/CodeGen/Passes.h" +#include "HexagonTargetMachine.h" +#include "HexagonSubtarget.h" +#include "HexagonMachineFunctionInfo.h" +#include "llvm/ADT/Statistic.h" #include "llvm/CodeGen/LatencyPriorityQueue.h" -#include "llvm/CodeGen/SchedulerRegistry.h" #include "llvm/CodeGen/MachineDominators.h" #include "llvm/CodeGen/MachineFunctionPass.h" +#include "llvm/CodeGen/MachineInstrBuilder.h" #include "llvm/CodeGen/MachineLoopInfo.h" #include "llvm/CodeGen/MachineRegisterInfo.h" +#include "llvm/CodeGen/Passes.h" #include "llvm/CodeGen/ScheduleHazardRecognizer.h" +#include "llvm/CodeGen/SchedulerRegistry.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetRegisterInfo.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" -#include "llvm/ADT/Statistic.h" #include "llvm/Support/MathExtras.h" -#include "llvm/CodeGen/MachineInstrBuilder.h" -#include "HexagonTargetMachine.h" -#include "HexagonSubtarget.h" -#include "HexagonMachineFunctionInfo.h" -#include -#include - -#include "llvm/Support/CommandLine.h" - using namespace llvm; diff --git a/lib/Target/Hexagon/HexagonFrameLowering.cpp b/lib/Target/Hexagon/HexagonFrameLowering.cpp index 78e0b1ced38..326903ad24a 100644 --- a/lib/Target/Hexagon/HexagonFrameLowering.cpp +++ b/lib/Target/Hexagon/HexagonFrameLowering.cpp @@ -1,4 +1,4 @@ -//==-- HexagonFrameLowering.cpp - Define frame lowering --*- C++ -*-==// +//===- HexagonFrameLowering.cpp - Define frame lowering -------------------===// // // The LLVM Compiler Infrastructure // @@ -7,6 +7,7 @@ // // //===----------------------------------------------------------------------===// + #include "Hexagon.h" #include "HexagonInstrInfo.h" #include "HexagonRegisterInfo.h" @@ -14,27 +15,25 @@ #include "HexagonTargetMachine.h" #include "HexagonMachineFunctionInfo.h" #include "HexagonFrameLowering.h" - -#include "llvm/CodeGen/AsmPrinter.h" -#include "llvm/CodeGen/MachineInstrBuilder.h" -#include "llvm/CodeGen/MachineModuleInfo.h" -#include "llvm/CodeGen/MachineFunction.h" -#include "llvm/CodeGen/MachineFrameInfo.h" -#include "llvm/CodeGen/MachineRegisterInfo.h" -#include "llvm/MC/MachineLocation.h" -#include "llvm/MC/MCAsmInfo.h" -#include "llvm/CodeGen/RegisterScavenging.h" -#include "llvm/Target/TargetInstrInfo.h" +#include "llvm/Function.h" #include "llvm/Type.h" #include "llvm/ADT/BitVector.h" #include "llvm/ADT/STLExtras.h" -#include "llvm/Support/CommandLine.h" +#include "llvm/CodeGen/AsmPrinter.h" +#include "llvm/CodeGen/MachineInstrBuilder.h" +#include "llvm/CodeGen/MachineFunction.h" +#include "llvm/CodeGen/MachineFunctionPass.h" +#include "llvm/CodeGen/MachineFrameInfo.h" +#include "llvm/CodeGen/MachineModuleInfo.h" +#include "llvm/CodeGen/MachineRegisterInfo.h" +#include "llvm/CodeGen/RegisterScavenging.h" +#include "llvm/MC/MachineLocation.h" +#include "llvm/MC/MCAsmInfo.h" +#include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetOptions.h" -#include +#include "llvm/Support/CommandLine.h" -#include "llvm/CodeGen/MachineFunctionPass.h" -#include "llvm/Function.h" using namespace llvm; static cl::opt DisableDeallocRet( diff --git a/lib/Target/Hexagon/HexagonInstrInfo.cpp b/lib/Target/Hexagon/HexagonInstrInfo.cpp index a346cd7c09d..e83da50569a 100644 --- a/lib/Target/Hexagon/HexagonInstrInfo.cpp +++ b/lib/Target/Hexagon/HexagonInstrInfo.cpp @@ -1,4 +1,4 @@ -//=- HexagonInstrInfo.cpp - Hexagon Instruction Information -------*- C++ -*-=// +//===- HexagonInstrInfo.cpp - Hexagon Instruction Information -------------===// // // The LLVM Compiler Infrastructure // @@ -15,22 +15,19 @@ #include "HexagonInstrInfo.h" #include "HexagonSubtarget.h" #include "Hexagon.h" -#include "llvm/Support/MathExtras.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallVector.h" +#include "llvm/CodeGen/DFAPacketizer.h" #include "llvm/CodeGen/MachineInstrBuilder.h" #include "llvm/CodeGen/MachineRegisterInfo.h" #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/CodeGen/MachineMemOperand.h" #include "llvm/CodeGen/PseudoSourceValue.h" +#include "llvm/Support/MathExtras.h" #define GET_INSTRINFO_CTOR -#include "llvm/CodeGen/DFAPacketizer.h" #include "HexagonGenInstrInfo.inc" #include "HexagonGenDFAPacketizer.inc" -#include - - using namespace llvm; /// diff --git a/lib/Target/Hexagon/HexagonRegisterInfo.cpp b/lib/Target/Hexagon/HexagonRegisterInfo.cpp index 256f8b4cd94..31377a6cd29 100644 --- a/lib/Target/Hexagon/HexagonRegisterInfo.cpp +++ b/lib/Target/Hexagon/HexagonRegisterInfo.cpp @@ -1,4 +1,4 @@ -//==- HexagonRegisterInfo.cpp - Hexagon Register Information -----*- C++ -*-==// +//===- HexagonRegisterInfo.cpp - Hexagon Register Information -------------===// // // The LLVM Compiler Infrastructure // @@ -17,24 +17,23 @@ #include "HexagonSubtarget.h" #include "HexagonTargetMachine.h" #include "HexagonMachineFunctionInfo.h" +#include "llvm/Function.h" +#include "llvm/Type.h" +#include "llvm/ADT/BitVector.h" +#include "llvm/ADT/STLExtras.h" #include "llvm/CodeGen/MachineInstrBuilder.h" #include "llvm/CodeGen/MachineFunction.h" +#include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/CodeGen/MachineRegisterInfo.h" #include "llvm/CodeGen/RegisterScavenging.h" #include "llvm/MC/MachineLocation.h" #include "llvm/Target/TargetInstrInfo.h" -#include "llvm/Type.h" -#include "llvm/ADT/BitVector.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/Support/CommandLine.h" -#include "llvm/Support/ErrorHandling.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetOptions.h" -#include +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/ErrorHandling.h" -#include "llvm/CodeGen/MachineFunctionPass.h" -#include "llvm/Function.h" using namespace llvm; diff --git a/lib/Target/Hexagon/HexagonRemoveSZExtArgs.cpp b/lib/Target/Hexagon/HexagonRemoveSZExtArgs.cpp index 3ca257fc62c..66a00e12dd0 100644 --- a/lib/Target/Hexagon/HexagonRemoveSZExtArgs.cpp +++ b/lib/Target/Hexagon/HexagonRemoveSZExtArgs.cpp @@ -1,4 +1,4 @@ -//=- HexagonRemoveExtendArgs.cpp - Remove unecessary argument sign extends --=// +//===- HexagonRemoveExtendArgs.cpp - Remove unecessary argument sign extends =// // // The LLVM Compiler Infrastructure // @@ -12,15 +12,12 @@ // //===----------------------------------------------------------------------===// - - -#include "llvm/Pass.h" +#include "HexagonTargetMachine.h" #include "llvm/Function.h" #include "llvm/Instructions.h" -#include "llvm/Transforms/Scalar.h" +#include "llvm/Pass.h" #include "llvm/CodeGen/MachineFunctionAnalysis.h" -#include "HexagonTargetMachine.h" -#include +#include "llvm/Transforms/Scalar.h" using namespace llvm; namespace { diff --git a/lib/Target/Hexagon/HexagonSplitTFRCondSets.cpp b/lib/Target/Hexagon/HexagonSplitTFRCondSets.cpp index f4d3647dea8..083091c1959 100644 --- a/lib/Target/Hexagon/HexagonSplitTFRCondSets.cpp +++ b/lib/Target/Hexagon/HexagonSplitTFRCondSets.cpp @@ -27,31 +27,24 @@ //===----------------------------------------------------------------------===// #define DEBUG_TYPE "xfer" -#include "llvm/CodeGen/Passes.h" -#include "llvm/CodeGen/LatencyPriorityQueue.h" -#include "llvm/CodeGen/SchedulerRegistry.h" -#include "llvm/CodeGen/MachineDominators.h" -#include "llvm/CodeGen/MachineFunctionPass.h" -#include "llvm/CodeGen/MachineLoopInfo.h" -#include "llvm/CodeGen/MachineRegisterInfo.h" -#include "llvm/CodeGen/ScheduleHazardRecognizer.h" -#include "llvm/Target/TargetMachine.h" -#include "llvm/Target/TargetInstrInfo.h" -#include "llvm/Target/TargetRegisterInfo.h" -#include "llvm/Support/Compiler.h" -#include "llvm/Support/Debug.h" -#include "llvm/ADT/Statistic.h" -#include "llvm/Support/MathExtras.h" -#include "llvm/CodeGen/MachineInstrBuilder.h" #include "HexagonTargetMachine.h" #include "HexagonSubtarget.h" #include "HexagonMachineFunctionInfo.h" -#include -#include - -#include "llvm/Support/CommandLine.h" -#define DEBUG_TYPE "xfer" - +#include "llvm/CodeGen/Passes.h" +#include "llvm/CodeGen/LatencyPriorityQueue.h" +#include "llvm/CodeGen/MachineDominators.h" +#include "llvm/CodeGen/MachineFunctionPass.h" +#include "llvm/CodeGen/MachineInstrBuilder.h" +#include "llvm/CodeGen/MachineLoopInfo.h" +#include "llvm/CodeGen/MachineRegisterInfo.h" +#include "llvm/CodeGen/ScheduleHazardRecognizer.h" +#include "llvm/CodeGen/SchedulerRegistry.h" +#include "llvm/Target/TargetInstrInfo.h" +#include "llvm/Target/TargetMachine.h" +#include "llvm/Target/TargetRegisterInfo.h" +#include "llvm/Support/Compiler.h" +#include "llvm/Support/Debug.h" +#include "llvm/Support/MathExtras.h" using namespace llvm; diff --git a/lib/Target/Hexagon/HexagonTargetMachine.cpp b/lib/Target/Hexagon/HexagonTargetMachine.cpp index 360446ad59a..fb55f7d1fe8 100644 --- a/lib/Target/Hexagon/HexagonTargetMachine.cpp +++ b/lib/Target/Hexagon/HexagonTargetMachine.cpp @@ -1,4 +1,4 @@ -//===-- HexagonTargetMachine.cpp - Define TargetMachine for Hexagon -------===// +//===- HexagonTargetMachine.cpp - Define TargetMachine for Hexagon --------===// // // The LLVM Compiler Infrastructure // @@ -16,11 +16,10 @@ #include "llvm/Module.h" #include "llvm/CodeGen/Passes.h" #include "llvm/PassManager.h" -#include "llvm/Support/CommandLine.h" #include "llvm/Transforms/IPO/PassManagerBuilder.h" #include "llvm/Transforms/Scalar.h" +#include "llvm/Support/CommandLine.h" #include "llvm/Support/TargetRegistry.h" -#include using namespace llvm;