Skip to content
  1. Dec 16, 2013
  2. Dec 15, 2013
  3. Dec 14, 2013
  4. Dec 13, 2013
    • Yuchen Wu's avatar
      llvm-cov: Added -b option for branch probabilities. · 342714c1
      Yuchen Wu authored
      This option tells llvm-cov to print out branch probabilities when
      a basic block contains multiple branches. It also prints out some
      function summary info including the number of times the function enters,
      the percent of time it returns, and how many blocks were executed.
      
      Also updated tests.
      
      llvm-svn: 197198
      342714c1
  5. Dec 10, 2013
    • NAKAMURA Takumi's avatar
      GCOV.cpp: Use PRIu64 instead of %lu. · 7ce0fe01
      NAKAMURA Takumi authored
      llvm-svn: 196882
      7ce0fe01
    • Yuchen Wu's avatar
      llvm-cov: Added -a option for block data. · 8c6bb5f4
      Yuchen Wu authored
      Similar to gcov, llvm-cov will now print out the block count at the end
      of each block. Multiple blocks can end on the same line.
      
      One computational difference is by using -a, llvm-cov will no longer
      simply add the block counts together to form a line count. Instead, it
      will take the maximum of the block counts on that line. This has a
      similar effect to what gcov does, but generates more correct counts in
      certain scenarios.
      
      Also updated tests.
      
      llvm-svn: 196856
      8c6bb5f4
  6. Dec 07, 2013
  7. Dec 06, 2013
  8. Dec 05, 2013
  9. Dec 04, 2013
  10. Dec 03, 2013
    • Yuchen Wu's avatar
      llvm-cov: Cleaned up print() function slightly. · 1c068163
      Yuchen Wu authored
      Changed while to for loop. Removed unnecessary if statement.
      
      llvm-svn: 196194
      1c068163
    • Yuchen Wu's avatar
      llvm-cov: Removed output to STDOUT/specified file. · 26326ad3
      Yuchen Wu authored
      Instead of asking the user to specify a single file to output coverage
      info and defaulting to STDOUT, llvm-cov now creates files for each
      source file with a naming system of: <source filename> + ".llcov".
      
      This is what gcov does and although it can clutter the working directory
      with numerous coverage files, it will be easier to hook the llvm-cov
      output to tools which operate on this assumption (such as lcov).
      
      llvm-svn: 196184
      26326ad3
    • Yuchen Wu's avatar
      llvm-cov: Store blocks rather than counts per line. · 8f1c881a
      Yuchen Wu authored
      Each line stores all the blocks that execute on that line, instead of
      only storing the line counts previously accumulated. This provides more
      information for each line, and will be useful for options in enabling
      block and branch information.
      
      llvm-svn: 196177
      8f1c881a
    • Yuchen Wu's avatar
      llvm-cov: Added edge struct for traversal in block. · 8ad9b04f
      Yuchen Wu authored
      Added GCOVEdge which are simple structs owned by the GCOVFunction that
      stores the source and destination GCOVBlocks, as well as the counts.
      Changed GCOVBlocks so that it stores a vector of source GCOVEdges and a
      vector of destination GCOVEdges, rather than just the block number.
      
      Storing the block number was only useful for knowing the number of edges
      and for debug info. Using a struct is useful for traversing the edges,
      especially back edges which may be needed later.
      
      llvm-svn: 196175
      8ad9b04f
    • Yuchen Wu's avatar
      llvm-cov: Split up reading of GCNO and GCDA files. · ba718338
      Yuchen Wu authored
      There are now two functions: readGCNO() and readGCDA().
      
      llvm-svn: 196173
      ba718338
    • Manman Ren's avatar
      Debug Info: rename getDebugInfoVersionFromModule to getDebugMetadataVersionFromModule. · bd4daf82
      Manman Ren authored
      Suggested by Eric.
      
      llvm-svn: 196172
      bd4daf82
  11. Dec 02, 2013
    • Manman Ren's avatar
      Debug Info: drop debug info via upgrading path if version number does not match. · 8b4306ce
      Manman Ren authored
      Add a helper function getDebugInfoVersionFromModule to return the debug info
      version number for a module.
      
      "Verifier/module-flags-1.ll" checks for verification errors.
      It will seg fault when calling getDebugInfoVersionFromModule because of the
      incorrect format for module flags in the testing case. We make
      getModuleFlagsMetadata more robust by checking for error conditions.
      
      PR17982
      
      llvm-svn: 196158
      8b4306ce
  12. Nov 26, 2013
  13. Nov 23, 2013
    • Chandler Carruth's avatar
      [PM] Complete the cross-layer interfaces with a Module-to-Function · c1ff9ed6
      Chandler Carruth authored
      proxy. This lets a function pass query a module analysis manager.
      However, the interface is const to indicate that only cached results can
      be safely queried.
      
      With this, I think the new pass manager is largely functionally complete
      for modules and analyses. Still lots to test, and need to generalize to
      SCCs and Loops, and need to build an adaptor layer to support the use of
      existing Pass objects in the new managers.
      
      llvm-svn: 195538
      c1ff9ed6
    • Chandler Carruth's avatar
      [PM] Add support to the analysis managers to query explicitly for cached · de9afd84
      Chandler Carruth authored
      results.
      
      This is the last piece of infrastructure needed to effectively support
      querying *up* the analysis layers. The next step will be to introduce
      a proxy which provides access to those layers with appropriate use of
      const to direct queries to the safe interface.
      
      llvm-svn: 195525
      de9afd84
    • Chandler Carruth's avatar
      [PM] Switch the downward invalidation to be incremental where only the · bceeb229
      Chandler Carruth authored
      one function's analyses are invalidated at a time. Also switch the
      preservation of the proxy to *fully* preserve the lower (function)
      analyses.
      
      Combined, this gets both upward and downward analysis invalidation to
      a point I'm happy with:
      
      - A function pass invalidates its function analyses, and its parent's
        module analyses.
      - A module pass invalidates all of its functions' analyses including the
        set of which functions are in the module.
      - A function pass can preserve a module analysis pass.
      - If all function passes preserve a module analysis pass, that
        preservation persists. If any doesn't the module analysis is
        invalidated.
      - A module pass can opt into managing *all* function analysis
        invalidation itself or *none*.
      - The conservative default is none, and the proxy takes the maximally
        conservative approach that works even if the set of functions has
        changed.
      - If a module pass opts into managing function analysis invalidation it
        has to propagate the invalidation itself, the proxy just does nothing.
      
      The only thing really missing is a way to query for a cached analysis or
      nothing at all. With this, function passes can more safely request
      a cached module analysis pass without fear of it accidentally running
      part way through.
      
      llvm-svn: 195519
      bceeb229
  14. Nov 22, 2013
    • Manman Ren's avatar
      Debug Info: move StripDebugInfo from StripSymbols.cpp to DebugInfo.cpp. · cb14bbcc
      Manman Ren authored
      We can share the implementation between StripSymbols and dropping debug info
      for metadata versions that do not match.
      
      Also update the comments to match the implementation. A follow-on patch will
      drop the "Debug Info Version" module flag in StripDebugInfo.
      
      llvm-svn: 195505
      cb14bbcc
    • Chandler Carruth's avatar
      [PM] Teach the analysis managers to pass themselves as arguments to the · f2edc075
      Chandler Carruth authored
      run methods of the analysis passes.
      
      Also generalizes and re-uses the SFINAE for transformation passes so
      that users can write an analysis pass and only accept an analysis
      manager if that is useful to their pass.
      
      This completes the plumbing to make an analysis manager available
      through every pass's run method if desired so that passes no longer need
      to be constructed around them.
      
      llvm-svn: 195451
      f2edc075
    • Chandler Carruth's avatar
      [PM] Fix the analysis templates' usage of IRUnitT. · 5bf5e31c
      Chandler Carruth authored
      This is supposed to be the whole type of the IR unit, and so we
      shouldn't pass a pointer to it but rather the value itself. In turn, we
      need to provide a 'Module *' as that type argument (for example). This
      will become more relevant with SCCs or other units which may not be
      passed as a pointer type, but also brings consistency with the
      transformation pass templates.
      
      llvm-svn: 195445
      5bf5e31c
    • Chandler Carruth's avatar
      [PM] Switch analysis managers to be threaded through the run methods · b3e72199
      Chandler Carruth authored
      rather than the constructors of passes.
      
      This simplifies the APIs of passes significantly and removes an error
      prone pattern where the *same* manager had to be given to every
      different layer. With the new API the analysis managers themselves will
      have to be cross connected with proxy analyses that allow a pass at one
      layer to query for the analysis manager of another layer. The proxy will
      both expose a handle to the other layer's manager and it will provide
      the invalidation hooks to ensure things remain consistent across layers.
      Finally, the outer-most analysis manager has to be passed to the run
      method of the outer-most pass manager. The rest of the propagation is
      automatic.
      
      I've used SFINAE again to allow passes to completely disregard the
      analysis manager if they don't need or want to care. This helps keep
      simple things simple for users of the new pass manager.
      
      Also, the system specifically supports passing a null pointer into the
      outer-most run method if your pass pipeline neither needs nor wants to
      deal with analyses. I find this of dubious utility as while some
      *passes* don't care about analysis, I'm not sure there are any
      real-world users of the pass manager itself that need to avoid even
      creating an analysis manager. But it is easy to support, so there we go.
      
      Finally I renamed the module proxy for the function analysis manager to
      the more verbose but less confusing name of
      FunctionAnalysisManagerModuleProxy. I hate this name, but I have no idea
      what else to name these things. I'm expecting in the fullness of time to
      potentially have the complete cross product of types at the proxy layer:
      
      {Module,SCC,Function,Loop,Region}AnalysisManager{Module,SCC,Function,Loop,Region}Proxy
      
      (except for XAnalysisManagerXProxy which doesn't make any sense)
      
      This should make it somewhat easier to do the next phases which is to
      build the upward proxy and get its invalidation correct, as well as to
      make the invalidation within the Module -> Function mapping pass be more
      fine grained so as to invalidate fewer fuction analyses.
      
      After all of the proxy analyses are done and the invalidation working,
      I'll finally be able to start working on the next two fun fronts: how to
      adapt an existing pass to work in both the legacy pass world and the new
      one, and building the SCC, Loop, and Region counterparts. Fun times!
      
      llvm-svn: 195400
      b3e72199
  15. Nov 21, 2013
    • Chandler Carruth's avatar
      [PM] Widen the interface for invalidate on an analysis result now that · 2846e9ef
      Chandler Carruth authored
      it is completely optional, and sink the logic for handling the preserved
      analysis set into it.
      
      This allows us to implement the delegation logic desired in the proxy
      module analysis for the function analysis manager where if the proxy
      itself is preserved we assume the set of functions hasn't changed and we
      do a fine grained invalidation by walking the functions in the module
      and running the invalidate for them all at the manager level and letting
      it try to invalidate any passes.
      
      This in turn makes it blindingly obvious why we should hoist the
      invalidate trait and have two collections of results. That allows
      handling invalidation for almost all analyses without indirect calls and
      it allows short circuiting when the preserved set is all.
      
      llvm-svn: 195338
      2846e9ef
Loading