Skip to content
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

[vmcore] Type resolution code needs algorithmic improvements #846

Closed
lattner opened this issue Dec 4, 2004 · 2 comments
Closed

[vmcore] Type resolution code needs algorithmic improvements #846

lattner opened this issue Dec 4, 2004 · 2 comments
Assignees
Labels
bugzilla Issues migrated from bugzilla llvm:core slow-compile

Comments

@lattner
Copy link
Collaborator

lattner commented Dec 4, 2004

Bugzilla Link 474
Resolution FIXED
Resolved on Feb 22, 2010 12:44
Version 1.0
OS All

Extended Description

The type resolution code that lives in Type.cpp is the code in charge of
providing the invariant that "any two LLVM types that are structurally
equivalent have the same address". This code has to deal with opaque types that
get refined (which happens as bytecode and .ll files are parsed as well as when
modules are linked together).

Providing this invariant in the case where you have deeply cyclic types with all
kinds of funny stuff happening is non-trivial, and we have some N^2 or worse
algorithm in there. This code should be changed to operate an SCC at a time, as
other parts of the type resolution code have already been changed.

This code is a hot spot for complex C++ code, typically while linking. For
example, linking 252.eon with a profile build gives the following hotspot in
this code:

% cumulative self self total
time seconds seconds calls s/call s/call name
18.83 1.74 1.74 12260 0.00 0.00
llvm::TypeMap<llvm::PointerValType,
llvm::PointerType>::finishRefinement(llvm::PointerType*, llvm::DerivedType
const*, llvm::Type const*)

-Chris

@lattner
Copy link
Collaborator Author

lattner commented Dec 4, 2004

assigned to @lattner

@lattner
Copy link
Collaborator Author

lattner commented Nov 16, 2005

Fixed:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20051114/029507.html

This function now takes 2.4% of gccld time on eon.

-Chris

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla llvm:core slow-compile
Projects
None yet
Development

No branches or pull requests

1 participant