search for: bblocks

Displaying 8 results from an estimated 8 matches for "bblocks".

Did you mean: blocks
2005 Mar 16
2
[LLVMdev] Dynamic Creation of a simple program
Hi Misha, Thanks for your answer I was doing this: ======================== BasicBlock *BBlock = new BasicBlock("entry", MyFunc); ... Value *Zero = ConstantSInt::get(Type::IntTy, 0); Value *UZero = ConstantUInt::get(Type::UIntTy, 0); MallocInst* mi = new MallocInst( STyStru ); mi->setName("tmp.0"); BBlock->getInstList().push_back( mi );
2008 Dec 05
2
[LLVMdev] replacing a global variable by a constant
Hi, I am trying to replace a global variable with a constant. I did manage to do it, but somehow it appears to be fairly bruteforce by just iterating over all functions/bblocks/instructions and filtering for those that load the variable and replacing the instruction with Instruction::replaceAllUsesWith(). The more intuitive way of iterating over the uses of the variable did not work out as I have to replace the whole instruction instead of just the operand (as GlobalVari...
2016 Oct 18
2
[SCEV] inconsistent operand ordering
Thanks for fixing this Sanjoy! I do have a few questions/suggestions on the fix if you don't mind. 1) Would this work correctly if the values are call instructions with no operands, like this- %a = foo() %b = bar() 2) From the way this function is set up, it looks like the emphasis is on saving compile time by trading off robustness. Is compile time such a big concern here that we want to
2008 Dec 05
0
[LLVMdev] replacing a global variable by a constant
...on or global value optimization). That pass would then probably do some similar iterating as you've described, but at least you won't have to maintain that part of code :-) > I did manage to do it, but somehow it appears to be fairly bruteforce by > just iterating over all functions/bblocks/instructions and filtering for > those that load the variable and replacing the instruction with > Instruction::replaceAllUsesWith(). > The more intuitive way of iterating over the uses of the variable did > not work out as I have to replace the whole instruction instead of just > t...
2010 May 11
0
[LLVMdev] determine the basic_block inside if and else
Hello I used a functionPass to count the number of bloks ? so for each BBlock I check if it is a loop or BB ... and I'm wandring How can I determine if a BB is a conditional block (if) ?? and How can I separate between the BBs inside the if and those inside the else ?? Thank you so much K.H -------------- next part -------------- An HTML attachment was scrubbed... URL:
2008 Dec 05
1
[LLVMdev] replacing a global variable by a constant
...> > That pass would then probably do some similar iterating as you've described, > but at least you won't have to maintain that part of code :-) > > >> I did manage to do it, but somehow it appears to be fairly bruteforce by >> just iterating over all functions/bblocks/instructions and filtering for >> those that load the variable and replacing the instruction with >> Instruction::replaceAllUsesWith(). >> The more intuitive way of iterating over the uses of the variable did >> not work out as I have to replace the whole instruction instea...
2016 Oct 18
2
[SCEV] inconsistent operand ordering
Thanks for the helpful reply! I see that we are trying to keep ScalarEvolution stable around instruction ordering. My suggestion would be to not restrict the fix by only recursing on the first operand. By "dominator logic" I meant that if all other 'cheap' checks fail, we should decide by walking the dominator tree to see which instruction's basic block is encountered
2016 Oct 17
2
[SCEV] inconsistent operand ordering
Hi, I noticed an inconsistency in how ScalarEvolution orders instruction operands. This inconsistency can result in creation of separate (%a * %b) and (%b * %a) SCEVs as demonstrated by the example IR below (attached as gep-phi.ll)- target datalayout = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128" define void @foo(i8* nocapture %arr, i32 %n, i32* %A, i32* %B) local_unnamed_addr {