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

Eliminate cyclic dependencies between libraries #1217

Closed
lattner opened this issue Jul 26, 2006 · 3 comments
Closed

Eliminate cyclic dependencies between libraries #1217

lattner opened this issue Jul 26, 2006 · 3 comments
Assignees
Labels
bugzilla Issues migrated from bugzilla build-problem llvm:core

Comments

@lattner
Copy link
Collaborator

lattner commented Jul 26, 2006

Bugzilla Link 845
Resolution FIXED
Resolved on Nov 07, 2018 00:17
Version 1.0
OS All

Extended Description

We want to eliminate cycles in the dependency graph of the LLVM libraries. llvm-config reports this,
and Reid has compiled this information. To get this info, use:

list of which libs/objs depend on which other ones:
GenLibDeps.pl -flat /path/to/Debug/lib > LibDeps.flat

full dependency listing including symbols:
GenLibDeps.pl -why /path/to/Debug/lib | c++filt > LibDeps.whyå

Here are some simple dependencies that can be snipped, this may be out-of-date:

The main cycle is this:
libLLVMAnalysis.a -> libLLVMCodeGen.a -> libLLVMScalarOpts.a ->
libLLVMSelectionDAG.a -> libLLVMTarget.a -> libLLVMTransformUtils.a ->
libLLVMipa.a -> libLLVMAnalysis.a

libLLVMAnalysis.a shouldn't depend on libLLVMCodeGen.a
libLLVMSelectionDAG.a shouldn't depend on libLLVMTransformUtils.a (it uses it for critical edge
breaking)
libLLVMTransformUtils.a shouldn't use LLVMipa (it uses/updates call-graph stuff)
libLLVMTarget.a uses libLLVMCodeGen.a for MVT::getVectorType (codegen should use target, not the
other way around)

LLVMIA64 uses intrinsic lowering? It shouldn't.

Maybe snippable:
libLLVMCodeGen uses Analysis only for loopinfo?

TransformUtils shouldn't depend on ScalarOpts. It currently does to get LowerSelectID, LowerSwitchID,
PromoteMemoryToRegisterID. We need to make a pass be able to "update" another pass without having
a strong dependency on that pass existing.

Thanks to Reid for collecting much of this data.

-Chris

@lattner
Copy link
Collaborator Author

lattner commented Jul 26, 2006

assigned to @lattner

@lattner
Copy link
Collaborator Author

lattner commented Aug 3, 2006

This is now fixed.  'make' in llvm-config now prints:

llvm[0]: Regenerating LibDeps.txt
llvm[0]: Finding cyclic dependencies between LLVM libraries.
llvm[0]: Building llvm-config script.

-Chris

@llvmbot
Copy link
Collaborator

llvmbot commented Aug 3, 2006

Verified on Linux. The makefile check has been re-enabled. It is now verbotten
to create cycles in library dependencies.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
jeanPerier pushed a commit to jeanPerier/llvm-project that referenced this issue Jan 4, 2022
[flang] Audit "auto" usage in Lower/Bridge.cpp
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 build-problem llvm:core
Projects
None yet
Development

No branches or pull requests

2 participants