[llvm] 7873376 - [LoopUnroll] Fix build failure for allyesconfig.
Whitney T Tsang via llvm-commits
llvm-commits at lists.llvm.org
Sat May 30 13:51:09 PDT 2020
Added a test and better description of the problem in rG0fee91a187d9.
From: Roman Lebedev <lebedev.ri at gmail.com>
To: Whitney Tsang <whitneyt at ca.ibm.com>, Whitney Tsang
<llvmlistbot at llvm.org>
Cc: llvm-commits at lists.llvm.org
Date: 2020/05/30 02:47 PM
Subject: [EXTERNAL] Re: [llvm] 7873376 - [LoopUnroll] Fix build failure
for allyesconfig.
Test?
Patch commit message isn't very detailed - what's the actual problem
with previous code?
On Sat, May 30, 2020 at 9:41 PM Whitney Tsang via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
>
>
> Author: Whitney Tsang
> Date: 2020-05-30T18:32:47Z
> New Revision: 7873376bb36b4f9646fbc26d6da88e2edbf796e4
>
> URL:
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_llvm_llvm-2Dproject_commit_7873376bb36b4f9646fbc26d6da88e2edbf796e4&d=DwIBaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=p0DGcdtx8-l1bvwJTLSk1zBTXpb78Y1slqHKTsTpRTE&m=sLGzca_hDZtqiN2cs7qs_tJhMYjKfrdO6w3EShRZcjU&s=4zRv0ycV5VQwyvS7d1Bs4BlZK5hnxwTmSyTanucZrt0&e=
> DIFF:
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_llvm_llvm-2Dproject_commit_7873376bb36b4f9646fbc26d6da88e2edbf796e4.diff&d=DwIBaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=p0DGcdtx8-l1bvwJTLSk1zBTXpb78Y1slqHKTsTpRTE&m=sLGzca_hDZtqiN2cs7qs_tJhMYjKfrdO6w3EShRZcjU&s=Aox6Pv5dZMbL9JeoYWX32HEeMZjLme9ECb7MRgfdaK8&e=
>
> LOG: [LoopUnroll] Fix build failure for allyesconfig.
>
> Differential Revision:
https://urldefense.proofpoint.com/v2/url?u=https-3A__reviews.llvm.org_D80477&d=DwIBaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=p0DGcdtx8-l1bvwJTLSk1zBTXpb78Y1slqHKTsTpRTE&m=sLGzca_hDZtqiN2cs7qs_tJhMYjKfrdO6w3EShRZcjU&s=Yb0zv7Y5QEiKp4Sg0VB9w6oj-KCjB7DIWpvIjtfgDlc&e=
.
>
> Added:
>
>
> Modified:
> llvm/lib/Transforms/Utils/LoopUnroll.cpp
>
> Removed:
>
>
>
>
################################################################################
> diff --git a/llvm/lib/Transforms/Utils/LoopUnroll.cpp
b/llvm/lib/Transforms/Utils/LoopUnroll.cpp
> index 06e9f7ff2f53..861fc7d46ffe 100644
> --- a/llvm/lib/Transforms/Utils/LoopUnroll.cpp
> +++ b/llvm/lib/Transforms/Utils/LoopUnroll.cpp
> @@ -818,10 +818,10 @@ LoopUnrollResult llvm::UnrollLoop(Loop *L,
UnrollLoopOptions ULO, LoopInfo *LI,
> // For loops exiting from non latch exiting block, we limit the
> // supported loops to have a single exiting block.
> NewIDom = TermBlocks.back();
> - for (BasicBlock *Iter : TermBlocks) {
> - Instruction *Term = Iter->getTerminator();
> + for (unsigned i = 0, e = TermBlocks.size(); i != e; ++i) {
> + Instruction *Term = TermBlocks[i]->getTerminator();
> if (isa<BranchInst>(Term) && cast<BranchInst>(Term)->
isConditional()) {
> - NewIDom = Iter;
> + NewIDom = DT->findNearestCommonDominator(TermBlocks[i],
Latches[i]);
> break;
> }
> }
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
>
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_llvm-2Dcommits&d=DwIBaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=p0DGcdtx8-l1bvwJTLSk1zBTXpb78Y1slqHKTsTpRTE&m=sLGzca_hDZtqiN2cs7qs_tJhMYjKfrdO6w3EShRZcjU&s=X6_9rDoSgs8hqlESDdMYbV9gVleMgwoyM0KugcXsCsA&e=
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200530/23a6425e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200530/23a6425e/attachment.gif>
More information about the llvm-commits
mailing list