search for: replacealluses

Displaying 20 results from an estimated 31 matches for "replacealluses".

2020 May 15
2
Issues with new Attributor (replaceAllUses fails with type mismatch)
...Internal and Official use only. > > Thanks > M Suresh > > From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of Mani, Suresh via llvm-dev > Sent: Friday, May 15, 2020 4:37 PM > To: llvm-dev at lists.llvm.org > Subject: [llvm-dev] Issues with new Attributor (replaceAllUses fails with type mismatch) > > [CAUTION: External Email] > > [AMD Official Use Only - Internal Distribution Only] > > Hi , > > There seems to be some issue with attributor, exactly in File Attributor.cpp, Function Attributor::rewriteFunctionSignatures(), Line No: 1600 (app...
2020 May 15
2
Issues with new Attributor (replaceAllUses fails with type mismatch)
...nstructions *after* we visited all of them. for (auto &CallSitePair : CallSitePairs) { CallBase &OldCB = *CallSitePair.first; CallBase &NewCB = *CallSitePair.second; ModifiedFns.insert(OldCB.getFunction()); CGUpdater.replaceCallSite(OldCB, NewCB); OldCB.replaceAllUsesWith(&NewCB); <---------------------------------------- Failing location OldCB.eraseFromParent(); } Failure symptom: Assertion failed: New->getType() == getType() && "replaceAllUses of value with new value of different type!" Snaps for IR from failing llvm I...
2013 Aug 02
0
[LLVMdev] opt -O3 causes Assertion `New->getType() == getType() && "replaceAllUses of value with new value of different type!"' failed
...optimization > :bzip2.del.bc.tgz > I have attached the input bc file after -O3 optimization : > bzip2.del.opt.bc.tgz > > > Command to run on -O3 optimized file: llc -cppgen=program > bzip2.del.opt.bc > > Call stack: > > llc: Value.cpp:307: void > llvm::Value::replaceAllUsesWith(llvm::Value*): Assertion > `New->getType() == getType() && "replaceAllUses of value with new > value of different type!"' failed. > 0 llc 0x00000000014c716a > llvm::sys::PrintStackTrace(_IO_FILE*) + 38 > 1 llc 0x00000000014c73d1...
2013 Jul 29
2
[LLVMdev] opt -O3 causes Assertion `New->getType() == getType() && "replaceAllUses of value with new value of different type!"' failed
...PU: amdfam10 I have attached the input bc file before -O3 optimization :bzip2.del.bc.tgz I have attached the input bc file after -O3 optimization : bzip2.del.opt.bc.tgz Command to run on -O3 optimized file: llc -cppgen=program bzip2.del.opt.bc Call stack: llc: Value.cpp:307: void llvm::Value::replaceAllUsesWith(llvm::Value*): Assertion `New->getType() == getType() && "replaceAllUses of value with new value of different type!"' failed. 0 llc 0x00000000014c716a llvm::sys::PrintStackTrace(_IO_FILE*) + 38 1 llc 0x00000000014c73d1 2 llc 0x0000...
2013 Aug 09
0
[LLVMdev] opt -O3 causes Assertion `New->getType() == getType() && "replaceAllUses of value with new value of different type!"' failed
...fter -O3 optimization : >>> bzip2.del.opt.bc.tgz >>> >>> >>> Command to run on -O3 optimized file: llc -cppgen=program >>> bzip2.del.opt.bc >>> >>> Call stack: >>> >>> llc: Value.cpp:307: void >>> llvm::Value::replaceAllUsesWith(llvm::Value*): Assertion >>> `New->getType() == getType() && "replaceAllUses of value with new >>> value of different type!"' failed. >>> 0 llc 0x00000000014c716a >>> llvm::sys::PrintStackTrace(_IO_FILE*) + 38 >>&gt...
2015 Jan 17
2
[LLVMdev] Assertion: replaceAllUses of value with new value of different type! being thrown all of a sudden
Hello, I wonder if someone would know what is going on below. All of a sudden I’m getting this assertion thrown: Assertion failed: (New->getType() == getType() && "replaceAllUses of value with new value of different type!"), function replaceAllUsesWith, file /Users/meister/Development/externals-clasp/llvm36/lib/IR/Value.cpp, line 345. It’s happening when DIBuilder::finalize is being called at the end of a source file compilation. Here’s the most illuminating debuggin...
2013 Aug 02
2
[LLVMdev] opt -O3 causes Assertion `New->getType() == getType() && "replaceAllUses of value with new value of different type!"' failed
...> I have attached the input bc file after -O3 optimization : >> bzip2.del.opt.bc.tgz >> >> >> Command to run on -O3 optimized file: llc -cppgen=program >> bzip2.del.opt.bc >> >> Call stack: >> >> llc: Value.cpp:307: void >> llvm::Value::replaceAllUsesWith(llvm::Value*): Assertion >> `New->getType() == getType() && "replaceAllUses of value with new >> value of different type!"' failed. >> 0 llc 0x00000000014c716a >> llvm::sys::PrintStackTrace(_IO_FILE*) + 38 >> 1 llc...
2015 Jan 19
2
[LLVMdev] Assertion: replaceAllUses of value with new value of different type! being thrown all of a sudden
...s.schaf at verizon.net> wrote: >> >> Hello, >> >> I wonder if someone would know what is going on below. >> >> >> All of a sudden I’m getting this assertion thrown: >> >> Assertion failed: (New->getType() == getType() && "replaceAllUses of value with new value of different type!"), function replaceAllUsesWith, file /Users/meister/Development/externals-clasp/llvm36/lib/IR/Value.cpp, line 345. >> >> It’s happening when DIBuilder::finalize is being called at the end of a source file compilation. >> >> H...
2017 Feb 01
2
Strange opt error in Value ("replaceAllUses of value with new value of different type!" assertion failure)
Hello. I'm getting the following error after adding some extra instrumentation in a module (LoopVectorize.cpp ) due to a bug in Value::replaceAllUsesWith (see more comments of mine below): Value::replaceAllUsesWith(New = i16* inttoptr (i16 51 to i16*)), this = %VectorGep = getelementptr i16, i16* inttoptr (i16 51 to i16*), <128 x i64> zeroinitializer, !dbg !17 ; this output is generated by me to see why error happens c...
2013 Oct 24
2
[LLVMdev] LLVM use chains
...m::BasicBlock' *) 0x6c675f7878630046 >> >> My conclusion was that the use chains weren't updated. Is there any >> recommended way of deleting a llvm::Function such that the use chain of the >> globals that it uses to be updated correspondingly? > You probably want replaceAllUsesWith. I am sorry I don't understand. Are you suggesting calling replaceAllUses of the .str1? What I really want to do is to 'erase' the function. By erasing I'd expect the uses of .str1 to 0 (because in the example I have it is used only by f()) and I see they are not. Vassil >...
2015 Jan 19
3
[LLVMdev] Assertion: replaceAllUses of value with new value of different type! being thrown all of a sudden
...g an assertions I added a few weeks after that commit in the Metadata RAUW method. But it is the equivalent assertion in Value::RAUW that you are hitting and that has been there forever. Looking at your exact revision, the assertion seems to trigger while executing: > > DIType(TempEnumTypes).replaceAllUsesWith(Enums); > > in DIBuilder::finalize(). Can you check if TempEnumTypes is null at this point? If that is the issue (which I’m not sure), then you need to call DIBuilder::createCompileUnit() at some point. > > Fred I had a thought, too: are you using two different `LLVMContext`s? T...
2013 Oct 24
0
[LLVMdev] LLVM use chains
>> You probably want replaceAllUsesWith. > > I am sorry I don't understand. Are you suggesting calling replaceAllUses of > the .str1? What I really want to do is to 'erase' the function. By erasing > I'd expect the uses of .str1 to 0 (because in the example I have it is used > only by f()) and I see the...
2019 Sep 19
2
Type unmatched after replacing functions
...ists.llvm.org> wrote: > > The function pointers are often put in the initializers of global variables, and > > they can not be simply replaced by a bitcast ConstantExpr since setOperand() > > cannot be used for Constant. > > Are you trying to be more selective than Value::replaceAllUsesWith > would allow for some reason? I'm very glad to select another way if there is a better one. :) > > Cheers. > > Tim.
2009 Jun 17
2
[LLVMdev] Localizing Globals ?
...>> > > It doesn't matter in terms of semantics: because AnalyzeGlobal > returned false, we're guaranteed the address of the global is never > taken. I wouldn't be surprised if we end up generating invalid IR in > some cases, though, because of the semantics of replaceAllUsesWith. > Do you have a testcase that breaks? > > The problem is replaceAllUsesWith asserts for type mismatch here. Try attached .bc with llvm-ld. assert(New->getType() == getType() && "replaceAllUses of value with new value of different type!"); Since stac...
2014 May 10
6
[LLVMdev] Replacing Platform Specific IR Codes with Generic Implementation and Introducing Macro Facilities
On 10 May 2014, at 13:53, Tim Northover <t.p.northover at gmail.com> wrote: > It doesn't make sense for everything though, particularly if you want > target-specific IR to simply not exist. What would you map ARM's > "ldrex" to on x86? This isn't a great example. Having load-linked / store-conditional in the IR would make a number of transforms related to
2009 Jun 17
0
[LLVMdev] Localizing Globals ?
On Tue, Jun 16, 2009 at 9:12 PM, Sanjiv Gupta<sanjiv.gupta at microchip.com> wrote: > The problem is replaceAllUsesWith asserts for type mismatch here. Try > attached .bc with llvm-ld. > > assert(New->getType() == getType() && >        "replaceAllUses of value with new value of different type!"); Ah, right; it probably isn't worth the effort to fix this transformation to wor...
2013 Dec 05
0
[LLVMdev] Help with replacing instructions via function pass
...via a function pass. I've written the following code in my function pass: ArrayType* b = ArrayType::get(IntegerType::get(getGlobalContext(), 8), 10); AllocaInst* pa = new AllocaInst(b, "arr"); //I is an instruction pointer currently pointing to %arr = alloca [30 x i8], align 1 I->replaceAllUsesWith(pa); I->eraseFromParent(); I->getParent()->getInstList().insert(*I, pa); When I run the pass, I run into the following error: Stack dump: Return code not zero; aborting void llvm::Value::replaceAllUsesWith(llvm::Value*): Assertion `New->getType() == getType() && &...
2013 Dec 06
0
[LLVMdev] ReplaceInstWithInst problem
...d, i.e. %a = alloca [30 x i8], align 1): ArrayType* arr = ArrayType::get(IntegerType::get(getGlobalContext(), 8), 10); AllocaInst* pa = new AllocaInst(arr, "blah"); BasicBlock::iterator ii(*I); ReplaceInstWithInst(I->getParent()->getInstList(), ii, pa); Why am I running into Value::replaceAllUsesWith(llvm::Value*): Assertion New->getType() == getType() && "replaceAllUses of value with new value of different type!"' ? Thanks, Shivam -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachment...
2009 Jun 16
0
[LLVMdev] Localizing Globals ?
...a different address space than stack? It doesn't matter in terms of semantics: because AnalyzeGlobal returned false, we're guaranteed the address of the global is never taken. I wouldn't be surprised if we end up generating invalid IR in some cases, though, because of the semantics of replaceAllUsesWith. Do you have a testcase that breaks? > How do I deny this optimization in that case? Can I find address space > for stack from AllocaInst and then compare the address spaces for two? An alloca is guaranteed to be in address space zero, so you can just check something like "GV->g...
2013 Oct 24
0
[LLVMdev] LLVM use chains
...82 = (const 'llvm::BasicBlock' *) 0x6c675f7878630046 > > My conclusion was that the use chains weren't updated. Is there any > recommended way of deleting a llvm::Function such that the use chain of the > globals that it uses to be updated correspondingly? You probably want replaceAllUsesWith. > Many thanks, > Vassil > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev