#include "HexagonTargetMachine.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/MachineDominators.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetMachine.h"
#define DEBUG_TYPE …
usingnamespacellvm;
STATISTIC(HexagonNumLoadAbsConversions,
"Number of Load instructions converted to absolute-set form");
STATISTIC(HexagonNumStoreAbsConversions,
"Number of Store instructions converted to absolute-set form");
namespace llvm {
FunctionPass *createHexagonGenMemAbsolute();
void initializeHexagonGenMemAbsolutePass(PassRegistry &Registry);
}
namespace {
class HexagonGenMemAbsolute : public MachineFunctionPass { … };
}
char HexagonGenMemAbsolute::ID = …;
INITIALIZE_PASS(…)
bool HexagonGenMemAbsolute::runOnMachineFunction(MachineFunction &Fn) { … }
bool HexagonGenMemAbsolute::isValidIndexedLoad(int &Opc, int &NewOpc) { … }
bool HexagonGenMemAbsolute::isValidIndexedStore(int &Opc, int &NewOpc) { … }
FunctionPass *llvm::createHexagonGenMemAbsolute() { … }