mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 1445105 - Remove various MSVC de-optimizations used to work around compiler bugs which are no longer needed. r=dmajor
This reverts the following bugs: 703135, 977538, 1274450, 1403220 --HG-- extra : rebase_source : c63585a915c5b9ea987fd035dbb5ecb21cb6246e
This commit is contained in:
parent
fac6016d5c
commit
38359cd40f
@ -265,10 +265,6 @@ GenericNaN()
|
||||
detail::CanonicalizedNaNSignificand);
|
||||
}
|
||||
|
||||
/* MSVC with PGO miscompiles this function. */
|
||||
#if defined(_MSC_VER)
|
||||
# pragma optimize("g", off)
|
||||
#endif
|
||||
static inline double
|
||||
CanonicalizeNaN(double d)
|
||||
{
|
||||
@ -276,9 +272,6 @@ CanonicalizeNaN(double d)
|
||||
return GenericNaN();
|
||||
return d;
|
||||
}
|
||||
#if defined(_MSC_VER)
|
||||
# pragma optimize("", on)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* JS::Value is the interface for a single JavaScript Engine value. A few
|
||||
|
@ -2007,10 +2007,6 @@ BuildTextRunsScanner::GetNextBreakBeforeFrame(uint32_t* aIndex)
|
||||
return static_cast<nsTextFrame*>(mLineBreakBeforeFrames.ElementAt(index));
|
||||
}
|
||||
|
||||
// Bug 1403220: Suspected MSVC PGO miscompilation
|
||||
#if defined(_MSC_VER) && defined(_M_IX86)
|
||||
#pragma optimize("", off)
|
||||
#endif
|
||||
static gfxFontGroup*
|
||||
GetFontGroupForFrame(const nsIFrame* aFrame, float aFontSizeInflation,
|
||||
nsFontMetrics** aOutFontMetrics = nullptr)
|
||||
@ -2029,9 +2025,6 @@ GetFontGroupForFrame(const nsIFrame* aFrame, float aFontSizeInflation,
|
||||
// not actually happen. But we should fix this.
|
||||
return fontGroup;
|
||||
}
|
||||
#if defined(_MSC_VER) && defined(_M_IX86)
|
||||
#pragma optimize("", on)
|
||||
#endif
|
||||
|
||||
static already_AddRefed<DrawTarget>
|
||||
CreateReferenceDrawTarget(const nsTextFrame* aTextFrame)
|
||||
|
@ -3693,13 +3693,6 @@ nsTreeBodyFrame::PaintImage(int32_t aRowIndex,
|
||||
return result;
|
||||
}
|
||||
|
||||
// Disable PGO for PaintText because MSVC 2015 seems to have decided
|
||||
// that it can null out the alreadyAddRefed<nsFontMetrics> used to
|
||||
// initialize fontMet after storing fontMet on the stack in the same
|
||||
// space, overwriting fontMet's stack storage with null.
|
||||
#ifdef _MSC_VER
|
||||
# pragma optimize("g", off)
|
||||
#endif
|
||||
ImgDrawResult
|
||||
nsTreeBodyFrame::PaintText(int32_t aRowIndex,
|
||||
nsTreeColumn* aColumn,
|
||||
@ -3831,9 +3824,6 @@ nsTreeBodyFrame::PaintText(int32_t aRowIndex,
|
||||
|
||||
return result;
|
||||
}
|
||||
#ifdef _MSC_VER
|
||||
# pragma optimize("", on)
|
||||
#endif
|
||||
|
||||
ImgDrawResult
|
||||
nsTreeBodyFrame::PaintCheckbox(int32_t aRowIndex,
|
||||
|
@ -1,43 +0,0 @@
|
||||
diff --git a/media/libtheora/lib/huffdec.c b/media/libtheora/lib/huffdec.c
|
||||
--- a/media/libtheora/lib/huffdec.c
|
||||
+++ b/media/libtheora/lib/huffdec.c
|
||||
@@ -320,16 +320,19 @@ static size_t oc_huff_node_size(int _nbi
|
||||
/*Produces a collapsed-tree representation of the given token list.
|
||||
_tree: The storage for the collapsed Huffman tree.
|
||||
This may be NULL to compute the required storage size instead of
|
||||
constructing the tree.
|
||||
_tokens: A list of internal tokens, in the order they are found in the
|
||||
codebook, and the lengths of their corresponding codewords.
|
||||
_ntokens: The number of tokens corresponding to this tree node.
|
||||
Return: The number of words required to store the tree.*/
|
||||
+#if defined(_MSC_VER) && _MSC_VER >= 1700
|
||||
+#pragma optimize( "", off )
|
||||
+#endif
|
||||
static size_t oc_huff_tree_collapse(ogg_int16_t *_tree,
|
||||
unsigned char _tokens[][2],int _ntokens){
|
||||
ogg_int16_t node[34];
|
||||
unsigned char depth[34];
|
||||
unsigned char last[34];
|
||||
size_t ntree;
|
||||
int ti;
|
||||
int l;
|
||||
@@ -367,16 +370,19 @@ static size_t oc_huff_tree_collapse(ogg_
|
||||
/*Pop back up a level of recursion.*/
|
||||
else if(l-->0)nbits=depth[l+1]-depth[l];
|
||||
}
|
||||
while(l>=0);
|
||||
}
|
||||
while(l>=0);
|
||||
return ntree;
|
||||
}
|
||||
+#if defined(_MSC_VER) && _MSC_VER >= 1700
|
||||
+#pragma optimize( "", on )
|
||||
+#endif
|
||||
|
||||
/*Unpacks a set of Huffman trees, and reduces them to a collapsed
|
||||
representation.
|
||||
_opb: The buffer to unpack the trees from.
|
||||
_nodes: The table to fill with the Huffman trees.
|
||||
Return: 0 on success, or a negative value on error.
|
||||
The caller is responsible for cleaning up any partially initialized
|
||||
_nodes on failure.*/
|
@ -325,9 +325,6 @@ static size_t oc_huff_node_size(int _nbits){
|
||||
codebook, and the lengths of their corresponding codewords.
|
||||
_ntokens: The number of tokens corresponding to this tree node.
|
||||
Return: The number of words required to store the tree.*/
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1700
|
||||
#pragma optimize( "", off )
|
||||
#endif
|
||||
static size_t oc_huff_tree_collapse(ogg_int16_t *_tree,
|
||||
unsigned char _tokens[][2],int _ntokens){
|
||||
ogg_int16_t node[34];
|
||||
@ -375,9 +372,6 @@ static size_t oc_huff_tree_collapse(ogg_int16_t *_tree,
|
||||
while(l>=0);
|
||||
return ntree;
|
||||
}
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1700
|
||||
#pragma optimize( "", on )
|
||||
#endif
|
||||
|
||||
/*Unpacks a set of Huffman trees, and reduces them to a collapsed
|
||||
representation.
|
||||
|
@ -82,5 +82,4 @@ patch -p3 < ./bug625773-r17780.patch
|
||||
patch -p3 < ./bug468275-r18219.patch
|
||||
patch -p3 < ./bug752139-r18031.patch
|
||||
patch -p3 < ./bug752668-r18268.patch
|
||||
patch -p3 < ./bug703135.patch
|
||||
patch -p3 < ./bug920992.patch
|
||||
|
Loading…
Reference in New Issue
Block a user