[LLVMdev] MachineLoopInfo Analysis Not Done

Bill Wendling isanbard at gmail.com
Thu Dec 6 17:56:02 PST 2007

I'm trying to create the Machine LICM pass and I have this defined:

  class VISIBILITY_HIDDEN MachineLICM : public MachineFunctionPass {
    virtual void getAnalysisUsage(AnalysisUsage &AU) const {

But when I go to use it:

  bool MachineLICM::runOnMachineFunction(MachineFunction &MF) {
    // Get our Loop information...
    LI = &getAnalysis<MachineLoopInfo>();
    for (MachineLoopInfo::iterator
       I = LI->begin(), E = LI->end(); I != E; ++I) {

it doesn't execute the loop. In fact, the analysis is never ran. How
do I force it to be run?


More information about the llvm-dev mailing list