Displaying 20 results from an estimated 500 matches similar to: "[LLVMdev] Problem to remove successors"
2010 May 04
2
[LLVMdev] Question about GVN
Hello, I was investigating GVN.cpp file and I found suspicious part:
1587 bool NeedToSplitEdges = false;
1588 for (pred_iterator PI = pred_begin(LoadBB), E = pred_end(LoadBB);
1589 PI != E; ++PI) {
1590 BasicBlock *Pred = *PI;
1591 if (IsValueFullyAvailableInBlock(Pred, FullyAvailableBlocks)) {
1592 continue;
1593 }
1594 PredLoads[Pred] = 0;
1595
1596 if
2013 Aug 12
2
[LLVMdev] TerminatorInst and changing successor
Hi,
Is changing the successors for each basic blocks means by default that the
Terminator Instruction will be changed or this is another problem should be
solved?
If case 2 please tell me how to change it according to the new successors?
Thanks
--
* Rasha Salah Omar
Msc Student at E-JUST
Demonestrator at Faculty of Computers and Informatics
Benha University*
* e-mail:
2013 Aug 14
3
[LLVMdev] BranchInst comparison
Your question isn't clear; please restate what specifically isn't working.
-Eli
On Wed, Aug 14, 2013 at 11:57 AM, Rasha Omar <rasha.sala7 at gmail.com> wrote:
> or like this
>
> %cmp4 = icmp eq i32 %rem, 0
>
> br i1 %cmp4, label %if.then5, label %if.else7
>
>
> On 14 August 2013 20:08, Rasha Omar <rasha.sala7 at gmail.com> wrote:
>
>> Hi
2013 Aug 15
0
[LLVMdev] BranchInst comparison
How could BranchInst be used to insert new branch between two basic blocks
to get result like this example:
br label %if.else
br label %if.then
br i1 %cmp1, label %if.then, label %if.else
Thanks for your help
On 14 August 2013 21:36, Eli Friedman <eli.friedman at gmail.com> wrote:
> Your question isn't clear; please restate what specifically isn't working.
>
> -Eli
2013 Aug 14
2
[LLVMdev] BranchInst comparison
Hi All,
How could I use BranchInst to implement for example
br label %if.else7
br label %if.then5
br i1 %cmp4, label %if.then5, label %if.else7
I can use BranchInst for only one instruction but how could I compare
between two branches
Thanks
--
* Rasha Salah Omar
Msc Student at E-JUST
Demonestrator at Faculty of Computers and Informatics
Benha University*
*
2013 Aug 14
0
[LLVMdev] BranchInst comparison
or like this
%cmp4 = icmp eq i32 %rem, 0
br i1 %cmp4, label %if.then5, label %if.else7
On 14 August 2013 20:08, Rasha Omar <rasha.sala7 at gmail.com> wrote:
> Hi All,
>
> How could I use BranchInst to implement for example
> br label %if.else7
> br label %if.then5
> br i1 %cmp4, label %if.then5, label %if.else7
>
> I can use BranchInst for only one
2013 Jul 31
1
[LLVMdev] Instruction insertion By Module Pass
Thank you for your help
I tried
Instruction* p=&( Bb->front());
Type * Int32Type = IntegerType::getInt32Ty(getGlobalContext());
AllocaInst* newInst = new AllocaInst(Int32Type,"flag", p);
that works well
but I need to store the value of the variable too.
What's the method that could be used to store specific value??
On 30 July 2013 16:01, John Criswell
2013 Jul 30
2
[LLVMdev] Instruction insertion By Module Pass
Hi,
I need to insert new instruction into every basic block like x=1
or while loop
I tried this code, but it doesn't work
Type * Int32Type = IntegerType::getInt32Ty(getGlobalContext());
AllocaInst* newInst = new AllocaInst(Int32Type,"flag", Bb);
Bb->getInstList().push_back(newInst);
the error:
void llvm::SymbolTableListTraits<llvm::Instruction,
2013 Aug 12
0
[LLVMdev] TerminatorInst and changing successor
Hi Rasha,
> Is changing the successors for each basic blocks means by default that the
> Terminator Instruction will be changed or this is another problem should be
> solved?
I think the only way you *can* change a basic block's successors is by
changing its terminator instruction, so "by default" is the closest
answer. Though you should make sure your basic block only has
2013 Jul 30
0
[LLVMdev] Instruction insertion By Module Pass
On 7/30/13 7:44 AM, Rasha Omar wrote:
> Hi,
> I need to insert new instruction into every basic block like x=1
> or while loop
> I tried this code, but it doesn't work
>
> Type * Int32Type = IntegerType::getInt32Ty(getGlobalContext());
> AllocaInst* newInst = new AllocaInst(Int32Type,"flag", Bb);
> Bb->getInstList().push_back(newInst);
The problem is
2013 May 29
2
[LLVMdev] CloneFunctionInto() Error
Dear All,
I need your help urgently
I have to copy the CFG of each function using CloneFunction or
CloneFunctionInto.
After I made the copy function. Print the basic blocks then get this error :
While deleting: i32 %
Use still stuck around after Def is destroyed: %mul2_ = mul nsw i32 %6, 3
Use still stuck around after Def is destroyed: store i32 3, i32* %x_,
align 4
opt: Value.cpp:75: virtual
2013 Aug 20
1
[LLVMdev] Question about removeFromParent
I have Function
Function* F;
and one of its basic blocks BB
I want to insert this BB into a new function without remove it from the
original
according that BList is the list of the basic blocks of the newFunction
BList.insert(BB);
but I don't want to call BB->removeFromParent(); and without this method it
give me error that BB is already in a container
is there another function that get
2013 Sep 10
1
[LLVMdev] Global Variable Recall
Hi All,
I need to call global variable by its name from the following code
for(Function::iterator i=F->begin();i!=F->end();++i)
{
BasicBlock*Bb =&*i;
GlobalVariable* GV = new GlobalVariable(type,false,
F->getLinkage(),0, "F$"+Bb->getName());
GV->setInitializer(Constant::getNullValue (typ));
GList.push_back(GV);
}
Could I solve that by
2013 May 29
0
[LLVMdev] CloneFunctionInto() Error
Does cloning copies the function with its address or it constructs a new
address to the new function? Is this real copying for the CFG or just
opaque one to do some work?
If it's not real copying, please I need a method that can help me in
copying the function in another with new pointer to another address.
Please I need answer urgent
Thanks
On 29 May 2013 10:14, Rasha Omar <rasha.sala7
2013 Sep 08
2
[LLVMdev] "Instruction does not dominate all uses"
BB:
%4= load i32* @"FB"
%5 = icmp ne i32 %4, 0
br i1 %5, label %BB1, label %BB2
The error after
$clang -pthread MyNew.ll -o MyNew
Instruction does not dominate all uses!
Could you help for this ?
--
* Rasha Salah Omar
Msc Student at E-JUST
Demonestrator at Faculty of Computers and Informatics
Benha University*
* e-mail: rasha.omar at ejust.edu.eg*
2013 Aug 22
2
[LLVMdev] Crash in CreateShl() method
Hi All,
AllocaInst * AI = builder.CreateAlloca(type, 0, BBName);
StoreInst* ST= builderTF.CreateStore(ConstantInt::get(type,1),AI);
Value * Vresult = (Value*)ST;
Vresult = builderWait.CreateShl(Vresult, 1);
I need to make one bit shift left to the variable stored in the second step
I've got crash in this step
opt: /home/xx/llvm2/llvm/include/llvm/Support/Casting.h:237: typename
2013 Sep 08
0
[LLVMdev] "Instruction does not dominate all uses"
Hi Rasha,
> Instruction does not dominate all uses!
There should be two instructions printed after that message. The first
defines a value used by the second, but the message means there's some
path through your function that can reach the second inst (the use)
without the value being defined by the first instruction.
At its simplest you probably want to decide what that value should be
2013 Aug 16
2
[LLVMdev] CreateOr no matching member error
For the following code:
Type * type = IntegerType::getInt32Ty(getGlobalContext());
IRBuilder<> builder(BB);
std::set<Value *> Vset;
Value * Vresult=0;
for(std::set<Value*>::iterator Vit=Vset.begin();Vit!=Vset.end();Vit++)
{
Vresult=builder.CreateOr(Vit, Vresult, "WaitOr");
}
Vset is inserted in previous loop by 0 or 1 The error
2013 Aug 22
2
[LLVMdev] SwitchInst problem
Hi All,
Value* V;
Value* V2;
BasicBlock * BB;
unsigned j; ///number of cases
.... //insert V , V2, j and BB
SwitchInst* sw= builder.CreateSwitch(V, BB, j);
ConstantInt * CI= dyn_cast<ConstantInt>(V2);
sw-> addCase( CI , BB);
At last step there is
Program received signal SIGSEGV, Segmentation fault.
What is wrong in the code?
Thanks in advance
--
* Rasha Salah Omar
2013 Sep 01
1
[LLVMdev] LLVM ERROR: Program used external function 'foo' which could not be resolved!
Hi All,
Hope this question finds you
I typed this command
lli Main.ll Mod.ll
to execute program in Mod.ll that contains three functions and the main
function is in Main.ll
but I've got the following error
LLVM ERROR: Program used external function 'foo' which could not be
resolved!
Thanks in advance
--
* Rasha Salah Omar
Msc Student at E-JUST
Demonestrator at