Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
I'm not sure why I've been CC'ed here, but most of this patch appears to be an arbitrary re-ordering of the cases.
Same blocks for case labels (see eg. Select and ShuffleVector, but there are more changes) are regrouped together now, the code readability is better I think.
Okay, so the actual code changes here are:
- combining the redundant Insert{Element,Value} and Extract{Element,Value} cases, which is good,
- eliminating some unnecessary temporary variables from some of the cases, which is also good, and
- reordering all the cases, which doesn't seem to be an improvement in any way and makes it harder to recognize the first two.
Why don't you submit a patch with just the first two changes?
Thank you, this makes the change much more obvious. You've still reordered the case starting with BitCast, though.
I hate to keep making these picky comments, but I don't know what you're trying to do with the braces now. You're adding braces on some of these cases, you're removing them from others, it's all inconsistent. I think it's almost always best to have braces on cases, unless they're just a single-line return or something; so please at least leave the existing braces where they are, and maybe add braces to cases if they don't have them.
It was inconsistent even before :/
Current code has the pattern like "If two addX in the case then use braces, if just one, no braces" so I was not sure. I added them at first and then I removed them just becauce I thought you would blame me that code doesnt follow original "scheme/pattern".
Sorry, thanks for the advice, I will fix it.
llvm/trunk/lib/Analysis/CFLGraph.h | ||
---|---|---|
548 | The logic for selects looks suspicious; operand 0 is the condition. |
llvm/trunk/lib/Analysis/CFLGraph.h | ||
---|---|---|
548 | Yep true. Seems like this is quite an old bug here. We should use operands 1 and 2 here. I will post a new patch tomorrow. |
llvm/trunk/lib/Analysis/CFLGraph.h | ||
---|---|---|
548 |
The logic for selects looks suspicious; operand 0 is the condition.