Lines Matching defs:ldst

2681 updateLdStOffset(Instruction *ldst, int32_t offset, Function *fn)
2683 if (offset != ldst->getSrc(0)->reg.data.offset) {
2684 if (ldst->getSrc(0)->refCount() > 1)
2685 ldst->setSrc(0, cloneShallow(fn, ldst->getSrc(0)));
2686 ldst->getSrc(0)->reg.data.offset = offset;
2707 bool overlaps(const Instruction *ldst) const;
2711 inline void set(const Instruction *ldst);
2738 void addRecord(Instruction *ldst);
2909 MemoryOpt::Record::set(const Instruction *ldst)
2911 const Symbol *mem = ldst->getSrc(0)->asSym();
2913 rel[0] = ldst->getIndirect(0, 0);
2914 rel[1] = ldst->getIndirect(0, 1);
2917 size = typeSizeof(ldst->sType);
3103 MemoryOpt::Record::overlaps(const Instruction *ldst) const
3106 that.set(ldst);
3167 Instruction *ldst, *next;
3171 for (ldst = bb->getEntry(); ldst; ldst = next) {
3174 next = ldst->next;
3176 if (ldst->op == OP_LOAD || ldst->op == OP_VFETCH) {
3177 if (ldst->subOp == NV50_IR_SUBOP_LOAD_LOCKED) {
3178 purgeRecords(ldst, ldst->src(0).getFile());
3181 if (ldst->isDead()) {
3183 delete_Instruction(prog, ldst);
3187 if (ldst->op == OP_STORE || ldst->op == OP_EXPORT) {
3188 if (ldst->subOp == NV50_IR_SUBOP_STORE_UNLOCKED) {
3189 purgeRecords(ldst, ldst->src(0).getFile());
3192 if (typeSizeof(ldst->dType) == 4 &&
3193 ldst->src(1).getFile() == FILE_GPR &&
3194 ldst->getSrc(1)->getInsn()->op == OP_NOP) {
3195 delete_Instruction(prog, ldst);
3201 if (ldst->op == OP_CALL ||
3202 ldst->op == OP_BAR ||
3203 ldst->op == OP_MEMBAR) {
3209 if (ldst->op == OP_ATOM || ldst->op == OP_CCTL) {
3210 if (ldst->src(0).getFile() == FILE_MEMORY_GLOBAL) {
3215 purgeRecords(NULL, ldst->src(0).getFile());
3218 if (ldst->op == OP_EMIT || ldst->op == OP_RESTART) {
3223 if (ldst->getPredicate()) // TODO: handle predicated ld/st
3225 if (ldst->perPatch) // TODO: create separate per-patch lists
3229 DataFile file = ldst->src(0).getFile();
3234 rec = findRecord(ldst, false, isAdjacent);
3236 keep = !replaceLdFromSt(ldst, rec);
3240 rec = keep ? findRecord(ldst, true, isAdjacent) : NULL;
3243 keep = !replaceLdFromLd(ldst, rec);
3246 keep = !combineLd(rec, ldst);
3249 lockStores(ldst);
3251 rec = findRecord(ldst, false, isAdjacent);
3254 keep = !replaceStFromSt(ldst, rec);
3256 keep = !combineSt(rec, ldst);
3259 purgeRecords(ldst, DATA_FILE_COUNT);
3262 addRecord(ldst);