1. Oct 31, 2018
  2. Oct 30, 2018
    • Fangrui Song's avatar
      [llvm-mca] Move namespace mca inside llvm:: · 5a8fd657
      Fangrui Song authored
      Summary: This allows to remove `using namespace llvm;` in those *.cpp files
      
      When we want to revisit the decision (everything resides in llvm::mca::*) in the future, we can move things to a nested namespace of llvm::mca::, to conceptually make them separate from the rest of llvm::mca::*
      
      Reviewers: andreadb, mattd
      
      Reviewed By: andreadb
      
      Subscribers: javed.absar, tschuett, gbedwell, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D53407
      
      llvm-svn: 345612
      5a8fd657
    • Samuel Benzaquen's avatar
      Add more benchmarks for std::string. · 74583444
      Samuel Benzaquen authored
      Summary:
      Added benchmarks for Construct, Copy, Move, Destroy, Relationals and
      Read. On the ones that matter, the benchmarks tests hot and cold data,
      and opaque and transparent inputs.
      
      Reviewers: EricWF
      
      Subscribers: christof, ldionne, libcxx-commits
      
      Differential Revision: https://reviews.llvm.org/D53825
      
      llvm-svn: 345611
      74583444
    • Roman Lebedev's avatar
      [clang-tidy] cppcoreguidelines-macro-usage: print macro names · c367ba19
      Roman Lebedev authored
      Summary:
      The macro may not have location (or more generally, the location may not exist),
      e.g. if it originates from compiler's command-line.
      
      The check complains on all the macros, even those without the location info.
      Which means, it only says it does not like it. What is 'it'? I have no idea.
      If we don't print the name, then there is no way to deal with that situation.
      
      And in general, not printing name here forces the user to try to understand,
      given, the macro definition location, what is the macro name?
      This isn't fun.
      
      Also, ignores-by-default the macros originating from command-line,
      with an option to not ignore those.
      
      I suspect some more issues may crop up later.
      
      Reviewers: JonasToth, aaron.ballman, hokein, xazax.hun, alexfh
      
      Reviewed By: JonasToth, aaron.ballman
      
      Subscribers: nemanjai, kbarton, rnkovacs, cfe-commits
      
      Tags: #clang-tools-extra
      
      Differential Revision: https://reviews.llvm.org/D53817
      
      llvm-svn: 345610
      c367ba19
    • Alexey Bataev's avatar
      [OPENMP] Support for mapping of the lambdas in target regions. · 60705422
      Alexey Bataev authored
      Added support for mapping of lambdas in the target regions. It scans all
      the captures by reference in the lambda, implicitly maps those variables
      in the target region and then later reinstate the addresses of
      references in lambda to the correct addresses of the captured|privatized
      variables.
      
      llvm-svn: 345609
      60705422
    • Alexey Bataev's avatar
      [LIBOMPTARGET] Add support for mapping of lambda captures. · e5369885
      Alexey Bataev authored
      Summary:
      Added support for correct mapping of variables captured by reference in
      lambdas. That kind of mapping may appear only in target-executable
      regions and must follow the original lambda or another lambda capture
      for the same lambda.
      The expected data: base address - the address of the lambda, begin
      pointer - pointer to the address of the lambda capture, size - size of
      the captured variable.
      When OMP_TGT_MAPTYPE_PTR_AND_OBJ mapping type is seen in
      target-executable region, the target address of the last processed item
      is taken as the address of the original lambda `tgt_lambda_ptr`. Then,
      the pointer to capture on the device is calculated like `tgt_lambda_ptr
      + (host_begin_pointer - host_begin_base)` and the target-based address
      of the original variable (which host address is
      `*(void**)begin_pointer`) is written to that pointer.
      
      Reviewers: kkwli0, gtbercea, grokos
      
      Subscribers: openmp-commits
      
      Differential Revision: https://reviews.llvm.org/D51107
      
      llvm-svn: 345608
      e5369885
    • Sanjay Patel's avatar
      [InstCombine] try to turn shuffle into insertelement · b12e4100
      Sanjay Patel authored
      shuffle (insert ?, Scalar, IndexC), V1, Mask --> insert V1, Scalar, IndexC'
      
      The motivating case is at least a couple of steps away: I noticed that
      SLPVectorizer does not analyze shuffles as well as sequences of 
      insert/extract in PR34724:
      https://bugs.llvm.org/show_bug.cgi?id=34724
      ...so SLP may fail to vectorize when source code has shuffles to start 
      with or instcombine has converted insert/extract to shuffles.
      
      Independent of that, an insertelement is always a simpler op for IR 
      analysis vs. a shuffle, so we should transform to insert when possible.
      
      I don't think there's any codegen concern here - if a target can't insert 
      a scalar directly to some fixed element in a vector (x86?), then this 
      should get expanded to the insert+shuffle that we started with.
      
      Differential Revision: https://reviews.llvm.org/D53507
      
      llvm-svn: 345607
      b12e4100
    • Jonas Paulsson's avatar
      [SchedModel] Fix for read advance cycles with implicit pseudo operands. · 611b533f
      Jonas Paulsson authored
      The SchedModel allows the addition of ReadAdvances to express that certain
      operands of the instructions are needed at a later point than the others.
      
      RegAlloc may add pseudo operands that are not part of the instruction
      descriptor, and therefore cannot have any read advance entries. This meant
      that in some cases the desired read advance was nullified by such a pseudo
      operand, which still had the original latency.
      
      This patch fixes this by making sure that such pseudo operands get a zero
      latency during DAG construction.
      
      Review: Matthias Braun, Ulrich Weigand.
      https://reviews.llvm.org/D49671
      
      llvm-svn: 345606
      611b533f
    • Bruno Ricci's avatar
      [AST] Only store data for the NRVO candidate in ReturnStmt if needed · 023b1d19
      Bruno Ricci authored
      Only store the NRVO candidate if needed in ReturnStmt.
      A good chuck of all of the ReturnStmt have no NRVO candidate
      (more than half when parsing all of Boost). For all of them
      this saves one pointer. This has no impact on children().
      
      Differential Revision: https://reviews.llvm.org/D53716
      
      Reviewed By: rsmith
      
      llvm-svn: 345605
      023b1d19
    • Sean Fertile's avatar
      [PPC64] Handle powerpc64 in OUTPUT_FORMAT. · 92964e74
      Sean Fertile authored
      Differential Revision: https://reviews.llvm.org/D53652
      
      llvm-svn: 345604
      92964e74
    • Jonas Paulsson's avatar
      [LoopVectorizer] Fix for cost values of memory accesses. · 1f067c94
      Jonas Paulsson authored
      This commit is a combination of two patches:
      
      * "Fix in getScalarizationOverhead()"
      
         If target returns false in TTI.prefersVectorizedAddressing(), it means the
         address registers will not need to be extracted. Therefore, there should
         be no operands scalarization overhead for a load instruction.
      
      * "Don't pass the instruction pointer from getMemInstScalarizationCost."
      
         Since VF is always > 1, this is a cost query for an instruction in the
         vectorized loop and it should not be evaluated within the scalar
         context of the instruction.
      
      Review: Ulrich Weigand, Hal Finkel
      https://reviews.llvm.org/D52351
      https://reviews.llvm.org/D52417
      
      llvm-svn: 345603
      1f067c94
    • Sanjay Patel's avatar
      [DAGCombiner] narrow vector binops when extraction is cheap · 8b207def
      Sanjay Patel authored
      Narrowing vector binops came up in the demanded bits discussion in D52912.
      
      I don't think we're going to be able to do this transform in IR as a canonicalization 
      because of the risk of creating unsupported widths for vector ops, but we already have 
      a DAG TLI hook to allow what I was hoping for: isExtractSubvectorCheap(). This is 
      currently enabled for x86, ARM, and AArch64 (although only x86 has existing regression 
      test diffs).
      
      This is artificially limited to not look through bitcasts because there are so many 
      test diffs already, but that's marked with a TODO and is a small follow-up.
      
      Differential Revision: https://reviews.llvm.org/D53784
      
      llvm-svn: 345602
      8b207def
    • Diogo N. Sampaio's avatar
      [FIX][AArch64] Add support for UDF instruction · bd74554f
      Diogo N. Sampaio authored
      Fix: Simplify test files from rL345581 failing
      in windows bots.
      
      llvm-svn: 345601
      bd74554f
    • Kamil Rytarowski's avatar
      Disable ASan test asan_and_llvm_coverage_test for NetBSD · d045b15b
      Kamil Rytarowski authored
      Right now the LLVM profile feature is turned off for this OS.
      
      llvm-svn: 345600
      d045b15b
    • Kamil Rytarowski's avatar
      Adapt ASan test heavy_uar_test for NetBSD · 02f838d7
      Kamil Rytarowski authored
      The stack size is tight for the main thread in multithread
      environment and follow the FreeBSD approach of reducing stack
      usage.
      
      llvm-svn: 345599
      02f838d7
    • Sanjay Patel's avatar
      [SelectionDAG] fix build warning for mismatched signs in compare; NFC · 680c9227
      Sanjay Patel authored
      llvm-svn: 345598
      680c9227
    • Bruno Ricci's avatar
      [AST] Only store the needed data in WhileStmt · bacf751a
      Bruno Ricci authored
      Don't store the data for the condition variable if not needed.
      This cuts the size of WhileStmt by up to a pointer.
      The order of the children is kept the same.
      
      Differential Revision: https://reviews.llvm.org/D53715
      
      Reviewed By: rjmccall
      
      llvm-svn: 345597
      bacf751a
    • Jonas Paulsson's avatar
      [SystemZ] Improve isFoldableLoad() for Sub, SDiv and UDiv. · af8e036c
      Jonas Paulsson authored
      Sub, SDiv and UDiv are not commutative, so only the RHS operand can fold a
      load. This patch adds a check for this.
      
      Review: Ulrich Weigand
      https://reviews.llvm.org/D53791
      
      llvm-svn: 345596
      af8e036c
    • Kamil Rytarowski's avatar
      Mark breaking TSan tests on NetBSD with XFAIL · 647ece01
      Kamil Rytarowski authored
      Failing tests:
       - dtls
       - ignored-interceptors-mmap
       - mutex_lock_destroyed
      
      llvm-svn: 345595
      647ece01
    • Roman Lebedev's avatar
      [clang] Move two utility functions into SourceManager · a32a2e34
      Roman Lebedev authored
      Summary: So we can keep that not-so-great logic in one place.
      
      Reviewers: rsmith, aaron.ballman
      
      Reviewed By: rsmith
      
      Subscribers: nemanjai, kbarton, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D53837
      
      llvm-svn: 345594
      a32a2e34
    • Francis Visoiu Mistrih's avatar
      [X86] Re-enable the machine verifier after fixing more tests · 0e237d35
      Francis Visoiu Mistrih authored
      Was disabled again in r345528. Hopefully this the bots.
      
      llvm-svn: 345593
      0e237d35