gem5
|
#include <hsail_code.hh>
Public Member Functions | |
HsailCode (const std::string &name_str, const Brig::BrigDirectiveExecutable *code_dir, const BrigObject *obj, StorageMap *objStorageMap) | |
HsailCode (const std::string &name_str) | |
void | init (const Brig::BrigDirectiveExecutable *code_dir, const BrigObject *obj, StorageMap *objStorageMap) |
void | generateHsaKernelInfo (HsaKernelInfo *hsaKernelInfo) const |
int | getSize (MemorySegment segment) const |
StorageElement * | findSymbol (Brig::BrigSegment segment, uint64_t addr) |
void | setPrivateSize (int32_t _private_size) |
Label * | refLabel (const Brig::BrigDirectiveLabel *lbl, const BrigObject *obj) |
Public Member Functions inherited from HsaCode | |
HsaCode (const std::string &name) | |
const std::string & | name () const |
int | numInsts () const |
std::vector < TheGpuISA::RawMachInst > * | insts () |
void | setReadonlyData (uint8_t *_readonly_data) |
Public Attributes | |
TheGpuISA::Decoder | decoder |
StorageMap * | storageMap |
LabelMap | labelMap |
uint32_t | kernarg_start |
uint32_t | kernarg_end |
int32_t | private_size |
int32_t | readonly_size |
uint32_t | max_creg |
uint32_t | max_sreg |
uint32_t | max_dreg |
Public Attributes inherited from HsaCode | |
uint8_t * | readonly_data |
int | funcarg_size |
Private Member Functions | |
int | getSize (Brig::BrigSegment segment) const |
Additional Inherited Members | |
Public Types inherited from HsaCode | |
enum | MemorySegment { MemorySegment::NONE, MemorySegment::FLAT, MemorySegment::GLOBAL, MemorySegment::READONLY, MemorySegment::KERNARG, MemorySegment::GROUP, MemorySegment::PRIVATE, MemorySegment::SPILL, MemorySegment::ARG, MemorySegment::EXTSPACE0 } |
Protected Attributes inherited from HsaCode | |
std::vector < TheGpuISA::RawMachInst > | _insts |
Definition at line 321 of file hsail_code.hh.
HsailCode::HsailCode | ( | const std::string & | name_str, |
const Brig::BrigDirectiveExecutable * | code_dir, | ||
const BrigObject * | obj, | ||
StorageMap * | objStorageMap | ||
) |
Definition at line 218 of file hsail_code.cc.
References init().
HsailCode::HsailCode | ( | const std::string & | name_str | ) |
Definition at line 52 of file hsail_code.cc.
|
inline |
Definition at line 429 of file hsail_code.hh.
References StorageMap::findSymbol(), and storageMap.
Referenced by AddrOperandBase::parseAddr().
|
inlinevirtual |
Implements HsaCode.
Definition at line 355 of file hsail_code.hh.
References Brig::BRIG_SEGMENT_GROUP, Brig::BRIG_SEGMENT_PRIVATE, Brig::BRIG_SEGMENT_SPILL, HsaKernelInfo::cRegCount, HsaKernelInfo::dRegCount, getSize(), max_creg, max_dreg, max_sreg, HsaKernelInfo::private_mem_size, roundUp(), HsaKernelInfo::spill_mem_size, HsaKernelInfo::sRegCount, and HsaKernelInfo::static_lds_size.
|
inlinevirtual |
Implements HsaCode.
Definition at line 371 of file hsail_code.hh.
References HsaCode::ARG, Brig::BRIG_SEGMENT_AMD_GCN, Brig::BRIG_SEGMENT_ARG, Brig::BRIG_SEGMENT_FLAT, Brig::BRIG_SEGMENT_GLOBAL, Brig::BRIG_SEGMENT_GROUP, Brig::BRIG_SEGMENT_KERNARG, Brig::BRIG_SEGMENT_NONE, Brig::BRIG_SEGMENT_PRIVATE, Brig::BRIG_SEGMENT_READONLY, Brig::BRIG_SEGMENT_SPILL, HsaCode::EXTSPACE0, fatal, HsaCode::FLAT, HsaCode::GLOBAL, HsaCode::GROUP, HsaCode::KERNARG, HsaCode::NONE, HsaCode::PRIVATE, HsaCode::READONLY, and HsaCode::SPILL.
Referenced by generateHsaKernelInfo().
|
inlineprivate |
Definition at line 415 of file hsail_code.hh.
References Brig::BRIG_SEGMENT_PRIVATE, StorageMap::getSize(), private_size, and storageMap.
void HsailCode::init | ( | const Brig::BrigDirectiveExecutable * | code_dir, |
const BrigObject * | obj, | ||
StorageMap * | objStorageMap | ||
) |
Definition at line 58 of file hsail_code.cc.
References HsaCode::_insts, LabelMap::addLabel(), StorageMap::addSymbol(), ControlFlowInfo::assignImmediatePostDominators(), Brig::BrigDirectiveExecutable::base, Brig::BRIG_KIND_DIRECTIVE_ARG_BLOCK_END, Brig::BRIG_KIND_DIRECTIVE_ARG_BLOCK_START, Brig::BRIG_KIND_DIRECTIVE_COMMENT, Brig::BRIG_KIND_DIRECTIVE_END, Brig::BRIG_KIND_DIRECTIVE_FUNCTION, Brig::BRIG_KIND_DIRECTIVE_KERNEL, Brig::BRIG_KIND_DIRECTIVE_LABEL, Brig::BRIG_KIND_DIRECTIVE_PRAGMA, Brig::BRIG_KIND_DIRECTIVE_VARIABLE, Brig::BRIG_KIND_INST_BEGIN, Brig::BRIG_KIND_INST_END, Brig::BRIG_KIND_OPERAND_BEGIN, Brig::BRIG_KIND_OPERAND_END, Brig::BRIG_SEGMENT_ARG, Brig::BRIG_SEGMENT_PRIVATE, brigNext(), BrigObject::currentCode, decoder, DPRINTF, fatal, Brig::BrigDirectiveExecutable::firstCodeBlockEntry, HsaCode::funcarg_size, BrigObject::getCodeSectionEntry(), BrigObject::getString(), GPUStaticInst::instAddr(), GPUStaticInst::instNum(), Brig::BrigBase::kind, labelMap, max_creg, max_dreg, max_sreg, SRegOperand::maxRegIdx, DRegOperand::maxRegIdx, CRegOperand::maxRegIdx, Brig::BrigDirectiveLabel::name, Brig::BrigDirectiveVariable::name, Brig::BrigDirectiveExecutable::nextModuleEntry, Brig::BrigInstBase::opcode, StorageMap::resetOffset(), Brig::BrigDirectiveVariable::segment, setPrivateSize(), storageMap, and warn.
Referenced by HsailCode().
|
inline |
Definition at line 441 of file hsail_code.hh.
References labelMap, and LabelMap::refLabel().
Referenced by LabelOperand::init().
|
inline |
TheGpuISA::Decoder HsailCode::decoder |
Definition at line 324 of file hsail_code.hh.
Referenced by init().
uint32_t HsailCode::kernarg_end |
Definition at line 329 of file hsail_code.hh.
uint32_t HsailCode::kernarg_start |
Definition at line 328 of file hsail_code.hh.
LabelMap HsailCode::labelMap |
Definition at line 327 of file hsail_code.hh.
Referenced by init(), and refLabel().
uint32_t HsailCode::max_creg |
Definition at line 337 of file hsail_code.hh.
Referenced by generateHsaKernelInfo(), and init().
uint32_t HsailCode::max_dreg |
Definition at line 339 of file hsail_code.hh.
Referenced by generateHsaKernelInfo(), and init().
uint32_t HsailCode::max_sreg |
Definition at line 338 of file hsail_code.hh.
Referenced by generateHsaKernelInfo(), and init().
int32_t HsailCode::private_size |
Definition at line 330 of file hsail_code.hh.
Referenced by getSize(), and setPrivateSize().
int32_t HsailCode::readonly_size |
Definition at line 332 of file hsail_code.hh.
StorageMap* HsailCode::storageMap |
Definition at line 326 of file hsail_code.hh.
Referenced by findSymbol(), getSize(), init(), ListOperand::init(), and AddrOperandBase::parseAddr().