-//===-- EmitBytecodeToAssembly.cpp - Emit bytecode to SparcV9 .s File --------==//
+//===-- EmitBytecodeToAssembly.cpp - Emit bytecode to SparcV9 .s File ------==//
//
// The LLVM Compiler Infrastructure
//
-//===-- llvm/CodeGen/MachineInstrAnnot.h ------------------------*- C++ -*-===//
+//===-- MachineInstrAnnot.h -------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
//
//===----------------------------------------------------------------------===//
//
-// Annotations used to pass information between code generation phases.
+// Annotations used to pass information between SparcV9 code generation phases.
//
//===----------------------------------------------------------------------===//
-#ifndef MACHINE_INSTR_ANNOT_h
-#define MACHINE_INSTR_ANNOT_h
+#ifndef MACHINEINSTRANNOT_H
+#define MACHINEINSTRANNOT_H
#include "llvm/CodeGen/MachineInstr.h"
#include "SparcV9RegInfo.h"
-##===- lib/Target/SparcV9/Makefile ---------------------------*- Makefile -*-===##
+##===- lib/Target/SparcV9/Makefile -------------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
-//===- MappingInfo.cpp - create LLVM info and output to .s file ---------===//
+//===- MappingInfo.cpp - create LLVM info and output to .s file -----------===//
//
// The LLVM Compiler Infrastructure
//
-//===- lib/Target/SparcV9/MappingInfo.h ---------------------------*- C++ -*-===//
+//===- lib/Target/SparcV9/MappingInfo.h -------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
-//===- SparcV9.td - Target Description for SparcV9 V9 Target ----------------===//
+//===- SparcV9.td - Target Description for SparcV9 Target -----------------===//
//
// The LLVM Compiler Infrastructure
//
//
//===----------------------------------------------------------------------===//
//
-// TODO: Need a description here.
+// TableGen target description file for the SparcV9. This is currently used
+// primarily to generate part of the SparcV9CodeEmitter automatically.
//
//===----------------------------------------------------------------------===//
-//===-- EmitAssembly.cpp - Emit SparcV9 Specific .s File ---------------------==//
+//===-- EmitAssembly.cpp - Emit SparcV9 Specific .s File -------------------==//
//
// The LLVM Compiler Infrastructure
//
-//===-- SparcV9.cpp - General implementation file for the SparcV9 Target ------===//
+//===-- SparcV9FrameInfo.cpp - Stack frame layout info for SparcV9 --------===//
//
// The LLVM Compiler Infrastructure
//
-//===-- SparcV9FrameInfo.h - Define TargetFrameInfo for SparcV9 -----*- C++ -*-===//
+//===-- SparcV9FrameInfo.h - Define TargetFrameInfo for SparcV9 -*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
-//===-- SparcInstr.def - Sparc Instruction Information -----------*- C++ -*-==//
+//===-- SparcV9Instr.def - SparcV9 Instruction Information -------*- C++ -*-==//
//
// The LLVM Compiler Infrastructure
//
-//===-- SparcV9InstrInfo.cpp ------------------------------------------------===//
+//===-- SparcV9InstrInfo.cpp - SparcV9 Instr. Selection Support Methods ---===//
//
// The LLVM Compiler Infrastructure
//
//
//===----------------------------------------------------------------------===//
//
+// This file contains various methods of the class SparcV9InstrInfo, many of
+// which appear to build canned sequences of MachineInstrs, and are
+// used in instruction selection.
+//
//===----------------------------------------------------------------------===//
#include "llvm/Constants.h"
//===----------------------------------------------------------------------===//
//
// This class contains information about individual instructions.
-// Most information is stored in the SparcV9MachineInstrDesc array above.
+// Also see the SparcV9MachineInstrDesc array, which can be found in
+// SparcV9TargetMachine.cpp.
// Other information is computed on demand, and most such functions
// default to member functions in base class TargetInstrInfo.
//
-//===-- SparcV9InstrSelection.cpp -------------------------------------------===//
+//===-- SparcV9InstrSelection.cpp -----------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
-//===-- llvm/CodeGen/SparcV9InstrSelectionSupport.h ---------------*- C++ -*-===//
+//===-- SparcV9InstrSelectionSupport.h --------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
//
//===----------------------------------------------------------------------===//
//
-// TODO: Need a description here.
+// More instruction selection support routines for the SparcV9 target.
//
//===----------------------------------------------------------------------===//
-#ifndef SPARC_INSTR_SELECTION_SUPPORT_h
-#define SPARC_INSTR_SELECTION_SUPPORT_h
+#ifndef SPARCV9INSTRSELECTIONSUPPORT_H
+#define SPARCV9INSTRSELECTIONSUPPORT_H
#include "llvm/DerivedTypes.h"
#include "SparcV9Internals.h"
-//===-- SparcV9Internals.h ----------------------------------------*- C++ -*-===//
+//===-- SparcV9Internals.h --------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
//
//===----------------------------------------------------------------------===//
-#ifndef SPARC_INTERNALS_H
-#define SPARC_INTERNALS_H
+#ifndef SPARCV9INTERNALS_H
+#define SPARCV9INTERNALS_H
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/Target/TargetMachine.h"
-//===- SparcV9JITInfo.h - SparcV9 implementation of the JIT interface -*-C++-*-===//
+//===- SparcV9JITInfo.h - SparcV9 Target JIT interface ----------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
//
//===----------------------------------------------------------------------===//
//
-// This file contains the SparcV9 implementation of the TargetJITInfo class.
+// This file contains the SparcV9 implementation of the TargetJITInfo class,
+// which makes target-specific hooks available to the target-independent
+// LLVM JIT compiler.
//
//===----------------------------------------------------------------------===//
-#ifndef SPARCJITINFO_H
-#define SPARCJITINFO_H
+#ifndef SPARCV9JITINFO_H
+#define SPARCV9JITINFO_H
#include "llvm/Target/TargetJITInfo.h"
-//===-- PeepholeOpts.cpp --------------------------------------------------===//
+//===-- SparcV9PeepholeOpts.cpp -------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
-//===- PreSelection.cpp - Specialize LLVM code for target machine ---------===//
+//===- SparcV9PreSelection.cpp - Specialize LLVM code for SparcV9 ---------===//
//
// The LLVM Compiler Infrastructure
//
//
//===----------------------------------------------------------------------===//
//
-// This file defines the PreSelection pass which specializes LLVM code for a
-// target machine, while remaining in legal portable LLVM form and
-// preserving type information and type safety. This is meant to enable
-// dataflow optimizations on target-specific operations such as accesses to
+// This file defines the PreSelection pass which specializes LLVM code for
+// the SparcV9 instruction selector, while remaining in legal portable LLVM
+// form and preserving type information and type safety. This is meant to enable
+// dataflow optimizations on SparcV9-specific operations such as accesses to
// constants, globals, and array indexing.
//
//===----------------------------------------------------------------------===//
namespace {
//===--------------------------------------------------------------------===//
- // PreSelection Pass - Specialize LLVM code for the current target machine.
+ // PreSelection Pass - Specialize LLVM code for the SparcV9 instr. selector.
//
class PreSelection : public FunctionPass, public InstVisitor<PreSelection> {
const TargetInstrInfo &instrInfo;
-//===-- PrologEpilogCodeInserter.cpp - Insert Prolog & Epilog code for fn -===//
+//===-- SparcV9PrologEpilogCodeInserter.cpp - Insert Fn Prolog & Epilog ---===//
//
// The LLVM Compiler Infrastructure
//
-//===-- SparcV9RegClassInfo.cpp - Register class def'ns for SparcV9 -----------===//
+//===-- SparcV9RegClassInfo.cpp - Register class def'ns for SparcV9 -------===//
//
// The LLVM Compiler Infrastructure
//
//
//===----------------------------------------------------------------------===//
//
-// This file defines the register classes used by the SparcV9 target description.
+// This file defines the methods used by the SparcV9 register allocator
+// to pick registers of various classes. Most of this code should be
+// considered part of the register allocator.
//
//===----------------------------------------------------------------------===//
-//===-- SparcV9RegClassInfo.h - Register class def'ns for SparcV9 ---*- C++ -*-===//
+//===-- SparcV9RegClassInfo.h - Register class def'ns for SparcV9 -*- C++ -*-=//
//
// The LLVM Compiler Infrastructure
//
//
//===----------------------------------------------------------------------===//
//
-// This file defines the register classes used by the SparcV9 target description.
+// This file defines the register classes used by the SparcV9 target. It
+// implicitly defines (using enums) the "class register numbers" used in
+// the SparcV9 target, which are converted using a formula in the TargetRegInfo
+// class to "unified register numbers".
//
//===----------------------------------------------------------------------===//
-//===-- SparcV9RegInfo.cpp - SparcV9 Target Register Information --------------===//
+//===-- SparcV9RegInfo.cpp - SparcV9 Target Register Information ----------===//
//
// The LLVM Compiler Infrastructure
//
//
//===----------------------------------------------------------------------===//
//
-// This file contains implementation of SparcV9 specific helper methods
+// This file contains implementations of SparcV9 specific helper methods
// used for register allocation.
//
//===----------------------------------------------------------------------===//
-//===-- UltraSparcV9SchedInfo.cpp -------------------------------------------===//
+//===-- SparcV9SchedInfo.cpp ----------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
//
//===----------------------------------------------------------------------===//
//
-// Describe the scheduling characteristics of the UltraSparcV9
+// Describe the scheduling characteristics of the UltraSparc IIi.
//
//===----------------------------------------------------------------------===//
-//===- StackSlots.cpp - Specialize LLVM code for target machine ----------===//
+//===- SparcV9StackSlots.cpp - Add empty stack slots to functions ---------===//
//
// The LLVM Compiler Infrastructure
//
-//===-- SparcV9.cpp - General implementation file for the SparcV9 Target ------===//
+//===-- SparcV9TargetMachine.cpp - SparcV9 Target Machine Implementation --===//
//
// The LLVM Compiler Infrastructure
//
-//===-- SparcV9TargetMachine.h - Define TargetMachine for SparcV9 ---*- C++ -*-===//
+//===-- SparcV9TargetMachine.h - Define TargetMachine for SparcV9 -*- C++ -*-=//
//
// The LLVM Compiler Infrastructure
//
//
//===----------------------------------------------------------------------===//
//
-// This file declares the top-level UltraSPARC target machine.
+// This file declares the top-level SparcV9 target machine.
//
//===----------------------------------------------------------------------===//
-#ifndef SPARC_TARGETMACHINE_H
-#define SPARC_TARGETMACHINE_H
+#ifndef SPARCV9TARGETMACHINE_H
+#define SPARCV9TARGETMACHINE_H
#include "llvm/Target/TargetFrameInfo.h"
#include "llvm/Target/TargetMachine.h"
-//===- SparcV9_F2.td - Format 2 instructions: SparcV9 V9 Target -------------===//
+//===- SparcV9_F2.td - Format 2 instructions: SparcV9 Target --------------===//
//
// The LLVM Compiler Infrastructure
//
-//===- SparcV9_F3.td - Format 3 Instructions: SparcV9 V9 Target -------------===//
+//===- SparcV9_F3.td - Format 3 Instructions: SparcV9 Target --------------===//
//
// The LLVM Compiler Infrastructure
//
-//===- SparcV9_F4.td - Format 4 instructions: SparcV9 V9 Target -------------===//
+//===- SparcV9_F4.td - Format 4 instructions: SparcV9 Target --------------===//
//
// The LLVM Compiler Infrastructure
//
-//===- SparcV9_Reg.td - SparcV9 V9 Register definitions ---------------------===//
+//===- SparcV9_Reg.td - SparcV9 Register definitions ----------------------===//
//
// The LLVM Compiler Infrastructure
//