[PATCH] Simplify communication between Resolver and Input Graph.

Rui Ueyama ruiu at google.com
Wed Apr 2 13:24:21 PDT 2014


Hi Bigcheese, shankarke, kledzik,

Resolver is sending too much information to Input Graph than Input
Graph actually needs. In order to collect the detailed information,
which wouldn't be consumed by anyone, we have a good amount of code
in Resolver, Input Graph and Input Elements. This patch is to
simplify it. No functionality change.

Specifically, this patch replaces ResolverState enum with a boolean
value. The enum defines many bits to notify the progress about
linking to Input Graph using bit masks, however, what Input Graph
actually does is to compare a given value with 0. The details of
the bit mask is simply being ignored, so the efforts to collect
such data is wasted.

This patch also changes the name of the notification interface from
setResolverState to notifyProgress, to make it sounds more like
message passing style. It's not a setter but something to notify of
an update, so the new name should be more appropriate than before.

http://llvm-reviews.chandlerc.com/D3267

Files:
  include/lld/Core/InputGraph.h
  include/lld/Core/Resolver.h
  include/lld/Driver/GnuLdInputGraph.h
  lib/Core/InputGraph.cpp
  lib/Core/Resolver.cpp
  unittests/DriverTests/InputGraphTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3267.1.patch
Type: text/x-patch
Size: 10591 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140402/2b2cc51a/attachment.bin>


More information about the llvm-commits mailing list