[Hexagon] Use standard macros to initialize HexagonExpandCondsets pass

llvm-svn: 271045
This commit is contained in:
Krzysztof Parzyszek 2016-05-27 21:15:34 +00:00
parent b62e7e31f7
commit 764fed98e6
1 changed files with 7 additions and 12 deletions

View File

@ -188,6 +188,13 @@ namespace {
char HexagonExpandCondsets::ID = 0;
INITIALIZE_PASS_BEGIN(HexagonExpandCondsets, "expand-condsets",
"Hexagon Expand Condsets", false, false)
INITIALIZE_PASS_DEPENDENCY(MachineDominatorTree)
INITIALIZE_PASS_DEPENDENCY(SlotIndexes)
INITIALIZE_PASS_DEPENDENCY(LiveIntervals)
INITIALIZE_PASS_END(HexagonExpandCondsets, "expand-condsets",
"Hexagon Expand Condsets", false, false)
unsigned HexagonExpandCondsets::getMaskForSub(unsigned Sub) {
switch (Sub) {
@ -1349,18 +1356,6 @@ bool HexagonExpandCondsets::runOnMachineFunction(MachineFunction &MF) {
// Public Constructor Functions
//===----------------------------------------------------------------------===//
static void initializePassOnce(PassRegistry &Registry) {
const char *Name = "Hexagon Expand Condsets";
PassInfo *PI = new PassInfo(Name, "expand-condsets",
&HexagonExpandCondsets::ID, 0, false, false);
Registry.registerPass(*PI, true);
}
void llvm::initializeHexagonExpandCondsetsPass(PassRegistry &Registry) {
CALL_ONCE_INITIALIZATION(initializePassOnce)
}
FunctionPass *llvm::createHexagonExpandCondsets() {
return new HexagonExpandCondsets();
}