[llvm-dev] GVN pass limitation.

xiuli pan via llvm-dev llvm-dev at lists.llvm.org
Mon Apr 18 02:17:04 PDT 2016



We are now facing a bug caused by the GVN pass, only part of the code was
optimized. I have found that the problem is cause by an Limit in


00055 static cl::opt<unsigned> BlockScanLimit(

00056     "memdep-block-scan-limit", cl::Hidden, cl::init(100),

00057     cl::desc("The number of instructions to scan in a block in memory

00058              "dependency analysis (default = 100)"));

The args can be changed using opt, but we are using libclang and libllvm and
running pass with llvm passmangers. I know that -mllvm can pass llvm args,
but the llvm::cl::ParseCommandLineOptions has some issues with mutlethread
and I have reported a bug in https://llvm.org/bugs/show_bug.cgi?id=25735,
and we could not use this for now.


So if there is another way to pass this memdep-block-scan-limit into the
pass manager or context? Or how could I set this memdep-block-scan-limit
right with libclang and libllvm?




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160418/be15066f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.ll
Type: application/octet-stream
Size: 10686 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160418/be15066f/attachment.obj>

More information about the llvm-dev mailing list