Skip to content
  1. Aug 28, 2018
  2. Aug 27, 2018
    • Zachary Turner's avatar
      Update the Visual Studio Integration from user feedback. · 522f9aec
      Zachary Turner authored
      This patch removes the MSBuild warnings about options that
      clang-cl ignores.  It also adds several additional fields to
      the LLVM Configuration options page.  The first is that it
      adds support for LLD!  To give the user flexibility though,
      we don't want to force LLD to always-on, and if we're not
      forcing LLD then we might as well not force clang-cl either.
      So we add options that can enable or disable lld, clang-cl,
      or any combination of the two.  Whenever one is disabled,
      it falls back to the Microsoft equivalent.
      
      Additionally, for each of clang-cl and lld-link, we add a new
      configuration setting that allows Additional Options to be
      passed for that specific tool only.  This is similar to the
      C/C++ > Command Line > Additional Options entry box, but
      it serves the use case where a user switches back and forth
      between the toolsets in their vcxproj, but where cl.exe
      won't accept some options that clang-cl will.  In this case
      you can pass those options in the clang-cl additional options
      and whenever clang-cl is disabled (or the other toolset is
      selected entirely), those options won't get passed at all.
      
      llvm-svn: 340780
      522f9aec
    • Zachary Turner's avatar
      Set line endings to Windows on MSBuild files. · 4e039d64
      Zachary Turner authored
      Normally we force Unix line endings in the repository, but since these are Windows files which are consumed by Microsoft tools that we don't have the source of, we should probably err on the side of caution and force CRLF.
      
      llvm-svn: 340776
      4e039d64
    • Andrea Di Biagio's avatar
      [llvm-mca] Remove unused include. NFC · 1a87a80d
      Andrea Di Biagio authored
      llvm-svn: 340768
      1a87a80d
    • Matt Davis's avatar
      [llvm-mca] Introduce the llvm-mca library and organize the directory accordingly. NFC. · 271ce763
      Matt Davis authored
      Summary:
      This patch introduces llvm-mca as a library.  The driver (llvm-mca.cpp), views, and stats, are not part of the library. 
      Those are separate components that are not required for the functioning of llvm-mca.
      
      The directory has been organized as follows:
      All library source files now reside in:
        - `lib/HardwareUnits/` - All subclasses of HardwareUnit (these represent the simulated hardware components of a backend).
            (LSUnit does not inherit from HardwareUnit, but Scheduler does which uses LSUnit).  
        - `lib/Stages/` - All subclasses of the pipeline stages.
        - `lib/` - This is the root of the library and contains library code that does not fit into the Stages or HardwareUnit subdirs.
      
      All library header files now reside in the `include` directory and mimic the same layout as the `lib` directory mentioned above.
      
      In the (near) future we would like to move the library (include and lib) contents from tools and into the core of llvm somewhere.
      That change would allow various analysis and optimization passes to make use of MCA  functionality for things like cost modeling.
      
      I left all of the non-library code just where it has always been, in the root of the llvm-mca directory. 
      The include directives for the non-library source file have been updated to refer to the llvm-mca library headers.
      I updated the llvm-mca/CMakeLists.txt file to include the library headers, but I made the non-library code
      explicitly reference the library's 'include' directory.  Once we eventually (hopefully) migrate the MCA library
      components into llvm the include directives used by the non-library source files will be updated to point to the
      proper location in llvm.
      
      Reviewers: andreadb, courbet, RKSimon
      
      Reviewed By: andreadb
      
      Subscribers: mgorny, javed.absar, tschuett, gbedwell, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D50929
      
      llvm-svn: 340755
      271ce763
    • Matt Davis's avatar
      [llvm-mca] Remove unused method. NFC. · b09ecf93
      Matt Davis authored
      llvm-svn: 340754
      b09ecf93
    • Andrea Di Biagio's avatar
      [llvm-mca] Improved report generated by the SchedulerStatistics view. · b89b96c1
      Andrea Di Biagio authored
      Before this patch, the SchedulerStatistics only printed the maximum number of
      buffer entries consumed in each scheduler's queue at a given point of the
      simulation.
      
      This patch restructures the reported table, and adds an extra field named
      "Average number of used buffer entries" to it.
      This patch also uses different colors to help identifying bottlenecks caused by
      high scheduler's buffer pressure.
      
      llvm-svn: 340746
      b89b96c1
  3. Aug 26, 2018
    • Chandler Carruth's avatar
      [IR] Replace `isa<TerminatorInst>` with `isTerminator()`. · 9ae926b9
      Chandler Carruth authored
      This is a bit awkward in a handful of places where we didn't even have
      an instruction and now we have to see if we can build one. But on the
      whole, this seems like a win and at worst a reasonable cost for removing
      `TerminatorInst`.
      
      All of this is part of the removal of `TerminatorInst` from the
      `Instruction` type hierarchy.
      
      llvm-svn: 340701
      9ae926b9
  4. Aug 25, 2018
  5. Aug 24, 2018
    • Matt Davis's avatar
      220271ac
    • Adrian Prantl's avatar
      Reduce the memory footprint of dsymutil. (NFC) · 29729f15
      Adrian Prantl authored
      This (partially) fixes a regression introduced by
      https://reviews.llvm.org/D43945 / r327399, which parallelized
      DwarfLinker. This patch avoids parsing and allocating the memory for
      all input DIEs up front and instead only allocates them in the
      concurrent loop in the AnalyzeLambda. At the end of the loop the
      memory from the LinkContext is cleared again.
      
      This reduces the peak memory needed to link the debug info of a
      non-modular build of the Swift compiler by >3GB.
      
      rdar://problem/43444464
      
      Differential Revision: https://reviews.llvm.org/D51078
      
      llvm-svn: 340650
      29729f15
    • Matt Davis's avatar
      [llvm-mca] Move views and stats into a Views subdir. NFC. · 10aa09f0
      Matt Davis authored
      llvm-svn: 340645
      10aa09f0
    • Joel Galenson's avatar
      [cfi-verify] Support cross-DSO · 6cc0e63e
      Joel Galenson authored
      When used in cross-DSO mode, CFI will generate calls to special functions rather than trap instructions.  For example, instead of generating
      
      if (!InlinedFastCheck(f))
        abort();
      call *f
      
      CFI generates
      
      if (!InlinedFastCheck(f))
        __cfi_slowpath(CallSiteTypeId, f);
      call *f
      
      This patch teaches cfi-verify to recognize calls to __cfi_slowpath and abort and treat them as trap functions.
      
      In addition to normal symbols, we also parse the dynamic relocations to handle cross-DSO calls in libraries.
      
      We also extend cfi-verify to recognize other patterns that occur using cross-DSO.  For example, some indirect calls are not guarded by a branch to a trap but instead follow a call to __cfi_slowpath.  For example:
      
      if (!InlinedFastCheck(f))
        call *f
      else {
        __cfi_slowpath(CallSiteTypeId, f);
        call *f
      }
      
      In this case, the second call to f is not marked as protected by the current code.  We thus recognize if indirect calls directly follow a call to a function that will trap on CFI violations and treat them as protected.
      
      We also ignore indirect calls in the PLT, since on AArch64 each entry contains an indirect call that should not be protected by CFI, and these are labeled incorrectly when debug information is not present.
      
      Differential Revision: https://reviews.llvm.org/D49383
      
      llvm-svn: 340612
      6cc0e63e
    • Joel Galenson's avatar
      [llvm-objdump] Label calls to the PLT. · 134cf47d
      Joel Galenson authored
      Differential Revision: https://reviews.llvm.org/D50204
      
      llvm-svn: 340611
      134cf47d
    • Richard Smith's avatar
      Make llvm-profdata show -text work as advertised in the documentation. · c6ba9ca1
      Richard Smith authored
      Per LLVM's CommandGuide, llvm-profdata show -text is supposed to produce
      textual output that can be passed as input to further llvm-profdata
      invocations. This previously didn't work for two reasons:
      
      1) -text was not sufficient to enable the machine-readable text format output;
      instead, -text was effectively ignored if -counts was not also specified. (With
      this patch, -counts is instead ignored if -text is specified, because the
      machine-readable text format always includes counts.)
      
      2) When the input data was an IR-level profile, the :ir marker was missing from
      the output, resulting in a text format output that would not be usable as
      profiling data due to function hash mismatches.
      
      Differential Revision: https://reviews.llvm.org/D51188
      
      llvm-svn: 340592
      c6ba9ca1
  6. Aug 23, 2018
    • Walter Lee's avatar
      [llvm-mca] Fix parameter name. NFC. · 20277693
      Walter Lee authored
      llvm-svn: 340570
      20277693
    • Matt Davis's avatar
      [llvm-mca] Set the Selection strategy to Default if nullptr is passed. · 0f70bc05
      Matt Davis authored
      * Set (not reset) the strategy in Scheduler::setCustomStrategyImpl()
      
      llvm-svn: 340566
      0f70bc05
    • Andrea Di Biagio's avatar
      [llvm-mca] Fix wrong call to setCustomStrategy(). · 354d1cc7
      Andrea Di Biagio authored
      Thanks to @waltl for reporting this issue.
      
      I have also added an assert to check for invalid null strategy objects, and I
      have reworded a couple of code comments in Scheduler.h
      
      llvm-svn: 340545
      354d1cc7
    • Andrea Di Biagio's avatar
      [llvm-mca] Allow the definition of custom strategies for selecting processor resource units. · 1715efd7
      Andrea Di Biagio authored
      With this patch, users can now customize the pipeline selection strategy for
      scheduler resources. The resource selection strategy can be defined at processor
      resource granularity. This enables the definition of different strategies for
      different hardware schedulers.
      
      To override the strategy associated with a processor resource, users can call
      method ResourceManager::setCustomStrategy(), and pass a 'ResourceStrategy'
      object in input.
      
      Class ResourceStrategy is an abstract class which declares virtual method
      `ResourceStrategy::select()`. Method select() is meant to implement the actual
      strategy; it is responsible for picking the next best resource from a set of
      available pipeline resources.  Custom strategy must simply override that method.
      
      By default, processor resources are associated with instances of
      'DefaultResourceStrategy'.  A 'DefaultResourceStrategy' internally implements a
      simple round-robin selector. For more details, please refer to the code comments
      in Scheduler.h.
      
      llvm-svn: 340536
      1715efd7
    • Victor Leschuk's avatar
      [DWARF] Unify warning callbacks. NFC. · cf1f714d
      Victor Leschuk authored
      Both DWARFDebugLine and DWARFDebugAddr used the same callback mechanism
      for handling recoverable errors. They both implemented similar warn() function
      to be used as such callbacks.
      
      In this revision we get rid of code duplication and move this warn() function
      to DWARFContext as DWARFContext::dumpWarning().
      
      Reviewers: lhames, jhenderson, aprantl, probinson, dblaikie, JDevlieghere
      
      Reviewed By: jhenderson
      
      Differential Revision: https://reviews.llvm.org/D51033
      
      llvm-svn: 340528
      cf1f714d
    • Peter Collingbourne's avatar
      MC: Teach the COFF object writer to write address-significance tables. · bc3089f4
      Peter Collingbourne authored
      The format is the same as in ELF: a sequence of ULEB128-encoded
      symbol indexes.
      
      Differential Revision: https://reviews.llvm.org/D51047
      
      llvm-svn: 340499
      bc3089f4
  7. Aug 22, 2018
  8. Aug 21, 2018
Loading