mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-27 13:20:29 +00: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
|
||||
llvm::stable_sort(
|
||||
Globals, [&DL](const GlobalVariable *GV1, const GlobalVariable *GV2) {
|
||||
return DL.getTypeAllocSize(GV1->getValueType()) <
|
||||
DL.getTypeAllocSize(GV2->getValueType());
|
||||
// We don't support scalable global variables.
|
||||
return DL.getTypeAllocSize(GV1->getValueType()).getFixedSize() <
|
||||
DL.getTypeAllocSize(GV2->getValueType()).getFixedSize();
|
||||
});
|
||||
|
||||
// If we want to just blindly group all globals together, do so.
|
||||
|
Loading…
Reference in New Issue
Block a user