-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[passmgr] Eliminate use of typeid/dynamic_cast #1260
Comments
The new PassManager continues to use typeid: Pass.h: return lookupPassInfo(typeid(AnalysisClass)); and dynamic_cast: It would be nice if we could get rid of these and start turning on -no-rtti. |
Devang, Any chance this PR (888) could get implemented for 2.0? Reid |
I have not yet thought much about this. IMO, it is impractical to use isa,classof approach used by Value thoughts ? ideas ? suggestions ? |
Every Pass already identifies itself when it registers. I don't see it as being |
One suggested implementation approach: Whenever a pass registration object's static ctor triggers, it Another approach: we could use the address of the pass registration object as a unique ID. |
I eliminated typeid uses. |
Cool! Thanks. When I get a chance to test it, I'll turn typeid support off in the Makefiles Thanks, Devang! Reid |
Thanks Reid. I still need to deal with two remaining dynamic_cast in PassAnalysisSupport.h though. |
Okay, I'll watch for the commits. :) |
FYI, I turned off typeid support when building llvm-gcc and all hell broke |
Passmanager no longer uses RTTI. |
Remove slice op creation. Creating a slice for a vector subscript
Extended Description
The passmgr is the only significant user of RTTI data. If we could eliminate its use, we could build all of
LLVM with -fno-rtti, which is good for a 5-6% size reduction. This would also provide (slightly) faster
builds for everyone! :)
-Chris
The text was updated successfully, but these errors were encountered: