1. Jul 31, 2019
  2. Jul 30, 2019
    • Kit Barton's avatar
      [LoopFusion] Extend use of OptimizationRemarkEmitter · de0b6339
      Kit Barton authored
      Summary:
      This patch extends the use of the OptimizationRemarkEmitter to provide
      information about loops that are not fused, and loops that are not eligible for
      fusion. In particular, it uses the OptimizationRemarkAnalysis to identify loops
      that are not eligible for fusion and the OptimizationRemarkMissed to identify
      loops that cannot be fused.
      
      It also reuses the statistics to provide the messages used in the
      OptimizationRemarks. This provides common message strings between the
      optimization remarks and the statistics.
      
      I would like feedback on this approach, in general. If people are OK with this,
      I will flesh out additional remarks in subsequent commits.
      
      Subscribers: hiraditya, jsji, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D63844
      
      llvm-svn: 367327
      de0b6339
    • Matt Arsenault's avatar
      AMDGPU: Avoid emitting "true" predicates · 57ef94fb
      Matt Arsenault authored
      Empty condition strings are considerde always true. This removes a lot
      of clutter from the generated matcher tables.
      
      This shrinks the source size of AMDGPUGenDAGISel.inc from 7.3M to
      6.1M.
      
      llvm-svn: 367326
      57ef94fb
    • Roman Lebedev's avatar
      [DivRemPairs] Add srem-of-srem tests (PR42823, D65298, D65451) · 5e0adce4
      Roman Lebedev authored
      The @srem_of_srem_expanded case exposed a RAUW pitfall in D65298.
      Right now these don't appear to fail verification,
      so it should be safe to precommit them.
      
      https://reviews.llvm.org/D65298
      https://bugs.llvm.org/show_bug.cgi?id=42823
      https://reviews.llvm.org/D65451
      
      llvm-svn: 367325
      5e0adce4
    • Sean Fertile's avatar
      Address post commit review comments on revision 366727. · 39f35038
      Sean Fertile authored
      Addresses number of comment made on D64652 after commiting:
      
      - Reorders function decls in the TargetLoweringObjectFileXCOFF class.
      - Fix comment in MCSectionXCOFF to include description of external reference
        csects.
      - Convert several llvm_unreachables to report_fatal_error
      - Convert several dyn_casts to casts as they are expected not to fail.
      - Avoid copying DataLayout object.
      
      llvm-svn: 367324
      39f35038
    • David Major's avatar
      [COFF][ARM64] Reorder handling of aarch64 MSVC builtins · 027bb527
      David Major authored
      In `CodeGenFunction::EmitAArch64BuiltinExpr()`, bulk move all of the aarch64 MSVC-builtin cases to an earlier point in the function (the `// Handle non-overloaded intrinsics first` switch block) in order to avoid an unreachable in `GetNeonType()`. The NEON type-overloading logic is not appropriate for the Windows builtins.
      
      Fixes https://llvm.org/pr42775
      
      Differential Revision: https://reviews.llvm.org/D65403
      
      llvm-svn: 367323
      027bb527
    • Roman Lebedev's avatar
      [InstCombine] Fold "x ?% y ==/!= 0" to "x & (y-1) ==/!= 0" iff y is power-of-two · be612ea4
      Roman Lebedev authored
      Summary:
      I have stumbled into this by accident while preparing to extend backend `x s% C ==/!= 0` handling.
      
      While we did happen to handle this fold in most of the cases,
      the folding is indirect - we fold `x u% y` to `x & (y-1)` (iff `y` is power-of-two),
      or first turn `x s% -y` to `x u% y`; that does handle most of the cases.
      But we can't turn `x s% INT_MIN` to `x u% -INT_MIN`,
      and thus we end up being stuck with `(x s% INT_MIN) == 0`.
      
      There is no such restriction for the more general fold:
      https://rise4fun.com/Alive/IIeS
      
      To be noted, the fold does not enforce that `y` is a constant,
      so it may indeed increase instruction count.
      This is consistent with what `x u% y`->`x & (y-1)` already does.
      I think it makes sense, it's at most one (simple) extra instruction,
      while `rem`ainder is really much more un-simple (and likely **very** costly).
      
      Reviewers: spatel, RKSimon, nikic, xbolva00, craig.topper
      
      Reviewed By: RKSimon
      
      Subscribers: hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D65046
      
      llvm-svn: 367322
      be612ea4
    • Mehdi Amini's avatar
      Ask confirmation when `git llvm push` will push multiple commits · c960c0a4
      Mehdi Amini authored
      This can reduce unexpectedly pushing more than expected by the user.
      
      Differential Revision: https://reviews.llvm.org/D64893
      
      llvm-svn: 367321
      c960c0a4
    • Mehdi Amini's avatar
      Fix `git llvm` script when no arguments are supplied on Python 3 · 7492b1ea
      Mehdi Amini authored
      Instead of displaying a help message, it was issuing an error message:
      
        AttributeError: 'Namespace' object has no attribute 'func'
      
      https://bugs.python.org/issue16308 has more information on the bug.
      
      llvm-svn: 367320
      7492b1ea
    • Eric Fiselier's avatar
      add more information to benchmark test failures · 54bb5413
      Eric Fiselier authored
      llvm-svn: 367319
      54bb5413
    • Simon Pilgrim's avatar
      [X86] SimplifyDemandedVectorEltsForTargetNode should be calling... · b989bc47
      Simon Pilgrim authored
      [X86] SimplifyDemandedVectorEltsForTargetNode should be calling resolveTargetShuffleInputs not getTargetShuffleMask
      
      Add TODO comment.
      
      llvm-svn: 367318
      b989bc47
    • Nico Weber's avatar
      libcxx: Define __STDCPP_THREADS__ to 1, not to __cplusplus. · 9aae539d
      Nico Weber authored
      [cpp.predefined]p2:
      
         __STDCPP_THREADS__
          Defined, and has the value integer literal 1, if and only if a program
          can have more than one thread of execution .
      
      Also define it only if it's not defined already, since it's supposed
      to be defined by the compiler.
      
      Also move it from thread to __config (which requires setting it only
      if _LIBCPP_HAS_NO_THREADS is not defined).
      
      Part of PR33230. The intent is to eventually make the compiler define
      this instead.
      
      llvm-svn: 367316
      9aae539d
    • Hans Wennborg's avatar
      gn build: Use rebase_path on filename args to libcxx/utils/gen_link_script.py · 9ad716ed
      Hans Wennborg authored
        $ ninja -j800
        [1/5] ACTION //libcxx/src:cxx_linker_script(//llvm/utils/gn/build/toolchain:stage2_unix)
        FAILED: lib/libc++.so
        python ../libcxx/utils/gen_link_script.py --input //build.gn/lib/libc++.so.0 --output //build.gn/lib/libc++.so c++abi unwind
        GENERATING SCRIPT: 'INPUT(libc++.so.0 -lc++abi -lunwind)' as file //build.gn/lib/libc++.so
        Traceback (most recent call last):
          File "../libcxx/utils/gen_link_script.py", line 57, in <module>
            sys.exit(main())
          File "../libcxx/utils/gen_link_script.py", line 50, in main
            with open(args.output, 'w') as f:
        IOError: [Errno 2] No such file or directory: '//build.gn/lib/libc++.so'
        ninja: build stopped: subcommand failed.
      
      Differential revision: https://reviews.llvm.org/D65449
      
      llvm-svn: 367314
      9ad716ed
    • Haojian Wu's avatar
      [clangd] Fix a regression in rL366996. · debf4817
      Haojian Wu authored
      Summary: That patch made the tweak always annotate the whole file by accident.
      
      Reviewers: jvikstrom
      
      Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D65443
      
      llvm-svn: 367313
      debf4817
    • Aaron Ballman's avatar
      Add typedef declaration information to the JSON AST dump. · d5e206ee
      Aaron Ballman authored
      When dumping a desugared QualType and the type is a type alias, also print out the id for the type alias declaration.
      
      llvm-svn: 367312
      d5e206ee
    • Sam Elliott's avatar
      [RISCV] Attempt to make rv{32,64}i-aliases-invalid.s less flaky · 1d8b3788
      Sam Elliott authored
      These tests have been disabled on Linux and Windows due to failing
      there. I think that could be down to a race condition between stdout
      and stderr, so I have disabled output to stdout.
      
      For the moment, only re-enable on linux, because I don't have a windows
      machine to test on.
      
      llvm-svn: 367311
      1d8b3788