mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
[SystemZ] Rein back the use of block operations
The backend tries to use block operations like MVC, NC, OC and XC for simple scalar operations. For correctness reasons, it rejects any case in which the regions might partially overlap. However, for performance reasons, it should also reject cases where the regions might be equal, since the instruction might then not use the fast path. This fixes a performance regression seen in bzip2. We may want to limit the optimisation even more in future, or even remove it entirely, but I'll try with this for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191525 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -674,10 +674,14 @@ SystemZInstrInfo::foldMemoryOperandImpl(MachineFunction &MF,
|
||||
//
|
||||
// Although MVC is in practice a fast choice in these cases, it is still
|
||||
// logically a bytewise copy. This means that we cannot use it if the
|
||||
// load or store is volatile. It also means that the transformation is
|
||||
// not valid in cases where the two memories partially overlap; however,
|
||||
// that is not a problem here, because we know that one of the memories
|
||||
// is a full frame index.
|
||||
// load or store is volatile. We also wouldn't be able to use MVC if
|
||||
// the two memories partially overlap, but that case cannot occur here,
|
||||
// because we know that one of the memories is a full frame index.
|
||||
//
|
||||
// For performance reasons, we also want to avoid using MVC if the addresses
|
||||
// might be equal. We don't worry about that case here, because spill slot
|
||||
// coloring happens later, and because we have special code to remove
|
||||
// MVCs that turn out to be redundant.
|
||||
if (OpNum == 0 && MI->hasOneMemOperand()) {
|
||||
MachineMemOperand *MMO = *MI->memoperands_begin();
|
||||
if (MMO->getSize() == Size && !MMO->isVolatile()) {
|
||||
|
||||
Reference in New Issue
Block a user