mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
Updated comments as suggested by Rafael. Thanks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211268 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -158,7 +158,13 @@ bool JumpThreading::runOnFunction(Function &F) {
|
|||||||
TLI = &getAnalysis<TargetLibraryInfo>();
|
TLI = &getAnalysis<TargetLibraryInfo>();
|
||||||
LVI = &getAnalysis<LazyValueInfo>();
|
LVI = &getAnalysis<LazyValueInfo>();
|
||||||
|
|
||||||
// Remove unreachable blocks from function as they may result in infinite loop.
|
// Remove unreachable blocks from function as they may result in infinite
|
||||||
|
// loop. We do threading if we found something profitable. Jump threading a
|
||||||
|
// branch can create other opportunities. If these opportunities form a cycle
|
||||||
|
// i.e. if any jump treading is undoing previous threading in the path, then
|
||||||
|
// we will loop forever. We take care of this issue by not jump threading for
|
||||||
|
// back edges. This works for normal cases but not for unreachable blocks as
|
||||||
|
// they may have cycle with no back edge.
|
||||||
removeUnreachableBlocks(F);
|
removeUnreachableBlocks(F);
|
||||||
|
|
||||||
FindLoopHeaders(F);
|
FindLoopHeaders(F);
|
||||||
|
Reference in New Issue
Block a user