Sorav Bansal via llvm-dev
2019-Sep-19 11:56 UTC
[llvm-dev] Interpreter and arithmetic overflow intrinsics
Hi all, I am trying to run LLI on an optimized bitcode file in interpreted mode, and I get the following error message: LLVM ERROR: Code generator does not support intrinsic function 'llvm.usub.with.overflow.i32'! As the error message indicates, this intrinsic is not supported (lib/CodeGen/IntrinsicLowering.cpp). Is there any way that I can get the interpreter to work across this intrinsic? I am happy to dig into the LLVM source code to fix this if required, but want to understand if there are some fundamental difficulties in supporting something like this or not. If not, what is the easiest way of adding this support? thanks, Sorav
Philip Reames via llvm-dev
2019-Sep-23 22:20 UTC
[llvm-dev] Interpreter and arithmetic overflow intrinsics
To my knowledge, the IR interpeter has not been actively maintained for several years. Fixing this particular issue would be straight forward, and your certainly welcome to contribute a patch, but I'd suggest taking a step back and asking why you want to use the IR interpreter at all. What use case are you solving? There may be a better option available. Philip On 9/19/19 4:56 AM, Sorav Bansal via llvm-dev wrote:> Hi all, > > I am trying to run LLI on an optimized bitcode file in interpreted > mode, and I get the following error message: > > LLVM ERROR: Code generator does not support intrinsic function > 'llvm.usub.with.overflow.i32'! > > As the error message indicates, this intrinsic is not supported > (lib/CodeGen/IntrinsicLowering.cpp). Is there any way that I can get > the interpreter to work across this intrinsic? I am happy to dig into > the LLVM source code to fix this if required, but want to understand > if there are some fundamental difficulties in supporting something > like this or not. If not, what is the easiest way of adding this > support? > > thanks, > > Sorav > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Sorav Bansal via llvm-dev
2019-Sep-24 03:53 UTC
[llvm-dev] Interpreter and arithmetic overflow intrinsics
Thanks Philip for your response! On Tue, Sep 24, 2019 at 3:50 AM Philip Reames <listmail at philipreames.com> wrote:> > To my knowledge, the IR interpeter has not been actively maintained for > several years. Fixing this particular issue would be straight forward, > and your certainly welcome to contribute a patch, but I'd suggest taking > a step back and asking why you want to use the IR interpreter at all. > What use case are you solving? There may be a better option available.I am interested in running a 32-bit bitcode file (target triple i386-unknown-linux-gnu) with custom instrumentation that tracks the computed values (e.g., it logs them to a file) and also compares them to an existing log. I have already implemented the instrumentation logic as a part of the LLI interpreter, but am now facing this issue with unsupported intrinsics. Do you have any suggestions on how to do this better? thanks! Sorav
Maybe Matching Threads
- [LLVMdev] replace hardcoded function names by intrinsics
- [LLVMdev] replace hardcoded function names by intrinsics
- [LLVMdev] replace hardcoded function names by intrinsics
- [LLVMdev] replace hardcoded function names by intrinsics
- [LLVMdev] How should LLVM interpreter handle llvm.objectsize.i64