#include "Hexagon.h"
#include "HexagonInstrInfo.h"
#include "HexagonMachineFunctionInfo.h"
#include "HexagonRegisterInfo.h"
#include "HexagonSubtarget.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Pass.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/Support/CommandLine.h"
#include <map>
usingnamespacellvm;
static cl::opt<unsigned> VExtractThreshold(
"hexagon-vextract-threshold", cl::Hidden, cl::init(1),
cl::desc("Threshold for triggering vextract replacement"));
namespace llvm {
void initializeHexagonVExtractPass(PassRegistry& Registry);
FunctionPass *createHexagonVExtract();
}
namespace {
class HexagonVExtract : public MachineFunctionPass { … };
char HexagonVExtract::ID = …;
}
INITIALIZE_PASS(…)
unsigned HexagonVExtract::genElemLoad(MachineInstr *ExtI, unsigned BaseR,
MachineRegisterInfo &MRI) { … }
bool HexagonVExtract::runOnMachineFunction(MachineFunction &MF) { … }
FunctionPass *llvm::createHexagonVExtract() { … }