Skip to content
Snippets Groups Projects
Select Git revision
  • clang-hash
  • master default protected
2 results

clang

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    Christian Dietrich authored
    This patch does integrate the AST hashing parts of the CHash project[1][2] into
    CLang. The extension provided by this patch accomplishes 2 things:
    
    - local hashes: It extends StmtDataCollector infrastructure by hash rules for
      declarations, types, and attributes. These rules are expressed in terms of
      TableGen files and capture what parts of a AST node are important to its
      semantic. Thereby, the rules only include information that is local to the
      respecting node (no pointers to other AST nodes should be followed).
    
      Since these DataCollectors do not impose rules how the AST nodes relate to
      each other, they provide a mechanism for "local" hashes.
    
    - global hashes: The CHashVisitor combines the local hashes via the
      RecursiveAST Visitor into a global semantic hash that includes (for a given
      AST node) all local hashes of all AST nodes that can influence the
      compilation of this AST node.
    
      With these global hashes, we can deduce (early) in the compilation process
      wether the result of this compiler run will produce the same object file.
      This mechanism is *NOT* part of this commit.
    
    [1] https://www.sra.uni-hannover.de/Research/cHash/
    [2] "cHash: Detection of Redunandt Recompilations via AST hashing", USENIX 2017
    601674bd
    History
    Name Last commit Last update