diff options
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/InstrSelection/InstrForest.cpp | 19 | ||||
-rw-r--r-- | lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp | 16 | ||||
-rw-r--r-- | lib/CodeGen/MachineInstr.cpp | 17 | ||||
-rw-r--r-- | lib/CodeGen/MachineInstrAnnot.cpp | 15 |
4 files changed, 16 insertions, 51 deletions
diff --git a/lib/CodeGen/InstrSelection/InstrForest.cpp b/lib/CodeGen/InstrSelection/InstrForest.cpp index cf355a57bd..d7edf1575b 100644 --- a/lib/CodeGen/InstrSelection/InstrForest.cpp +++ b/lib/CodeGen/InstrSelection/InstrForest.cpp @@ -1,12 +1,5 @@ -// $Id$ -//--------------------------------------------------------------------------- -// File: -// InstrForest.cpp -// -// Purpose: -// Convert SSA graph to instruction trees for instruction selection. -// -// Strategy: +//===-- InstrForest.cpp - Build instruction forest for inst selection -----===// +// // The key goal is to group instructions into a single // tree if one or more of them might be potentially combined into a single // complex instruction in the target machine. @@ -17,7 +10,7 @@ // and (2) O and I are part of the same basic block, // and (3) O has only a single use, viz., I. // -//--------------------------------------------------------------------------- +//===----------------------------------------------------------------------===// #include "llvm/CodeGen/InstrForest.h" #include "llvm/CodeGen/MachineCodeForInstruction.h" @@ -28,8 +21,6 @@ #include "llvm/Type.h" #include "llvm/CodeGen/MachineInstr.h" #include "Support/STLExtras.h" -#include <alloca.h> -#include <iostream> using std::cerr; using std::vector; @@ -127,10 +118,10 @@ InstructionNode::dumpNode(int indent) const const MachineCodeForInstruction &mvec = MachineCodeForInstruction::get(getInstruction()); - if (mvec.size() > 0) + if (!mvec.empty()) cerr << "\tMachine Instructions: "; - for (unsigned int i=0; i < mvec.size(); ++i) { + for (unsigned i = 0; i < mvec.size(); ++i) { mvec[i]->dump(); if (i < mvec.size() - 1) cerr << "; "; diff --git a/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp b/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp index e4a188ec35..914fec3576 100644 --- a/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp +++ b/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp @@ -1,14 +1,9 @@ -//*************************************************************************** -// File: -// InstrSelectionSupport.h +//===-- InstrSelectionSupport.cpp -----------------------------------------===// +// +// Target-independent instruction selection code. See SparcInstrSelection.cpp +// for usage. // -// Purpose: -// Target-independent instruction selection code. -// See SparcInstrSelection.cpp for usage. -// -// History: -// 10/10/01 - Vikram Adve - Created -//**************************************************************************/ +//===----------------------------------------------------------------------===// #include "llvm/CodeGen/InstrSelectionSupport.h" #include "llvm/CodeGen/InstrSelection.h" @@ -21,7 +16,6 @@ #include "llvm/Target/MachineRegInfo.h" #include "llvm/Constants.h" #include "llvm/Function.h" -#include "llvm/BasicBlock.h" #include "llvm/Type.h" #include "llvm/iMemory.h" using std::vector; diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp index 124c28a2d9..79034113fc 100644 --- a/lib/CodeGen/MachineInstr.cpp +++ b/lib/CodeGen/MachineInstr.cpp @@ -1,25 +1,12 @@ -// $Id$ -//*************************************************************************** -// File: -// MachineInstr.cpp +//===-- MachineInstr.cpp --------------------------------------------------===// // -// Purpose: -// -// -// Strategy: -// -// History: -// 7/2/01 - Vikram Adve - Created -//**************************************************************************/ +//===----------------------------------------------------------------------===// #include "llvm/CodeGen/MachineInstr.h" #include "llvm/Value.h" -#include <iostream> using std::cerr; -//************************ Class Implementations **************************/ - // Constructor for instructions with fixed #operands (nearly all) MachineInstr::MachineInstr(MachineOpCode _opCode, OpCodeMask _opCodeMask) diff --git a/lib/CodeGen/MachineInstrAnnot.cpp b/lib/CodeGen/MachineInstrAnnot.cpp index c5c0c3fe09..960c49283e 100644 --- a/lib/CodeGen/MachineInstrAnnot.cpp +++ b/lib/CodeGen/MachineInstrAnnot.cpp @@ -1,20 +1,13 @@ -// $Id$ -*-c++-*- -//*************************************************************************** -// File: -// MachineInstrAnnot.cpp +//===-- MachineInstrAnnot.cpp ---------------------------------------------===// // -// Purpose: -// Annotations used to pass information between code generation phases. +// This file defines Annotations used to pass information between code +// generation phases. // -// History: -// 5/10/02 - Vikram Adve - Created -//**************************************************************************/ +//===----------------------------------------------------------------------===// #include "llvm/CodeGen/MachineInstrAnnot.h" #include "llvm/Annotation.h" #include "llvm/iOther.h" -#include <vector> - AnnotationID CallArgsDescriptor::AID(AnnotationManager:: getID("CodeGen::CallArgsDescriptor")); |