[PATCH] D70378: [LLD][COFF] Fix missing cache cleanup in COFF::link()

Adrian McCarthy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 20 08:43:18 PDT 2020


amccarth added a comment.

In D70378#2045288 <https://reviews.llvm.org/D70378#2045288>, @aganea wrote:

> In D70378#2045190 <https://reviews.llvm.org/D70378#2045190>, @amccarth wrote:
>
> > I read back through some of the history, but I still don't feel like I have all the context.  That said, this change looks simple and straightforward to me.
> >
> > Would it be feasible and useful to create a test that links two trivial programs with a single instantiation of the lld process?  It seems like it would detect regressions and catch any introduction of a new global that needs to be reset.
>
>
> That is great suggestion! I will see what I can do. Maybe something along the lines of `LLVM_ENABLE_ASSERTIONS` + `LLVM_ENABLE_EXPENSIVE_CHECKS` + run all LLD tests while calling `link()` three times in a row?


It might be better to run `link()` on different inputs.  If you were to re-link the same program, a cache that wasn't cleared may return the expected values and thus elude detection.  If that's difficult, I'm happy with anything that at least tries link() more than once in a single process lifetime and isn't too costly for build and test times.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70378/new/

https://reviews.llvm.org/D70378





More information about the llvm-commits mailing list