#include "AMDGPU.h"
#include "GCNSubtarget.h"
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
#include "SIMachineFunctionInfo.h"
#include "llvm/CodeGen/LiveIntervals.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/VirtRegMap.h"
#include "llvm/InitializePasses.h"
usingnamespacellvm;
#define DEBUG_TYPE …
namespace {
class SILowerWWMCopies : public MachineFunctionPass { … };
}
INITIALIZE_PASS_BEGIN(SILowerWWMCopies, DEBUG_TYPE, "SI Lower WWM Copies",
false, false)
INITIALIZE_PASS_DEPENDENCY(LiveIntervalsWrapperPass)
INITIALIZE_PASS_DEPENDENCY(VirtRegMap)
INITIALIZE_PASS_END(SILowerWWMCopies, DEBUG_TYPE, "SI Lower WWM Copies", false,
false)
char SILowerWWMCopies::ID = …;
char &llvm::SILowerWWMCopiesID = …;
bool SILowerWWMCopies::isSCCLiveAtMI(const MachineInstr &MI) { … }
void SILowerWWMCopies::addToWWMSpills(MachineFunction &MF, Register Reg) { … }
bool SILowerWWMCopies::runOnMachineFunction(MachineFunction &MF) { … }