#include "MCTargetDesc/R600MCTargetDesc.h"
#include "R600.h"
#include "R600Subtarget.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
usingnamespacellvm;
#define DEBUG_TYPE …
namespace {
static bool isCFAlu(const MachineInstr &MI) { … }
class R600ClauseMergePass : public MachineFunctionPass { … };
}
INITIALIZE_PASS_BEGIN(R600ClauseMergePass, DEBUG_TYPE,
"R600 Clause Merge", false, false)
INITIALIZE_PASS_END(R600ClauseMergePass, DEBUG_TYPE,
"R600 Clause Merge", false, false)
char R600ClauseMergePass::ID = …;
char &llvm::R600ClauseMergePassID = …;
unsigned R600ClauseMergePass::getCFAluSize(const MachineInstr &MI) const { … }
bool R600ClauseMergePass::isCFAluEnabled(const MachineInstr &MI) const { … }
void R600ClauseMergePass::cleanPotentialDisabledCFAlu(
MachineInstr &CFAlu) const { … }
bool R600ClauseMergePass::mergeIfPossible(MachineInstr &RootCFAlu,
const MachineInstr &LatrCFAlu) const { … }
bool R600ClauseMergePass::runOnMachineFunction(MachineFunction &MF) { … }
StringRef R600ClauseMergePass::getPassName() const { … }
llvm::FunctionPass *llvm::createR600ClauseMergePass() { … }