Browse Source

Merge branch 'master' of github.com:icsharpcode/ILSpy

pull/70/head
Daniel Grunwald 15 years ago
parent
commit
880c856a25
  1. 4
      ICSharpCode.Decompiler/ILAst/ILAstOptimizer.cs

4
ICSharpCode.Decompiler/ILAst/ILAstOptimizer.cs

@ -746,8 +746,8 @@ namespace ICSharpCode.Decompiler.ILAst
static HashSet<ControlFlowNode> FindLoopContent(HashSet<ControlFlowNode> scope, ControlFlowNode head) static HashSet<ControlFlowNode> FindLoopContent(HashSet<ControlFlowNode> scope, ControlFlowNode head)
{ {
var exitNodes = head.DominanceFrontier.SelectMany(n => n.Predecessors); var viaBackEdges = head.Predecessors.Where(p => head.Dominates(p));
HashSet<ControlFlowNode> agenda = new HashSet<ControlFlowNode>(exitNodes); HashSet<ControlFlowNode> agenda = new HashSet<ControlFlowNode>(viaBackEdges);
HashSet<ControlFlowNode> result = new HashSet<ControlFlowNode>(); HashSet<ControlFlowNode> result = new HashSet<ControlFlowNode>();
while(agenda.Count > 0) { while(agenda.Count > 0) {

Loading…
Cancel
Save