[PATCH] D44311: [WebAssembly] Implement -print-gc-sections to test global GC

Nicholas Wilson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 9 09:19:58 PST 2018


ncw created this revision.
ncw added reviewers: sbc100, ruiu.
Herald added subscribers: llvm-commits, sunfish, aheejin, jgravelle-google, dschuff, jfb.

We don't have any tests for GC of globals yet. I've therefore implemented `-print-gc-sections` for globals, and extended the tests to exercise it. I've also made it follow the `--no-gc-sections` flag, so the tests are consistent.

It does require the addition of a YAML file, since user-defined globals aren't accessible from LLC at the moment. It's better to have the test in there than not!

Ultimately, I would quite like to move the global GC into MarkLive... but I'll leave that for another time!


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D44311

Files:
  test/wasm/Inputs/globals.yaml
  test/wasm/gc-sections.ll
  wasm/Driver.cpp
  wasm/InputFiles.cpp
  wasm/InputGlobal.h
  wasm/MarkLive.cpp
  wasm/Writer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44311.137774.patch
Type: text/x-patch
Size: 9942 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180309/4305665e/attachment.bin>


More information about the llvm-commits mailing list