To anyone interested, I was apparently not initializing "hard enough".
I copied every initialize call from opt and it now works.
> Le 2015-06-16 à 22:33:58, Félix Cloutier <felixcca at yahoo.ca> a
écrit :
>
> Hi all,
>
> I'm trying to add the StructurizeCFG pass with a legacy::PassManager:
>
> legacy::PassManager pm;
> pm.add(createTypeBasedAliasAnalysisPass());
> pm.add(createScopedNoAliasAAPass());
> pm.add(createBasicAliasAnalysisPass());
> // other passes
> pm.add(createStructurizeCFGPass());
> pm.run(*module);
>
> But I get this error when I attempt to to run it:
>
> Pass 'Structurize control flow' is not initialized.
> Verify if there is a pass dependency cycle.
> Required Passes:
> Lower SwitchInst's to branches
> Dominator Tree Construction
> Assertion failed: (PI && "Expected required passes to be
initialized"), function schedulePass, file
/path/to/llvm/lib/IR/LegacyPassManager.cpp, line 640.
>
> StructurizeCFG calls initializeStructurizeCFGPass from its constructor, so
it would seem to me that the pass should have been initialized. Predictably,
explicitly calling it myself does not change anything.
>
> There appears to be only one use of StructurizeCFG (from the AMD GPU
backend), and I'm not familiar enough with the backend architecture to
figure out what it's doing that I'm not.
>
> Am I missing something obvious?
>
> Félix
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20150617/e26a0b1b/attachment.html>