Displaying 20 results from an estimated 300 matches similar to: "[LLVMdev] SwitchInstr::removeCase() doesn't remove PHINodes' predecessors"
2008 Sep 27
0
[LLVMdev] SwitchInstr::removeCase() doesn't remove PHINodes' predecessors
Nuno Lopes wrote:
> PHINode should have one entry for each predecessor of its parent basic
> block!
> %ret.0 = phi i32 [ 0, %ifthen ], [ 1, %ifelse ] ; <i32>
> [#uses=1]
> Broken module found, compilation aborted!
>
> This is because myphi is not reachable from ifthen anymore. My question is:
> is this a bug (or missing feature) or do I need to
2015 Aug 10
3
Possible bug in adjusting PHINode from removePredecessor?
Hi,
Simple description of the problem below. I have code coming into
pruneEH as follows
fn a {
entry:
call fn b
...
for_cond:
%i = phi [1, entry] [%x, for_body]
cmp $i with someval
cond-br for_body or for_exit
for_body:
...
$x = $i + 1
branch for_cond
for_exit
...
}
PruneEH determines that the call to fn-b won't return. The code is
modified thus.
fn a {
entry:
call fn b
unreachable insn
2017 May 01
4
RFC: Stop using redundant PHI node entries for multi-edge predecessors
Hi,
On Mon, May 1, 2017 at 8:47 AM, Daniel Berlin via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
>> Today, the IR requires that if you have multiple edges from A to B
>> (typically with a switch) any phi nodes in B must have an equal number of
>> entries for A, but that all of them must have the same value.
>
>> This seems rather annoying....
>> 1) It
2020 May 15
3
ConstantFoldTerminator doesn't delete trivially dead phi inputs
I'm looking into some missed optimizations where CodeGenPrepare seems
to leave trivially dead instructions lying around.
This happens because CodeGenPrepare::runOnFunction calls
ConstantFoldTerminator which folds a "br i1 false" into an
unconditional branch and calls BasicBlock::removePredecessor which
calls PHINode::removeIncomingValue. Each incoming value that is
removed from a
2005 Sep 23
1
Minor idea - "Press any key to boot within 5 second" style of thing...
I like how some cds, such as the windows installer discs will skip
booting from the disc if you accidentally left the drive because they
require you to hit a key to make them actually boot from the disc.
I've kind of tried to emulate this behavior using chain.c32, but, it
requires me to specify which harddrive, and I'd rather see an
independant setup. I've tried localboot -1, but, it
2009 May 08
2
[LLVMdev] Splitting a basic block, replacing it's terminator
Hi,
I want to insert a conditional branch in the middle of a basic block.
To that end, I am doing these steps:
(1) Split the basic block:
bb->splitBasicBlock()
(2) Remove the old terminator:
succ->removePredecessor(bb)
bb->getTerminator()->getParent()
(3) Adding a new terminator:
BranchInst::Create(ifTrue, ifFalse, cnd, "", bb);
That seems to work, but later passes
2008 Aug 12
0
[LLVMdev] Eliminating gotos
On Aug 11, 2008, at 2:02 PM, Benedict Gaster wrote:
> We would like to develop a code generator using LLVM for a target
> language that does not support conditional branches and in fact only
> supports structured control flow, eg. If and while.
What's the difference between an "if" and a conditional branch?
> As far as I can tell that the problem with doing this in
2010 Mar 04
1
ifthen() question
Hi All,
I am using a specialized aggregation function to reduce a dataset with
multiple rows per id down to 1 row per id. My function work perfect when
there are >1 id but alters the 'var.g' in undesirable ways when this
condition is not met, Therefore, I have been trying ifthen() statements to
keep the original value when length of unique id == 1 but I cannot get it to
work. e.g.:
2008 Aug 11
3
[LLVMdev] Eliminating gotos
We would like to develop a code generator using LLVM for a target language
that does not support conditional branches and in fact only supports
structured control flow, eg. If and while. As far as I can tell that the
problem with doing this in LLVM today, is that it does not support these
high-level constructs and instead all control flow is implemented as
branches.
It is ³fairly²
2008 Aug 12
4
[LLVMdev] Eliminating gotos
Hi,
Comments inline.
Ben
On 12/08/2008 03:14, "Owen Anderson" <resistor at mac.com> wrote:
>> We would like to develop a code generator using LLVM for a target language
>> that does not support conditional branches and in fact only supports
>> structured control flow, eg. If and while.
What's the difference between an "if" and a conditional
2013 Aug 25
0
[LLVMdev] removePredecessor() and update predecessor list
Hi all,
for(pred_iterator PI=pred_begin(BB); PI!=pred_end(BB); PI++)
{
BasicBlock *Pres = *PI;
pred.insert(Pres);
}
for(predit = pred.begin(); predit!=pred.end();predit++)
(BB)->removePredecessor(*predit);
Is this code enough to remove the predecessor for each basic block As I
read in documentation that this removePredecessor() doesn't update the
predecessor list.
So,
2009 May 08
0
[LLVMdev] Splitting a basic block, replacing it's terminator
On May 8, 2009, at 4:02 PM, Nick Johnson wrote:
> I want to insert a conditional branch in the middle of a basic block.
> To that end, I am doing these steps:
>
> (1) Split the basic block:
> bb->splitBasicBlock()
>
> (2) Remove the old terminator:
> succ->removePredecessor(bb)
> bb->getTerminator()->getParent()
Assuming that the new block will still be a
2012 Apr 04
3
Rgui maintains open file handles after Sweave error
Hello Folks,
When I run the document below through sweave, rgui.exe/rsession.exe
leaves a file handle open to the sweave-001.pdf graphic (as verified by
process explorer). Pdflatex.exe then crashes (with a Permission Denied
error) because the graphic file is locked.
This only seems to happen when there is an error in the sweave document.
When there are no errors, no file handles are left open.
2013 Jul 31
1
[LLVMdev] Problem to remove successors
Hi All,
I need to remove successors from every basic block to insert new ones
I tried this code, but it doesn't work
void RemoveSuccessor(TerminatorInst *TI, unsigned SuccNum) {
assert(SuccNum < TI->getNumSuccessors() &&
"Trying to remove a nonexistant successor!");
// If our old successor block contains any PHI nodes, remove the entry
in the
//
2019 Mar 18
2
How to get the possible predecessors for a PHINode
Hi all,
I have encountered the following instruction:
%.0.i = phi i8* [ %9, %8 ], [ %11, %10 ]
How can I get the %8 and %10?
I'm using http://llvm.org/doxygen/classllvm_1_1PHINode.html as a reference
but I cannot understand how to do that.
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2009 Mar 17
1
Combining Sweave and fancyvrb
I find Sweave very useful and I was trying to combine it with the
latex package fancyvrb. I was trying to get line numbering and labels
in order to reference the lines where particular commands occur.
Unfortunately, I haven't been able to figure out how to do it. Maybe
somebody can help me.
The following is a sample Rnw file: the first part shows what I would
like to get, the second what I
2007 Jun 21
1
generating a new variable based on results of a by command
I have a matrix with a set of variables one of which is a factor. Using by()
I have calculated something about each group (say the sum). Now I want to
create a new variable in the original matrix that contains the results of
the by() for each observation that is in the corresponding group.
For example I have:
---------
a <-c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16)
b
2000 Jun 28
1
Rd2dvi
I'm trying to use R CMD Rd2dvi and I end up at a Latex (I think)
command prompt. What's missing or what am I suppose to do?
Paul Gilbert
_______
paul at breman:/apps/dse-versions/2000.6/dse#R CMD Rd2dvi syskern This is
TeX, Version 3.14159 (Web2C 7.3) (Rd2.tex LaTeX2e <1998/12/01> Babel
<v3.6k> and hyphenation patterns for american, french, german, ngerman,
nohyphenation,
2010 May 01
1
[LLVMdev] How to change successor of a regular Basic block
Hi,
I am working with regular dominator tree and not MachineDominatorTree.
I wanted to modify the CFG structure and for that I need to change
successor of a basic block.
How can I do that?
Or is there a way to cast a BasicBlock to MachineBasicBlock so that i
can use functions addSucessor and removeSuccessor for the basic block.
It will be great if someone can help.
regards,
Ambika
2011 Nov 09
1
[LLVMdev] [LLVM, loop-unswitch tests] preserve-analyses.ll, strange PHI instruction.
OK. Thanks. And if I removed "case 4:" for example. Need I scan all phi
nodes and fix it, by removing one predecessor (if it exists) to switch's
parent block?
-Stepan.
Nick Lewycky wrote:
> Stepan Dyatkovskiy wrote:
>> Hi all.
>>
>> Looking at test/Transforms/LoopUnswitch/preserve-analyses.ll, I found
>> improper phi instruction at string #122:
>>