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

Óscar Fuentes <[email protected]> changed:

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

--- Comment #13 from Óscar Fuentes <[email protected]> 2011-05-08 07:28:30 CDT ---
It works now.

Apparently the problem was caused by my compiler running an incorrect series of
passes when optimizations are enabled. This is the code I was using, taken from
a past incantation of lli (or opt, I'm not sure):

    if( optimizationLevel > 0 ) {
      PassManager Passes;
      Passes.add( new TargetData(M) );
      FunctionPassManager *FPasses = new FunctionPassManager(M);
      FPasses->add( new TargetData(M) );

      createStandardFunctionPasses(FPasses, optimizationLevel);
      llvm::Pass *InliningPass = createFunctionInliningPass();
      createStandardModulePasses(&Passes, optimizationLevel,
                                 /*OptimizeSize=*/ false,
                                 /*UnitAtATime=*/ true,
                                 /*UnrollLoops=*/ true,
                                 /*SimplifyLibCalls=*/ true,
                                 /*HaveExceptions=*/ false,
                                 InliningPass);

      FPasses->doInitialization();
      for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I)
        FPasses->run(*I);
      FPasses->doFinalization();

      Passes.run(*M);
    }

After replacing that code with a call to builder::setOptLevel the optimized
LLVM bitcode no longer contains calls to llvm.trap. That was consistent with
what I was told on irc: on the JIT, after running the passes the right way, no
intrinsics are left on the code.

What is still unresolved is whether the JIT handles occurrences of llvm.trap or
barfs at it. Eli, if you want to investigate this further, please reopen the
bug and provide instructions about what to do for feeding you with more info.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to