[LLVMbugs] [Bug 320] [passmanager] Infinite loop when a transitive pass requires a transitive pass

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Jun 1 10:00:56 PDT 2007


http://llvm.org/bugs/show_bug.cgi?id=320

dpatel at apple.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From dpatel at apple.com  2007-06-01 12:00 -------
New PassManager does not go into infinite loop (at compile time as well as runtime) when I apply 
following patch to Hello example.

Index: Hello.cpp                                                                                                                                            
===============================================================
====                                                                                         
RCS file: /var/cvs/llvm/llvm/lib/Transforms/Hello/Hello.cpp,v                                                                                               
retrieving revision 1.18                                                                                                                                    
diff -r1.18 Hello.cpp                                                                                                                                       
42a43,59                                                                                                                                                    
>   struct Hello1 : public FunctionPass {                                                                                                                   
>     static char ID; // Pass identification, replacement for typeid                                                                                        
>     Hello1() : FunctionPass((intptr_t)&ID) {}                                                                                                             
>                                                                                                                                                           
>     virtual bool runOnFunction(Function &F) {                                                                                                             
>       HelloCounter++;                                                                                                                                     
>       std::string fname = F.getName();                                                                                                                    
>       EscapeString(fname);                                                                                                                                
>       cerr << "Hello1: " << fname << "\n";                                                                                                                
>       return false;                                                                                                                                       
>     }                                                                                                                                                     
>   };                                                                                                                                                      
>                                                                                                                                                           
>   char Hello1::ID = 0;                                                                                                                                    
>   RegisterPass<Hello1> X1("hello1", "Hello1 World Pass");                                                                                                 
>                                                                                                                                                           
>                                                                                                                                                           
57a75                                                                                                                                                       
>       AU.addRequiredTransitive<Hello>();                                                                                                                  
58a77                                                                                                                                                       
>       const std::vector<AnalysisID> &IDs = AU.getRequiredTransitiveSet();                                                                                 




------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



More information about the llvm-bugs mailing list