pass visibility question

Hi developers,

I have some problems using a non-default alias analysis. I wrote a
modulepass which needs a functionpass. The functionpass needs a type
bases alias analysis instead of the basicaa. I added the command line
parameter for this analysis to the opt invocation as follows:

opt -tbaa -global-live-values test.bc

The 'global-live-values' pass preserves all and requires a
functionpass 'LocalLiveValue'. The latter requires a
'MemoryDependenceAnalysis' pass which needs an alias analysis (see

class GlobalLiveValues : public ModulePass {

  void GlobalLiveValues::getAnalysisUsage(AnalysisUsage &AU) const {

class LocalLiveValue : public FunctionPass {
  void LocalLiveValue::getAnalysisUsage(AnalysisUsage &AU) const {

void MemoryDependenceAnalysis::getAnalysisUsage(AnalysisUsage &AU) const {

The passmanager structure looks as follows:

Target Data Layout
Basic Alias Analysis (default AA impl)
Type-Based Alias Analysis
  ModulePass Manager
    Basic CallGraph Construction
    Global Value Liveness Analysis
      Unnamed pass: implement Pass::getPassName()
    FunctionPass Manager
      Preliminary module verification
      Dominator Tree Construction
      Module Verifier
Pass Arguments: -mergereturn -memdep -local-live-values
Basic Alias Analysis (default AA impl)
  FunctionPass Manager
    Unify function exit nodes
    Memory Dependence Analysis

I would expect, that when the "Memory Dependence Analysis" calls "AA =
&getAnalysis<AliasAnalysis>();" it would get the alias analysis I
specified in the command line (-tbaa). Could you please help me? Is
the creation of the Passmanager OK when the dependency between
GlobalLiveValues and LocalLiveValue is dealt with? This Passmanager
seems not to be aware of the 'Type-Based Alias Analysis' created

Thank you for your help,
Gordon Haak