Add IR support, ELF section and user documentation for partitioning feature.
The partitioning feature was proposed here: http://lists.llvm.org/pipermail/llvm-dev/2019-February/130583.html This is mostly just documentation. The feature itself will be contributed in subsequent patches. Differential Revision: https://reviews.llvm.org/D60242 llvm-svn: 361923
This commit is contained in:
@@ -1262,7 +1262,8 @@ void ModuleBitcodeWriter::writeModuleInfo() {
|
||||
GV.getDLLStorageClass() != GlobalValue::DefaultStorageClass ||
|
||||
GV.hasComdat() ||
|
||||
GV.hasAttributes() ||
|
||||
GV.isDSOLocal()) {
|
||||
GV.isDSOLocal() ||
|
||||
GV.hasPartition()) {
|
||||
Vals.push_back(getEncodedVisibility(GV));
|
||||
Vals.push_back(getEncodedThreadLocalMode(GV));
|
||||
Vals.push_back(getEncodedUnnamedAddr(GV));
|
||||
@@ -1274,6 +1275,8 @@ void ModuleBitcodeWriter::writeModuleInfo() {
|
||||
Vals.push_back(VE.getAttributeListID(AL));
|
||||
|
||||
Vals.push_back(GV.isDSOLocal());
|
||||
Vals.push_back(addToStrtab(GV.getPartition()));
|
||||
Vals.push_back(GV.getPartition().size());
|
||||
} else {
|
||||
AbbrevToUse = SimpleGVarAbbrev;
|
||||
}
|
||||
@@ -1311,6 +1314,8 @@ void ModuleBitcodeWriter::writeModuleInfo() {
|
||||
|
||||
Vals.push_back(F.isDSOLocal());
|
||||
Vals.push_back(F.getAddressSpace());
|
||||
Vals.push_back(addToStrtab(F.getPartition()));
|
||||
Vals.push_back(F.getPartition().size());
|
||||
|
||||
unsigned AbbrevToUse = 0;
|
||||
Stream.EmitRecord(bitc::MODULE_CODE_FUNCTION, Vals, AbbrevToUse);
|
||||
@@ -1333,6 +1338,8 @@ void ModuleBitcodeWriter::writeModuleInfo() {
|
||||
Vals.push_back(getEncodedThreadLocalMode(A));
|
||||
Vals.push_back(getEncodedUnnamedAddr(A));
|
||||
Vals.push_back(A.isDSOLocal());
|
||||
Vals.push_back(addToStrtab(A.getPartition()));
|
||||
Vals.push_back(A.getPartition().size());
|
||||
|
||||
unsigned AbbrevToUse = 0;
|
||||
Stream.EmitRecord(bitc::MODULE_CODE_ALIAS, Vals, AbbrevToUse);
|
||||
@@ -1351,6 +1358,8 @@ void ModuleBitcodeWriter::writeModuleInfo() {
|
||||
Vals.push_back(getEncodedLinkage(I));
|
||||
Vals.push_back(getEncodedVisibility(I));
|
||||
Vals.push_back(I.isDSOLocal());
|
||||
Vals.push_back(addToStrtab(I.getPartition()));
|
||||
Vals.push_back(I.getPartition().size());
|
||||
Stream.EmitRecord(bitc::MODULE_CODE_IFUNC, Vals);
|
||||
Vals.clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user