Skip to content
  1. Dec 17, 2013
    • Quentin Colombet's avatar
    • Quentin Colombet's avatar
      Add warning capabilities in LLVM. · 66673f40
      Quentin Colombet authored
      The patch adds a new LLVMContext::diagnose that can be used to communicate to
      the front-end, if any, that something of interest happened.
      The diagnostics are supported by a new abstraction, the DiagnosticInfo class.
      The base class contains the following information:
      - The kind of the report: What this is about.
      - The severity of the report: How bad this is.
      
      This patch also adds 2 classes:
      - DiagnosticInfoInlineAsm: For inline asm reporting. Basically, this diagnostic
      will be used to switch to the new diagnostic API for LLVMContext::emitError.
      - DiagnosticStackSize: For stack size reporting. Comes as a replacement of the
      hard coded warning in PEI.
      
      This patch also features dynamic diagnostic identifiers. In other words plugins
      can use this infrastructure for their own diagnostics (for more details, see
      getNextAvailablePluginDiagnosticKind).
      
      This patch introduces a new DiagnosticHandlerTy and a new DiagnosticContext in
      the LLVMContext that should be set by the front-end to be able to map these
      diagnostics in its own system.
      
      http://llvm-reviews.chandlerc.com/D2376
      <rdar://problem/15515174>
      
      llvm-svn: 197438
      66673f40
  2. Dec 16, 2013
  3. Dec 15, 2013
  4. Dec 14, 2013
  5. 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
  6. 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
  7. Dec 07, 2013
  8. Dec 06, 2013
  9. Dec 05, 2013
  10. Dec 04, 2013
  11. 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
  12. 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
  13. Nov 26, 2013
  14. 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
  15. 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
Loading