mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
[SVE][CodeGen] Replace use of TypeSize operator< in GlobalMerge::doMerge
We don't support global variables with scalable vector types so I've changed the code to compare the fixed sizes instead. Differential Revision: https://reviews.llvm.org/D88564
This commit is contained in:
parent
6428f0596b
commit
42f980da4f
@ -223,8 +223,9 @@ bool GlobalMerge::doMerge(SmallVectorImpl<GlobalVariable*> &Globals,
|
|||||||
// FIXME: Find better heuristics
|
// FIXME: Find better heuristics
|
||||||
llvm::stable_sort(
|
llvm::stable_sort(
|
||||||
Globals, [&DL](const GlobalVariable *GV1, const GlobalVariable *GV2) {
|
Globals, [&DL](const GlobalVariable *GV1, const GlobalVariable *GV2) {
|
||||||
return DL.getTypeAllocSize(GV1->getValueType()) <
|
// We don't support scalable global variables.
|
||||||
DL.getTypeAllocSize(GV2->getValueType());
|
return DL.getTypeAllocSize(GV1->getValueType()).getFixedSize() <
|
||||||
|
DL.getTypeAllocSize(GV2->getValueType()).getFixedSize();
|
||||||
});
|
});
|
||||||
|
|
||||||
// If we want to just blindly group all globals together, do so.
|
// If we want to just blindly group all globals together, do so.
|
||||||
|
Loading…
Reference in New Issue
Block a user