mirror of
https://github.com/RPCS3/llvm.git
synced 2026-01-31 01:25:19 +01:00
Scalable Vector IR Type with further LTO fixes
Reintroduces the scalable vector IR type from D32530, after it was reverted a couple of times due to increasing chromium LTO build times. This latest incarnation removes the walk over aggregate types from the verifier entirely, in favor of rejecting scalable vectors in the isValidElementType methods in ArrayType and StructType. This removes the 70% degradation observed with the second repro tarball from PR42210. Reviewers: thakis, hans, rengolin, sdesmalen Reviewed By: sdesmalen Differential Revision: https://reviews.llvm.org/D64079 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365203 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1878,7 +1878,8 @@ Error BitcodeReader::parseTypeTableBody() {
|
||||
return error("Invalid type");
|
||||
ResultTy = ArrayType::get(ResultTy, Record[0]);
|
||||
break;
|
||||
case bitc::TYPE_CODE_VECTOR: // VECTOR: [numelts, eltty]
|
||||
case bitc::TYPE_CODE_VECTOR: // VECTOR: [numelts, eltty] or
|
||||
// [numelts, eltty, scalable]
|
||||
if (Record.size() < 2)
|
||||
return error("Invalid record");
|
||||
if (Record[0] == 0)
|
||||
@@ -1886,7 +1887,8 @@ Error BitcodeReader::parseTypeTableBody() {
|
||||
ResultTy = getTypeByID(Record[1]);
|
||||
if (!ResultTy || !StructType::isValidElementType(ResultTy))
|
||||
return error("Invalid type");
|
||||
ResultTy = VectorType::get(ResultTy, Record[0]);
|
||||
bool Scalable = Record.size() > 2 ? Record[2] : false;
|
||||
ResultTy = VectorType::get(ResultTy, Record[0], Scalable);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user