[LLVMdev] Pass Manager hangs with CallGraph and LoopSimplify
Samuel Crow
samuraileumas at yahoo.com
Mon May 11 13:16:41 PDT 2009
See http://llvm.org/docs/GettingStarted.html#brokengcc and then try building with something OTHER than GCC 4.1.2 .
----- Original Message ----
> From: Nick Johnson <npjohnso at cs.princeton.edu>
> To: LLVM Developers Mailing List <llvmdev at cs.uiuc.edu>
> Sent: Monday, May 11, 2009 3:01:12 PM
> Subject: [LLVMdev] Pass Manager hangs with CallGraph and LoopSimplify
>
> Hello,
>
> I have discovered a situation in which the pass manager will infinite
> loop. The minimal test case is below this message. The required
> structure of these passes is;
>
> Before requires CallGraph
> After requires LoopSimplify and Before
>
> I can observe this through opt:
>
> opt -load ./libBug.so -after input.bc -o output.bc
>
> I built my copy of llvm from svn revision 68820 using gcc 4.1.2
>
> Any suggestions?
> --
> Nick Johnson
>
>
>
>
> #include "llvm/Pass.h"
> #include "llvm/Transforms/Scalar.h"
> #include "llvm/Analysis/CallGraph.h"
>
>
> using namespace llvm;
>
> class Before : public ModulePass {
> public:
> static char ID;
> Before() : ModulePass(&ID) {}
>
> void getAnalysisUsage(AnalysisUsage &au) const {
> au.addRequired< CallGraph >();
> au.setPreservesAll();
> }
>
> bool runOnModule(Module &m) { return false; }
> };
>
> class After : public FunctionPass {
> public:
> static char ID;
>
> After() : FunctionPass(&ID) {}
>
> void getAnalysisUsage(AnalysisUsage &au) const {
> au.addRequiredID( LoopSimplifyID );
> au.addRequired< Before >();
> au.setPreservesAll();
> }
>
> bool runOnFunction(Function &f) { return false; }
> };
>
> char Before::ID = 0;
> char After::ID = 0;
> namespace {
> RegisterPass< Before > x("before", "before");
> RegisterPass< After > y("after", "after");
> }
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
More information about the llvm-dev
mailing list