"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/amd/compiler/aco_optimizer.cpp" between
mesa-20.0.0-rc2.tar.xz and mesa-20.0.0-rc3.tar.xz

About: Mesa is an open-source implementation of the OpenGL specification - a system for rendering interactive 3D graphics (main library code). Release candidate.

aco_optimizer.cpp  (mesa-20.0.0-rc2.tar.xz):aco_optimizer.cpp  (mesa-20.0.0-rc3.tar.xz)
skipping to change at line 1846 skipping to change at line 1846
/* s_and_b32(a, s_not_b32(b)) -> s_andn2_b32(a, b) /* s_and_b32(a, s_not_b32(b)) -> s_andn2_b32(a, b)
* s_or_b32(a, s_not_b32(b)) -> s_orn2_b32(a, b) * s_or_b32(a, s_not_b32(b)) -> s_orn2_b32(a, b)
* s_and_b64(a, s_not_b64(b)) -> s_andn2_b64(a, b) * s_and_b64(a, s_not_b64(b)) -> s_andn2_b64(a, b)
* s_or_b64(a, s_not_b64(b)) -> s_orn2_b64(a, b) */ * s_or_b64(a, s_not_b64(b)) -> s_orn2_b64(a, b) */
bool combine_salu_n2(opt_ctx& ctx, aco_ptr<Instruction>& instr) bool combine_salu_n2(opt_ctx& ctx, aco_ptr<Instruction>& instr)
{ {
if (instr->definitions[1].isTemp() && ctx.uses[instr->definitions[1].tempId() ]) if (instr->definitions[1].isTemp() && ctx.uses[instr->definitions[1].tempId() ])
return false; return false;
if (instr->definitions[0].isTemp() && ctx.info[instr->definitions[0].tempId()
].is_uniform_bool())
return false;
for (unsigned i = 0; i < 2; i++) { for (unsigned i = 0; i < 2; i++) {
Instruction *op2_instr = follow_operand(ctx, instr->operands[i]); Instruction *op2_instr = follow_operand(ctx, instr->operands[i]);
if (!op2_instr || (op2_instr->opcode != aco_opcode::s_not_b32 && op2_instr ->opcode != aco_opcode::s_not_b64)) if (!op2_instr || (op2_instr->opcode != aco_opcode::s_not_b32 && op2_instr ->opcode != aco_opcode::s_not_b64))
continue; continue;
if (instr->operands[!i].isLiteral() && op2_instr->operands[0].isLiteral() && if (instr->operands[!i].isLiteral() && op2_instr->operands[0].isLiteral() &&
instr->operands[!i].constantValue() != op2_instr->operands[0].constant Value()) instr->operands[!i].constantValue() != op2_instr->operands[0].constant Value())
continue; continue;
ctx.uses[instr->operands[i].tempId()]--; ctx.uses[instr->operands[i].tempId()]--;
skipping to change at line 2602 skipping to change at line 2605
for (unsigned i = 0; i < instr->operands.size(); i++) for (unsigned i = 0; i < instr->operands.size(); i++)
{ {
if (instr->operands[i].isConstant() && i > 0) { if (instr->operands[i].isConstant() && i > 0) {
literal_uses = UINT32_MAX; literal_uses = UINT32_MAX;
break; break;
} }
if (!instr->operands[i].isTemp()) if (!instr->operands[i].isTemp())
continue; continue;
/* if one of the operands is sgpr, we cannot add a literal somewhere else on pre-GFX10 or operands other than the 1st */ /* if one of the operands is sgpr, we cannot add a literal somewhere else on pre-GFX10 or operands other than the 1st */
if (instr->operands[i].getTemp().type() == RegType::sgpr && (i > 0 | | ctx.program->chip_class < GFX10)) { if (instr->operands[i].getTemp().type() == RegType::sgpr && (i > 0 | | ctx.program->chip_class < GFX10)) {
if (ctx.info[instr->operands[i].tempId()].is_literal()) { if (!sgpr_used && ctx.info[instr->operands[i].tempId()].is_litera l()) {
literal_uses = ctx.uses[instr->operands[i].tempId()]; literal_uses = ctx.uses[instr->operands[i].tempId()];
literal_idx = i; literal_idx = i;
} else { } else {
literal_uses = UINT32_MAX; literal_uses = UINT32_MAX;
} }
sgpr_used = true; sgpr_used = true;
/* don't break because we still need to check constants */ /* don't break because we still need to check constants */
} else if (!sgpr_used && } else if (!sgpr_used &&
ctx.info[instr->operands[i].tempId()].is_literal() && ctx.info[instr->operands[i].tempId()].is_literal() &&
ctx.uses[instr->operands[i].tempId()] < literal_uses) { ctx.uses[instr->operands[i].tempId()] < literal_uses) {
 End of changes. 2 change blocks. 
1 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)