[llvm-dev] Loop unroll error

chenyunxiao via llvm-dev llvm-dev at lists.llvm.org
Sat Sep 16 02:37:51 PDT 2017

Dear llvm developers:
    I think llvm is a powerful project. But there is an error trouble me.
    When I use OPT tool to inline other function, then use pass manager to unroll loop. The inline option is successful, but when unroll loop at ten times the result is false.
    But I do not want to promote the memory to register, so I just interpret the ll file which create by clang.
   Can you help me how to deal with this problem?

    The follow will show my code:
    llvm::legacy::PassManager lpm;
//     lpm.add(createPromoteMemoryToRegisterPass());
//     int threshold = UINT_MAX;
//     int unrollCount = unroll_time;
//     int allowPartial = 1;
//     lpm.add(createInstructionNamerPass());
    //lpm.add(new looptest());
    func = Mod->getFunction("main");

By Chen YX
Best wishes to you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170916/ede08248/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcd_2_true-unreach-call_true-no-overflowinline.ll
Type: application/octet-stream
Size: 6834 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170916/ede08248/attachment.obj>

More information about the llvm-dev mailing list