[all-commits] [llvm/llvm-project] 1fafa3: [SCEV] Avoid unnecessary call to getExitingBlock()...
Enna1 via All-commits
all-commits at lists.llvm.org
Thu Jun 20 18:43:56 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1fafa32f6ee844f0862954d0b2330dee26b0469f
https://github.com/llvm/llvm-project/commit/1fafa32f6ee844f0862954d0b2330dee26b0469f
Author: Enna1 <xumingjie.enna1 at bytedance.com>
Date: 2024-06-21 (Fri, 21 Jun 2024)
Changed paths:
M llvm/include/llvm/Analysis/ScalarEvolution.h
M llvm/lib/Analysis/ScalarEvolution.cpp
Log Message:
-----------
[SCEV] Avoid unnecessary call to getExitingBlock() in computeExitLimit() (#96188)
In `computeExitLimit()`, we use `getExitingBlock()` to check if loop has
exactly one exiting block.
Since `computeExitLimit()` is only used in
`computeBackedgeTakenCount()`, and `getExitingBlocks()` is called to get
all exiting blocks in `computeBackedgeTakenCount()`, we can simply check
if loop has exactly one exiting block by checking if the number of
exiting blocks equals 1 in `computeBackedgeTakenCount()` and pass it as
an argument to `computeExitLimit()`.
This change helps to improve the compile time for files containing large
loops.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list