|
LLVM 24.0.0git
|
#include "Sparc.h"#include "SparcSubtarget.h"#include "llvm/ADT/SmallSet.h"#include "llvm/ADT/Statistic.h"#include "llvm/CodeGen/MFPropsModifier.h"#include "llvm/CodeGen/MachineFunctionAnalysisManager.h"#include "llvm/CodeGen/MachineFunctionPass.h"#include "llvm/CodeGen/MachineInstrBuilder.h"#include "llvm/CodeGen/MachinePassManager.h"#include "llvm/CodeGen/MachineRegisterInfo.h"#include "llvm/CodeGen/TargetInstrInfo.h"#include "llvm/CodeGen/TargetRegisterInfo.h"#include "llvm/IR/Analysis.h"#include "llvm/Pass.h"#include "llvm/Target/TargetMachine.h"Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "delay-slot-filler" |
| #define DEBUG_TYPE "delay-slot-filler" |
Definition at line 32 of file DelaySlotFiller.cpp.
|
static |
Definition at line 64 of file DelaySlotFiller.cpp.
Referenced by tryCombineRestoreWithPrevInst().
|
static |
Definition at line 104 of file DelaySlotFiller.cpp.
Referenced by tryCombineRestoreWithPrevInst().
|
static |
Definition at line 150 of file DelaySlotFiller.cpp.
References assert(), llvm::isInt(), and TII.
Referenced by tryCombineRestoreWithPrevInst().
|
static |
Definition at line 337 of file DelaySlotFiller.cpp.
References IsRegInSet(), Reg, and Subtarget.
Referenced by findDelayInstr().
|
static |
Definition at line 405 of file DelaySlotFiller.cpp.
References delayHasHazard(), I, insertCallDefsUses(), insertDefsUses(), MBB, Opc, llvm::skipDebugInstructionsBackward(), and Subtarget.
Referenced by runOnMachineBasicBlock().
|
static |
The restore before a tail call must run in its delay slot: jmp reg reads a register of the current window, and call writes o7.
For the same reason a leaf call needs the copy of o7 back from g1 that SparcFrameLowering emits.
Definition at line 251 of file DelaySlotFiller.cpp.
References MBB, Opc, and llvm::skipMetaInstructionsBackward().
Referenced by runOnMachineBasicBlock().
|
static |
Definition at line 268 of file DelaySlotFiller.cpp.
References assert(), llvm::MachineOperand::getReg(), llvm::SmallSet< T, N, C >::insert(), llvm::MachineOperand::isGlobal(), llvm::MachineOperand::isImm(), llvm::MachineOperand::isReg(), llvm::MachineOperand::isUse(), llvm_unreachable, MI, and Reg.
Referenced by findDelayInstr().
|
static |
Definition at line 303 of file DelaySlotFiller.cpp.
References llvm::SmallSet< T, N, C >::insert(), MI, Reg, and Subtarget.
Referenced by findDelayInstr().
|
static |
Definition at line 327 of file DelaySlotFiller.cpp.
References llvm::SmallSet< T, N, C >::count(), llvm::MCRegAliasIterator::isValid(), Reg, and Subtarget.
Referenced by delayHasHazard().
|
static |
Definition at line 467 of file DelaySlotFiller.cpp.
References MI.
Referenced by padWriteYHazards().
|
static |
On SPARC V8 a write to y may take until the third instruction after it completes to take effect, so an instruction that reads y within that window (MULScc, RDY, SDIV, SDIVcc, UDIV, UDIVcc) gets an undefined value.
V9 removed the delay. As in GCC, make sure there are at least three instructions between a WRY and the next reader of y. This runs after the delay slots are filled so that the instructions are counted in the order they execute, and a filled delay slot can no longer shrink the gap.
Definition at line 479 of file DelaySlotFiller.cpp.
References llvm::BuildMI(), Changed, E(), I, isWriteY(), MBB, readsRegister(), Subtarget, TII, and TRI.
Referenced by runOnMachineBasicBlock().
|
static |
Definition at line 582 of file DelaySlotFiller.cpp.
References Changed, llvm::MachineFunction::getRegInfo(), llvm::MachineRegisterInfo::invalidateLiveness(), MBB, and runOnMachineBasicBlock().
Referenced by llvm::SparcDelaySlotFillerPass::run().
|
static |
runOnMachineBasicBlock - Fill in delay slots for the given basic block.
We assume there is only one delay slot per delayed instruction.
Definition at line 517 of file DelaySlotFiller.cpp.
References llvm::MachineInstrBuilder::addImm(), assert(), llvm::BuildMI(), Changed, D(), findDelayInstr(), findRequiredDelayInstr(), I, MBB, MI, llvm::None, padWriteYHazards(), Subtarget, TII, and tryCombineRestoreWithPrevInst().
Referenced by runDelaySlotFillerOnMachineFunction().
| STATISTIC | ( | FilledSlots | , |
| "Number of delay slots filled" | ) |
|
static |
Definition at line 188 of file DelaySlotFiller.cpp.
References assert(), combineRestoreADD(), combineRestoreOR(), combineRestoreSETHIi(), llvm::make_range(), MBB, MBBI, MI, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::skipDebugInstructionsBackward(), Subtarget, and TII.
Referenced by runOnMachineBasicBlock().