Bug 1430696 Try de-optimizing a function to make Win64 PGO builds happy. draft
authorRyan VanderMeulen <ryanvm@gmail.com>
Thu, 11 Jan 2018 11:33:36 -0500
changeset 721142 69262e4556ef15f5118099e7777e493cba109454
parent 721141 c86cda62b0db8541cfe374660af220535e73efaf
child 721143 3c58cf66cf56964729568d9094234ec94f7c7b9a
push id95737
push userbmo:tom@mozilla.com
push dateTue, 16 Jan 2018 19:30:35 +0000
bugs1430696
milestone59.0a1
Bug 1430696 Try de-optimizing a function to make Win64 PGO builds happy. MozReview-Commit-ID: G9imGr5eiXL
layout/generic/nsContainerFrame.cpp
--- a/layout/generic/nsContainerFrame.cpp
+++ b/layout/generic/nsContainerFrame.cpp
@@ -1040,16 +1040,19 @@ nsContainerFrame::PositionChildViews(nsI
  *
  * Flags:
  * NS_FRAME_NO_MOVE_FRAME - don't move the frame. aX and aY are ignored in this
  *    case. Also implies NS_FRAME_NO_MOVE_VIEW
  * NS_FRAME_NO_MOVE_VIEW - don't position the frame's view. Set this if you
  *    don't want to automatically sync the frame and view
  * NS_FRAME_NO_SIZE_VIEW - don't size the frame's view
  */
+#ifdef _MSC_VER
+# pragma optimize("g", off)
+#endif
 void
 nsContainerFrame::FinishReflowChild(nsIFrame*                  aKidFrame,
                                     nsPresContext*             aPresContext,
                                     const ReflowOutput& aDesiredSize,
                                     const ReflowInput*   aReflowInput,
                                     const WritingMode&         aWM,
                                     const LogicalPoint&        aPos,
                                     const nsSize&              aContainerSize,
@@ -1086,17 +1089,20 @@ nsContainerFrame::FinishReflowChild(nsIF
       // If the frame has moved, then we need to make sure any child views are
       // correctly positioned
       PositionChildViews(aKidFrame);
     }
   }
 
   aKidFrame->DidReflow(aPresContext, aReflowInput);
 }
-
+#ifdef _MSC_VER
+# pragma optimize("", on)
+#endif
+ 
 //XXX temporary: hold on to a copy of the old physical version of
 //    FinishReflowChild so that we can convert callers incrementally.
 void
 nsContainerFrame::FinishReflowChild(nsIFrame*                  aKidFrame,
                                     nsPresContext*             aPresContext,
                                     const ReflowOutput& aDesiredSize,
                                     const ReflowInput*   aReflowInput,
                                     nscoord                    aX,