Go to the documentation of this file.
37 return Sec.
Name ==
"producers";
43 if (Sec.
Name == SecName) {
49 std::unique_ptr<FileOutputBuffer> Buf =
std::move(*BufferOrErr);
51 if (
Error E = Buf->commit())
57 SecName.
str().c_str());
65 RemovePred = [&Config](
const Section &Sec) {
71 RemovePred = [RemovePred](
const Section &Sec) {
77 RemovePred = [RemovePred](
const Section &Sec) {
84 RemovePred = [&Config](
const Section &Sec) {
92 RemovePred = [&Config](
const Section &Sec) {
100 RemovePred = [&Config, RemovePred](
const Section &Sec) {
105 return RemovePred(Sec);
117 std::tie(SecName, FileName) =
Flag.split(
"=");
132 Sec.
Contents = makeArrayRef<uint8_t>(
133 reinterpret_cast<const uint8_t *
>(BufferCopy->getBufferStart()),
134 BufferCopy->getBufferSize());
149 assert(Obj &&
"Unable to deserialize Wasm object");
152 Writer TheWriter(*Obj, Out);
void removeSections(function_ref< bool(const Section &)> ToRemove)
This is an optimization pass for GlobalISel generic memory operations.
Error executeObjcopyOnBinary(const CommonConfig &Config, const WasmConfig &, object::WasmObjectFile &In, raw_ostream &Out)
Apply the transformations described by Config and WasmConfig to In and writes the result into Out.
ArrayRef< uint8_t > Contents
void addSectionWithOwnedContents(Section NewSection, std::unique_ptr< MemoryBuffer > &&Content)
std::function< bool(const Section &Sec)> SectionPred
bool matches(StringRef S) const
static ErrorSuccess success()
Create a success value.
Tagged union holding either a T or a Error.
std::vector< Section > Sections
bool startswith(StringRef Prefix) const
Check if this string starts with the given Prefix.
Error createFileError(const Twine &F, Error E)
Concatenate a source file path and/or name with an Error.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
std::vector< NewSectionInfo > AddSection
std::vector< StringRef > DumpSection
Flag
These should be considered private to the implementation of the MCInstrDesc class.
This class implements an extremely fast bulk output stream that can only output to a stream.
static bool isDebugSection(const Section &Sec)
std::shared_ptr< MemoryBuffer > SectionData
static bool isLinkerSection(const Section &Sec)
bar al al movzbl eax ret Missed when stored in a memory object
static Error dumpSectionToFile(StringRef SecName, StringRef Filename, Object &Obj)
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
print Print MemDeps of function
StringRef - Represent a constant reference to a string, i.e.
reference get()
Returns a reference to the stored T value.
Expected< std::unique_ptr< Object > > create() const
static Expected< std::unique_ptr< FileOutputBuffer > > create(StringRef FilePath, size_t Size, unsigned Flags=0)
Factory method to create an OutputBuffer object which manages a read/write buffer of the specified si...
static void removeSections(const CommonConfig &Config, Object &Obj)
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.
static Error handleArgs(const CommonConfig &Config, Object &Obj)
Lightweight error class with error context and mandatory checking.
static bool isNameSection(const Section &Sec)
Error takeError()
Take ownership of the stored error.
static bool isCommentSection(const Section &Sec)
size_t size() const
size - Get the array size.
std::string str() const
str - Get the contents as an std::string.
static std::unique_ptr< MemoryBuffer > getMemBufferCopy(StringRef InputData, const Twine &BufferName="")
Open the specified memory range as a MemoryBuffer, copying the contents and taking ownership of it.
we should consider alternate ways to model stack dependencies Lots of things could be done in WebAssemblyTargetTransformInfo cpp there are numerous optimization related hooks that can be overridden in WebAssemblyTargetLowering Instead of the OptimizeReturned which should consider preserving the returned attribute through to MachineInstrs and extending the MemIntrinsicResults pass to do this optimization on calls too That would also let the WebAssemblyPeephole pass clean up dead defs for such as it does for stores Consider implementing and or getMachineCombinerPatterns Find a clean way to fix the problem which leads to the Shrink Wrapping pass being run after the WebAssembly PEI pass When setting multiple variables to the same we currently get code like const It could be done with a smaller encoding like local tee $pop5 local copy