[PATCH] Greatly simplify InputGraph.

Rui Ueyama ruiu at google.com
Tue Apr 1 14:16:43 PDT 2014


Hi Bigcheese, shankarke, kledzik,

InputGraph has too many knobs and controls that are not being used. This
patch is to remove dead code, unused features and a class. There are two
things that worth noting, besides simple dead code removal:

1. ControlNode class is removed. We had it as the base class of Group
class, but it provides no functionality particularly meaningful. We now
have shallower class hierarchy that is easier to understand.

2. InputGraph provides a feature to replace a node with its internal data.
It is being used to "expand" some type of node, such as a Linker Script
node, with its actual files. We used to have two options when replacing
it -- ExpandOnly or ExpandAndReplace. ExpandOnly was to expand it but not
remove the node from the tree. There is no use of that option in the code,
so it was a dead feature.

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

Files:
  include/lld/Core/InputGraph.h
  include/lld/Driver/CoreInputGraph.h
  include/lld/Driver/DarwinInputGraph.h
  include/lld/Driver/GnuLdInputGraph.h
  include/lld/Driver/WinLinkInputGraph.h
  lib/Core/InputGraph.cpp
  lib/Driver/CoreDriver.cpp
  lib/Driver/Driver.cpp
  lib/Driver/GnuLdDriver.cpp
  lib/Driver/GnuLdInputGraph.cpp
  lib/Driver/WinLinkDriver.cpp
  unittests/DriverTests/InputGraphTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3252.1.patch
Type: text/x-patch
Size: 44936 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140401/8dc0ab4c/attachment.bin>


More information about the llvm-commits mailing list