1. Nov 24, 2018
    • Evandro Menezes's avatar
      [TableGen] Emit more variant transitions · 079bf4b7
      Evandro Menezes authored
      `llvm-mca` relies on the predicates to be based on `MCSchedPredicate` in order
      to resolve the scheduling for variant instructions.  Otherwise, it aborts
      the building of the instruction model early.
      
      However, the scheduling model emitter in `TableGen` gives up too soon, unless
      all processors use only such predicates.
      
      In order to allow more processors to be used with `llvm-mca`, this patch
      emits scheduling transitions if any processor uses these predicates.  The
      transition emitted for the processors using legacy predicates is the one
      specified with `NoSchedPred`, which is based on `MCSchedPredicate`.
      
      Preferably, `llvm-mca` should instead assume a reasonable default when a
      variant transition is not based on `MCSchedPredicate` for a given processor.
      This issue should be revisited in the future.
      
      Differential revision: https://reviews.llvm.org/D54648
      
      llvm-svn: 347504
      079bf4b7
    • Andrea Di Biagio's avatar
      [llvm-mca] Refactor some of the logic in InstrBuilder, and add a verifyOperands method. · 7e32cc83
      Andrea Di Biagio authored
      With this change, InstrBuilder emits an error if the MCInst sequence contains an
      instruction with a variadic opcode, and a non-zero number of variadic operands.
      
      Currently we don't know how to correctly analyze variadic opcodes. The problem
      with variadic operands is that there is no information for them in the opcode
      descriptor (i.e. MCInstrDesc). That means, we don't know which variadic operands
      are defs, and which are uses.
      
      In future, we could try to conservatively assume that any extra register
      operands is both a register use and a register definition.
      
      This patch fixes a subtle bug in the evaluation of read/write operands for ARM
      VLD1 with implicit index update. Added test vld1-index-update.s
      
      llvm-svn: 347503
      7e32cc83
    • Sanjay Patel's avatar
      [DAG] consolidate shift simplifications · 7e119c04
      Sanjay Patel authored
      ...and use them to avoid creating obviously undef values as
      discussed in the post-commit thread for r347478.
      
      The diffs in vector div/rem show that we were missing real
      optimizations by creating bogus shift nodes.
      
      llvm-svn: 347502
      7e119c04
    • Sanjay Patel's avatar
      [x86] make test immune to oversized shift simplification · e0cc8763
      Sanjay Patel authored
      I'm not sure if this actually preserves the original intent
      of this test, but if we leave it as-is, the -1 (oversized)
      shift should be folded to undef and allow deleting half
      of the output.
      
      llvm-svn: 347501
      e0cc8763
    • Luke Cheeseman's avatar
      Revert r347491 as it's llvm counterpart breaks buildbots · 2ed41a79
      Luke Cheeseman authored
      llvm-svn: 347500
      2ed41a79
    • Luke Cheeseman's avatar
      Revert r347490 as it breaks address sanitizer builds · 6db3a6a4
      Luke Cheeseman authored
      llvm-svn: 347499
      6db3a6a4
  2. Nov 23, 2018
  3. Nov 22, 2018
    • Andrea Di Biagio's avatar
      [llvm-mca] LSUnit: use a SmallSet to model load/store queues. NFCI · 840f0326
      Andrea Di Biagio authored
      Also, try to minimize the number of queries to the memory queues to speedup the
      analysis.
      
      On average, this change gives a small 2% speedup. For memcpy-like kernels, the
      speedup is up to 5.5%.
      
      llvm-svn: 347469
      840f0326
    • Ilya Biryukov's avatar
      [clangd] Cleanup: make diagnostics callbacks from TUScheduler non-racy · c76394bc
      Ilya Biryukov authored
      Summary:
      Previously, removeDoc followed by an addDoc to TUScheduler resulted in
      racy diagnostic responses, i.e. the old dianostics could be delivered
      to the client after the new ones by TUScheduler.
      
      To workaround this, we tracked a version number in ClangdServer and
      discarded stale diagnostics. After this commit, the TUScheduler will
      stop delivering diagnostics for removed files and the workaround in
      ClangdServer is not required anymore.
      
      Reviewers: sammccall
      
      Reviewed By: sammccall
      
      Subscribers: javed.absar, ioeric, MaskRay, jkorous, arphaman, jfb, kadircet, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D54829
      
      llvm-svn: 347468
      c76394bc
    • Eric Liu's avatar
      [clangd] Cleanup: stop passing around list of supported URI schemes. · c0ac4bb1
      Eric Liu authored
      Summary:
      Instead of passing around a list of supported URI schemes in clangd, we
      expose an interface to convert a path to URI using any compatible scheme
      that has been registered. It favors customized schemes and falls
      back to "file" when no other scheme works.
      
      Changes in this patch are:
      - URI::create(AbsPath, URISchemes) -> URI::create(AbsPath). The new API finds a
      compatible scheme from the registry.
      - Remove URISchemes option everywhere (ClangdServer, SymbolCollecter, FileIndex etc).
      - Unit tests will use "unittest" by default.
      - Move "test" scheme from ClangdLSPServer to ClangdMain.cpp, and only
      register the test scheme when lit-test or enable-lit-scheme is set.
      (The new flag is added to make lit protocol.test work; I wonder if there
      is alternative here.)
      
      Reviewers: sammccall
      
      Reviewed By: sammccall
      
      Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D54800
      
      llvm-svn: 347467
      c0ac4bb1
    • Eric Liu's avatar
      [clangd] Cleanup: use index file instead of header in workspace symbols lit test. · 5628c145
      Eric Liu authored
      Summary:
      The full path of the input header depends on the execution environment
      and may result in different behavior (e.g. when different URI schemes are used).
      
      Reviewers: sammccall
      
      Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D54833
      
      llvm-svn: 347466
      5628c145
    • Krasimir Georgiev's avatar
      [clang-format] Do not treat asm clobber [ as ObjCExpr, refined · 56904bf8
      Krasimir Georgiev authored
      Summary:
      r346756 refined clang-format to not treat the `[` in `asm (...: [] ..)` as an
      ObjCExpr. However that's not enough, as we might have a comma-separated list of
      such clobbers as in the newly added test.
      This updates the detection to instead look at the Line's first token being `asm`
      and not mark `[`-s as ObjCExprs in this case.
      
      Reviewers: djasper, benhamilton
      
      Reviewed By: djasper, benhamilton
      
      Subscribers: benhamilton, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D54795
      
      llvm-svn: 347465
      56904bf8