[llvm-commits] [llvm] r145124 - in /llvm/trunk: include/llvm/Pass.h lib/VMCore/Pass.cpp
Benjamin Kramer
benny.kra at googlemail.com
Thu Nov 24 13:14:11 PST 2011
Author: d0k
Date: Thu Nov 24 15:14:11 2011
New Revision: 145124
URL: http://llvm.org/viewvc/llvm-project?rev=145124&view=rev
Log:
Devirtualize Pass::getPassID, overriding it isn't useful and it gets called a lot.
While at it pull the trivial ctor in line.
Modified:
llvm/trunk/include/llvm/Pass.h
llvm/trunk/lib/VMCore/Pass.cpp
Modified: llvm/trunk/include/llvm/Pass.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Pass.h?rev=145124&r1=145123&r2=145124&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Pass.h (original)
+++ llvm/trunk/include/llvm/Pass.h Thu Nov 24 15:14:11 2011
@@ -86,7 +86,7 @@
Pass(const Pass &); // DO NOT IMPLEMENT
public:
- explicit Pass(PassKind K, char &pid);
+ explicit Pass(PassKind K, char &pid) : Resolver(0), PassID(&pid), Kind(K) { }
virtual ~Pass();
@@ -99,7 +99,7 @@
virtual const char *getPassName() const;
/// getPassID - Return the PassID number that corresponds to this pass.
- virtual AnalysisID getPassID() const {
+ AnalysisID getPassID() const {
return PassID;
}
Modified: llvm/trunk/lib/VMCore/Pass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Pass.cpp?rev=145124&r1=145123&r2=145124&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Pass.cpp (original)
+++ llvm/trunk/lib/VMCore/Pass.cpp Thu Nov 24 15:14:11 2011
@@ -25,8 +25,6 @@
// Pass Implementation
//
-Pass::Pass(PassKind K, char &pid) : Resolver(0), PassID(&pid), Kind(K) { }
-
// Force out-of-line virtual method.
Pass::~Pass() {
delete Resolver;
More information about the llvm-commits
mailing list