Skip to content
  1. Mar 17, 2017
    • Peter Collingbourne's avatar
      ELF: Add cache pruning support. · ee59e43f
      Peter Collingbourne authored
      This patch causes us to use pruneCache() to prune the ThinLTO cache after
      completing LTO. A new flag --thinlto-cache-policy allows users to configure
      the policy.
      
      Differential Revision: https://reviews.llvm.org/D31021
      
      llvm-svn: 298036
      ee59e43f
    • Peter Collingbourne's avatar
      LTO: Fix a potential race condition in the caching API. · 128423f9
      Peter Collingbourne authored
      After the call to sys::fs::exists succeeds, indicating a cache hit, we call
      AddFile and the client will open the file using the supplied path. If the
      client is using cache pruning, there is a potential race between the pruner
      and the client. To avoid this, change the caching API so that it provides
      a MemoryBuffer to the client, and have clients use that MemoryBuffer where
      possible.
      
      This scheme won't work with the gold plugin because the plugin API expects a
      file path. So we have the gold plugin use the buffer identifier as a path and
      live with the race for now. (Note that the gold plugin isn't actually affected
      by the problem at the moment because it doesn't support cache pruning.)
      
      This effectively reverts r279883 modulo the change to use the existing path
      in the gold plugin.
      
      Differential Revision: https://reviews.llvm.org/D31063
      
      llvm-svn: 298020
      128423f9
  2. Mar 16, 2017
  3. Mar 15, 2017
  4. Mar 14, 2017
Loading