summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/IfConversion.cpp
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2012-02-08 21:23:13 +0000
committerAndrew Trick <atrick@apple.com>2012-02-08 21:23:13 +0000
commit1fa5bcbe2ae447344d6cbba3f19daa9a5bed5de8 (patch)
treeaa75a14f62673ecf5b1e2c4e17c1289336597211 /llvm/lib/CodeGen/IfConversion.cpp
parentc40815de62286ee6e324cb0a342db85e0a5a3c23 (diff)
downloadbcm5719-llvm-1fa5bcbe2ae447344d6cbba3f19daa9a5bed5de8.tar.gz
bcm5719-llvm-1fa5bcbe2ae447344d6cbba3f19daa9a5bed5de8.zip
Codegen pass definition cleanup. No functionality.
Moving toward a uniform style of pass definition to allow easier target configuration. Globally declare Pass ID. Globally declare pass initializer. Use INITIALIZE_PASS consistently. Add a call to the initializer from CodeGen.cpp. Remove redundant "createPass" functions and "getPassName" methods. While cleaning up declarations, cleaned up comments (sorry for large diff). llvm-svn: 150100
Diffstat (limited to 'llvm/lib/CodeGen/IfConversion.cpp')
-rw-r--r--llvm/lib/CodeGen/IfConversion.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/IfConversion.cpp b/llvm/lib/CodeGen/IfConversion.cpp
index bbc0f180c0a..e05837618fc 100644
--- a/llvm/lib/CodeGen/IfConversion.cpp
+++ b/llvm/lib/CodeGen/IfConversion.cpp
@@ -170,7 +170,6 @@ namespace {
}
virtual bool runOnMachineFunction(MachineFunction &MF);
- virtual const char *getPassName() const { return "If Converter"; }
private:
bool ReverseBranchCondition(BBInfo &BBI);
@@ -253,12 +252,12 @@ namespace {
char IfConverter::ID = 0;
}
+char &llvm::IfConverterID = IfConverter::ID;
+
INITIALIZE_PASS_BEGIN(IfConverter, "if-converter", "If Converter", false, false)
INITIALIZE_PASS_DEPENDENCY(MachineBranchProbabilityInfo)
INITIALIZE_PASS_END(IfConverter, "if-converter", "If Converter", false, false)
-FunctionPass *llvm::createIfConverterPass() { return new IfConverter(); }
-
bool IfConverter::runOnMachineFunction(MachineFunction &MF) {
TLI = MF.getTarget().getTargetLowering();
TII = MF.getTarget().getInstrInfo();
OpenPOWER on IntegriCloud