#include "AMDGPUExportClustering.h"
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
#include "SIInstrInfo.h"
#include "llvm/CodeGen/ScheduleDAGInstrs.h"
usingnamespacellvm;
namespace {
class ExportClustering : public ScheduleDAGMutation { … };
static bool isExport(const SUnit &SU) { … }
static bool isPositionExport(const SIInstrInfo *TII, SUnit *SU) { … }
static void sortChain(const SIInstrInfo *TII, SmallVector<SUnit *, 8> &Chain,
unsigned PosCount) { … }
static void buildCluster(ArrayRef<SUnit *> Exports, ScheduleDAGInstrs *DAG) { … }
static void removeExportDependencies(ScheduleDAGInstrs *DAG, SUnit &SU) { … }
void ExportClustering::apply(ScheduleDAGInstrs *DAG) { … }
}
namespace llvm {
std::unique_ptr<ScheduleDAGMutation> createAMDGPUExportClusteringDAGMutation() { … }
}