1. Jun 21, 2019
    • Eric Fiselier's avatar
      Enable aligned_union in C++03 · f044ebeb
      Eric Fiselier authored
      llvm-svn: 364058
      f044ebeb
    • Eric Fiselier's avatar
      Get is_convertible tests passing in C++03 (except the fallback). · b6a9afa8
      Eric Fiselier authored
      llvm-svn: 364057
      b6a9afa8
    • James Henderson's avatar
      [docs][llvm-objdump] Fix bad merge of docs · f7212dbe
      James Henderson authored
      llvm-svn: 364056
      f7212dbe
    • Aaron Ballman's avatar
      Add an automated note to files produced by gen_ast_dump_json_test.py. · 60294f9d
      Aaron Ballman authored
      This also details what filters, if any, were used to generate the test output. Updates all the current JSON testing files to include the automated note.
      
      llvm-svn: 364055
      60294f9d
    • Eric Fiselier's avatar
      Remove dead non-variadic workarounds in <type_traits> · 3503d84a
      Eric Fiselier authored
      We can use variadics with clang
      
      llvm-svn: 364054
      3503d84a
    • Eric Fiselier's avatar
      Make rvalue metaprogramming traits work in C++03. · 87cf92d9
      Eric Fiselier authored
      The next step is to get move and forward working in C++03.
      
      llvm-svn: 364053
      87cf92d9
    • George Rimar's avatar
      [llvm-objcopy] - Get rid of dynrel.elf precompiled binary from inputs. · fa1c7d9b
      George Rimar authored
      We do not have to spread using the precompiled binaries in the tests,
      when we can use YAML. This patch removes the dynrel.elf binary and adds
      a few comments to the test cases.
      
      Differential revision: https://reviews.llvm.org/D63641
      
      llvm-svn: 364052
      fa1c7d9b
    • Jay Foad's avatar
      [Scalarizer] Propagate IR flags · d9d3c91b
      Jay Foad authored
      Summary:
      The motivation for this was to propagate fast-math flags like nnan and
      ninf on vector floating point operations to the corresponding scalar
      operations to take advantage of follow-on optimizations. But I think
      the same argument applies to all of our IR flags: if they apply to the
      vector operation then they also apply to all the individual scalar
      operations, and they might enable follow-on optimizations.
      
      Subscribers: hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D63593
      
      llvm-svn: 364051
      d9d3c91b
    • Eric Fiselier's avatar
      Remove even more dead code. · 5b4cc84b
      Eric Fiselier authored
      llvm-svn: 364050
      5b4cc84b
    • George Rimar's avatar
      [llvm-readobj] - Inline a few yaml inputs into test cases. · 0a32c07c
      George Rimar authored
      There are some test that are splitted into main part + input yaml for no visible reason.
      This patch inines the yaml part for the 3 test cases I found.
      
      Differential revision: https://reviews.llvm.org/D63644
      
      llvm-svn: 364049
      0a32c07c
    • Andrea Di Biagio's avatar
      Set an explicit x86 triple for test bottleneck-analysis.s added by my r364045. NFC · dd0dc19b
      Andrea Di Biagio authored
      This should unbreak the ppc64 buildbots.
      
      llvm-svn: 364048
      dd0dc19b
    • Eric Fiselier's avatar
      Assume __is_final, __is_base_of, and friends. · 395c7330
      Eric Fiselier authored
      All the compilers we support provide these builtins. We don't
      need to do a configuration dance anymore.
      
      This patch also cleans up some dead or almost dead
      C++11 feature detection macros.
      
      llvm-svn: 364047
      395c7330
    • Sam Elliott's avatar
      [RISCV] Add RISCV-specific TargetTransformInfo · 96c8bc79
      Sam Elliott authored
      Summary:
      LLVM Allows Targets to provide information that guides optimisations
      made to LLVM IR. This is done with callbacks on a TargetTransformInfo object.
      
      This patch adds a TargetTransformInfo class for RISC-V. This will allow us to
      implement RISC-V specific callbacks as they become necessary.
      
      This commit also adds the getIntImmCost callbacks, and tests them with a simple
      constant hoisting test. Our immediate costs are on the conservative side, for
      the moment, but we prevent hoisting in most circumstances anyway.
      
      Previous review was on D63007
      
      Reviewers: asb, luismarques
      
      Reviewed By: asb
      
      Subscribers: ributzka, MaskRay, llvm-commits, Jim, benna, psnobl, jocewei, PkmX, rkruppe, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, apazos, simoncook, johnrusso, rbar, hiraditya, mgorny
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D63433
      
      llvm-svn: 364046
      96c8bc79
    • Andrea Di Biagio's avatar
      [MCA][Bottleneck Analysis] Teach how to compute a critical sequence of... · aa9b6468
      Andrea Di Biagio authored
      [MCA][Bottleneck Analysis] Teach how to compute a critical sequence of instructions based on the simulation.
      
      This patch teaches the bottleneck analysis how to identify and print the most
      expensive sequence of instructions according to the simulation. Fixes PR37494.
      
      The goal is to help users identify the sequence of instruction which is most
      critical for performance.
      
      A dependency graph is internally used by the bottleneck analysis to describe
      data dependencies and processor resource interferences between instructions.
      
      There is one node in the graph for every instruction in the input assembly
      sequence. The number of nodes in the graph is independent from the number of
      iterations simulated by the tool. It means that a single node of the graph
      represents all the possible instances of a same instruction contributed by the
      simulated iterations.
      
      Edges are dynamically "discovered" by the bottleneck analysis by observing
      instruction state transitions and "backend pressure increase" events generated
      by the Execute stage. Information from the events is used to identify critical
      dependencies, and materialize edges in the graph. A dependency edge is uniquely
      identified by a pair of node identifiers plus an instance of struct
      DependencyEdge::Dependency (which provides more details about the actual
      dependency kind).
      
      The bottleneck analysis internally ranks dependency edges based on their impact
      on the runtime (see field DependencyEdge::Dependency::Cost). To this end, each
      edge of the graph has an associated cost. By default, the cost of an edge is a
      function of its latency (in cycles). In practice, the cost of an edge is also a
      function of the number of cycles where the dependency has been seen as
      'contributing to backend pressure increases'. The idea is that the higher the
      cost of an edge, the higher is the impact of the dependency on performance. To
      put it in another way, the cost of an edge is a measure of criticality for
      performance.
      
      Note how a same edge may be found in multiple iteration of the simulated loop.
      The logic that adds new edges to the graph checks if an equivalent dependency
      already exists (duplicate edges are not allowed). If an equivalent dependency
      edge is found, field DependencyEdge::Frequency of that edge is incremented by
      one, and the new cost is cumulatively added to the existing edge cost.
      
      At the end of simulation, costs are propagated to nodes through the edges of the
      graph. The goal is to identify a critical sequence from a node of the root-set
      (composed by node of the graph with no predecessors) to a 'sink node' with no
      successors.  Note that the graph is intentionally kept acyclic to minimize the
      complexity of the critical sequence computation algorithm (complexity is
      currently linear in the number of nodes in the graph).
      
      The critical path is finally computed as a sequence of dependency edges. For
      edges describing processor resource interferences, the view also prints a
      so-called "interference probability" value (by dividing field
      DependencyEdge::Frequency by the total number of iterations).
      
      Examples of critical sequence computations can be found in tests added/modified
      by this patch.
      
      On output streams that support colored output, instructions from the critical
      sequence are rendered with a different color.
      
      Strictly speaking the analysis conducted by the bottleneck analysis view is not
      a critical path analysis. The cost of an edge doesn't only depend on the
      dependency latency. More importantly, the cost of a same edge may be computed
      differently by different iterations.
      
      The number of dependencies is discovered dynamically based on the events
      generated by the simulator. However, their number is not fixed. This is
      especially true for edges that model processor resource interferences; an
      interference may not occur in every iteration. For that reason, it makes sense
      to also print out a "probability of interference".
      
      By construction, the accuracy of this analysis (as always) is strongly dependent
      on the simulation (and therefore the quality of the information available in the
      scheduling model).
      
      That being said, the critical sequence effectively identifies a performance
      criticality. Instructions from that sequence are expected to have a very big
      impact on performance. So, users can take advantage of this information to focus
      their attention on specific interactions between instructions.
      In my experience, it works quite well in practice, and produces useful
      output (in a reasonable amount time).
      
      Differential Revision: https://reviews.llvm.org/D63543
      
      llvm-svn: 364045
      aa9b6468
    • Haojian Wu's avatar
      [clangd] Add include-mapping for C symbols. · 34f5188d
      Haojian Wu authored
      Summary:
      This resolves the issue of introducing c++-style includes for C files.
      
      - refactor the gen_std.py, make it reusable for parsing C symbols.
      - add a language mode to the mapping method to use different mapping for
        C and C++ files.
      
      Reviewers: kadircet
      
      Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, jfb, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D63270
      
      llvm-svn: 364044
      34f5188d
    • Aaron Ballman's avatar
      c07cfce2
    • Michal Gorny's avatar
      [lldb] [Process] Introduce common helpers to split/recombine YMM data · 88058292
      Michal Gorny authored
      Introduce two common helpers to take care of splitting and recombining
      YMM registers to/from XSAVE-like data.  Since FreeBSD, Linux and NetBSD
      all use XSAVE-like data structures but with potentially different field
      layouts, the function takes two pointers -- to XMM register and to YMM
      high bits, and copies the data from/to YMMReg type.
      
      While at it, remove support for big endian.  To mine and Pavel Labath's
      combined knowledge, there is no such thing on x86.  Furthermore,
      assuming that the YMM register data would be swapped for big endian
      seems to be a weird assumption.
      
      Differential Revision: https://reviews.llvm.org/D63610
      
      llvm-svn: 364042
      88058292
    • Simon Tatham's avatar
      [ARM] Add MVE 64-bit GPR <-> vector move instructions. · 0c7af664
      Simon Tatham authored
      These instructions let you load half a vector register at once from
      two general-purpose registers, or vice versa.
      
      The assembly syntax for these instructions mentions the vector
      register name twice. For the move _into_ a vector register, the MC
      operand list also has to mention the register name twice (once as the
      output, and once as an input to represent where the unchanged half of
      the output register comes from). So we can conveniently assign one of
      the two asm operands to be the output $Qd, and the other $QdSrc, which
      avoids confusing the auto-generated AsmMatcher too much. For the move
      _from_ a vector register, there's no way to get round the fact that
      both instances of that register name have to be inputs, so we need a
      custom AsmMatchConverter to avoid generating two separate output MC
      operands. (And even that wouldn't have worked if it hadn't been for
      D60695.)
      
      Reviewers: dmgreen, samparker, SjoerdMeijer, t.p.northover
      
      Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D62679
      
      llvm-svn: 364041
      0c7af664
    • Simon Tatham's avatar
      [ARM] Add MVE vector instructions that take a scalar input. · bafb105e
      Simon Tatham authored
      This adds the `MVE_qDest_rSrc` superclass and all its instances, plus
      a few other instructions that also take a scalar input register or two.
      
      I've also belatedly added custom diagnostic messages to the operand
      classes for odd- and even-numbered GPRs, which required matching
      changes in two of the existing MVE assembly test files.
      
      Reviewers: dmgreen, samparker, SjoerdMeijer, t.p.northover
      
      Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D62678
      
      llvm-svn: 364040
      bafb105e
    • Paul Robinson's avatar
      Fix a crash with assembler source and -g. · 26cc5bcb
      Paul Robinson authored
      llvm-mc or clang with -g normally produces debug info describing the
      assembler source itself; however, if that source already contains some
      .file/.loc directives, we should instead emit the debug info described
      by those directives.  For certain assembler sources seen in the wild
      (particularly in the Chrome build) this was causing a crash due to
      incorrect assumptions about legal sequences of assembler source text.
      
      Fixes PR38994.
      
      Differential Revision: https://reviews.llvm.org/D63573
      
      llvm-svn: 364039
      26cc5bcb
    • Simon Pilgrim's avatar
      [X86] X86ISD::ANDNP is a (non-commutative) binop · 36a999ff
      Simon Pilgrim authored
      The sat add/sub tests still have unnecessary extract_subvector((vandnps ymm, ymm), 0) uses that should be split to (vandnps (extract_subvector(ymm, 0), extract_subvector(ymm, 0)), but its getting better.
      
      llvm-svn: 364038
      36a999ff
    • Simon Tatham's avatar
      [ARM] Add a batch of similarly encoded MVE instructions. · a6b6a157
      Simon Tatham authored
      Summary:
      This adds the `MVE_qDest_qSrc` superclass and all instructions that
      inherit from it. It's not the complete class of _everything_ with a
      q-register as both destination and source; it's a subset of them that
      all have similar encodings (but it would have been hopelessly unwieldy
      to call it anything like MVE_111x11100).
      
      This category includes add/sub with carry; long multiplies; halving
      multiplies; multiply and accumulate, and some more complex
      instructions.
      
      Reviewers: dmgreen, samparker, SjoerdMeijer, t.p.northover
      
      Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D62677
      
      llvm-svn: 364037
      a6b6a157
    • James Henderson's avatar
      [binutils] Add response file option to help and docs · 9485b265
      James Henderson authored
      Many LLVM-based tools already support response files (i.e. files
      containing a list of options, specified with '@'). This change simply
      updates the documentation and help text for some of these tools to
      include it. I haven't attempted to fix all tools, just a selection that
      I am interested in.
      
      I've taken the opportunity to add some tests for --help behaviour, where
      they were missing. We could expand these tests, but I don't think that's
      within scope of this patch.
      
      This fixes https://bugs.llvm.org/show_bug.cgi?id=42233 and
      https://bugs.llvm.org/show_bug.cgi?id=42236.
      
      Reviewed by: grimar, MaskRay, jkorous
      
      Differential Revision: https://reviews.llvm.org/D63597
      
      llvm-svn: 364036
      9485b265
    • Tatyana Krasnukha's avatar
      [unittests] Simplify CMakeLists with object library · d76c7b1c
      Tatyana Krasnukha authored
      The solution suggested by Chris Bieneman works for all versions of CMake.
      
      Differential Revision: https://reviews.llvm.org/D63544
      
      llvm-svn: 364035
      d76c7b1c
    • Fangrui Song's avatar
      5e56f301
    • Anastasia Stulova's avatar
      [Sema] Fix diagnostic for addr spaces in reference binding · 3562edb9
      Anastasia Stulova authored
      Extend reference binding behavior to account for address spaces.
      
      Differential Revision: https://reviews.llvm.org/D62914
      
      llvm-svn: 364032
      3562edb9
    • Eric Fiselier's avatar
      Remove dead config now that C++03 requires Clang. · 8d30a6e4
      Eric Fiselier authored
      llvm-svn: 364031
      8d30a6e4
    • Simon Pilgrim's avatar
      9184b009
    • James Henderson's avatar
      [llvm-dwarfdump] Remove unnecessary explicit -h behaviour · beb2493f
      James Henderson authored
      --help and -h are automatically supported by the command-line parser,
      unless overridden by the tool. The behaviour of the PrintHelpMessage
      being used for -h prior to this patch is subtly different to that
      provided by --help automatically (it omits certain elements of help text
      and options, such as --help-list), so overriding the default is not
      desirable, without good reason. This patch removes the explicit
      specification of -h and its behaviour, so that the default behaviour is
      used.
      
      Reviewed by: hintonda
      
      Differential Revision: https://reviews.llvm.org/D63565
      
      llvm-svn: 364029
      beb2493f
    • Fangrui Song's avatar
      [ARM] Fix -Wimplicit-fallthrough after D62675 · d5cf95e4
      Fangrui Song authored
      llvm-svn: 364028
      d5cf95e4
    • Simon Tatham's avatar
      [ARM] Add MVE vector compare instructions. · 7d76f8ac
      Simon Tatham authored
      Summary:
      These take a pair of vector register to compare, and a comparison type
      (written in the form of an Arm condition suffix); they output a vector
      of booleans in the VPR register, where predication can conveniently
      use them.
      
      Reviewers: dmgreen, samparker, SjoerdMeijer, t.p.northover
      
      Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D62676
      
      llvm-svn: 364027
      7d76f8ac
    • Simon Pilgrim's avatar
      c26b8f2a
    • Fangrui Song's avatar
      22e478f0
    • Simon Pilgrim's avatar
      [X86] foldVectorXorShiftIntoCmp - use isConstOrConstSplat. NFCI. · b5733581
      Simon Pilgrim authored
      Use the isConstOrConstSplat helper instead of inspecting the build vector manually.
      
      llvm-svn: 364024
      b5733581
    • Anastasia Stulova's avatar
      [Sema] Improved diagnostic for qualifiers in reference binding · 1da9e4c9
      Anastasia Stulova authored
      Improved wording and also simplified by using printing
      method from qualifiers.
      
      Differential Revision: https://reviews.llvm.org/D62914
      
      llvm-svn: 364023
      1da9e4c9
    • Simon Pilgrim's avatar
      771c33e3
    • Sven van Haastregt's avatar
      [cmake] Add llvm-dwarfdump to clang test dependencies · e65fa21c
      Sven van Haastregt authored
      Commit r363496 ("[Clang] Harmonize Split DWARF options with llc",
      2019-06-15) introduced the use of llvm-dwarfdump in the clang tests,
      so ensure the clang tests are dependent on llvm-dwarfdump.
      
      llvm-svn: 364021
      e65fa21c
    • Sven van Haastregt's avatar
      [OpenCL] Remove duplicate read_image declarations · 772a7a76
      Sven van Haastregt authored
      Patch by Pierre Gondois.
      
      llvm-svn: 364020
      772a7a76
    • James Henderson's avatar
      [docs][llvm-objdump] Improve llvm-objdump documentation · a8ed354b
      James Henderson authored
      The llvm-objdump document was missing many options, and there were also
      some style issues with it. This patches fixes all but the first issue
      listed in https://bugs.llvm.org/show_bug.cgi?id=42249 by:
      
          1. Adding missing options and commands.
          2. Standardising on double dashes for long-options throughout.
          3. Moving Mach-O specific options to a separate section.
          4. Removing options that don't exist or aren't relevant to
             llvm-objdump.
      
      Reviewed by: MaskRay, mtrent, alexshap
      
      Differential Revision: https://reviews.llvm.org/D63606
      
      llvm-svn: 364019
      a8ed354b
    • Sam Elliott's avatar
      [RISC-V] Add -msave-restore and -mno-save-restore to clang driver · 3e53e0e4
      Sam Elliott authored
      Summary:
      The GCC RISC-V toolchain accepts `-msave-restore` and `-mno-save-restore`
      to control whether libcalls are used for saving and restoring the stack within
      prologues and epilogues.
      
      Clang currently errors if someone passes -msave-restore or -mno-save-restore.
      This means that people need to change build configurations to use clang. This
      patch adds these flags, so that clang invocations can now match gcc.
      
      As the RISC-V backend does not currently have a `save-restore` target feature,
      we emit a warning if someone requests `-msave-restore`. LLVM does not error if
      we pass the (unimplemented) target features `+save-restore` or `-save-restore`.
      
      Reviewers: asb, luismarques
      
      Reviewed By: asb
      
      Subscribers: rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D63498
      
      llvm-svn: 364018
      3e53e0e4