1. Aug 29, 2018
  2. Aug 28, 2018
    • Simon Pilgrim's avatar
      [TableGen] CodeGenDAGPatterns::GenerateVariants - basic caching of matching predicates · 6a92b5e1
      Simon Pilgrim authored
      CodeGenDAGPatterns::GenerateVariants is a costly function in many tblgen commands (33.87% of the total runtime of x86 -gen-dag-isel), and due to the O(N^2) nature of the function, there are a high number of repeated comparisons of the pattern's vector<Predicate>.
      
      This initial patch at least avoids repeating these comparisons for every Variant in a pattern. I began investigating caching all the matches before entering the loop but hit issues with how best to store the data and how to update the cache as patterns were added.
      
      Saves around 15secs in debug builds of x86 -gen-dag-isel.
      
      Differential Revision: https://reviews.llvm.org/D51035
      
      llvm-svn: 340837
      6a92b5e1
    • Kirill Bobyrev's avatar
      [benchmark] Stop building benchmarks by default · a294dfa8
      Kirill Bobyrev authored
      Although the benchmark regex-related build issue seems to be
      fixed, it appears that benchmark library triggers some stage 2 clang-cl
      bugs:
      
      http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/builds/13495/steps/build%20stage%202/logs/stdio
      
      The only sensible option now is to prevent benchmark library from
      building in the default configuration.
      
      llvm-svn: 340836
      a294dfa8
    • Raphael Isemann's avatar
      Use a RAII guard to control access to DisassemblerLLVMC. · 4925421c
      Raphael Isemann authored
      Summary:
      This patch replaces the manual lock/unlock calls for gaining exclusive access to the disassembler with
      a RAII-powered access scope. This should prevent that we somehow skip over these trailing Unlock calls
      (e.g. with early returns).
      
      We also have a second `GetDisasmToUse` method now that takes an already constructed access scope to
      prevent deadlocks when we call this from other methods.
      
      Reviewers: #lldb, davide, vsk
      
      Reviewed By: #lldb, davide, vsk
      
      Subscribers: davide, vsk, lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D51319
      
      llvm-svn: 340835
      4925421c
    • David Bolvansky's avatar
      [Inliner] Attribute callsites with inline remarks · c1b27b56
      David Bolvansky authored
      Summary:
      Sometimes reading an output *.ll file it is not easy to understand why some callsites are not inlined. We can read output of inline remarks (option --pass-remarks-missed=inline) and try correlating its messages with the callsites.
      
      An easier way proposed by this patch is to add to every callsite processed by Inliner an attribute with the latest message that describes the cause of not inlining this callsite. The attribute is called //inline-remark//. By default this feature is off. It can be switched on by the option //-inline-remark-attribute//.
      
      For example in the provided test the result method //@test1// has two callsites //@bar// and inline remarks report different inlining missed reasons:
        remark: <unknown>:0:0: bar not inlined into test1 because too costly to inline (cost=-5, threshold=-6)
        remark: <unknown>:0:0: bar not inlined into test1 because it should never be inlined (cost=never): recursive
      
      It is not clear which remark correspond to which callsite. With the inline remark attribute enabled we get the reasons attached to their callsites:
        define void @test1() {
          call void @bar(i1 true) #0
          call void @bar(i1 false) #2
          ret void
        }
        attributes #0 = { "inline-remark"="(cost=-5, threshold=-6)" }
        ..
        attributes #2 = { "inline-remark"="(cost=never): recursive" }
      
      Patch by: yrouban (Yevgeny Rouban)
      
      Reviewers: xbolva00, tejohnson, apilipenko
      
      Reviewed By: xbolva00, tejohnson
      
      Subscribers: eraman, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D50435
      
      llvm-svn: 340834
      c1b27b56