-//===-- AMDGPU.h - TODO: Add brief description -------===//
+//===-- AMDGPU.h - MachineFunction passes hw codegen --------------*- C++ -*-=//
//
// The LLVM Compiler Infrastructure
//
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
-//
-// TODO: Add full description
-//
-//===----------------------------------------------------------------------===//
#ifndef AMDGPU_H
#define AMDGPU_H
#include "llvm/Target/TargetMachine.h"
namespace llvm {
- class FunctionPass;
- class AMDGPUTargetMachine;
-
- FunctionPass *createR600CodeEmitterPass(formatted_raw_ostream &OS);
- FunctionPass *createR600LowerInstructionsPass(TargetMachine &tm);
- FunctionPass *createSIAssignInterpRegsPass(TargetMachine &tm);
- FunctionPass *createSIInitMachineFunctionInfoPass(TargetMachine &tm);
- FunctionPass *createSILowerShaderInstructionsPass(TargetMachine &tm);
- FunctionPass *createSIPropagateImmReadsPass(TargetMachine &tm);
- FunctionPass *createSICodeEmitterPass(formatted_raw_ostream &OS);
+class FunctionPass;
+class AMDGPUTargetMachine;
- FunctionPass *createAMDGPULowerInstructionsPass(TargetMachine &tm);
+// R600 Passes
+FunctionPass *createR600CodeEmitterPass(formatted_raw_ostream &OS);
+FunctionPass *createR600LowerInstructionsPass(TargetMachine &tm);
- FunctionPass *createAMDGPUDelimitInstGroupsPass(TargetMachine &tm);
+// SI Passes
+FunctionPass *createSIAssignInterpRegsPass(TargetMachine &tm);
+FunctionPass *createSILowerShaderInstructionsPass(TargetMachine &tm);
+FunctionPass *createSIPropagateImmReadsPass(TargetMachine &tm);
+FunctionPass *createSICodeEmitterPass(formatted_raw_ostream &OS);
- FunctionPass *createAMDGPUConvertToISAPass(TargetMachine &tm);
+// Passes common to R600 and SI
+FunctionPass *createAMDGPULowerInstructionsPass(TargetMachine &tm);
+FunctionPass *createAMDGPUConvertToISAPass(TargetMachine &tm);
- FunctionPass *createAMDGPUFixRegClassesPass(TargetMachine &tm);
+} // End namespace llvm
-} /* End namespace llvm */
-#endif /* AMDGPU_H */
+#endif // AMDGPU_H
virtual bool runOnMachineFunction(MachineFunction &MF);
};
-} /* End anonymous namespace */
+} // End anonymous namespace
char AMDGPUConvertToISAPass::ID = 0;
-//===-- AMDGPUISelLowering.cpp - TODO: Add brief description -------===//
+//===-- AMDGPUISelLowering.cpp - AMDGPU Common DAG lowering functions -----===//
//
// The LLVM Compiler Infrastructure
//
//
//===----------------------------------------------------------------------===//
//
-// TODO: Add full description
+// This is the parent TargetLowering class for hardware code gen targets.
//
//===----------------------------------------------------------------------===//
-//===-- AMDGPUISelLowering.h - TODO: Add brief description -------===//
+//===-- AMDGPUISelLowering.h - AMDGPU Lowering Interface --------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
//
//===----------------------------------------------------------------------===//
//
-// TODO: Add full description
+// This file contains the interface defintiion of the TargetLowering class
+// that is common to all AMD GPUs.
//
//===----------------------------------------------------------------------===//
-//===-- AMDGPUInstrInfo.h - TODO: Add brief description -------===//
+//===-- AMDGPUInstrInfo.h - AMDGPU Instruction Information ------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
//
//===----------------------------------------------------------------------===//
//
-// TODO: Add full description
+// This file contains the definitoin of a TargetInstrInfo class that is common
+// to all AMD GPUs.
//
//===----------------------------------------------------------------------===//
namespace llvm {
- class AMDGPUTargetMachine;
- class MachineFunction;
- class MachineInstr;
- class MachineInstrBuilder;
+class AMDGPUTargetMachine;
+class MachineFunction;
+class MachineInstr;
+class MachineInstrBuilder;
- class AMDGPUInstrInfo : public AMDILInstrInfo {
- private:
+class AMDGPUInstrInfo : public AMDILInstrInfo {
+private:
AMDGPUTargetMachine & TM;
std::map<unsigned, unsigned> amdilToISA;
- public:
+public:
explicit AMDGPUInstrInfo(AMDGPUTargetMachine &tm);
virtual const AMDGPURegisterInfo &getRegisterInfo() const = 0;
DebugLoc DL) const;
#include "AMDGPUInstrEnums.h.include"
- };
+};
} // End llvm namespace
-//===-- AMDGPULowerInstructions.cpp - TODO: Add brief description -------===//
+//===-- AMDGPULowerInstructions.cpp - AMDGPU lowering pass ----------------===//
//
// The LLVM Compiler Infrastructure
//
//
//===----------------------------------------------------------------------===//
//
-// TODO: Add full description
+// This pass lowers unsupported AMDIL MachineInstrs to LLVM pseudo
+// MachineInstrs for hw codegen targets.
//
//===----------------------------------------------------------------------===//
-//===-- AMDGPURegisterInfo.cpp - TODO: Add brief description -------===//
+//===-- AMDGPURegisterInfo.cpp - AMDGPU Register Information -------------===//
//
// The LLVM Compiler Infrastructure
//
//
//===----------------------------------------------------------------------===//
//
-// TODO: Add full description
+// Parent TargetRegisterInfo class common to all hw codegen targets.
//
//===----------------------------------------------------------------------===//
-//===-- AMDGPUTargetMachine.cpp - TODO: Add brief description -------===//
+//===-- AMDGPUTargetMachine.cpp - TargetMachine for hw codegen targets-----===//
//
// The LLVM Compiler Infrastructure
//
//
//===----------------------------------------------------------------------===//
//
-// TODO: Add full description
+// The AMDGPU target machine contains all of the hardware specific information
+// needed to emit code for R600 and SI GPUs.
//
//===----------------------------------------------------------------------===//