search for: splitedblock

Displaying 3 results from an estimated 3 matches for "splitedblock".

Did you mean: splitblock
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
...& "Block must have terminator instruction."); assert(it != basicBlock->getInstList().end() && "Can't split block since there is no following instruction in the basic block."); auto newBlock = llvm::BasicBlock::Create(basicBlock->getContext(), "splitedBlock", basicBlock->getParent(), basicBlock->getNextNode()); // Move all of the instructions from original block into new block. newBlock->getInstList().splice(newBlock->end(), basicBlock->getInstList(), it, basicBlock->end()); // Now we must loop through all of the s...