[llvm] r313706 - Reverting due to Green Dragon bot failure.
Mike Edwards via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 19 18:21:02 PDT 2017
Author: sqlbyme
Date: Tue Sep 19 18:21:02 2017
New Revision: 313706
URL: http://llvm.org/viewvc/llvm-project?rev=313706&view=rev
Log:
Reverting due to Green Dragon bot failure.
http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental/42594/
Removed:
llvm/trunk/test/MC/WebAssembly/bss.ll
Modified:
llvm/trunk/include/llvm/BinaryFormat/Wasm.h
llvm/trunk/include/llvm/ObjectYAML/WasmYAML.h
llvm/trunk/lib/MC/WasmObjectWriter.cpp
llvm/trunk/lib/Object/WasmObjectFile.cpp
llvm/trunk/lib/ObjectYAML/WasmYAML.cpp
llvm/trunk/test/MC/WebAssembly/array-fill.ll
llvm/trunk/test/MC/WebAssembly/explicit-sections.ll
llvm/trunk/test/MC/WebAssembly/unnamed-data.ll
llvm/trunk/test/MC/WebAssembly/weak-alias.ll
llvm/trunk/test/tools/llvm-readobj/sections.test
llvm/trunk/tools/llvm-readobj/WasmDumper.cpp
llvm/trunk/tools/obj2yaml/wasm2yaml.cpp
llvm/trunk/tools/yaml2obj/yaml2wasm.cpp
Modified: llvm/trunk/include/llvm/BinaryFormat/Wasm.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/BinaryFormat/Wasm.h?rev=313706&r1=313705&r2=313706&view=diff
==============================================================================
--- llvm/trunk/include/llvm/BinaryFormat/Wasm.h (original)
+++ llvm/trunk/include/llvm/BinaryFormat/Wasm.h Tue Sep 19 18:21:02 2017
@@ -97,7 +97,6 @@ struct WasmDataSegment {
uint32_t MemoryIndex;
WasmInitExpr Offset;
ArrayRef<uint8_t> Content;
- StringRef Name;
};
struct WasmElemSegment {
@@ -185,7 +184,6 @@ enum : unsigned {
WASM_SYMBOL_INFO = 0x2,
WASM_DATA_SIZE = 0x3,
WASM_DATA_ALIGNMENT = 0x4,
- WASM_SEGMENT_NAMES = 0x5,
};
enum : unsigned {
Modified: llvm/trunk/include/llvm/ObjectYAML/WasmYAML.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ObjectYAML/WasmYAML.h?rev=313706&r1=313705&r2=313706&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ObjectYAML/WasmYAML.h (original)
+++ llvm/trunk/include/llvm/ObjectYAML/WasmYAML.h Tue Sep 19 18:21:02 2017
@@ -160,10 +160,9 @@ struct LinkingSection : CustomSection {
return C && C->Name == "linking";
}
+ std::vector<SymbolInfo> SymbolInfos;
uint32_t DataSize;
uint32_t DataAlignment;
- std::vector<SymbolInfo> SymbolInfos;
- std::vector<NameEntry> SegmentNames;
};
struct TypeSection : Section {
Modified: llvm/trunk/lib/MC/WasmObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/WasmObjectWriter.cpp?rev=313706&r1=313705&r2=313706&view=diff
==============================================================================
--- llvm/trunk/lib/MC/WasmObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/WasmObjectWriter.cpp Tue Sep 19 18:21:02 2017
@@ -102,7 +102,6 @@ struct WasmFunctionTypeDenseMapInfo {
// wasm data segment.
struct WasmDataSegment {
MCSectionWasm *Section;
- StringRef Name;
uint32_t Offset;
SmallVector<char, 4> Data;
};
@@ -280,8 +279,7 @@ private:
uint32_t NumFuncImports);
void writeCodeRelocSection();
void writeDataRelocSection();
- void writeLinkingMetaDataSection(ArrayRef<WasmDataSegment> Segments,
- uint32_t DataSize, uint32_t DataAlignment,
+ void writeLinkingMetaDataSection(uint32_t DataSize, uint32_t DataAlignment,
ArrayRef<StringRef> WeakSymbols,
bool HasStackPointer,
uint32_t StackPointerGlobal);
@@ -913,8 +911,7 @@ void WasmObjectWriter::writeDataRelocSec
}
void WasmObjectWriter::writeLinkingMetaDataSection(
- ArrayRef<WasmDataSegment> Segments, uint32_t DataSize,
- uint32_t DataAlignment, ArrayRef<StringRef> WeakSymbols,
+ uint32_t DataSize, uint32_t DataAlignment, ArrayRef<StringRef> WeakSymbols,
bool HasStackPointer, uint32_t StackPointerGlobal) {
SectionBookkeeping Section;
startSection(Section, wasm::WASM_SEC_CUSTOM, "linking");
@@ -946,14 +943,6 @@ void WasmObjectWriter::writeLinkingMetaD
endSection(SubSection);
}
- if (Segments.size()) {
- startSection(SubSection, wasm::WASM_SEGMENT_NAMES);
- encodeULEB128(Segments.size(), getStream());
- for (const WasmDataSegment &Segment : Segments)
- writeString(Segment.Name);
- endSection(SubSection);
- }
-
endSection(Section);
}
@@ -1140,7 +1129,6 @@ void WasmObjectWriter::writeObject(MCAss
DataSize = alignTo(DataSize, Section.getAlignment());
DataSegments.emplace_back();
WasmDataSegment &Segment = DataSegments.back();
- Segment.Name = Section.getSectionName();
Segment.Offset = DataSize;
Segment.Section = &Section;
addData(Segment.Data, Section, DataAlignment);
@@ -1300,8 +1288,7 @@ void WasmObjectWriter::writeObject(MCAss
writeNameSection(Functions, Imports, NumFuncImports);
writeCodeRelocSection();
writeDataRelocSection();
- writeLinkingMetaDataSection(DataSegments, DataSize, DataAlignment,
- WeakSymbols, HasStackPointer, StackPointerGlobal);
+ writeLinkingMetaDataSection(DataSize, DataAlignment, WeakSymbols, HasStackPointer, StackPointerGlobal);
// TODO: Translate the .comment section to the output.
// TODO: Translate debug sections to the output.
Modified: llvm/trunk/lib/Object/WasmObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/WasmObjectFile.cpp?rev=313706&r1=313705&r2=313706&view=diff
==============================================================================
--- llvm/trunk/lib/Object/WasmObjectFile.cpp (original)
+++ llvm/trunk/lib/Object/WasmObjectFile.cpp Tue Sep 19 18:21:02 2017
@@ -396,15 +396,6 @@ Error WasmObjectFile::parseLinkingSectio
case wasm::WASM_DATA_ALIGNMENT:
LinkingData.DataAlignment = readVaruint32(Ptr);
break;
- case wasm::WASM_SEGMENT_NAMES: {
- uint32_t Count = readVaruint32(Ptr);
- if (Count > DataSegments.size())
- return make_error<GenericBinaryError>("Too many segment names",
- object_error::parse_failed);
- for (uint32_t i = 0; i < Count; i++)
- DataSegments[i].Data.Name = readString(Ptr);
- break;
- }
case wasm::WASM_STACK_POINTER:
default:
Ptr += Size;
Modified: llvm/trunk/lib/ObjectYAML/WasmYAML.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ObjectYAML/WasmYAML.cpp?rev=313706&r1=313705&r2=313706&view=diff
==============================================================================
--- llvm/trunk/lib/ObjectYAML/WasmYAML.cpp (original)
+++ llvm/trunk/lib/ObjectYAML/WasmYAML.cpp Tue Sep 19 18:21:02 2017
@@ -60,7 +60,6 @@ static void sectionMapping(IO &IO, WasmY
IO.mapRequired("DataSize", Section.DataSize);
IO.mapRequired("DataAlignment", Section.DataAlignment);
IO.mapOptional("SymbolInfo", Section.SymbolInfos);
- IO.mapOptional("SegmentNames", Section.SegmentNames);
}
static void sectionMapping(IO &IO, WasmYAML::CustomSection &Section) {
Modified: llvm/trunk/test/MC/WebAssembly/array-fill.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/array-fill.ll?rev=313706&r1=313705&r2=313706&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/array-fill.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/array-fill.ll Tue Sep 19 18:21:02 2017
@@ -9,14 +9,6 @@ target triple = "wasm32-unknown-unknown-
@gBd = hidden global [2 x %struct.bd] [%struct.bd { i8 1 }, %struct.bd { i8 2 }], align 1
-; CHECK: - Type: DATA
-; CHECK: Content: '0102'
-
-; CHECK: - Type: CUSTOM
-; CHECK-NEXT: Name: linking
-; CHECK-NEXT: DataSize: 2
-; CHECK-NEXT: DataAlignment: 1
-; CHECK-NEXT: SegmentNames:
-; CHECK-NEXT: - Index: 0
-; CHECK-NEXT: Name: .data
-; CHECK-NEXT: ...
+; CHECK: - Type: DATA
+; CHECK: Content: '0102'
+; CHECK: DataSize: 2
Removed: llvm/trunk/test/MC/WebAssembly/bss.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/bss.ll?rev=313705&view=auto
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/bss.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/bss.ll (removed)
@@ -1,20 +0,0 @@
-; RUN: llc -mtriple wasm32-unknown-unknown-wasm -filetype=obj %s -o - | obj2yaml | FileCheck %s
-
- at g0 = global i8* null, align 4
-
-; CHECK: - Type: DATA
-; CHECK-NEXT: Segments:
-; CHECK-NEXT: - SectionOffset: 6
-; CHECK-NEXT: MemoryIndex: 0
-; CHECK-NEXT: Offset:
-; CHECK-NEXT: Opcode: I32_CONST
-; CHECK-NEXT: Value: 0
-; CHECK-NEXT: Content: '00000000'
-; CHECK-NEXT: - Type: CUSTOM
-; CHECK-NEXT: Name: linking
-; CHECK-NEXT: DataSize: 4
-; CHECK-NEXT: DataAlignment: 4
-; CHECK-NEXT: SegmentNames:
-; CHECK-NEXT: - Index: 0
-; CHECK-NEXT: Name: .bss.g0
-; CHECK-NEXT: ...
Modified: llvm/trunk/test/MC/WebAssembly/explicit-sections.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/explicit-sections.ll?rev=313706&r1=313705&r2=313706&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/explicit-sections.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/explicit-sections.ll Tue Sep 19 18:21:02 2017
@@ -63,16 +63,3 @@
; CHECK-NEXT: Opcode: I32_CONST
; CHECK-NEXT: Value: 24
; CHECK-NEXT: Content: '08000000'
-
-; CHECK: - Type: CUSTOM
-; CHECK-NEXT: Name: linking
-; CHECK-NEXT: DataSize: 28
-; CHECK-NEXT: DataAlignment: 8
-; CHECK-NEXT: SegmentNames:
-; CHECK-NEXT: - Index: 0
-; CHECK-NEXT: Name: .data.global0
-; CHECK-NEXT: - Index: 1
-; CHECK-NEXT: Name: .sec1
-; CHECK-NEXT: - Index: 2
-; CHECK-NEXT: Name: .sec2
-; CHECK-NEXT: ...
Modified: llvm/trunk/test/MC/WebAssembly/unnamed-data.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/unnamed-data.ll?rev=313706&r1=313705&r2=313706&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/unnamed-data.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/unnamed-data.ll Tue Sep 19 18:21:02 2017
@@ -74,13 +74,4 @@
; CHECK-NEXT: Name: linking
; CHECK-NEXT: DataSize: 28
; CHECK-NEXT: DataAlignment: 8
-; CHECK-NEXT: SegmentNames:
-; CHECK-NEXT: - Index: 0
-; CHECK-NEXT: Name: .rodata..L.str1
-; CHECK-NEXT: - Index: 1
-; CHECK-NEXT: Name: .rodata..L.str2
-; CHECK-NEXT: - Index: 2
-; CHECK-NEXT: Name: .data.a
-; CHECK-NEXT: - Index: 3
-; CHECK-NEXT: Name: .data.b
; CHECK-NEXT: ...
Modified: llvm/trunk/test/MC/WebAssembly/weak-alias.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/weak-alias.ll?rev=313706&r1=313705&r2=313706&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/weak-alias.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/weak-alias.ll Tue Sep 19 18:21:02 2017
@@ -101,9 +101,4 @@ entry:
; CHECK-NEXT: Flags: 1
; CHECK-NEXT: - Name: bar_alias
; CHECK-NEXT: Flags: 1
-; CHECK-NEXT: SegmentNames:
-; CHECK-NEXT: - Index: 0
-; CHECK-NEXT: Name: .data.bar
-; CHECK-NEXT: - Index: 1
-; CHECK-NEXT: Name: .data.bar_alias_address
; CHECK-NEXT: ...
Modified: llvm/trunk/test/tools/llvm-readobj/sections.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/sections.test?rev=313706&r1=313705&r2=313706&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-readobj/sections.test (original)
+++ llvm/trunk/test/tools/llvm-readobj/sections.test Tue Sep 19 18:21:02 2017
@@ -543,12 +543,6 @@ WASM-NEXT: Section {
WASM-NEXT: Type: DATA (0xB)
WASM-NEXT: Size: 19
WASM-NEXT: Offset: 154
-WASM-NEXT: Segments [
-WASM-NEXT: Segment {
-WASM-NEXT: Size: 13
-WASM-NEXT: Offset: 0
-WASM-NEXT: }
-WASM-NEXT: ]
WASM-NEXT: }
WASM-NEXT: Section {
WASM-NEXT: Type: CUSTOM (0x0)
Modified: llvm/trunk/tools/llvm-readobj/WasmDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/WasmDumper.cpp?rev=313706&r1=313705&r2=313706&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/WasmDumper.cpp (original)
+++ llvm/trunk/tools/llvm-readobj/WasmDumper.cpp Tue Sep 19 18:21:02 2017
@@ -160,18 +160,6 @@ void WasmDumper::printSections() {
W.printNumber("DataAlignment", LinkingData.DataAlignment);
}
break;
- case wasm::WASM_SEC_DATA: {
- ListScope Group(W, "Segments");
- for (const WasmSegment &Segment : Obj->dataSegments()) {
- DictScope Group(W, "Segment");
- if (!Segment.Data.Name.empty())
- W.printString("Name", Segment.Data.Name);
- W.printNumber("Size", Segment.Data.Content.size());
- if (Segment.Data.Offset.Opcode == wasm::WASM_OPCODE_I32_CONST)
- W.printNumber("Offset", Segment.Data.Offset.Value.Int32);
- }
- break;
- }
case wasm::WASM_SEC_MEMORY:
ListScope Group(W, "Memories");
for (const wasm::WasmLimits &Memory : Obj->memories()) {
Modified: llvm/trunk/tools/obj2yaml/wasm2yaml.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/obj2yaml/wasm2yaml.cpp?rev=313706&r1=313705&r2=313706&view=diff
==============================================================================
--- llvm/trunk/tools/obj2yaml/wasm2yaml.cpp (original)
+++ llvm/trunk/tools/obj2yaml/wasm2yaml.cpp Tue Sep 19 18:21:02 2017
@@ -70,16 +70,6 @@ std::unique_ptr<WasmYAML::CustomSection>
CustomSec = std::move(NameSec);
} else if (WasmSec.Name == "linking") {
std::unique_ptr<WasmYAML::LinkingSection> LinkingSec = make_unique<WasmYAML::LinkingSection>();
- size_t Index = 0;
- for (const object::WasmSegment &Segment : Obj.dataSegments()) {
- if (!Segment.Data.Name.empty()) {
- WasmYAML::NameEntry NameEntry;
- NameEntry.Name = Segment.Data.Name;
- NameEntry.Index = Index;
- LinkingSec->SegmentNames.push_back(NameEntry);
- }
- Index++;
- }
for (const object::SymbolRef& Sym: Obj.symbols()) {
const object::WasmSymbol Symbol = Obj.getWasmSymbol(Sym);
if (Symbol.Flags != 0) {
@@ -244,7 +234,7 @@ ErrorOr<WasmYAML::Object *> WasmDumper::
}
case wasm::WASM_SEC_DATA: {
auto DataSec = make_unique<WasmYAML::DataSection>();
- for (const object::WasmSegment &Segment : Obj.dataSegments()) {
+ for (auto &Segment : Obj.dataSegments()) {
WasmYAML::DataSegment Seg;
Seg.SectionOffset = Segment.SectionOffset;
Seg.MemoryIndex = Segment.Data.MemoryIndex;
Modified: llvm/trunk/tools/yaml2obj/yaml2wasm.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/yaml2obj/yaml2wasm.cpp?rev=313706&r1=313705&r2=313706&view=diff
==============================================================================
--- llvm/trunk/tools/yaml2obj/yaml2wasm.cpp (original)
+++ llvm/trunk/tools/yaml2obj/yaml2wasm.cpp Tue Sep 19 18:21:02 2017
@@ -157,17 +157,6 @@ int WasmWriter::writeSectionContent(raw_
SubSection.Done();
}
-
- // SEGMENT_NAMES subsection
- if (Section.SegmentNames.size()) {
- encodeULEB128(wasm::WASM_SEGMENT_NAMES, OS);
- encodeULEB128(Section.SegmentNames.size(), SubSection.GetStream());
- for (const WasmYAML::NameEntry &NameEntry : Section.SegmentNames) {
- encodeULEB128(NameEntry.Index, SubSection.GetStream());
- writeStringRef(NameEntry.Name, SubSection.GetStream());
- }
- SubSection.Done();
- }
return 0;
}
More information about the llvm-commits
mailing list