Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] Update PHINode after extracting code"
2011 Jan 27
0
[LLVMdev] Update PHINode after extracting code
I guess I didn't have a clear question.
Suppose we have BB1 and BB2 both point to BB3.
BB1 has variable x. BB2 also as variable x.
BB3 will have PHINode for x with 2 value from BB1 and BB2.
BB1 BB2
\ /
BB3
Now if BB1 and BB2 is extracted into a function
(using ExtractCodeRegion), they will be replaced by
a basic block called codeRepl (which has a call to the extracted
2011 Jan 27
2
[LLVMdev] Update PHINode after extracting code
On 01/26/2011 07:50 PM, Vu Le wrote:
> I guess I didn't have a clear question.
>
> Suppose we have BB1 and BB2 both point to BB3.
> BB1 has variable x. BB2 also as variable x.
> BB3 will have PHINode for x with 2 value from BB1 and BB2.
> BB1 BB2
> \ /
> BB3
>
> Now if BB1 and BB2 is extracted into a function
> (using ExtractCodeRegion), they
2011 Jan 27
0
[LLVMdev] Update PHINode after extracting code
Hi Tobias,
If the PHI node at exit block of region R has multiple inputs from the R,
I split the exit block into 2.
The first block contains all PHI nodes whose input are all from the region.
The second is the new exit node.
All branches (outside R) to the old exit now point the new exit.
All regions whose exit is the old exit are also updated with the new exit
node.
It works like a charm.
2012 Feb 03
5
[LLVMdev] Updating PHI for Instruction Domination?
So my best bet is to try and work in reg2mem mode and then go back to
mem2reg?
I'm curious, it seems though when you split a block that the phis get
updated, right?
On Thu, Feb 2, 2012 at 5:05 PM, Eric Christopher <echristo at apple.com> wrote:
> Not that I'm aware of.
>
> -eric
>
> On Feb 2, 2012, at 3:47 PM, Ryan Taylor wrote:
>
> So essentially I'm
2012 Feb 06
1
[LLVMdev] Fwd: Updating PHI for Instruction Domination?
---------- Forwarded message ----------
From: Ryan Taylor <ryta1203 at gmail.com>
Date: Mon, Feb 6, 2012 at 10:36 AM
Subject: Re: [LLVMdev] Updating PHI for Instruction Domination?
To: Eric Christopher <echristo at apple.com>
Since I'm not sure which instructions I might want to replicate, would it
be possible to cast the Value from "PHINode::getIncomingValue" to
2012 Feb 06
0
[LLVMdev] Updating PHI for Instruction Domination?
I guess not since Value is a superclass of Instruction.
On Mon, Feb 6, 2012 at 10:36 AM, Ryan Taylor <ryta1203 at gmail.com> wrote:
>
>
> ---------- Forwarded message ----------
> From: Ryan Taylor <ryta1203 at gmail.com>
> Date: Mon, Feb 6, 2012 at 10:36 AM
> Subject: Re: [LLVMdev] Updating PHI for Instruction Domination?
> To: Eric Christopher <echristo at
2012 Feb 06
1
[LLVMdev] Updating PHI for Instruction Domination?
You're creating a new path that doesn't include L. For all values defined in L and used outside of L, you need to determine the new reaching def. That's specific to your transformation and can't be automated. Once you do that, creating the phi in F is natural.
-Andy
On Feb 6, 2012, at 11:51 AM, Ryan Taylor <ryta1203 at gmail.com> wrote:
> I guess not since Value is a
2012 Jul 25
2
[LLVMdev] Question about an unusual jump instruction
Dear all,
I'm working on an exploratory backend on llvm. In the instruction set I'm using
I have an instruction (called DECJNZ) that decrements a register and, if the
decremented value is not zero, jumps (with a relative jump) to a given offset.
I've described in tablegen this instruction as follow:
def DECJNZ : Instruction {
let Namespace = "MyTarget";
let
2010 Nov 17
1
[LLVMdev] Copy Instruction from one Basic block to another
I want to do the following:
suppose the program structure:
bb
/ \
bb1 bb2
\ /
bb3
2010 Jul 17
2
[LLVMdev] How to insert a basic block in an edge
Hi all,
Suppose in a CFG bb1 has two succesor bb3 and bb4, and bb3 has two
predecessor bb1 and bb2. Now how can I insert a basic block between
bb1 and bb3 that at the edge bb1-->bb3 .
In general how can I insert a basic block on an edge?
Regards,
Chayan
2010 Jul 18
2
[LLVMdev] How to insert a basic block in an edge
Hi,
I have tried to use SplitEdge function, but failed. Actually the third
parameter is a variable of type Pass and it need to be non-null. But I
could not figure out how to use it. Please help me out.
Regards,
Chayan
On Sat, Jul 17, 2010 at 10:16 PM, Nick Lewycky <nicholas at mxc.ca> wrote:
> Chayan Sarkar wrote:
>>
>> Hi all,
>>
>> Suppose in a CFG bb1 has two
2015 Mar 24
2
[LLVMdev] RFC - Improvements to PGO profile support
Example. Assuming the cap is 'C'
void bar()
{
// ENTRY count is 4*C, after capping it becomes 'C'
...
}
void test()
{
// BB1: count(BB1) = C
bar();
// BB2: count(BB2) = C
bar();
}
void test2()
{
// BB3: count(BB3) = C
bar();
// BB4: count(BB4) = C
bar();
}
What would inliner see here ? When it sees callsite1 -- it might mistaken
that is the
2010 Jul 20
2
[LLVMdev] How to insert a basic block in an edge
Hi All,
Still I could not figure out how to use Pass* while calling
SplitEdge() function. Can anyone provide me some example?
Regards,
Chayan
On Sun, Jul 18, 2010 at 11:49 PM, Nick Lewycky <nicholas at mxc.ca> wrote:
> Chayan Sarkar wrote:
>>
>> Hi,
>>
>> I have tried to use SplitEdge function, but failed. Actually the third
>> parameter is a variable of
2012 Jul 25
0
[LLVMdev] Question about an unusual jump instruction
On Wed, Jul 25, 2012 at 12:48 AM, Michele Scandale
<michele.scandale at gmail.com> wrote:
> Dear all,
>
> I'm working on an exploratory backend on llvm. In the instruction set I'm using
> I have an instruction (called DECJNZ) that decrements a register and, if the
> decremented value is not zero, jumps (with a relative jump) to a given offset.
>
> I've
2008 Jan 22
3
[LLVMdev] Walking all the predecessors for a basic block
Hi all,
Is there a way to walk through ALL the predecessors of a basic block
in a CFG. I tried to iterate over the preds using this method
for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI != E; ++I) {
BasicBlock *PredBB = *PI;
}
but this only gives the immediate predecessors for a basic block.
For example, in this sample control flow graph.
entry -> bb1 -> bb2 -> bb4
2010 Nov 14
2
[LLVMdev] Copy Instruction from one Basic block to another
I have created a new basic block. Now I want to make copy of instructions
from one basic block to another . How to do that ?
--
regards,
soumya prasad ukil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101115/ddb0c4ab/attachment.html>
2010 Nov 15
0
[LLVMdev] Copy Instruction from one Basic block to another
On Nov 14, 2010, at 12:13 PM, Soumya Prasad Ukil wrote:
> I have created a new basic block. Now I want to make copy of instructions from one basic block to another . How to do that ?
See CloneBasicBlock @ Transforms/Utils/Cloning.h
-
Devang
2010 Aug 02
2
[LLVMdev] indirectbr and phi instructions
Hi,
How does the requirement that phi instructions have one value per
predecessor basic block interact with indirectbr instructions? For
instance, take the following code:
L1:
br i1 %somevalue, label %L2, label %L3
L2:
%ret1 = i8* blockaddress(@myfunction, %L5)
br label %L4
L3:
%ret2 = i8* blockaddress(@myfunction, %L6)
br label %L4
L4:
%ret = phi i8* [%ret1, L2], [%ret2, L3]
2014 Sep 20
6
[LLVMdev] PHINode containing itself causes segfault when compiling Blender OpenCL kernel with R600 backend
Hi!
I'm trying to run Blender using Mesa OpenCL implementation on a radeonsi
card. First the kernel didn't want to compile, but that was caused by a
bug in it (they were using . instead of -> in 1 place), and after fixing
this bug I've got the kernel to compile...
...But after that, LLVM started to crash during translation of IR into
shader code with R600 backend.
2010 Jul 17
0
[LLVMdev] How to insert a basic block in an edge
Chayan Sarkar wrote:
> Hi all,
>
> Suppose in a CFG bb1 has two succesor bb3 and bb4, and bb3 has two
> predecessor bb1 and bb2. Now how can I insert a basic block between
> bb1 and bb3 that at the edge bb1-->bb3 .
>
> In general how can I insert a basic block on an edge?
Use llvm::SplitEdge in Transforms/Utils/BasicBlockUtils.h.
The technique is to create a new bb with a