Displaying 6 results from an estimated 6 matches for "setincomingblock".
Did you mean:
getincomingblock
2013 Nov 09
1
[LLVMdev] Variable-length Phi-node
...= V->getType() &&
"All operands to PHI node must be the same type as the PHI node!");
if (NumOperands == ReservedSpace)
growOperands(); // Get more space!
// Initialize some new operands.
++NumOperands;
setIncomingValue(NumOperands - 1, V);
setIncomingBlock(NumOperands - 1, BB);
}
-Filip
On Nov 9, 2013, at 9:56 AM, David Chisnall <David.Chisnall at cl.cam.ac.uk> wrote:
> On 9 Nov 2013, at 16:35, William Moses <moses.williamsteven at gmail.com> wrote:
>
>> Is it possible to create something which has the same effect of a...
2013 Nov 09
0
[LLVMdev] Variable-length Phi-node
On 9 Nov 2013, at 16:35, William Moses <moses.williamsteven at gmail.com> wrote:
> Is it possible to create something which has the same effect of a variable-length phi node in the C++ api. Specifically, create a phi-node where the number of incoming values is not known at the time of its creation.
The PHI node preallocates its storage, so no.
> If there is no such way of creating a
2013 Nov 09
2
[LLVMdev] Variable-length Phi-node
All,
Is it possible to create something which has the same effect of a
variable-length phi node in the C++ api. Specifically, create a phi-node
where the number of incoming values is not known at the time of its
creation.
If there is no such way of creating a phinode like that, would it be
possible to create a dummy instruction and perform a replaceAllUsesWith? If
so, what should the dummy
2018 May 24
0
LLVM Pass To Remove Dead Code In A Basic Block
> On 25 May 2018, at 01:46, Aaron via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> Hi all,
>
> LLVM optimization pass gives an error "Terminator found in the middle of a basic block!" since basic block IR may have multiple "ret" instructions. It seems LLVM does not accept multiple return in a basic block by default.
>
Yes, if you’re inserting
2018 May 24
2
LLVM Pass To Remove Dead Code In A Basic Block
Hi all,
LLVM optimization pass gives an error "Terminator found in the middle of a
basic block!" since basic block IR may have multiple "ret" instructions. It
seems LLVM does not accept multiple return in a basic block by default.
Is there a specific optimization or pass that I can enable to remove
unreachable codes in basic blocks?
Best,
Aaron
-------------- next part
2018 May 24
2
LLVM Pass To Remove Dead Code In A Basic Block
...es in the basic block, updating the BB
field of
// incoming values...
llvm::BasicBlock *Successor = *I;
for (auto &PN : Successor->phis())
{
int Idx = PN.getBasicBlockIndex(basicBlock);
while (Idx != -1)
{
PN.setIncomingBlock((unsigned)Idx, newBlock);
Idx = PN.getBasicBlockIndex(basicBlock);
}
}
}
return newBlock;
}
Best,
Aaron
On Thu, May 24, 2018 at 9:22 AM, Dean Michael Berris <dean.berris at gmail.com>
wrote:
>
>
> > On 25 May 2018, at 01:46, Aaron...