projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
61e0172
)
Print IR from Hexagon MI passes with -print-before/after-all.
author
Krzysztof Parzyszek
<kparzysz@codeaurora.org>
Mon, 6 May 2013 21:58:00 +0000
(21:58 +0000)
committer
Krzysztof Parzyszek
<kparzysz@codeaurora.org>
Mon, 6 May 2013 21:58:00 +0000
(21:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181255
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Target/Hexagon/HexagonCFGOptimizer.cpp
patch
|
blob
|
history
lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp
patch
|
blob
|
history
lib/Target/Hexagon/HexagonPeephole.cpp
patch
|
blob
|
history
lib/Target/Hexagon/HexagonRemoveSZExtArgs.cpp
patch
|
blob
|
history
lib/Target/Hexagon/HexagonSplitTFRCondSets.cpp
patch
|
blob
|
history
lib/Target/Hexagon/HexagonVLIWPacketizer.cpp
patch
|
blob
|
history
diff --git
a/lib/Target/Hexagon/HexagonCFGOptimizer.cpp
b/lib/Target/Hexagon/HexagonCFGOptimizer.cpp
index 7c50596b9a568f781aa95cc566cbd0ad73b01d4b..8597f11ddde7673eaf2e6b10a53c4ecd8cfcba1b 100644
(file)
--- a/
lib/Target/Hexagon/HexagonCFGOptimizer.cpp
+++ b/
lib/Target/Hexagon/HexagonCFGOptimizer.cpp
@@
-26,6
+26,11
@@
using namespace llvm;
using namespace llvm;
+namespace llvm {
+ void initializeHexagonCFGOptimizerPass(PassRegistry&);
+}
+
+
namespace {
class HexagonCFGOptimizer : public MachineFunctionPass {
namespace {
class HexagonCFGOptimizer : public MachineFunctionPass {
@@
-39,7
+44,9
@@
private:
public:
static char ID;
HexagonCFGOptimizer(const HexagonTargetMachine& TM)
public:
static char ID;
HexagonCFGOptimizer(const HexagonTargetMachine& TM)
- : MachineFunctionPass(ID), QTM(TM), QST(*TM.getSubtargetImpl()) {}
+ : MachineFunctionPass(ID), QTM(TM), QST(*TM.getSubtargetImpl()) {
+ initializeHexagonCFGOptimizerPass(*PassRegistry::getPassRegistry());
+ }
const char *getPassName() const {
return "Hexagon CFG Optimizer";
const char *getPassName() const {
return "Hexagon CFG Optimizer";
@@
-230,6
+237,16
@@
bool HexagonCFGOptimizer::runOnMachineFunction(MachineFunction &Fn) {
// Public Constructor Functions
//===----------------------------------------------------------------------===//
// Public Constructor Functions
//===----------------------------------------------------------------------===//
+static void initializePassOnce(PassRegistry &Registry) {
+ PassInfo *PI = new PassInfo("Hexagon CFG Optimizer", "hexagon-cfg",
+ &HexagonCFGOptimizer::ID, 0, false, false);
+ Registry.registerPass(*PI, true);
+}
+
+void llvm::initializeHexagonCFGOptimizerPass(PassRegistry &Registry) {
+ CALL_ONCE_INITIALIZATION(initializePassOnce)
+}
+
FunctionPass *llvm::createHexagonCFGOptimizer(const HexagonTargetMachine &TM) {
return new HexagonCFGOptimizer(TM);
}
FunctionPass *llvm::createHexagonCFGOptimizer(const HexagonTargetMachine &TM) {
return new HexagonCFGOptimizer(TM);
}
diff --git
a/lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp
b/lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp
index 40dba7afe64f2b8b3dd301c1f04b827e34a62b1b..8a5991fbc4f251e1de67d8a00ddb6d7ad4d38c39 100644
(file)
--- a/
lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp
+++ b/
lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp
@@
-41,6
+41,11
@@
using namespace llvm;
using namespace llvm;
+namespace llvm {
+ void initializeHexagonExpandPredSpillCodePass(PassRegistry&);
+}
+
+
namespace {
class HexagonExpandPredSpillCode : public MachineFunctionPass {
namespace {
class HexagonExpandPredSpillCode : public MachineFunctionPass {
@@
-50,7
+55,10
@@
class HexagonExpandPredSpillCode : public MachineFunctionPass {
public:
static char ID;
HexagonExpandPredSpillCode(const HexagonTargetMachine& TM) :
public:
static char ID;
HexagonExpandPredSpillCode(const HexagonTargetMachine& TM) :
- MachineFunctionPass(ID), QTM(TM), QST(*TM.getSubtargetImpl()) {}
+ MachineFunctionPass(ID), QTM(TM), QST(*TM.getSubtargetImpl()) {
+ PassRegistry &Registry = *PassRegistry::getPassRegistry();
+ initializeHexagonExpandPredSpillCodePass(Registry);
+ }
const char *getPassName() const {
return "Hexagon Expand Predicate Spill Code";
const char *getPassName() const {
return "Hexagon Expand Predicate Spill Code";
@@
-175,6
+183,18
@@
bool HexagonExpandPredSpillCode::runOnMachineFunction(MachineFunction &Fn) {
// Public Constructor Functions
//===----------------------------------------------------------------------===//
// Public Constructor Functions
//===----------------------------------------------------------------------===//
+static void initializePassOnce(PassRegistry &Registry) {
+ const char *Name = "Hexagon Expand Predicate Spill Code";
+ PassInfo *PI = new PassInfo(Name, "hexagon-spill-pred",
+ &HexagonExpandPredSpillCode::ID,
+ 0, false, false);
+ Registry.registerPass(*PI, true);
+}
+
+void llvm::initializeHexagonExpandPredSpillCodePass(PassRegistry &Registry) {
+ CALL_ONCE_INITIALIZATION(initializePassOnce)
+}
+
FunctionPass*
llvm::createHexagonExpandPredSpillCode(const HexagonTargetMachine &TM) {
return new HexagonExpandPredSpillCode(TM);
FunctionPass*
llvm::createHexagonExpandPredSpillCode(const HexagonTargetMachine &TM) {
return new HexagonExpandPredSpillCode(TM);
diff --git
a/lib/Target/Hexagon/HexagonPeephole.cpp
b/lib/Target/Hexagon/HexagonPeephole.cpp
index 6c4eb7e66887557049e4dc641e5706de5295264a..89e34068894ee3dfbd4ed091599cfbbb67e700a7 100644
(file)
--- a/
lib/Target/Hexagon/HexagonPeephole.cpp
+++ b/
lib/Target/Hexagon/HexagonPeephole.cpp
@@
-61,10
+61,6
@@
static cl::opt<bool> DisableHexagonPeephole("disable-hexagon-peephole",
cl::Hidden, cl::ZeroOrMore, cl::init(false),
cl::desc("Disable Peephole Optimization"));
cl::Hidden, cl::ZeroOrMore, cl::init(false),
cl::desc("Disable Peephole Optimization"));
-static cl::opt<int>
-DbgPNPCount("pnp-count", cl::init(-1), cl::Hidden,
- cl::desc("Maximum number of P=NOT(P) to be optimized"));
-
static cl::opt<bool> DisablePNotP("disable-hexagon-pnotp",
cl::Hidden, cl::ZeroOrMore, cl::init(false),
cl::desc("Disable Optimization of PNotP"));
static cl::opt<bool> DisablePNotP("disable-hexagon-pnotp",
cl::Hidden, cl::ZeroOrMore, cl::init(false),
cl::desc("Disable Optimization of PNotP"));
@@
-77,6
+73,10
@@
static cl::opt<bool> DisableOptExtTo64("disable-hexagon-opt-ext-to-64",
cl::Hidden, cl::ZeroOrMore, cl::init(false),
cl::desc("Disable Optimization of extensions to i64."));
cl::Hidden, cl::ZeroOrMore, cl::init(false),
cl::desc("Disable Optimization of extensions to i64."));
+namespace llvm {
+ void initializeHexagonPeepholePass(PassRegistry&);
+}
+
namespace {
struct HexagonPeephole : public MachineFunctionPass {
const HexagonInstrInfo *QII;
namespace {
struct HexagonPeephole : public MachineFunctionPass {
const HexagonInstrInfo *QII;
@@
-85,7
+85,9
@@
namespace {
public:
static char ID;
public:
static char ID;
- HexagonPeephole() : MachineFunctionPass(ID) { }
+ HexagonPeephole() : MachineFunctionPass(ID) {
+ initializeHexagonPeepholePass(*PassRegistry::getPassRegistry());
+ }
bool runOnMachineFunction(MachineFunction &MF);
bool runOnMachineFunction(MachineFunction &MF);
@@
-104,8
+106,10
@@
namespace {
char HexagonPeephole::ID = 0;
char HexagonPeephole::ID = 0;
-bool HexagonPeephole::runOnMachineFunction(MachineFunction &MF) {
+INITIALIZE_PASS(HexagonPeephole, "hexagon-peephole", "Hexagon Peephole",
+ false, false)
+bool HexagonPeephole::runOnMachineFunction(MachineFunction &MF) {
QII = static_cast<const HexagonInstrInfo *>(MF.getTarget().
getInstrInfo());
QRI = static_cast<const HexagonRegisterInfo *>(MF.getTarget().
QII = static_cast<const HexagonInstrInfo *>(MF.getTarget().
getInstrInfo());
QRI = static_cast<const HexagonRegisterInfo *>(MF.getTarget().
diff --git
a/lib/Target/Hexagon/HexagonRemoveSZExtArgs.cpp
b/lib/Target/Hexagon/HexagonRemoveSZExtArgs.cpp
index bfec79d95f609c825e02a5613ab9196fe7847971..44234e85dc698399926c5d425cc5172f8eb6470e 100644
(file)
--- a/
lib/Target/Hexagon/HexagonRemoveSZExtArgs.cpp
+++ b/
lib/Target/Hexagon/HexagonRemoveSZExtArgs.cpp
@@
-21,11
+21,18
@@
#include "llvm/Transforms/Scalar.h"
using namespace llvm;
#include "llvm/Transforms/Scalar.h"
using namespace llvm;
+
+namespace llvm {
+ void initializeHexagonRemoveExtendArgsPass(PassRegistry&);
+}
+
namespace {
struct HexagonRemoveExtendArgs : public FunctionPass {
public:
static char ID;
namespace {
struct HexagonRemoveExtendArgs : public FunctionPass {
public:
static char ID;
- HexagonRemoveExtendArgs() : FunctionPass(ID) {}
+ HexagonRemoveExtendArgs() : FunctionPass(ID) {
+ initializeHexagonRemoveExtendArgsPass(*PassRegistry::getPassRegistry());
+ }
virtual bool runOnFunction(Function &F);
const char *getPassName() const {
virtual bool runOnFunction(Function &F);
const char *getPassName() const {
@@
-41,11
+48,9
@@
namespace {
}
char HexagonRemoveExtendArgs::ID = 0;
}
char HexagonRemoveExtendArgs::ID = 0;
-RegisterPass<HexagonRemoveExtendArgs> X("reargs",
- "Remove Sign and Zero Extends for Args"
- );
-
+INITIALIZE_PASS(HexagonRemoveExtendArgs, "reargs",
+ "Remove Sign and Zero Extends for Args", false, false)
bool HexagonRemoveExtendArgs::runOnFunction(Function &F) {
unsigned Idx = 1;
bool HexagonRemoveExtendArgs::runOnFunction(Function &F) {
unsigned Idx = 1;
diff --git
a/lib/Target/Hexagon/HexagonSplitTFRCondSets.cpp
b/lib/Target/Hexagon/HexagonSplitTFRCondSets.cpp
index df290da01617e370af0cce7efe013e721ff930cf..8608e082f9dfe076307b86a08de18c0da944535f 100644
(file)
--- a/
lib/Target/Hexagon/HexagonSplitTFRCondSets.cpp
+++ b/
lib/Target/Hexagon/HexagonSplitTFRCondSets.cpp
@@
-49,6
+49,11
@@
using namespace llvm;
using namespace llvm;
+namespace llvm {
+ void initializeHexagonSplitTFRCondSetsPass(PassRegistry&);
+}
+
+
namespace {
class HexagonSplitTFRCondSets : public MachineFunctionPass {
namespace {
class HexagonSplitTFRCondSets : public MachineFunctionPass {
@@
-58,7
+63,9
@@
class HexagonSplitTFRCondSets : public MachineFunctionPass {
public:
static char ID;
HexagonSplitTFRCondSets(const HexagonTargetMachine& TM) :
public:
static char ID;
HexagonSplitTFRCondSets(const HexagonTargetMachine& TM) :
- MachineFunctionPass(ID), QTM(TM), QST(*TM.getSubtargetImpl()) {}
+ MachineFunctionPass(ID), QTM(TM), QST(*TM.getSubtargetImpl()) {
+ initializeHexagonSplitTFRCondSetsPass(*PassRegistry::getPassRegistry());
+ }
const char *getPassName() const {
return "Hexagon Split TFRCondSets";
const char *getPassName() const {
return "Hexagon Split TFRCondSets";
@@
-211,6
+218,17
@@
bool HexagonSplitTFRCondSets::runOnMachineFunction(MachineFunction &Fn) {
// Public Constructor Functions
//===----------------------------------------------------------------------===//
// Public Constructor Functions
//===----------------------------------------------------------------------===//
+static void initializePassOnce(PassRegistry &Registry) {
+ const char *Name = "Hexagon Split TFRCondSets";
+ PassInfo *PI = new PassInfo(Name, "hexagon-split-tfr",
+ &HexagonSplitTFRCondSets::ID, 0, false, false);
+ Registry.registerPass(*PI, true);
+}
+
+void llvm::initializeHexagonSplitTFRCondSetsPass(PassRegistry &Registry) {
+ CALL_ONCE_INITIALIZATION(initializePassOnce)
+}
+
FunctionPass*
llvm::createHexagonSplitTFRCondSets(const HexagonTargetMachine &TM) {
return new HexagonSplitTFRCondSets(TM);
FunctionPass*
llvm::createHexagonSplitTFRCondSets(const HexagonTargetMachine &TM) {
return new HexagonSplitTFRCondSets(TM);
diff --git
a/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp
b/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp
index 7473876675fb2f5fe12f0344e50e3648167a071e..39995e10b96da9fa3e9c5d1fc0a346d9d4766ef1 100644
(file)
--- a/
lib/Target/Hexagon/HexagonVLIWPacketizer.cpp
+++ b/
lib/Target/Hexagon/HexagonVLIWPacketizer.cpp
@@
-56,9
+56,6
@@
static cl::opt<bool> PacketizeVolatiles("hexagon-packetize-volatiles",
cl::ZeroOrMore, cl::Hidden, cl::init(true),
cl::desc("Allow non-solo packetization of volatile memory references"));
cl::ZeroOrMore, cl::Hidden, cl::init(true),
cl::desc("Allow non-solo packetization of volatile memory references"));
-extern cl::opt<bool> ScheduleInlineAsm;
-extern cl::opt<bool> CountDeadOutput;
-
namespace llvm {
void initializeHexagonPacketizerPass(PassRegistry&);
}
namespace llvm {
void initializeHexagonPacketizerPass(PassRegistry&);
}
@@
-180,6
+177,7
@@
INITIALIZE_PASS_BEGIN(HexagonPacketizer, "packets", "Hexagon Packetizer",
INITIALIZE_PASS_DEPENDENCY(MachineDominatorTree)
INITIALIZE_PASS_DEPENDENCY(MachineBranchProbabilityInfo)
INITIALIZE_PASS_DEPENDENCY(MachineLoopInfo)
INITIALIZE_PASS_DEPENDENCY(MachineDominatorTree)
INITIALIZE_PASS_DEPENDENCY(MachineBranchProbabilityInfo)
INITIALIZE_PASS_DEPENDENCY(MachineLoopInfo)
+INITIALIZE_AG_DEPENDENCY(AliasAnalysis)
INITIALIZE_PASS_END(HexagonPacketizer, "packets", "Hexagon Packetizer",
false, false)
INITIALIZE_PASS_END(HexagonPacketizer, "packets", "Hexagon Packetizer",
false, false)