summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/Targets.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2015-08-24 08:11:53 +0000
committerRui Ueyama <ruiu@google.com>2015-08-24 08:11:53 +0000
commit473aa4088d5f000131faa49b4f8ab0067c0b7252 (patch)
tree25b4b9cd7046c817a689d67774553f2cd3533a9e /clang/lib/Basic/Targets.cpp
parent28103266c6330b241b333556e78313f25fbf1ee9 (diff)
downloadbcm5719-llvm-473aa4088d5f000131faa49b4f8ab0067c0b7252.tar.gz
bcm5719-llvm-473aa4088d5f000131faa49b4f8ab0067c0b7252.zip
COFF: Add a test for ICF and circular references.
ICF is a feature to merge sections not by name (which is the regular COMDAT merging) but by contents. If two or more sections have the identical contents and relocations, ICF merges them to save space. Accessors or templated functions tend to have the same contents, and ICF can hold them. If we consider sections as vertices and relocations as edges, the problem is to find as many isomorphic graphs as possile from input graphs. MSVC linker is smart enough to identify isomorphic graphs even if they contain circles (GNU gold cannot handle circles according to http://research.google.com/pubs/pub36912.html, so this is impressive). Circular references are not uncommon in COFF object files. One example is .pdata. .pdata sections contain exception handler info for functions, so they naturally have relocations for the functions. The functions in turn have references to the .pdata sections so that the functions and their .pdata are linked together. As a result, they form circles. This is a test case for circular graphs. LLD is not able to handle this test case yet. I'll add code soon. llvm-svn: 245827
Diffstat (limited to 'clang/lib/Basic/Targets.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud