similar to: Create an Add Instruction in LLVM IR

Displaying 20 results from an estimated 1000 matches similar to: "Create an Add Instruction in LLVM IR"

2018 Aug 08
3
Error Calling eraseFromParent()
LLVM is built in Release mode. The version is 6.0.0. I think that a similar code worked on verison 3.9.0. It is probably a null pointer dereference occurring in eraseFromParent(). I checked and reconfirmed that the instruction had no uses. Perhaps I should rebuild LLVM. Thanks. On Wed, Aug 8, 2018 at 9:03 PM, mayuyu.io <admin at mayuyu.io> wrote: > Hmmmm that’s strange. Do you get an
2018 Aug 08
2
Error Calling eraseFromParent()
Hi. Thanks. I changed the code but the problem exists. This is my new code which is again very simple: ... bool runOnFunction(Function &F) override { vector<Instruction *> dels; dels.clear(); for (inst_iterator It = inst_begin(&F), Ie = inst_end(&F); It != Ie;) { Instruction *I = &*(It++); if (auto* op = dyn_cast<BinaryOperator>(I)) { IRBuilder<NoFolder>
2018 Aug 07
2
Error Calling eraseFromParent()
Thanks Bjorn! But The problem is still there. On Wed, Aug 8, 2018 at 2:04 AM, Björn Pettersson A < bjorn.a.pettersson at ericsson.com> wrote: > It looks quite dangerous to erase the instruction I inside the loop when > iterating over all instructions in the function. > I guess it depends on how the range based iterator is implemented if that > works or not. > > I think
2005 Jul 07
1
rsync 2.6.4 - directory always updated
Hi, I'm trying to figure out why when I do an rsync (Solaris, version 2.6.4 on both sides) from a site on the West Coast of the US to a site on the East coast, I keep getting directories updated when I use the command like this: # rsync -ar -v -v -i -O --force --delete --exclude=.snapshot --stats \ src:/sysic/lib/freedomlib_V100/ /sysic/lib/freedomlib_V100/ And I get output like this,
2004 Apr 29
3
memory problems with lm
Hello list, I've seen the recent discussions documenting problems with lm. I have encountered the following problem. I use WinXP Pro with service pack 1, and R 1.9.0, on a XEON 2GHz, with 1GB of RAM. > eff.fro std.dev mean NSTRDSP 7.403749e-01 1.215686e-01 CPFGEP 9.056763e+00 1.815686e+00 WSWOLF 4.703588e+05 1.112832e+05 NPILGRIM 1.017640e+06 2.134335e+05
2019 Jul 03
2
optimisation issue in an llvm IR pass
Hello, I have an optimisation issue in an llvm IR pass - the issue being that unnecessary instructions are generated in the final assembly (with -O3). I want to create the following assembly snippet: mov dl,BYTE PTR [rsi+rdi*1] add dl,0x1 adc dl,0x0 mov BYTE PTR [rsi+rdi*1],dl however what is created is (variant #1): mov dl,BYTE PTR [rsi+rdx*1] add dl,0x1 cmp
2019 Jul 03
3
optimisation issue in an llvm IR pass
Hi Craig, On 03.07.19 17:33, Craig Topper wrote: > Don't the CreateICmp calls return a Value* with an i1 type? But then > they are added to an i8 type? Not sure that works.  I had that initially: auto cf = IRB.CreateICmpULT(Incr, ConstantInt::get(Int8Ty, 1)); auto carry = IRB.CreateZExt(cf, Int8Ty); Incr = IRB.CreateAdd(Incr, carry); it makes no difference to the generated assembly
2012 Feb 01
1
[LLVMdev] Function Insertion Error
Hi, I am trying to insert a function into the LLVM IR. But i get a stack dump exception. My code is as follows.   #include "llvm/Pass.h" #include "llvm/Function.h" #include "llvm/Module.h" #include "llvm/Support/raw_ostream.h" #include "llvm/ADT/Statistic.h" #include "llvm/Support/IRBuilder.h" using namespace llvm;   namespace {
2012 Nov 02
4
[LLVMdev] Instruction does not dominate all uses! <badref> ??
I'm having trouble figuring out what the error "Instruction does not dominate all uses!" means. I'm trying to construct a call to a function with two parameters. The printed IR, with error, looks like this: define i32 @add(i32, i32) { EntryBlock: %2 = add i32 %0, %1 ret i32 %2 } define i32 @eval_expr() { EntryBlock: ret i32 <badref> } Instruction does not dominate
2017 Apr 08
3
How to insert vector type input parameter for function in C/C++ API?
Fantastic! It's working! Thank you so much Craig!!! On Fri, Apr 7, 2017 at 6:05 PM, Craig Topper <craig.topper at gmail.com> wrote: > It should be VectorType::get(Type::getInt32Ty(Context),4). You need the > word "get" after VectorType:: > > ~Craig > > On Fri, Apr 7, 2017 at 6:01 PM, Michael Choi <choimichael103 at gmail.com> > wrote: >
2011 Oct 13
1
[LLVMdev] problems running JIT code on Mac 32-bit
Hello, I am trying to run this test program via JIT on my Mac (10.7.1) where I have compiled the latest LLVM code for 32-bit and it is not working properly. Running the same code against LLVM 2.9 works fine. I also tried recompiling my same checkout of LLVM as 64-bit and re-compiled my test program and that works fine, for some reason the 32-bit version is yielding unexpected behavior. I believe
2013 Nov 26
2
[LLVMdev] Disabling optimizations when using llvm::createPrintModulePass
Hello, using the LLVM API, I've build one very simple function that adds two ConstantInts and returns the result. I noticed that, when I emit IR code, it is optimized to a simple "ret i16 42" when I add 40 and 2. I'd like to see the operations that are necessary to compute the result, though. Can I somehow disable this optimization in the pass, leading to more verbose IR code?
2012 Nov 02
0
[LLVMdev] Instruction does not dominate all uses! <badref> ??
Hi edA-qa mort-ora-y, On 02/11/12 10:20, edA-qa mort-ora-y wrote: > I'm having trouble figuring out what the error "Instruction does not > dominate all uses!" means. I'm trying to construct a call to a function > with two parameters. The printed IR, with error, looks like this: > > define i32 @add(i32, i32) { > EntryBlock: > %2 = add i32 %0, %1 >
2017 Mar 31
2
How to write the same things as `opt` command in C++ API
Hi, I'm Ryo Ota. I'm using LLVM 3.8.1. I have a quesion about inlining function in C++ API. I'd like to inline some functions in a module in the same way as `opt -inline` command. But my C++ code didn't work what I want to do. For example, by using `opt -inline` command,`main.ll` is converted into the `inlined.ll`(`opt` command worked what I want to do) [main.ll (Not inlined)]
2004 Oct 02
2
patch: SDI Xpe images support for pxelinux
Hi, I added support in pxelinux for SDI (Wndows XP embedded images) files a few time ago for specific needs. It works well (at least for me atm) and I think I can now submit it to this list. I get a very good improvement in speed over the traditional way of loading SDI images. * Links : The 'diff -urN' patch for syslinux-2.11 (documentation included) :
2013 Nov 28
0
[LLVMdev] Disabling optimizations when using llvm::createPrintModulePass
IRBuilder is a templated class, and one of the template arguments is the constant folder to use. By default it uses the ConstantFolder class which does target-independant constant folding. If you want to disable constant folding you can specify the NoFolder class instead, i.e. declare the builder as follows: IRBuilder<true, llvm::NoFolder> builder(body) On 26 Nov 2013, at 19:23, Daniel
2014 Oct 26
2
Nouveau doesn't use the maximal resolution of my screen and GPU
Hi everybody, I'm using Lubuntu 14.04 on an old desktop PC with a NVIDIA GeForce 7600 GS and a screen of 19 inches. The maximal resolution of my screen with Nvidia drivers is 1280x1024. (In particular, I use the Nvidia 331.89 driver) With Nouveau driver, the maximal resolution falls to 1024x768. Is there a solution for increasing the maximum resolution with Nouveau ? Best regards,
2015 Feb 16
3
[LLVMdev] LLVM parallel annotations
Hi all, I'm a grad student from MIT and as part of my thesis, I will be propagating parallelism in the IR level. I will be modifying clang and adding LLVM IR metadata annotations to indicate parallel regions and loops, then write optimizer passes that will run on top of the annotated LLVM IR. There has been a lot of research lately on Parallel IRs, such as SPIR[1
2012 Sep 19
3
[LLVMdev] newbie question on getelementptr
Hi All, I'm new to LLVM and I'm having a coding problem. I'm creating a GlobalVariable that contains a StructType that contains a Function. The function returns i32 and takes two i32's. Here is my code: GlobalVariable* retrieved = module->getGlobalVariable("myGV"); ... Constant* result = ConstantExpr::getGetElementPtr(retrieved, indices); How do I get my Function
2011 Nov 28
1
2 Y-AXIS labels on the same (left-hand side) Y-AXIS XXXX
Hello everyone, Is it possible to specify a 2 line y-axis label on the same lef-hand side y-axis? I am using the \n regular expression, but only the 2nd line appears (I assume the 1st line is printed off the page...) plot(PRE_SHB,R1, main="Figure 1.1: Scatterplot of Residualized Post Score", xlab = "Pre Score", ylab = "Residualized Post Score \n (Adjusted for Age