{"shas":[["6a47f4d2a4ed23067b86b770650762e7a2ee69a9","dc0c83763d96e040f193b50480a63873ecedb8fe@91177308-0d34-0410-b5e6-96231b3b80d8","make domtree verification print something useful on failure.\n\n\ngit-svn-id: http://llvm.org/svn/llvm-project/llvm/trunk@123078 91177308-0d34-0410-b5e6-96231b3b80d8","lattner"],["3a1a3952124496661f2be953026d5e8f328017e5","dc0c83763d96e040f193b50480a63873ecedb8fe@91177308-0d34-0410-b5e6-96231b3b80d8","When loop rotation happens, it is *very* common for the duplicated condbr\nto be foldable into an uncond branch.  When this happens, we can make a\nmuch simpler CFG for the loop, which is important for nested loop cases\nwhere we want the outer loop to be aggressively optimized.\n\nHandle this case more aggressively.  For example, previously on\nphi-duplicate.ll we would get this:\n\n\ndefine void @test(i32 %N, double* %G) nounwind ssp {\nentry:\n  %cmp1 = icmp slt i64 1, 1000\n  br i1 %cmp1, label %bb.nph, label %for.end\n\nbb.nph:                                           ; preds = %entry\n  br label %for.body\n\nfor.body:                                         ; preds = %bb.nph, %for.cond\n  %j.02 = phi i64 [ 1, %bb.nph ], [ %inc, %for.cond ]\n  %arrayidx = getelementptr inbounds double* %G, i64 %j.02\n  %tmp3 = load double* %arrayidx\n  %sub = sub i64 %j.02, 1\n  %arrayidx6 = getelementptr inbounds double* %G, i64 %sub\n  %tmp7 = load double* %arrayidx6\n  %add = fadd double %tmp3, %tmp7\n  %arrayidx10 = getelementptr inbounds double* %G, i64 %j.02\n  store double %add, double* %arrayidx10\n  %inc = add nsw i64 %j.02, 1\n  br label %for.cond\n\nfor.cond:                                         ; preds = %for.body\n  %cmp = icmp slt i64 %inc, 1000\n  br i1 %cmp, label %for.body, label %for.cond.for.end_crit_edge\n\nfor.cond.for.end_crit_edge:                       ; preds = %for.cond\n  br label %for.end\n\nfor.end:                                          ; preds = %for.cond.for.end_crit_edge, %entry\n  ret void\n}\n\nNow we get the much nicer:\n\ndefine void @test(i32 %N, double* %G) nounwind ssp {\nentry:\n  br label %for.body\n\nfor.body:                                         ; preds = %entry, %for.body\n  %j.01 = phi i64 [ 1, %entry ], [ %inc, %for.body ]\n  %arrayidx = getelementptr inbounds double* %G, i64 %j.01\n  %tmp3 = load double* %arrayidx\n  %sub = sub i64 %j.01, 1\n  %arrayidx6 = getelementptr inbounds double* %G, i64 %sub\n  %tmp7 = load double* %arrayidx6\n  %add = fadd double %tmp3, %tmp7\n  %arrayidx10 = getelementptr inbounds double* %G, i64 %j.01\n  store double %add, double* %arrayidx10\n  %inc = add nsw i64 %j.01, 1\n  %cmp = icmp slt i64 %inc, 1000\n  br i1 %cmp, label %for.body, label %for.end\n\nfor.end:                                          ; preds = %for.body\n  ret void\n}\n\nWith all of these recent changes, we are now able to compile:\n\nvoid foo(char *X) {\n for (int i = 0; i != 100; ++i) \n   for (int j = 0; j != 100; ++j)\n     X[j+i*100] = 0;\n}\n\ninto a single memset of 10000 bytes.  This series of changes\nshould also be helpful for other nested loop scenarios as well.\n\n\n\ngit-svn-id: http://llvm.org/svn/llvm-project/llvm/trunk@123079 91177308-0d34-0410-b5e6-96231b3b80d8","lattner"],["229ab7577dcb83457f4e9c24fc6a55f8a3ded8c5","dc0c83763d96e040f193b50480a63873ecedb8fe@91177308-0d34-0410-b5e6-96231b3b80d8","constify TargetData references.\nSplit memset formation logic out into its own\n\"tryMergingIntoMemset\" helper function.\n\n\ngit-svn-id: http://llvm.org/svn/llvm-project/llvm/trunk@123081 91177308-0d34-0410-b5e6-96231b3b80d8","lattner"],["56d173bd391cab28841bee353a1b48bde980e9a4","dc0c83763d96e040f193b50480a63873ecedb8fe@91177308-0d34-0410-b5e6-96231b3b80d8","merge two tests and filecheckify\n\n\ngit-svn-id: http://llvm.org/svn/llvm-project/llvm/trunk@123082 91177308-0d34-0410-b5e6-96231b3b80d8","lattner"]],"repo":"larsr/llvm","actor":"larsr","ref":"refs/heads/master","size":4,"head":"56d173bd391cab28841bee353a1b48bde980e9a4","push_id":22565192}