@@ -638,9 +638,6 @@ class InnerLoopVectorizer {
638638 // / there can be multiple exiting edges reaching this block.
639639 BasicBlock *LoopExitBlock;
640640
641- // / The scalar loop body.
642- BasicBlock *LoopScalarBody;
643-
644641 // / A list of all bypass blocks. The first block is the entry of the loop.
645642 SmallVector<BasicBlock *, 4 > LoopBypassBlocks;
646643
@@ -2530,7 +2527,6 @@ BasicBlock *InnerLoopVectorizer::emitMemRuntimeChecks(BasicBlock *Bypass) {
25302527}
25312528
25322529void InnerLoopVectorizer::createVectorLoopSkeleton (StringRef Prefix) {
2533- LoopScalarBody = OrigLoop->getHeader ();
25342530 LoopVectorPreHeader = OrigLoop->getLoopPreheader ();
25352531 assert (LoopVectorPreHeader && " Invalid loop structure" );
25362532 LoopExitBlock = OrigLoop->getUniqueExitBlock (); // may be nullptr
@@ -2944,20 +2940,19 @@ void InnerLoopVectorizer::fixVectorizedLoop(VPTransformState &State,
29442940
29452941 // Set/update profile weights for the vector and remainder loops as original
29462942 // loop iterations are now distributed among them. Note that original loop
2947- // represented by LoopScalarBody becomes remainder loop after vectorization.
2943+ // becomes the scalar remainder loop after vectorization.
29482944 //
29492945 // For cases like foldTailByMasking() and requiresScalarEpiloque() we may
29502946 // end up getting slightly roughened result but that should be OK since
29512947 // profile is not inherently precise anyway. Note also possible bypass of
29522948 // vector code caused by legality checks is ignored, assigning all the weight
29532949 // to the vector loop, optimistically.
29542950 //
2955- // For scalable vectorization we can't know at compile time how many iterations
2956- // of the loop are handled in one vector iteration, so instead assume a pessimistic
2957- // vscale of '1'.
2958- Loop *ScalarLoop = LI->getLoopFor (LoopScalarBody);
2951+ // For scalable vectorization we can't know at compile time how many
2952+ // iterations of the loop are handled in one vector iteration, so instead
2953+ // assume a pessimistic vscale of '1'.
29592954 Loop *VectorLoop = LI->getLoopFor (HeaderBB);
2960- setProfileInfoAfterUnrolling (ScalarLoop , VectorLoop, ScalarLoop ,
2955+ setProfileInfoAfterUnrolling (OrigLoop , VectorLoop, OrigLoop ,
29612956 VF.getKnownMinValue () * UF);
29622957}
29632958
0 commit comments