[llvm] r316904 - [Hexagon] Allow the RDF optimizations to be run in .mir testcases
Krzysztof Parzyszek via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 30 07:11:52 PDT 2017
Author: kparzysz
Date: Mon Oct 30 07:11:52 2017
New Revision: 316904
URL: http://llvm.org/viewvc/llvm-project?rev=316904&view=rev
Log:
[Hexagon] Allow the RDF optimizations to be run in .mir testcases
Modified:
llvm/trunk/lib/Target/Hexagon/HexagonRDFOpt.cpp
llvm/trunk/lib/Target/Hexagon/HexagonTargetMachine.cpp
Modified: llvm/trunk/lib/Target/Hexagon/HexagonRDFOpt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonRDFOpt.cpp?rev=316904&r1=316903&r2=316904&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/HexagonRDFOpt.cpp (original)
+++ llvm/trunk/lib/Target/Hexagon/HexagonRDFOpt.cpp Mon Oct 30 07:11:52 2017
@@ -55,9 +55,7 @@ namespace {
class HexagonRDFOpt : public MachineFunctionPass {
public:
- HexagonRDFOpt() : MachineFunctionPass(ID) {
- initializeHexagonRDFOptPass(*PassRegistry::getPassRegistry());
- }
+ HexagonRDFOpt() : MachineFunctionPass(ID) {}
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.addRequired<MachineDominatorTree>();
@@ -104,10 +102,12 @@ struct HexagonDCE : public DeadCodeElimi
char HexagonRDFOpt::ID = 0;
-INITIALIZE_PASS_BEGIN(HexagonRDFOpt, "rdfopt", "Hexagon RDF opt", false, false)
+INITIALIZE_PASS_BEGIN(HexagonRDFOpt, "hexagon-rdf-opt",
+ "Hexagon RDF optimizations", false, false)
INITIALIZE_PASS_DEPENDENCY(MachineDominatorTree)
INITIALIZE_PASS_DEPENDENCY(MachineDominanceFrontier)
-INITIALIZE_PASS_END(HexagonRDFOpt, "rdfopt", "Hexagon RDF opt", false, false)
+INITIALIZE_PASS_END(HexagonRDFOpt, "hexagon-rdf-opt",
+ "Hexagon RDF optimizations", false, false)
bool HexagonCP::interpretAsCopy(const MachineInstr *MI, EqualityMap &EM) {
auto mapRegs = [&EM] (RegisterRef DstR, RegisterRef SrcR) -> void {
Modified: llvm/trunk/lib/Target/Hexagon/HexagonTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonTargetMachine.cpp?rev=316904&r1=316903&r2=316904&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/HexagonTargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/Hexagon/HexagonTargetMachine.cpp Mon Oct 30 07:11:52 2017
@@ -132,6 +132,7 @@ namespace llvm {
void initializeHexagonNewValueJumpPass(PassRegistry&);
void initializeHexagonOptAddrModePass(PassRegistry&);
void initializeHexagonPacketizerPass(PassRegistry&);
+ void initializeHexagonRDFOptPass(PassRegistry&);
Pass *createHexagonLoopIdiomPass();
Pass *createHexagonVectorLoopCarriedReusePass();
@@ -191,6 +192,7 @@ extern "C" void LLVMInitializeHexagonTar
initializeHexagonNewValueJumpPass(PR);
initializeHexagonOptAddrModePass(PR);
initializeHexagonPacketizerPass(PR);
+ initializeHexagonRDFOptPass(PR);
}
HexagonTargetMachine::HexagonTargetMachine(const Target &T, const Triple &TT,
More information about the llvm-commits
mailing list