FailedChanges

Summary

  1. Make `vector` unconditionally move elements when exceptions are disabled. Summary: `std::vector<T>` is free choose between using copy or move operations when it needs to resize. The standard only candidates that the correct exception safety guarantees are provided. When exceptions are disabled these guarantees are trivially satisfied. Meaning vector is free to optimize it's implementation by moving instead of copying. This patch makes `std::vector` unconditionally move elements when exceptions are disabled. This optimization is conforming according to the current standard wording. There are concerns that moving in `-fno-noexceptions`mode will be a surprise to users. For example, a user may be surprised to find their code is slower with exceptions enabled than it is disabled. I'm sympathetic to this surprised, but I don't think it should block this optimization. Reviewers: mclow.lists, ldionne, rsmith Reviewed By: ldionne Subscribers: zoecarver, christof, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D62228
  2. gn build: Merge r370500
  3. [MachinePipeliner] Separate schedule emission, NFC This is the first stage in refactoring the pipeliner and making it more accessible for backends to override and control. This separates the logic and state required to *emit* a scheudule from the logic that *computes* and validates a schedule. This will enable (a) new schedule emitters and (b) new modulo scheduling implementations to coexist. NFC. Differential Revision: https://reviews.llvm.org/D67006
  4. [llvm-ifs][IFS] llvm Interface Stubs merging + object file generation tool. This tool merges interface stub files to produce a merged interface stub file or a stub library. Currently it for stub library generation it can produce an ELF .so stub file, or a TBD file (experimental). It will be used by the clang -emit-interface-stubs compilation pipeline to merge and assemble the per-CU stub files into a stub library. The new IFS format is as follows: --- !experimental-ifs-v1 IfsVersion: 1.0 Triple: <llvm triple> ObjectFileFormat: <ELF | TBD> Symbols: _ZSymbolName: { Type: <type>, etc... } ... Differential Revision: https://reviews.llvm.org/D66405
  5. [DAGCombine] ReduceLoadWidth - remove duplicate SDLoc. NFCI. SDLoc(N0) and SDLoc(cast<LoadSDNode>(N0)) should be equivalent.
  6. [TargetLowering] SimplifyDemandedBits ADD/SUB/MUL - correctly inherit SDNodeFlags from the original node. Just disable NSW/NUW flags. This matches what we're already doing for the other situations for these nodes, it was just missed for the demanded constant case. Noticed by inspection - confirmed in offline discussion with @spatel. I've checked we have test coverage in the x86 extract-bits.ll and extract-lowbits.ll tests
  7. GlobalISel: Fix missing pass dependency
  8. [X86] Pass v32i16/v64i8 in zmm registers on KNL target. gcc and icc pass these types in zmm registers in zmm registers. This patch implements a quick hack to override the register type before calling convention handling to one that is legal. Longer term we might want to do something similar to 256-bit integer registers on AVX1 where we just split all the operations. Fixes PR42957 Differential Revision: https://reviews.llvm.org/D66708
  9. [ValueTypes] Add v16f16 and v32f16 to EVT::getEVTString and Tablegen's getEnumName Missed these when I hadded the enum entries
  10. [clang-scan-deps] NFC, remove outdated implementation comment There's no need to purge symlinked entries in the FileManager, as the new FileEntryRef API allows us to compute dependencies more accurately when the FileManager is reused.
  11. gn build: Merge r370490
  12. MemTag: unchecked load/store optimization. Summary: MTE allows memory access to bypass tag check iff the address argument is [SP, #imm]. This change takes advantage of this to demote uses of tagged addresses to regular FrameIndex operands, reducing register pressure in large functions. MO_TAGGED target flag is used to signal that the FrameIndex operand refers to memory that might be tagged, and needs to be handled with care. Such operand must be lowered to [SP, #imm] directly, without a scratch register. The transformation pass attempts to predict when the offset will be out of range and disable the optimization. AArch64RegisterInfo::eliminateFrameIndex has an escape hatch in case this prediction has been wrong, but it is quite inefficient and should be avoided. Reviewers: pcc, vitalybuka, ostannard Subscribers: mgorny, javed.absar, kristof.beyls, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66457
  13. [DAGCombine] visitVSELECT - remove equivalent getValueType() call. NFCI.
  14. FileManager: Remove ShouldCloseOpenFile argument from getBufferForFile, NFC Remove this dead code. We always close it.
  15. [INSTRUCTIONS] Add support of const for getLoadStorePointerOperand() and getLoadStorePointerOperand(). Reviewer: hsaito, sebpop, reames, hfinkel, mkuper, bogner, haicheng, arsenm, lattner, chandlerc, grosser, rengolin Reviewed By: reames Subscribers: wdng, llvm-commits, bmahjour Tag: LLVM Differential Revision: https://reviews.llvm.org/D66595
  16. [Attributor] Fix: do not pretend to preserve the CFG
  17. [X86] Merge X86InstrInfo::loadRegFromAddr/storeRegToAddr into their only call site. I'm looking at unfolding broadcast loads on AVX512 which will require refactoring this code to select broadcast opcodes instead of regular load/stores in some cases. Merging them to avoid further complicating their interfaces.
  18. [clangd] Add highlighting for macro expansions. Summary: https://github.com/clangd/clangd/issues/134 Reviewers: hokein, ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66995
  19. Revert [Clang Interpreter] Initial patch for the constexpr interpreter This reverts r370476 (git commit a5590950549719d0d9ea69ed164b0c8c0f4e02e6)
  20. [Attributor] Use existing function information for the call site Summary: Instead of recomputing information for call sites we now use the function information directly. This is always valid and once we have call site specific information we can improve here. This patch also bootstraps attributes that are created on-demand through an initial update call. Information that is known will then directly be available in the new attribute without causing an iteration delay. The tests show how this improves the iteration count. Reviewers: sstefan1, uenoku Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66781
  21. [Attributor] Manifest load/store alignment generally Summary: Any pointer could have load/store users not only floating ones so we move the manifest logic for alignment into the AAAlignImpl class. Reviewers: uenoku, sstefan1 Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66922
  22. [DAGCombine] visitVSELECT - remove duplicate getOperand calls. NFCI.
  23. [Clang Interpreter] Initial patch for the constexpr interpreter Summary: This patch introduces the skeleton of the constexpr interpreter, capable of evaluating a simple constexpr functions consisting of if statements. The interpreter is described in more detail in the RFC. Further patches will add more features. Reviewers: Bigcheese, jfb, rsmith Subscribers: bruno, uenoku, ldionne, Tyker, thegameg, tschuett, dexonsmith, mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64146
  24. [InstCombine][AMDGPU] Simplify tbuffer loads Summary: Add missing tbuffer loads intrinsics in SimplifyDemandedVectorElts. Reviewers: arsenm, nhaehnle Reviewed By: arsenm Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66926
  25. [llvm-nm] Small fix to Exected<StringRef> Differential Revision: https://reviews.llvm.org/D66976
  26. [clangd] Added highlighting for structured bindings. Summary: Structured bindings are in a BindingDecl. The decl the declRefExpr points to are the BindingDecls. So this adds an additional if statement in the addToken function to highlight them. Reviewers: hokein, ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66738
  27. [yaml2obj][obj2yaml] - Use a single "Other" field instead of "Other", "Visibility" and "StOther". Currenly we can encode the 'st_other' field of symbol using 3 fields. 'Visibility' is used to encode STV_* values. 'Other' is used to encode everything except the visibility, but it can't handle arbitrary values. 'StOther' is used to encode arbitrary values when 'Visibility'/'Other' are not helpfull enough. 'st_other' field is used to encode symbol visibility and platform-dependent flags and values. Problem to encode it is that it consists of Visibility part (STV_* values) which are enumeration values and the Other part, which is different and inconsistent. For MIPS the Other part contains flags for all STO_MIPS_* values except STO_MIPS_MIPS16. (Like comment in ELFDumper says: "Someones in their infinite wisdom decided to make STO_MIPS_MIPS16 flag overlapped with other ST_MIPS_xxx flags."...) And for PPC64 the Other part might actually encode any value. This patch implements custom logic for handling the st_other and removes 'Visibility' and 'StOther' fields. Here is an example of a new YAML style this patch allows: - Name: foo Other: [ 0x4 ] - Name: bar Other: [ STV_PROTECTED, 4 ] - Name: zed Other: [ STV_PROTECTED, STO_MIPS_OPTIONAL, 0xf8 ] Differential revision: https://reviews.llvm.org/D66886
  28. [DAGCombine] visitVSELECT - use getShiftAmountTy for shift amounts.
  29. [DAGCombine] visitMULHS - use getScalarValueSizeInBits() to make safe for vector types. This is hidden behind a (scalar-only) isOneConstant(N1) check at the moment, but once we get around to adding vector support we need to ensure we're dealing with the scalar bitwidth, not the total.
  30. [mips] Merge common checkings under the same check prefix. NFC
  31. [RISCV] Fix a couple of tests' CHECKs
  32. Remove an extra ";", NFC.
  33. [X86] Add tests for rotate matching. NFC
  34. [CodeGen] Introduce MachineBasicBlock::replacePhiUsesWith helper and use it. NFC Summary: Found a couple of places in the code where all the PHI nodes of a MBB is updated, replacing references to one MBB by reference to another MBB instead. This patch simply refactors the code to use a common helper (MachineBasicBlock::replacePhiUsesWith) for such PHI node updates. Reviewers: t.p.northover, arsenm, uabelho Subscribers: wdng, hiraditya, jsji, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66750
  35. [ASTImporter] Do not look up lambda classes Summary: Consider this code: ``` void f() { auto L0 = [](){}; auto L1 = [](){}; } ``` First we import `L0` then `L1`. Currently we end up having only one CXXRecordDecl for the two different lambdas. And that is a problem if the body of their op() is different. This happens because when we import `L1` then lookup finds the existing `L0` and since they are structurally equivalent we just map the imported L0 to be the counterpart of L1. We have the same problem in this case: ``` template <typename F0, typename F1> void f(F0 L0 = [](){}, F1 L1 = [](){}) {} ``` In StructuralEquivalenceContext we could distinquish lambdas only by their source location in these cases. But we the lambdas are actually structrually equivalent they differn only by the source location. Thus, the solution is to disable lookup completely if the decl in the "from" context is a lambda. However, that could have other problems: what if the lambda is defined in a header file and included in several TUs? I think we'd have as many duplicates as many includes we have. I think we could live with that, because the lambda classes are TU local anyway, we cannot just access them from another TU. Reviewers: a_sidorin, a.sidorin, shafik Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66348
  36. [DAGCombine] visitMULHS/visitMULHU - isBuildVectorAllZeros doesn't mean node is all zeros Return a proper zero vector, just in case some elements are undef. Noticed by inspection after dealing with a similar issue in PR43159.
  37. Fix Wdocumentation warning. NFCI.
  38. [llvm-objcopy] Allow the visibility of symbols created by --binary and --add-symbol to be specified with --new-symbol-visibility
  39. [ASTImporter] Propagate errors during import of overridden methods. Summary: If importing overridden methods fails for a method it can be seen incorrectly as non-virtual. To avoid this inconsistency the method is marked with import error to avoid later use of it. Reviewers: martong, a.sidorin, shafik, a_sidorin Reviewed By: martong, shafik Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66933
  40. [Attributor] Implement AANoAliasCallSiteArgument initialization Summary: This patch adds an appropriate `initialize` method for `AANoAliasCallSiteArgument`. Reviewers: jdoerfert, sstefan1 Reviewed By: jdoerfert Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66927
  41. [Clangd] ExtractFunction Added checks for broken control flow Summary: - Added checks for broken control flow - Added unittests Reviewers: sammccall, kadircet Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66732
  42. [LoopIdiomRecognize] BCmp loop idiom recognition Summary: @mclow.lists brought up this issue up in IRC. It is a reasonably common problem to compare some two values for equality. Those may be just some integers, strings or arrays of integers. In C, there is `memcmp()`, `bcmp()` functions. In C++, there exists `std::equal()` algorithm. One can also write that function manually. libstdc++'s `std::equal()` is specialized to directly call `memcmp()` for various types, but not `std::byte` from C++2a. https://godbolt.org/z/mx2ejJ libc++ does not do anything like that, it simply relies on simple C++'s `operator==()`. https://godbolt.org/z/er0Zwf (GOOD!) So likely, there exists a certain performance opportunities. Let's compare performance of naive `std::equal()` (no `memcmp()`) with one that is using `memcmp()` (in this case, compiled with modified compiler). {F8768213} ``` #include <algorithm> #include <cmath> #include <cstdint> #include <iterator> #include <limits> #include <random> #include <type_traits> #include <utility> #include <vector> #include "benchmark/benchmark.h" template <class T> bool equal(T* a, T* a_end, T* b) noexcept { for (; a != a_end; ++a, ++b) { if (*a != *b) return false; } return true; } template <typename T> std::vector<T> getVectorOfRandomNumbers(size_t count) { std::random_device rd; std::mt19937 gen(rd()); std::uniform_int_distribution<T> dis(std::numeric_limits<T>::min(), std::numeric_limits<T>::max()); std::vector<T> v; v.reserve(count); std::generate_n(std::back_inserter(v), count, [&dis, &gen]() { return dis(gen); }); assert(v.size() == count); return v; } struct Identical { template <typename T> static std::pair<std::vector<T>, std::vector<T>> Gen(size_t count) { auto Tmp = getVectorOfRandomNumbers<T>(count); return std::make_pair(Tmp, std::move(Tmp)); } }; struct InequalHalfway { template <typename T> static std::pair<std::vector<T>, std::vector<T>> Gen(size_t count) { auto V0 = getVectorOfRandomNumbers<T>(count); auto V1 = V0; V1[V1.size() / size_t(2)]++; // just change the value. return std::make_pair(std::move(V0), std::move(V1)); } }; template <class T, class Gen> void BM_bcmp(benchmark::State& state) { const size_t Length = state.range(0); const std::pair<std::vector<T>, std::vector<T>> Data = Gen::template Gen<T>(Length); const std::vector<T>& a = Data.first; const std::vector<T>& b = Data.second; assert(a.size() == Length && b.size() == a.size()); benchmark::ClobberMemory(); benchmark::DoNotOptimize(a); benchmark::DoNotOptimize(a.data()); benchmark::DoNotOptimize(b); benchmark::DoNotOptimize(b.data()); for (auto _ : state) { const bool is_equal = equal(a.data(), a.data() + a.size(), b.data()); benchmark::DoNotOptimize(is_equal); } state.SetComplexityN(Length); state.counters["eltcnt"] = benchmark::Counter(Length, benchmark::Counter::kIsIterationInvariant); state.counters["eltcnt/sec"] = benchmark::Counter(Length, benchmark::Counter::kIsIterationInvariantRate); const size_t BytesRead = 2 * sizeof(T) * Length; state.counters["bytes_read/iteration"] = benchmark::Counter(BytesRead, benchmark::Counter::kDefaults, benchmark::Counter::OneK::kIs1024); state.counters["bytes_read/sec"] = benchmark::Counter( BytesRead, benchmark::Counter::kIsIterationInvariantRate, benchmark::Counter::OneK::kIs1024); } template <typename T> static void CustomArguments(benchmark::internal::Benchmark* b) { const size_t L2SizeBytes = []() { for (const benchmark::CPUInfo::CacheInfo& I : benchmark::CPUInfo::Get().caches) { if (I.level == 2) return I.size; } return 0; }(); // What is the largest range we can check to always fit within given L2 cache? const size_t MaxLen = L2SizeBytes / /*total bufs*/ 2 / /*maximal elt size*/ sizeof(T) / /*safety margin*/ 2; b->RangeMultiplier(2)->Range(1, MaxLen)->Complexity(benchmark::oN); } BENCHMARK_TEMPLATE(BM_bcmp, uint8_t, Identical) ->Apply(CustomArguments<uint8_t>); BENCHMARK_TEMPLATE(BM_bcmp, uint16_t, Identical) ->Apply(CustomArguments<uint16_t>); BENCHMARK_TEMPLATE(BM_bcmp, uint32_t, Identical) ->Apply(CustomArguments<uint32_t>); BENCHMARK_TEMPLATE(BM_bcmp, uint64_t, Identical) ->Apply(CustomArguments<uint64_t>); BENCHMARK_TEMPLATE(BM_bcmp, uint8_t, InequalHalfway) ->Apply(CustomArguments<uint8_t>); BENCHMARK_TEMPLATE(BM_bcmp, uint16_t, InequalHalfway) ->Apply(CustomArguments<uint16_t>); BENCHMARK_TEMPLATE(BM_bcmp, uint32_t, InequalHalfway) ->Apply(CustomArguments<uint32_t>); BENCHMARK_TEMPLATE(BM_bcmp, uint64_t, InequalHalfway) ->Apply(CustomArguments<uint64_t>); ``` {F8768210} ``` $ ~/src/googlebenchmark/tools/compare.py --no-utest benchmarks build-{old,new}/test/llvm-bcmp-bench RUNNING: build-old/test/llvm-bcmp-bench --benchmark_out=/tmp/tmpb6PEUx 2019-04-25 21:17:11 Running build-old/test/llvm-bcmp-bench Run on (8 X 4000 MHz CPU s) CPU Caches: L1 Data 16K (x8) L1 Instruction 64K (x4) L2 Unified 2048K (x4) L3 Unified 8192K (x1) Load Average: 0.65, 3.90, 4.14 --------------------------------------------------------------------------------------------------- Benchmark Time CPU Iterations UserCounters... --------------------------------------------------------------------------------------------------- <...> BM_bcmp<uint8_t, Identical>/512000 432131 ns 432101 ns 1613 bytes_read/iteration=1000k bytes_read/sec=2.20706G/s eltcnt=825.856M eltcnt/sec=1.18491G/s BM_bcmp<uint8_t, Identical>_BigO 0.86 N 0.86 N BM_bcmp<uint8_t, Identical>_RMS 8 % 8 % <...> BM_bcmp<uint16_t, Identical>/256000 161408 ns 161409 ns 4027 bytes_read/iteration=1000k bytes_read/sec=5.90843G/s eltcnt=1030.91M eltcnt/sec=1.58603G/s BM_bcmp<uint16_t, Identical>_BigO 0.67 N 0.67 N BM_bcmp<uint16_t, Identical>_RMS 25 % 25 % <...> BM_bcmp<uint32_t, Identical>/128000 81497 ns 81488 ns 8415 bytes_read/iteration=1000k bytes_read/sec=11.7032G/s eltcnt=1077.12M eltcnt/sec=1.57078G/s BM_bcmp<uint32_t, Identical>_BigO 0.71 N 0.71 N BM_bcmp<uint32_t, Identical>_RMS 42 % 42 % <...> BM_bcmp<uint64_t, Identical>/64000 50138 ns 50138 ns 10909 bytes_read/iteration=1000k bytes_read/sec=19.0209G/s eltcnt=698.176M eltcnt/sec=1.27647G/s BM_bcmp<uint64_t, Identical>_BigO 0.84 N 0.84 N BM_bcmp<uint64_t, Identical>_RMS 27 % 27 % <...> BM_bcmp<uint8_t, InequalHalfway>/512000 192405 ns 192392 ns 3638 bytes_read/iteration=1000k bytes_read/sec=4.95694G/s eltcnt=1.86266G eltcnt/sec=2.66124G/s BM_bcmp<uint8_t, InequalHalfway>_BigO 0.38 N 0.38 N BM_bcmp<uint8_t, InequalHalfway>_RMS 3 % 3 % <...> BM_bcmp<uint16_t, InequalHalfway>/256000 127858 ns 127860 ns 5477 bytes_read/iteration=1000k bytes_read/sec=7.45873G/s eltcnt=1.40211G eltcnt/sec=2.00219G/s BM_bcmp<uint16_t, InequalHalfway>_BigO 0.50 N 0.50 N BM_bcmp<uint16_t, InequalHalfway>_RMS 0 % 0 % <...> BM_bcmp<uint32_t, InequalHalfway>/128000 49140 ns 49140 ns 14281 bytes_read/iteration=1000k bytes_read/sec=19.4072G/s eltcnt=1.82797G eltcnt/sec=2.60478G/s BM_bcmp<uint32_t, InequalHalfway>_BigO 0.40 N 0.40 N BM_bcmp<uint32_t, InequalHalfway>_RMS 18 % 18 % <...> BM_bcmp<uint64_t, InequalHalfway>/64000 32101 ns 32099 ns 21786 bytes_read/iteration=1000k bytes_read/sec=29.7101G/s eltcnt=1.3943G eltcnt/sec=1.99381G/s BM_bcmp<uint64_t, InequalHalfway>_BigO 0.50 N 0.50 N BM_bcmp<uint64_t, InequalHalfway>_RMS 1 % 1 % RUNNING: build-new/test/llvm-bcmp-bench --benchmark_out=/tmp/tmpQ46PP0 2019-04-25 21:19:29 Running build-new/test/llvm-bcmp-bench Run on (8 X 4000 MHz CPU s) CPU Caches: L1 Data 16K (x8) L1 Instruction 64K (x4) L2 Unified 2048K (x4) L3 Unified 8192K (x1) Load Average: 1.01, 2.85, 3.71 --------------------------------------------------------------------------------------------------- Benchmark Time CPU Iterations UserCounters... --------------------------------------------------------------------------------------------------- <...> BM_bcmp<uint8_t, Identical>/512000 18593 ns 18590 ns 37565 bytes_read/iteration=1000k bytes_read/sec=51.2991G/s eltcnt=19.2333G eltcnt/sec=27.541G/s BM_bcmp<uint8_t, Identical>_BigO 0.04 N 0.04 N BM_bcmp<uint8_t, Identical>_RMS 37 % 37 % <...> BM_bcmp<uint16_t, Identical>/256000 18950 ns 18948 ns 37223 bytes_read/iteration=1000k bytes_read/sec=50.3324G/s eltcnt=9.52909G eltcnt/sec=13.511G/s BM_bcmp<uint16_t, Identical>_BigO 0.08 N 0.08 N BM_bcmp<uint16_t, Identical>_RMS 34 % 34 % <...> BM_bcmp<uint32_t, Identical>/128000 18627 ns 18627 ns 37895 bytes_read/iteration=1000k bytes_read/sec=51.198G/s eltcnt=4.85056G eltcnt/sec=6.87168G/s BM_bcmp<uint32_t, Identical>_BigO 0.16 N 0.16 N BM_bcmp<uint32_t, Identical>_RMS 35 % 35 % <...> BM_bcmp<uint64_t, Identical>/64000 18855 ns 18855 ns 37458 bytes_read/iteration=1000k bytes_read/sec=50.5791G/s eltcnt=2.39731G eltcnt/sec=3.3943G/s BM_bcmp<uint64_t, Identical>_BigO 0.32 N 0.32 N BM_bcmp<uint64_t, Identical>_RMS 33 % 33 % <...> BM_bcmp<uint8_t, InequalHalfway>/512000 9570 ns 9569 ns 73500 bytes_read/iteration=1000k bytes_read/sec=99.6601G/s eltcnt=37.632G eltcnt/sec=53.5046G/s BM_bcmp<uint8_t, InequalHalfway>_BigO 0.02 N 0.02 N BM_bcmp<uint8_t, InequalHalfway>_RMS 29 % 29 % <...> BM_bcmp<uint16_t, InequalHalfway>/256000 9547 ns 9547 ns 74343 bytes_read/iteration=1000k bytes_read/sec=99.8971G/s eltcnt=19.0318G eltcnt/sec=26.8159G/s BM_bcmp<uint16_t, InequalHalfway>_BigO 0.04 N 0.04 N BM_bcmp<uint16_t, InequalHalfway>_RMS 29 % 29 % <...> BM_bcmp<uint32_t, InequalHalfway>/128000 9396 ns 9394 ns 73521 bytes_read/iteration=1000k bytes_read/sec=101.518G/s eltcnt=9.41069G eltcnt/sec=13.6255G/s BM_bcmp<uint32_t, InequalHalfway>_BigO 0.08 N 0.08 N BM_bcmp<uint32_t, InequalHalfway>_RMS 30 % 30 % <...> BM_bcmp<uint64_t, InequalHalfway>/64000 9499 ns 9498 ns 73802 bytes_read/iteration=1000k bytes_read/sec=100.405G/s eltcnt=4.72333G eltcnt/sec=6.73808G/s BM_bcmp<uint64_t, InequalHalfway>_BigO 0.16 N 0.16 N BM_bcmp<uint64_t, InequalHalfway>_RMS 28 % 28 % Comparing build-old/test/llvm-bcmp-bench to build-new/test/llvm-bcmp-bench Benchmark Time CPU Time Old Time New CPU Old CPU New --------------------------------------------------------------------------------------------------------------------------------------- <...> BM_bcmp<uint8_t, Identical>/512000 -0.9570 -0.9570 432131 18593 432101 18590 <...> BM_bcmp<uint16_t, Identical>/256000 -0.8826 -0.8826 161408 18950 161409 18948 <...> BM_bcmp<uint32_t, Identical>/128000 -0.7714 -0.7714 81497 18627 81488 18627 <...> BM_bcmp<uint64_t, Identical>/64000 -0.6239 -0.6239 50138 18855 50138 18855 <...> BM_bcmp<uint8_t, InequalHalfway>/512000 -0.9503 -0.9503 192405 9570 192392 9569 <...> BM_bcmp<uint16_t, InequalHalfway>/256000 -0.9253 -0.9253 127858 9547 127860 9547 <...> BM_bcmp<uint32_t, InequalHalfway>/128000 -0.8088 -0.8088 49140 9396 49140 9394 <...> BM_bcmp<uint64_t, InequalHalfway>/64000 -0.7041 -0.7041 32101 9499 32099 9498 ``` What can we tell from the benchmark? * Performance of naive equality check somewhat improves with element size, maxing out at eltcnt/sec=1.58603G/s for uint16_t, or bytes_read/sec=19.0209G/s for uint64_t. I think, that instability implies performance problems. * Performance of `memcmp()`-aware benchmark always maxes out at around bytes_read/sec=51.2991G/s for every type. That is 2.6x the throughput of the naive variant! * eltcnt/sec metric for the `memcmp()`-aware benchmark maxes out at eltcnt/sec=27.541G/s for uint8_t (was: eltcnt/sec=1.18491G/s, so 24x) and linearly decreases with element size. For uint64_t, it's ~4x+ the elements/second. * The call obvious is more pricey than the loop, with small element count. As it can be seen from the full output {F8768210}, the `memcmp()` is almost universally worse, independent of the element size (and thus buffer size) when element count is less than 8. So all in all, bcmp idiom does indeed pose untapped performance headroom. This diff does implement said idiom recognition. I think a reasonable test coverage is present, but do tell if there is anything obvious missing. Now, quality. This does succeed to build and pass the test-suite, at least without any non-bundled elements. {F8768216} {F8768217} This transform fires 91 times: ``` $ /build/test-suite/utils/compare.py -m loop-idiom.NumBCmp result-new.json Tests: 1149 Metric: loop-idiom.NumBCmp Program result-new MultiSourc...Benchmarks/7zip/7zip-benchmark 79.00 MultiSource/Applications/d/make_dparser 3.00 SingleSource/UnitTests/vla 2.00 MultiSource/Applications/Burg/burg 1.00 MultiSourc.../Applications/JM/lencod/lencod 1.00 MultiSource/Applications/lemon/lemon 1.00 MultiSource/Benchmarks/Bullet/bullet 1.00 MultiSourc...e/Benchmarks/MallocBench/gs/gs 1.00 MultiSourc...gs-C/TimberWolfMC/timberwolfmc 1.00 MultiSourc...Prolangs-C/simulator/simulator 1.00 ``` The size changes are: I'm not sure what's going on with SingleSource/UnitTests/vla.test yet, did not look. ``` $ /build/test-suite/utils/compare.py -m size..text result-{old,new}.json --filter-hash Tests: 1149 Same hash: 907 (filtered out) Remaining: 242 Metric: size..text Program result-old result-new diff test-suite...ingleSource/UnitTests/vla.test 753.00 833.00 10.6% test-suite...marks/7zip/7zip-benchmark.test 1001697.00 966657.00 -3.5% test-suite...ngs-C/simulator/simulator.test 32369.00 32321.00 -0.1% test-suite...plications/d/make_dparser.test 89585.00 89505.00 -0.1% test-suite...ce/Applications/Burg/burg.test 40817.00 40785.00 -0.1% test-suite.../Applications/lemon/lemon.test 47281.00 47249.00 -0.1% test-suite...TimberWolfMC/timberwolfmc.test 250065.00 250113.00 0.0% test-suite...chmarks/MallocBench/gs/gs.test 149889.00 149873.00 -0.0% test-suite...ications/JM/lencod/lencod.test 769585.00 769569.00 -0.0% test-suite.../Benchmarks/Bullet/bullet.test 770049.00 770049.00 0.0% test-suite...HMARK_ANISTROPIC_DIFFUSION/128 NaN NaN nan% test-suite...HMARK_ANISTROPIC_DIFFUSION/256 NaN NaN nan% test-suite...CHMARK_ANISTROPIC_DIFFUSION/64 NaN NaN nan% test-suite...CHMARK_ANISTROPIC_DIFFUSION/32 NaN NaN nan% test-suite...ENCHMARK_BILATERAL_FILTER/64/4 NaN NaN nan% Geomean difference nan% result-old result-new diff count 1.000000e+01 10.00000 10.000000 mean 3.152090e+05 311695.40000 0.006749 std 3.790398e+05 372091.42232 0.036605 min 7.530000e+02 833.00000 -0.034981 25% 4.243300e+04 42401.00000 -0.000866 50% 1.197370e+05 119689.00000 -0.000392 75% 6.397050e+05 639705.00000 -0.000005 max 1.001697e+06 966657.00000 0.106242 ``` I don't have timings though. And now to the code. The basic idea is to completely replace the whole loop. If we can't fully kill it, don't transform. I have left one or two comments in the code, so hopefully it can be understood. Also, there is a few TODO's that i have left for follow-ups: * widening of `memcmp()`/`bcmp()` * step smaller than the comparison size * Metadata propagation * more than two blocks as long as there is still a single backedge? * ??? Reviewers: reames, fhahn, mkazantsev, chandlerc, craig.topper, courbet Reviewed By: courbet Subscribers: hiraditya, xbolva00, nikic, jfb, gchatelet, courbet, llvm-commits, mclow.lists Tags: #llvm Differential Revision: https://reviews.llvm.org/D61144
  43. [NFC] SCEVExpander: add SetCurrentDebugLocation() / getCurrentDebugLocation() wrappers Summary: The internal `Builder` is private, which means there is currently no way to set the debuginfo locations for `SCEVExpander`. This only adds the wrappers, but does not use them anywhere. Reviewers: mkazantsev, sanjoy, gberry, jyknight, dneilson Reviewed By: sanjoy Subscribers: javed.absar, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61007
  44. [clangd] Collecting main file macro expansion locations in ParsedAST. Summary: TokenBuffer does not collect macro expansions inside macro arguments which is needed for semantic higlighting. Therefore collects macro expansions in the main file in a PPCallback when building the ParsedAST instead. Reviewers: hokein, ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66928
  45. [Tooling] Migrated APIs that take ownership of objects to unique_ptr Subscribers: jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66960
  46. [LiveDebugValues] Insert entry values after bundles Summary: Change LiveDebugValues so that it inserts entry values after the bundle which contains the clobbering instruction. Previously it would insert the debug value after the bundle head using insertAfter(), breaking the bundle. Reviewers: djtodoro, NikolaPrica, aprantl, vsk Reviewed By: vsk Subscribers: hiraditya, llvm-commits Tags: #debug-info, #llvm Differential Revision: https://reviews.llvm.org/D66888
  47. [clangd] Add .vscode-test to .gitignore. Reviewers: jvikstrom Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66949
  48. [CodeGen]: fix error message for "=r" asm constraint Summary: Nico Weber reported that the following code: char buf[9]; asm("" : "=r" (buf)); yields the "impossible constraint in asm: can't store struct into a register" error message, although |buf| is not a struct (see http://crbug.com/999160). Make the error message more generic and add a test for it. Also make sure other tests in x86_64-PR42672.c check for the full error message. Reviewers: eli.friedman, thakis Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66948
  49. vim: add `immarg` keyword The `immarg` attribute was added in r355981.
  50. gn build: Merge r370441
  51. [ADT] Removed VariadicFunction Summary: It is not used. It uses macro-based unrolling instead of variadic templates, so it is not idiomatic anymore, and therefore it is a questionable API to keep "just in case". Subscribers: mgorny, dmgreen, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66961
  52. [LLD] [COFF] Support merging resource object files Extend WindowsResourceParser to support using a ResourceSectionRef for loading resources from an object file. Only allow merging resource object files in mingw mode; keep the existing error on multiple resource objects in link mode. If there only is one resource object file and no .res resources, don't parse and recreate the .rsrc section, but just link it in without inspecting it. This allows users to produce any .rsrc section (outside of what the parser supports), just like before. (I don't have a specific need for this, but it reduces the risk of this new feature.) Separate out the .rsrc section chunks in InputFiles.cpp, and only include them in the list of section chunks to link if we've determined that there only was one single resource object. (We need to keep other chunks from those object files, as they can legitimately contain other sections as well, in addition to .rsrc section chunks.) Differential Revision: https://reviews.llvm.org/D66824
  53. [WindowsResource] Remove use of global variables in WindowsResourceParser Instead of updating a global variable counter for the next index of strings and data blobs, pass along a reference to actual data/string vectors and let the TreeNode insertion methods add their data/strings to the vectors when a new entry is needed. Additionally, if the resource tree had duplicates, that were ignored with -force:multipleres in lld, we no longer store all versions of the duplicated resource data, now we only keep the one that actually ends up referenced. Differential Revision: https://reviews.llvm.org/D66823
  54. [WindowsResource] Avoid duplicating the input filenames for each resource. NFC. Differential Revision: https://reviews.llvm.org/D66821
  55. [COFF] Add a ResourceSectionRef method for getting resource contents This allows llvm-readobj to print the contents of each resource when printing resources from an object file or executable, like it already does for plain .res files. This requires providing the whole COFFObjectFile to ResourceSectionRef. This supports both object files and executables. For executables, the DataRVA field is used as is to look up the right section. For object files, ideally we would need to complete linking of them and fix up all relocations to know what the DataRVA field would end up being. In practice, the only thing that makes sense for an RVA field is an ADDR32NB relocation. Thus, find a relocation pointing at this field, verify that it has the expected type, locate the symbol it points at, look up the section the symbol points at, and read from the right offset in that section. This works both for GNU windres object files (which use one single .rsrc section, with all relocations against the base of the .rsrc section, with the original value of the DataRVA field being the offset of the data from the beginning of the .rsrc section) and cvtres object files (with two separate .rsrc$01 and .rsrc$02 sections, and one symbol per data entry, with the original pre-relocated DataRVA field being set to zero). Differential Revision: https://reviews.llvm.org/D66820
  56. [MIPS GlobalISel] Lower uitofp Add custom lowering for G_UITOFP for MIPS32. Differential Revision: https://reviews.llvm.org/D66930
  57. [MIPS GlobalISel] Lower fptoui Add lower for G_FPTOUI. Algorithm is similar to the SDAG version in TargetLowering::expandFP_TO_UINT. Lower G_FPTOUI for MIPS32. Differential Revision: https://reviews.llvm.org/D66929
  58. [CodeGen] Fix lowering for returning the result of an extractvalue When the number of return values exceeds the number of registers available, SelectionDAGBuilder::visitRet transforms a function's return to use a pointer to a buffer to hold return values. When the returned value is an operator such as extractvalue, the value may have a non-zero result number. Add that number to the indexing when obtaining the values to store. This fixes https://bugs.llvm.org/show_bug.cgi?id=43132. Differential Revision: https://reviews.llvm.org/D66978
  59. [clangd] Add distinct highlightings for static fields and methods Reviewers: hokein, ilya-biryukov, jvikstrom Reviewed By: hokein Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66828
  60. [PowerPC][NFC] Use inline Subtarget->isPPC64() To be consistent with all the other instances.
  61. [PowerPC][NFC] Use -mtriple in RUN line, remove target triple in tls.ll To avoid confusion, especially when -mtriple are also added for PPC32.
  62. [PPC32] Emit R_PPC_GOT_TPREL16 instead R_PPC_GOT_TPREL16_LO Unlike ppc64, which has ADDISgotTprelHA+LDgotTprelL pairs, ppc32 just uses LDgotTprelL32, so it does not make lots of sense to use _LO without a paired _HA. Emit R_PPC_GOT_TPREL16 instead R_PPC_GOT_TPREL16_LO to match GCC, and get better linker relocation check. Note, R_PPC_GOT_TPREL16_{HA,LO} don't have good linker support: (a) lld does not support R_PPC_GOT_TPREL16_{HA,LO}. (b) Top of tree ld.bfd does not support R_PPC_GOT_REL16_HA Initial-Exec -> Local-Exec relaxation: // a.o addis 3, 3, tsd_tls@got@tprel@ha lwz 3, tsd_tls@got@tprel@l(3) add 3, 3, tsd_tls@tls // b.o .section .tdata,"awT"; .globl tsd_tls; tsd_tls: // ld/ld-new a.o b.o internal error, aborting at ../../bfd/elf32-ppc.c:7952 in ppc_elf_relocate_section Reviewed By: adalava Differential Revision: https://reviews.llvm.org/D66925
  63. [clang-scan-deps] NFC, refactor the DependencyScanningWorker to use a consumer to report the dependencies to the client This will allow the scanner to report modular dependencies to the consumer. This will also allow the scanner to accept regular cc1 clang invocations, e.g. in an implementation of a libclang C API for clang-scan-deps, that I will add follow-up patches for in the future.
  64. [X86] Explicitly list all the always trivially rematerializable instructions. Add a default with an llvm_unreachable for anything we don't expect. This seems safer that just blindly returning true for anything missing from the switch.
Revision 370502 by ericwf:
Make `vector` unconditionally move elements when exceptions are disabled.

Summary:
`std::vector<T>` is free choose between using copy or move operations when it needs to resize. The standard only candidates that the correct exception safety guarantees are provided. When exceptions are disabled these guarantees are trivially satisfied. Meaning vector is free to optimize it's implementation by moving instead of copying.

This patch makes `std::vector` unconditionally move elements when exceptions are disabled.

This optimization is conforming according to the current standard wording.

There are concerns that moving in `-fno-noexceptions`mode will be a surprise to users. For example, a user may be surprised to find their code is slower with exceptions enabled than it is disabled. I'm sympathetic to this surprised, but I don't think it should block this optimization.


Reviewers: mclow.lists, ldionne, rsmith

Reviewed By: ldionne

Subscribers: zoecarver, christof, dexonsmith, libcxx-commits

Tags: #libc

Differential Revision: https://reviews.llvm.org/D62228
Change TypePath in RepositoryPath in Workspace
The file was modified/libcxx/trunk/include/memory (diff)libcxx.src/include/memory
The file was modified/libcxx/trunk/include/vector (diff)libcxx.src/include/vector
The file was added/libcxx/trunk/test/libcxx/containers/sequences/vector/exception_safety_exceptions_disabled.sh.cpplibcxx.src/test/libcxx/containers/sequences/vector/exception_safety_exceptions_disabled.sh.cpp
Revision 370501 by nico:
gn build: Merge r370500
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/utils/gn/secondary/llvm/lib/CodeGen/BUILD.gn (diff)llvm.src/utils/gn/secondary/llvm/lib/CodeGen/BUILD.gn
Revision 370500 by jamesm:
[MachinePipeliner] Separate schedule emission, NFC

This is the first stage in refactoring the pipeliner and making it more
accessible for backends to override and control. This separates the logic and
state required to *emit* a scheudule from the logic that *computes* and
validates a schedule.

This will enable (a) new schedule emitters and (b) new modulo scheduling
implementations to coexist.

NFC.

Differential Revision: https://reviews.llvm.org/D67006
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/CodeGen/MachinePipeliner.h (diff)llvm.src/include/llvm/CodeGen/MachinePipeliner.h
The file was added/llvm/trunk/include/llvm/CodeGen/ModuloSchedule.hllvm.src/include/llvm/CodeGen/ModuloSchedule.h
The file was modified/llvm/trunk/lib/CodeGen/CMakeLists.txt (diff)llvm.src/lib/CodeGen/CMakeLists.txt
The file was modified/llvm/trunk/lib/CodeGen/MachinePipeliner.cpp (diff)llvm.src/lib/CodeGen/MachinePipeliner.cpp
The file was added/llvm/trunk/lib/CodeGen/ModuloSchedule.cppllvm.src/lib/CodeGen/ModuloSchedule.cpp
Revision 370499 by zer0:
[llvm-ifs][IFS] llvm Interface Stubs merging + object file generation tool.

This tool merges interface stub files to produce a merged interface stub file
or a stub library. Currently it for stub library generation it can produce an
ELF .so stub file, or a TBD file (experimental). It will be used by the clang
-emit-interface-stubs compilation pipeline to merge and assemble the per-CU
stub files into a stub library.

The new IFS format is as follows:

--- !experimental-ifs-v1
IfsVersion:      1.0
Triple:          <llvm triple>
ObjectFileFormat: <ELF | TBD>
Symbols:
  _ZSymbolName: { Type: <type>, etc... }
...

Differential Revision: https://reviews.llvm.org/D66405
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/CMakeLists.txt (diff)llvm.src/test/CMakeLists.txt
The file was modified/llvm/trunk/test/lit.cfg.py (diff)llvm.src/test/lit.cfg.py
The file was added/llvm/trunk/test/tools/llvm-ifsllvm.src/test/tools/llvm-ifs
The file was added/llvm/trunk/test/tools/llvm-ifs/conflict-header-format.ifsllvm.src/test/tools/llvm-ifs/conflict-header-format.ifs
The file was added/llvm/trunk/test/tools/llvm-ifs/conflict-header-triple.ifsllvm.src/test/tools/llvm-ifs/conflict-header-triple.ifs
The file was added/llvm/trunk/test/tools/llvm-ifs/conflict-header-version.ifsllvm.src/test/tools/llvm-ifs/conflict-header-version.ifs
The file was added/llvm/trunk/test/tools/llvm-ifs/conflict-size.ifsllvm.src/test/tools/llvm-ifs/conflict-size.ifs
The file was added/llvm/trunk/test/tools/llvm-ifs/conflict-type.ifsllvm.src/test/tools/llvm-ifs/conflict-type.ifs
The file was added/llvm/trunk/test/tools/llvm-ifs/conflict-weak.ifsllvm.src/test/tools/llvm-ifs/conflict-weak.ifs
The file was added/llvm/trunk/test/tools/llvm-ifs/func.ifsllvm.src/test/tools/llvm-ifs/func.ifs
The file was added/llvm/trunk/test/tools/llvm-ifs/object-function-size-weak-combo.ifsllvm.src/test/tools/llvm-ifs/object-function-size-weak-combo.ifs
The file was added/llvm/trunk/test/tools/llvm-ifs/object.ifsllvm.src/test/tools/llvm-ifs/object.ifs
The file was added/llvm/trunk/test/tools/llvm-ifs/version-ok.ifsllvm.src/test/tools/llvm-ifs/version-ok.ifs
The file was added/llvm/trunk/test/tools/llvm-ifs/weak.ifsllvm.src/test/tools/llvm-ifs/weak.ifs
The file was modified/llvm/trunk/tools/LLVMBuild.txt (diff)llvm.src/tools/LLVMBuild.txt
The file was added/llvm/trunk/tools/llvm-ifsllvm.src/tools/llvm-ifs
The file was added/llvm/trunk/tools/llvm-ifs/CMakeLists.txtllvm.src/tools/llvm-ifs/CMakeLists.txt
The file was added/llvm/trunk/tools/llvm-ifs/LLVMBuild.txtllvm.src/tools/llvm-ifs/LLVMBuild.txt
The file was added/llvm/trunk/tools/llvm-ifs/llvm-ifs.cppllvm.src/tools/llvm-ifs/llvm-ifs.cpp
Revision 370498 by rksimon:
[DAGCombine] ReduceLoadWidth - remove duplicate SDLoc. NFCI.

SDLoc(N0) and SDLoc(cast<LoadSDNode>(N0)) should be equivalent.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (diff)llvm.src/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Revision 370497 by rksimon:
[TargetLowering] SimplifyDemandedBits ADD/SUB/MUL - correctly inherit SDNodeFlags from the original node.

Just disable NSW/NUW flags. This matches what we're already doing for the other situations for these nodes, it was just missed for the demanded constant case.

Noticed by inspection - confirmed in offline discussion with @spatel. I've checked we have test coverage in the x86 extract-bits.ll and extract-lowbits.ll tests
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (diff)llvm.src/lib/CodeGen/SelectionDAG/TargetLowering.cpp
Revision 370496 by arsenm:
GlobalISel: Fix missing pass dependency
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/CodeGen/GlobalISel/InstructionSelect.cpp (diff)llvm.src/lib/CodeGen/GlobalISel/InstructionSelect.cpp
Revision 370495 by ctopper:
[X86] Pass v32i16/v64i8 in zmm registers on KNL target.

gcc and icc pass these types in zmm registers in zmm registers.

This patch implements a quick hack to override the register
type before calling convention handling to one that is legal.
Longer term we might want to do something similar to 256-bit
integer registers on AVX1 where we just split all the operations.

Fixes PR42957

Differential Revision: https://reviews.llvm.org/D66708
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/docs/ReleaseNotes.rst (diff)llvm.src/docs/ReleaseNotes.rst
The file was modified/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (diff)llvm.src/lib/Target/X86/X86ISelLowering.cpp
The file was modified/llvm/trunk/test/CodeGen/X86/all-ones-vector.ll (diff)llvm.src/test/CodeGen/X86/all-ones-vector.ll
The file was modified/llvm/trunk/test/CodeGen/X86/avg-mask.ll (diff)llvm.src/test/CodeGen/X86/avg-mask.ll
The file was modified/llvm/trunk/test/CodeGen/X86/avg.ll (diff)llvm.src/test/CodeGen/X86/avg.ll
The file was modified/llvm/trunk/test/CodeGen/X86/avx512-calling-conv.ll (diff)llvm.src/test/CodeGen/X86/avx512-calling-conv.ll
The file was modified/llvm/trunk/test/CodeGen/X86/avx512-ext.ll (diff)llvm.src/test/CodeGen/X86/avx512-ext.ll
The file was modified/llvm/trunk/test/CodeGen/X86/avx512-insert-extract.ll (diff)llvm.src/test/CodeGen/X86/avx512-insert-extract.ll
The file was modified/llvm/trunk/test/CodeGen/X86/avx512-logic.ll (diff)llvm.src/test/CodeGen/X86/avx512-logic.ll
The file was modified/llvm/trunk/test/CodeGen/X86/avx512-mask-op.ll (diff)llvm.src/test/CodeGen/X86/avx512-mask-op.ll
The file was modified/llvm/trunk/test/CodeGen/X86/avx512-select.ll (diff)llvm.src/test/CodeGen/X86/avx512-select.ll
The file was modified/llvm/trunk/test/CodeGen/X86/avx512-trunc.ll (diff)llvm.src/test/CodeGen/X86/avx512-trunc.ll
The file was modified/llvm/trunk/test/CodeGen/X86/avx512-vbroadcast.ll (diff)llvm.src/test/CodeGen/X86/avx512-vbroadcast.ll
The file was modified/llvm/trunk/test/CodeGen/X86/avx512-vbroadcasti128.ll (diff)llvm.src/test/CodeGen/X86/avx512-vbroadcasti128.ll
The file was modified/llvm/trunk/test/CodeGen/X86/avx512-vbroadcasti256.ll (diff)llvm.src/test/CodeGen/X86/avx512-vbroadcasti256.ll
The file was modified/llvm/trunk/test/CodeGen/X86/bitcast-and-setcc-512.ll (diff)llvm.src/test/CodeGen/X86/bitcast-and-setcc-512.ll
The file was modified/llvm/trunk/test/CodeGen/X86/bitcast-int-to-vector-bool-zext.ll (diff)llvm.src/test/CodeGen/X86/bitcast-int-to-vector-bool-zext.ll
The file was modified/llvm/trunk/test/CodeGen/X86/bitcast-setcc-512.ll (diff)llvm.src/test/CodeGen/X86/bitcast-setcc-512.ll
The file was modified/llvm/trunk/test/CodeGen/X86/broadcast-elm-cross-splat-vec.ll (diff)llvm.src/test/CodeGen/X86/broadcast-elm-cross-splat-vec.ll
The file was modified/llvm/trunk/test/CodeGen/X86/build-vector-512.ll (diff)llvm.src/test/CodeGen/X86/build-vector-512.ll
The file was modified/llvm/trunk/test/CodeGen/X86/combine-sdiv.ll (diff)llvm.src/test/CodeGen/X86/combine-sdiv.ll
The file was modified/llvm/trunk/test/CodeGen/X86/fast-isel-nontemporal.ll (diff)llvm.src/test/CodeGen/X86/fast-isel-nontemporal.ll
The file was modified/llvm/trunk/test/CodeGen/X86/fast-isel-vecload.ll (diff)llvm.src/test/CodeGen/X86/fast-isel-vecload.ll
The file was modified/llvm/trunk/test/CodeGen/X86/kshift.ll (diff)llvm.src/test/CodeGen/X86/kshift.ll
The file was modified/llvm/trunk/test/CodeGen/X86/madd.ll (diff)llvm.src/test/CodeGen/X86/madd.ll
The file was modified/llvm/trunk/test/CodeGen/X86/masked_store_trunc.ll (diff)llvm.src/test/CodeGen/X86/masked_store_trunc.ll
The file was modified/llvm/trunk/test/CodeGen/X86/masked_store_trunc_ssat.ll (diff)llvm.src/test/CodeGen/X86/masked_store_trunc_ssat.ll
The file was modified/llvm/trunk/test/CodeGen/X86/masked_store_trunc_usat.ll (diff)llvm.src/test/CodeGen/X86/masked_store_trunc_usat.ll
The file was modified/llvm/trunk/test/CodeGen/X86/merge-consecutive-loads-512.ll (diff)llvm.src/test/CodeGen/X86/merge-consecutive-loads-512.ll
The file was modified/llvm/trunk/test/CodeGen/X86/midpoint-int-vec-512.ll (diff)llvm.src/test/CodeGen/X86/midpoint-int-vec-512.ll
The file was modified/llvm/trunk/test/CodeGen/X86/movmsk-cmp.ll (diff)llvm.src/test/CodeGen/X86/movmsk-cmp.ll
The file was modified/llvm/trunk/test/CodeGen/X86/nontemporal-loads-2.ll (diff)llvm.src/test/CodeGen/X86/nontemporal-loads-2.ll
The file was modified/llvm/trunk/test/CodeGen/X86/nontemporal-loads.ll (diff)llvm.src/test/CodeGen/X86/nontemporal-loads.ll
The file was modified/llvm/trunk/test/CodeGen/X86/pmul.ll (diff)llvm.src/test/CodeGen/X86/pmul.ll
The file was modified/llvm/trunk/test/CodeGen/X86/pmulh.ll (diff)llvm.src/test/CodeGen/X86/pmulh.ll
The file was modified/llvm/trunk/test/CodeGen/X86/shuffle-vs-trunc-512.ll (diff)llvm.src/test/CodeGen/X86/shuffle-vs-trunc-512.ll
The file was modified/llvm/trunk/test/CodeGen/X86/subvector-broadcast.ll (diff)llvm.src/test/CodeGen/X86/subvector-broadcast.ll
The file was modified/llvm/trunk/test/CodeGen/X86/var-permute-512.ll (diff)llvm.src/test/CodeGen/X86/var-permute-512.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vec_shift6.ll (diff)llvm.src/test/CodeGen/X86/vec_shift6.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-bitreverse.ll (diff)llvm.src/test/CodeGen/X86/vector-bitreverse.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-compare-results.ll (diff)llvm.src/test/CodeGen/X86/vector-compare-results.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-fshl-512.ll (diff)llvm.src/test/CodeGen/X86/vector-fshl-512.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-fshl-rot-512.ll (diff)llvm.src/test/CodeGen/X86/vector-fshl-rot-512.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-fshr-512.ll (diff)llvm.src/test/CodeGen/X86/vector-fshr-512.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-fshr-rot-512.ll (diff)llvm.src/test/CodeGen/X86/vector-fshr-rot-512.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-idiv-sdiv-512.ll (diff)llvm.src/test/CodeGen/X86/vector-idiv-sdiv-512.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-idiv-udiv-512.ll (diff)llvm.src/test/CodeGen/X86/vector-idiv-udiv-512.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-lzcnt-512.ll (diff)llvm.src/test/CodeGen/X86/vector-lzcnt-512.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-popcnt-512.ll (diff)llvm.src/test/CodeGen/X86/vector-popcnt-512.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-reduce-and-bool.ll (diff)llvm.src/test/CodeGen/X86/vector-reduce-and-bool.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-reduce-mul.ll (diff)llvm.src/test/CodeGen/X86/vector-reduce-mul.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-reduce-or-bool.ll (diff)llvm.src/test/CodeGen/X86/vector-reduce-or-bool.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-reduce-xor-bool.ll (diff)llvm.src/test/CodeGen/X86/vector-reduce-xor-bool.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-rotate-512.ll (diff)llvm.src/test/CodeGen/X86/vector-rotate-512.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-sext.ll (diff)llvm.src/test/CodeGen/X86/vector-sext.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-shift-ashr-512.ll (diff)llvm.src/test/CodeGen/X86/vector-shift-ashr-512.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-shift-lshr-512.ll (diff)llvm.src/test/CodeGen/X86/vector-shift-lshr-512.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-shift-shl-512.ll (diff)llvm.src/test/CodeGen/X86/vector-shift-shl-512.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-shuffle-512-v32.ll (diff)llvm.src/test/CodeGen/X86/vector-shuffle-512-v32.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-shuffle-512-v64.ll (diff)llvm.src/test/CodeGen/X86/vector-shuffle-512-v64.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-shuffle-avx512.ll (diff)llvm.src/test/CodeGen/X86/vector-shuffle-avx512.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-shuffle-v1.ll (diff)llvm.src/test/CodeGen/X86/vector-shuffle-v1.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-trunc-packus.ll (diff)llvm.src/test/CodeGen/X86/vector-trunc-packus.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-trunc-ssat.ll (diff)llvm.src/test/CodeGen/X86/vector-trunc-ssat.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-trunc-usat.ll (diff)llvm.src/test/CodeGen/X86/vector-trunc-usat.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-trunc.ll (diff)llvm.src/test/CodeGen/X86/vector-trunc.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-tzcnt-512.ll (diff)llvm.src/test/CodeGen/X86/vector-tzcnt-512.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-zext.ll (diff)llvm.src/test/CodeGen/X86/vector-zext.ll
The file was modified/llvm/trunk/test/CodeGen/X86/viabs.ll (diff)llvm.src/test/CodeGen/X86/viabs.ll
Revision 370494 by ctopper:
[ValueTypes] Add v16f16 and v32f16 to EVT::getEVTString and Tablegen's getEnumName

Missed these when I hadded the enum entries
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/CodeGen/ValueTypes.cpp (diff)llvm.src/lib/CodeGen/ValueTypes.cpp
The file was modified/llvm/trunk/utils/TableGen/CodeGenTarget.cpp (diff)llvm.src/utils/TableGen/CodeGenTarget.cpp
Revision 370493 by arphaman:
[clang-scan-deps] NFC, remove outdated implementation comment

There's no need to purge symlinked entries in the FileManager,
as the new FileEntryRef API allows us to compute dependencies more
accurately when the FileManager is reused.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp (diff)clang.src/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp
Revision 370492 by nico:
gn build: Merge r370490
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/utils/gn/secondary/llvm/lib/Target/AArch64/BUILD.gn (diff)llvm.src/utils/gn/secondary/llvm/lib/Target/AArch64/BUILD.gn
Revision 370490 by eugenis:
MemTag: unchecked load/store optimization.

Summary:
MTE allows memory access to bypass tag check iff the address argument
is [SP, #imm]. This change takes advantage of this to demote uses of
tagged addresses to regular FrameIndex operands, reducing register
pressure in large functions.

MO_TAGGED target flag is used to signal that the FrameIndex operand
refers to memory that might be tagged, and needs to be handled with
care. Such operand must be lowered to [SP, #imm] directly, without a
scratch register.

The transformation pass attempts to predict when the offset will be
out of range and disable the optimization.
AArch64RegisterInfo::eliminateFrameIndex has an escape hatch in case
this prediction has been wrong, but it is quite inefficient and should
be avoided.

Reviewers: pcc, vitalybuka, ostannard

Subscribers: mgorny, javed.absar, kristof.beyls, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D66457
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/AArch64/AArch64.h (diff)llvm.src/lib/Target/AArch64/AArch64.h
The file was modified/llvm/trunk/lib/Target/AArch64/AArch64RegisterInfo.cpp (diff)llvm.src/lib/Target/AArch64/AArch64RegisterInfo.cpp
The file was added/llvm/trunk/lib/Target/AArch64/AArch64StackTaggingPreRA.cppllvm.src/lib/Target/AArch64/AArch64StackTaggingPreRA.cpp
The file was modified/llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.cpp (diff)llvm.src/lib/Target/AArch64/AArch64TargetMachine.cpp
The file was modified/llvm/trunk/lib/Target/AArch64/CMakeLists.txt (diff)llvm.src/lib/Target/AArch64/CMakeLists.txt
The file was modified/llvm/trunk/lib/Target/AArch64/Utils/AArch64BaseInfo.h (diff)llvm.src/lib/Target/AArch64/Utils/AArch64BaseInfo.h
The file was modified/llvm/trunk/test/CodeGen/AArch64/O3-pipeline.ll (diff)llvm.src/test/CodeGen/AArch64/O3-pipeline.ll
The file was added/llvm/trunk/test/CodeGen/AArch64/stack-tagging-unchecked-ld-st.llllvm.src/test/CodeGen/AArch64/stack-tagging-unchecked-ld-st.ll
Revision 370489 by rksimon:
[DAGCombine] visitVSELECT - remove equivalent getValueType() call. NFCI.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (diff)llvm.src/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Revision 370488 by Duncan P. N. Exon Smith:
FileManager: Remove ShouldCloseOpenFile argument from getBufferForFile, NFC

Remove this dead code.  We always close it.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/Basic/FileManager.h (diff)clang.src/include/clang/Basic/FileManager.h
The file was modified/cfe/trunk/lib/Basic/FileManager.cpp (diff)clang.src/lib/Basic/FileManager.cpp
The file was modified/cfe/trunk/lib/Serialization/ModuleManager.cpp (diff)clang.src/lib/Serialization/ModuleManager.cpp
Revision 370486 by whitneyt:
[INSTRUCTIONS] Add support of const for getLoadStorePointerOperand() and
getLoadStorePointerOperand().
Reviewer: hsaito, sebpop, reames, hfinkel, mkuper, bogner, haicheng,
arsenm, lattner, chandlerc, grosser, rengolin
Reviewed By: reames
Subscribers: wdng, llvm-commits, bmahjour
Tag: LLVM
Differential Revision: https://reviews.llvm.org/D66595
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/IR/Instructions.h (diff)llvm.src/include/llvm/IR/Instructions.h
Revision 370485 by jdoerfert:
[Attributor] Fix: do not pretend to preserve the CFG
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/IPO/Attributor.cpp (diff)llvm.src/lib/Transforms/IPO/Attributor.cpp
Revision 370484 by ctopper:
[X86] Merge X86InstrInfo::loadRegFromAddr/storeRegToAddr into their only call site.

I'm looking at unfolding broadcast loads on AVX512 which will
require refactoring this code to select broadcast opcodes instead
of regular load/stores in some cases. Merging them to avoid
further complicating their interfaces.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (diff)llvm.src/lib/Target/X86/X86InstrInfo.cpp
The file was modified/llvm/trunk/lib/Target/X86/X86InstrInfo.h (diff)llvm.src/lib/Target/X86/X86InstrInfo.h
Revision 370482 by jvikstrom:
[clangd] Add highlighting for macro expansions.

Summary: https://github.com/clangd/clangd/issues/134

Reviewers: hokein, ilya-biryukov

Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D66995
Change TypePath in RepositoryPath in Workspace
The file was modified/clang-tools-extra/trunk/clangd/SemanticHighlighting.cpp (diff)clang-tools-extra.src/clangd/SemanticHighlighting.cpp
The file was modified/clang-tools-extra/trunk/clangd/SemanticHighlighting.h (diff)clang-tools-extra.src/clangd/SemanticHighlighting.h
The file was modified/clang-tools-extra/trunk/clangd/test/semantic-highlighting.test (diff)clang-tools-extra.src/clangd/test/semantic-highlighting.test
The file was modified/clang-tools-extra/trunk/clangd/unittests/SemanticHighlightingTests.cpp (diff)clang-tools-extra.src/clangd/unittests/SemanticHighlightingTests.cpp
Revision 370481 by nand:
Revert [Clang Interpreter] Initial patch for the constexpr interpreter

This reverts r370476 (git commit a5590950549719d0d9ea69ed164b0c8c0f4e02e6)
Change TypePath in RepositoryPath in Workspace
The file was removed/cfe/trunk/docs/ConstantInterpreter.rstclang.src/docs/ConstantInterpreter.rst
The file was modified/cfe/trunk/include/clang/AST/ASTContext.h (diff)clang.src/include/clang/AST/ASTContext.h
The file was modified/cfe/trunk/include/clang/Basic/DiagnosticASTKinds.td (diff)clang.src/include/clang/Basic/DiagnosticASTKinds.td
The file was modified/cfe/trunk/include/clang/Basic/LangOptions.def (diff)clang.src/include/clang/Basic/LangOptions.def
The file was removed/cfe/trunk/include/clang/Basic/OptionalDiagnostic.hclang.src/include/clang/Basic/OptionalDiagnostic.h
The file was modified/cfe/trunk/include/clang/Driver/Options.td (diff)clang.src/include/clang/Driver/Options.td
The file was modified/cfe/trunk/lib/AST/ASTContext.cpp (diff)clang.src/lib/AST/ASTContext.cpp
The file was modified/cfe/trunk/lib/AST/CMakeLists.txt (diff)clang.src/lib/AST/CMakeLists.txt
The file was modified/cfe/trunk/lib/AST/ExprConstant.cpp (diff)clang.src/lib/AST/ExprConstant.cpp
The file was removed/cfe/trunk/lib/AST/Interpclang.src/lib/AST/Interp
The file was modified/cfe/trunk/lib/Driver/ToolChains/Clang.cpp (diff)clang.src/lib/Driver/ToolChains/Clang.cpp
The file was modified/cfe/trunk/lib/Frontend/CompilerInvocation.cpp (diff)clang.src/lib/Frontend/CompilerInvocation.cpp
The file was removed/cfe/trunk/test/AST/Interpclang.src/test/AST/Interp
The file was modified/cfe/trunk/test/SemaCXX/constant-expression-cxx2a.cpp (diff)clang.src/test/SemaCXX/constant-expression-cxx2a.cpp
The file was modified/cfe/trunk/test/SemaCXX/constexpr-many-arguments.cpp (diff)clang.src/test/SemaCXX/constexpr-many-arguments.cpp
The file was modified/cfe/trunk/test/SemaCXX/shift.cpp (diff)clang.src/test/SemaCXX/shift.cpp
The file was modified/cfe/trunk/utils/TableGen/CMakeLists.txt (diff)clang.src/utils/TableGen/CMakeLists.txt
The file was removed/cfe/trunk/utils/TableGen/ClangOpcodesEmitter.cppclang.src/utils/TableGen/ClangOpcodesEmitter.cpp
The file was modified/cfe/trunk/utils/TableGen/TableGen.cpp (diff)clang.src/utils/TableGen/TableGen.cpp
The file was modified/cfe/trunk/utils/TableGen/TableGenBackends.h (diff)clang.src/utils/TableGen/TableGenBackends.h
Revision 370480 by jdoerfert:
[Attributor] Use existing function information for the call site

Summary:
Instead of recomputing information for call sites we now use the
function information directly. This is always valid and once we have
call site specific information we can improve here.

This patch also bootstraps attributes that are created on-demand through
an initial update call. Information that is known will then directly be
available in the new attribute without causing an iteration delay.

The tests show how this improves the iteration count.

Reviewers: sstefan1, uenoku

Subscribers: hiraditya, bollu, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D66781
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/Transforms/IPO/Attributor.h (diff)llvm.src/include/llvm/Transforms/IPO/Attributor.h
The file was modified/llvm/trunk/lib/Transforms/IPO/Attributor.cpp (diff)llvm.src/lib/Transforms/IPO/Attributor.cpp
The file was modified/llvm/trunk/test/Transforms/FunctionAttrs/align.ll (diff)llvm.src/test/Transforms/FunctionAttrs/align.ll
The file was modified/llvm/trunk/test/Transforms/FunctionAttrs/arg_nocapture.ll (diff)llvm.src/test/Transforms/FunctionAttrs/arg_nocapture.ll
The file was modified/llvm/trunk/test/Transforms/FunctionAttrs/arg_returned.ll (diff)llvm.src/test/Transforms/FunctionAttrs/arg_returned.ll
The file was modified/llvm/trunk/test/Transforms/FunctionAttrs/dereferenceable.ll (diff)llvm.src/test/Transforms/FunctionAttrs/dereferenceable.ll
The file was modified/llvm/trunk/test/Transforms/FunctionAttrs/fn_noreturn.ll (diff)llvm.src/test/Transforms/FunctionAttrs/fn_noreturn.ll
The file was modified/llvm/trunk/test/Transforms/FunctionAttrs/internal-noalias.ll (diff)llvm.src/test/Transforms/FunctionAttrs/internal-noalias.ll
The file was modified/llvm/trunk/test/Transforms/FunctionAttrs/liveness.ll (diff)llvm.src/test/Transforms/FunctionAttrs/liveness.ll
The file was modified/llvm/trunk/test/Transforms/FunctionAttrs/noalias_returned.ll (diff)llvm.src/test/Transforms/FunctionAttrs/noalias_returned.ll
The file was modified/llvm/trunk/test/Transforms/FunctionAttrs/nofree-attributor.ll (diff)llvm.src/test/Transforms/FunctionAttrs/nofree-attributor.ll
The file was modified/llvm/trunk/test/Transforms/FunctionAttrs/nonnull.ll (diff)llvm.src/test/Transforms/FunctionAttrs/nonnull.ll
The file was modified/llvm/trunk/test/Transforms/FunctionAttrs/noreturn_async.ll (diff)llvm.src/test/Transforms/FunctionAttrs/noreturn_async.ll
The file was modified/llvm/trunk/test/Transforms/FunctionAttrs/noreturn_sync.ll (diff)llvm.src/test/Transforms/FunctionAttrs/noreturn_sync.ll
The file was modified/llvm/trunk/test/Transforms/FunctionAttrs/nounwind.ll (diff)llvm.src/test/Transforms/FunctionAttrs/nounwind.ll
The file was modified/llvm/trunk/test/Transforms/FunctionAttrs/read_write_returned_arguments_scc.ll (diff)llvm.src/test/Transforms/FunctionAttrs/read_write_returned_arguments_scc.ll
Revision 370479 by jdoerfert:
[Attributor] Manifest load/store alignment generally

Summary:
Any pointer could have load/store users not only floating ones so we
move the manifest logic for alignment into the AAAlignImpl class.

Reviewers: uenoku, sstefan1

Subscribers: hiraditya, bollu, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D66922
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/IPO/Attributor.cpp (diff)llvm.src/lib/Transforms/IPO/Attributor.cpp
The file was modified/llvm/trunk/test/Transforms/FunctionAttrs/align.ll (diff)llvm.src/test/Transforms/FunctionAttrs/align.ll
Revision 370478 by rksimon:
[DAGCombine] visitVSELECT - remove duplicate getOperand calls. NFCI.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (diff)llvm.src/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Revision 370476 by nand:
[Clang Interpreter] Initial patch for the constexpr interpreter

Summary:
This patch introduces the skeleton of the constexpr interpreter,
capable of evaluating a simple constexpr functions consisting of
if statements. The interpreter is described in more detail in the
RFC. Further patches will add more features.

Reviewers: Bigcheese, jfb, rsmith

Subscribers: bruno, uenoku, ldionne, Tyker, thegameg, tschuett, dexonsmith, mgorny, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D64146
Change TypePath in RepositoryPath in Workspace
The file was added/cfe/trunk/docs/ConstantInterpreter.rstclang.src/docs/ConstantInterpreter.rst
The file was modified/cfe/trunk/include/clang/AST/ASTContext.h (diff)clang.src/include/clang/AST/ASTContext.h
The file was modified/cfe/trunk/include/clang/Basic/DiagnosticASTKinds.td (diff)clang.src/include/clang/Basic/DiagnosticASTKinds.td
The file was modified/cfe/trunk/include/clang/Basic/LangOptions.def (diff)clang.src/include/clang/Basic/LangOptions.def
The file was added/cfe/trunk/include/clang/Basic/OptionalDiagnostic.hclang.src/include/clang/Basic/OptionalDiagnostic.h
The file was modified/cfe/trunk/include/clang/Driver/Options.td (diff)clang.src/include/clang/Driver/Options.td
The file was modified/cfe/trunk/lib/AST/ASTContext.cpp (diff)clang.src/lib/AST/ASTContext.cpp
The file was modified/cfe/trunk/lib/AST/CMakeLists.txt (diff)clang.src/lib/AST/CMakeLists.txt
The file was modified/cfe/trunk/lib/AST/ExprConstant.cpp (diff)clang.src/lib/AST/ExprConstant.cpp
The file was added/cfe/trunk/lib/AST/Interpclang.src/lib/AST/Interp
The file was added/cfe/trunk/lib/AST/Interp/Block.cppclang.src/lib/AST/Interp/Block.cpp
The file was added/cfe/trunk/lib/AST/Interp/Block.hclang.src/lib/AST/Interp/Block.h
The file was added/cfe/trunk/lib/AST/Interp/ByteCodeEmitter.cppclang.src/lib/AST/Interp/ByteCodeEmitter.cpp
The file was added/cfe/trunk/lib/AST/Interp/ByteCodeEmitter.hclang.src/lib/AST/Interp/ByteCodeEmitter.h
The file was added/cfe/trunk/lib/AST/Interp/ByteCodeExprGen.cppclang.src/lib/AST/Interp/ByteCodeExprGen.cpp
The file was added/cfe/trunk/lib/AST/Interp/ByteCodeExprGen.hclang.src/lib/AST/Interp/ByteCodeExprGen.h
The file was added/cfe/trunk/lib/AST/Interp/ByteCodeGenError.cppclang.src/lib/AST/Interp/ByteCodeGenError.cpp
The file was added/cfe/trunk/lib/AST/Interp/ByteCodeGenError.hclang.src/lib/AST/Interp/ByteCodeGenError.h
The file was added/cfe/trunk/lib/AST/Interp/ByteCodeStmtGen.cppclang.src/lib/AST/Interp/ByteCodeStmtGen.cpp
The file was added/cfe/trunk/lib/AST/Interp/ByteCodeStmtGen.hclang.src/lib/AST/Interp/ByteCodeStmtGen.h
The file was added/cfe/trunk/lib/AST/Interp/CMakeLists.txtclang.src/lib/AST/Interp/CMakeLists.txt
The file was added/cfe/trunk/lib/AST/Interp/Context.cppclang.src/lib/AST/Interp/Context.cpp
The file was added/cfe/trunk/lib/AST/Interp/Context.hclang.src/lib/AST/Interp/Context.h
The file was added/cfe/trunk/lib/AST/Interp/Descriptor.cppclang.src/lib/AST/Interp/Descriptor.cpp
The file was added/cfe/trunk/lib/AST/Interp/Descriptor.hclang.src/lib/AST/Interp/Descriptor.h
The file was added/cfe/trunk/lib/AST/Interp/Disasm.cppclang.src/lib/AST/Interp/Disasm.cpp
The file was added/cfe/trunk/lib/AST/Interp/EvalEmitter.cppclang.src/lib/AST/Interp/EvalEmitter.cpp
The file was added/cfe/trunk/lib/AST/Interp/EvalEmitter.hclang.src/lib/AST/Interp/EvalEmitter.h
The file was added/cfe/trunk/lib/AST/Interp/Frame.cppclang.src/lib/AST/Interp/Frame.cpp
The file was added/cfe/trunk/lib/AST/Interp/Frame.hclang.src/lib/AST/Interp/Frame.h
The file was added/cfe/trunk/lib/AST/Interp/Function.cppclang.src/lib/AST/Interp/Function.cpp
The file was added/cfe/trunk/lib/AST/Interp/Function.hclang.src/lib/AST/Interp/Function.h
The file was added/cfe/trunk/lib/AST/Interp/Integral.hclang.src/lib/AST/Interp/Integral.h
The file was added/cfe/trunk/lib/AST/Interp/Interp.cppclang.src/lib/AST/Interp/Interp.cpp
The file was added/cfe/trunk/lib/AST/Interp/Interp.hclang.src/lib/AST/Interp/Interp.h
The file was added/cfe/trunk/lib/AST/Interp/InterpFrame.cppclang.src/lib/AST/Interp/InterpFrame.cpp
The file was added/cfe/trunk/lib/AST/Interp/InterpFrame.hclang.src/lib/AST/Interp/InterpFrame.h
The file was added/cfe/trunk/lib/AST/Interp/InterpStack.cppclang.src/lib/AST/Interp/InterpStack.cpp
The file was added/cfe/trunk/lib/AST/Interp/InterpStack.hclang.src/lib/AST/Interp/InterpStack.h
The file was added/cfe/trunk/lib/AST/Interp/InterpState.cppclang.src/lib/AST/Interp/InterpState.cpp
The file was added/cfe/trunk/lib/AST/Interp/InterpState.hclang.src/lib/AST/Interp/InterpState.h
The file was added/cfe/trunk/lib/AST/Interp/Opcode.hclang.src/lib/AST/Interp/Opcode.h
The file was added/cfe/trunk/lib/AST/Interp/Opcodes.tdclang.src/lib/AST/Interp/Opcodes.td
The file was added/cfe/trunk/lib/AST/Interp/Pointer.cppclang.src/lib/AST/Interp/Pointer.cpp
The file was added/cfe/trunk/lib/AST/Interp/Pointer.hclang.src/lib/AST/Interp/Pointer.h
The file was added/cfe/trunk/lib/AST/Interp/Program.cppclang.src/lib/AST/Interp/Program.cpp
The file was added/cfe/trunk/lib/AST/Interp/Program.hclang.src/lib/AST/Interp/Program.h
The file was added/cfe/trunk/lib/AST/Interp/Record.cppclang.src/lib/AST/Interp/Record.cpp
The file was added/cfe/trunk/lib/AST/Interp/Record.hclang.src/lib/AST/Interp/Record.h
The file was added/cfe/trunk/lib/AST/Interp/Source.cppclang.src/lib/AST/Interp/Source.cpp
The file was added/cfe/trunk/lib/AST/Interp/Source.hclang.src/lib/AST/Interp/Source.h
The file was added/cfe/trunk/lib/AST/Interp/State.cppclang.src/lib/AST/Interp/State.cpp
The file was added/cfe/trunk/lib/AST/Interp/State.hclang.src/lib/AST/Interp/State.h
The file was added/cfe/trunk/lib/AST/Interp/Type.cppclang.src/lib/AST/Interp/Type.cpp
The file was added/cfe/trunk/lib/AST/Interp/Type.hclang.src/lib/AST/Interp/Type.h
The file was modified/cfe/trunk/lib/Driver/ToolChains/Clang.cpp (diff)clang.src/lib/Driver/ToolChains/Clang.cpp
The file was modified/cfe/trunk/lib/Frontend/CompilerInvocation.cpp (diff)clang.src/lib/Frontend/CompilerInvocation.cpp
The file was added/cfe/trunk/test/AST/Interpclang.src/test/AST/Interp
The file was added/cfe/trunk/test/AST/Interp/cond.cppclang.src/test/AST/Interp/cond.cpp
The file was modified/cfe/trunk/test/SemaCXX/constant-expression-cxx2a.cpp (diff)clang.src/test/SemaCXX/constant-expression-cxx2a.cpp
The file was modified/cfe/trunk/test/SemaCXX/constexpr-many-arguments.cpp (diff)clang.src/test/SemaCXX/constexpr-many-arguments.cpp
The file was modified/cfe/trunk/test/SemaCXX/shift.cpp (diff)clang.src/test/SemaCXX/shift.cpp
The file was modified/cfe/trunk/utils/TableGen/CMakeLists.txt (diff)clang.src/utils/TableGen/CMakeLists.txt
The file was added/cfe/trunk/utils/TableGen/ClangOpcodesEmitter.cppclang.src/utils/TableGen/ClangOpcodesEmitter.cpp
The file was modified/cfe/trunk/utils/TableGen/TableGen.cpp (diff)clang.src/utils/TableGen/TableGen.cpp
The file was modified/cfe/trunk/utils/TableGen/TableGenBackends.h (diff)clang.src/utils/TableGen/TableGenBackends.h
Revision 370475 by Piotr Sobczak:
[InstCombine][AMDGPU] Simplify tbuffer loads

Summary: Add missing tbuffer loads intrinsics in SimplifyDemandedVectorElts.

Reviewers: arsenm, nhaehnle

Reviewed By: arsenm

Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D66926
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp (diff)llvm.src/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
The file was modified/llvm/trunk/test/Transforms/InstCombine/AMDGPU/amdgcn-demanded-vector-elts.ll (diff)llvm.src/test/Transforms/InstCombine/AMDGPU/amdgcn-demanded-vector-elts.ll
Revision 370474 by sidneym:
[llvm-nm] Small fix to Exected<StringRef>

Differential Revision: https://reviews.llvm.org/D66976
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/tools/llvm-nm/llvm-nm.cpp (diff)llvm.src/tools/llvm-nm/llvm-nm.cpp
Revision 370473 by jvikstrom:
[clangd] Added highlighting for structured bindings.

Summary: Structured bindings are in a BindingDecl. The decl the declRefExpr points to are the BindingDecls. So this adds an additional if statement in the addToken function to highlight them.

Reviewers: hokein, ilya-biryukov

Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D66738
Change TypePath in RepositoryPath in Workspace
The file was modified/clang-tools-extra/trunk/clangd/SemanticHighlighting.cpp (diff)clang-tools-extra.src/clangd/SemanticHighlighting.cpp
The file was modified/clang-tools-extra/trunk/clangd/unittests/SemanticHighlightingTests.cpp (diff)clang-tools-extra.src/clangd/unittests/SemanticHighlightingTests.cpp
Revision 370472 by grimar:
[yaml2obj][obj2yaml] - Use a single "Other" field instead of "Other", "Visibility" and "StOther".

Currenly we can encode the 'st_other' field of symbol using 3 fields.
'Visibility' is used to encode STV_* values.
'Other' is used to encode everything except the visibility, but it can't handle arbitrary values.
'StOther' is used to encode arbitrary values when 'Visibility'/'Other' are not helpfull enough.

'st_other' field is used to encode symbol visibility and platform-dependent
flags and values. Problem to encode it is that it consists of Visibility part (STV_* values)
which are enumeration values and the Other part, which is different and inconsistent.

For MIPS the Other part contains flags for all STO_MIPS_* values except STO_MIPS_MIPS16.
(Like comment in ELFDumper says: "Someones in their infinite wisdom decided to make
STO_MIPS_MIPS16 flag overlapped with other ST_MIPS_xxx flags."...)

And for PPC64 the Other part might actually encode any value.

This patch implements custom logic for handling the st_other and removes
'Visibility' and 'StOther' fields.

Here is an example of a new YAML style this patch allows:

- Name:  foo
  Other: [ 0x4 ]
- Name:  bar
  Other: [ STV_PROTECTED, 4 ]
- Name:  zed
  Other: [ STV_PROTECTED, STO_MIPS_OPTIONAL, 0xf8 ]

Differential revision: https://reviews.llvm.org/D66886
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/ObjectYAML/ELFYAML.h (diff)llvm.src/include/llvm/ObjectYAML/ELFYAML.h
The file was modified/llvm/trunk/include/llvm/Support/YAMLTraits.h (diff)llvm.src/include/llvm/Support/YAMLTraits.h
The file was modified/llvm/trunk/lib/ObjectYAML/ELFEmitter.cpp (diff)llvm.src/lib/ObjectYAML/ELFEmitter.cpp
The file was modified/llvm/trunk/lib/ObjectYAML/ELFYAML.cpp (diff)llvm.src/lib/ObjectYAML/ELFYAML.cpp
The file was modified/llvm/trunk/lib/Support/YAMLTraits.cpp (diff)llvm.src/lib/Support/YAMLTraits.cpp
The file was modified/llvm/trunk/test/tools/llvm-objcopy/ELF/localize-hidden.test (diff)llvm.src/test/tools/llvm-objcopy/ELF/localize-hidden.test
The file was modified/llvm/trunk/test/tools/llvm-objcopy/ELF/symbol-copy.test (diff)llvm.src/test/tools/llvm-objcopy/ELF/symbol-copy.test
The file was modified/llvm/trunk/test/tools/llvm-objdump/elf-symbol-visibility.test (diff)llvm.src/test/tools/llvm-objdump/elf-symbol-visibility.test
The file was modified/llvm/trunk/test/tools/llvm-readobj/elf-symbol-visibility.test (diff)llvm.src/test/tools/llvm-readobj/elf-symbol-visibility.test
The file was modified/llvm/trunk/test/tools/obj2yaml/elf-symbol-visibility.yaml (diff)llvm.src/test/tools/obj2yaml/elf-symbol-visibility.yaml
The file was modified/llvm/trunk/test/tools/yaml2obj/elf-symbol-stother.yaml (diff)llvm.src/test/tools/yaml2obj/elf-symbol-stother.yaml
The file was modified/llvm/trunk/test/tools/yaml2obj/elf-symbol-visibility.yaml (diff)llvm.src/test/tools/yaml2obj/elf-symbol-visibility.yaml
Revision 370471 by rksimon:
[DAGCombine] visitVSELECT - use getShiftAmountTy for shift amounts.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (diff)llvm.src/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Revision 370468 by rksimon:
[DAGCombine] visitMULHS - use getScalarValueSizeInBits() to make safe for vector types.

This is hidden behind a (scalar-only) isOneConstant(N1) check at the moment, but once we get around to adding vector support we need to ensure we're dealing with the scalar bitwidth, not the total.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (diff)llvm.src/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Revision 370467 by atanasyan:
[mips] Merge common checkings under the same check prefix. NFC
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/CodeGen/Mips/start-asm-file.ll (diff)llvm.src/test/CodeGen/Mips/start-asm-file.ll
Revision 370466 by luismarques:
[RISCV] Fix a couple of tests' CHECKs
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/CodeGen/RISCV/inline-asm.ll (diff)llvm.src/test/CodeGen/RISCV/inline-asm.ll
The file was modified/llvm/trunk/test/CodeGen/RISCV/interrupt-attr-nocall.ll (diff)llvm.src/test/CodeGen/RISCV/interrupt-attr-nocall.ll
Revision 370465 by hokein:
Remove an extra ";", NFC.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp (diff)llvm.src/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
Revision 370464 by deadalnix:
[X86] Add tests for rotate matching. NFC
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/CodeGen/X86/rotate-extract-vector.ll (diff)llvm.src/test/CodeGen/X86/rotate-extract-vector.ll
The file was modified/llvm/trunk/test/CodeGen/X86/rotate-extract.ll (diff)llvm.src/test/CodeGen/X86/rotate-extract.ll
Revision 370463 by bjope:
[CodeGen] Introduce MachineBasicBlock::replacePhiUsesWith helper and use it. NFC

Summary:
Found a couple of places in the code where all the PHI nodes
of a MBB is updated, replacing references to one MBB by
reference to another MBB instead.

This patch simply refactors the code to use a common helper
(MachineBasicBlock::replacePhiUsesWith) for such PHI node
updates.

Reviewers: t.p.northover, arsenm, uabelho

Subscribers: wdng, hiraditya, jsji, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D66750
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h (diff)llvm.src/include/llvm/CodeGen/MachineBasicBlock.h
The file was modified/llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp (diff)llvm.src/lib/CodeGen/MachineBasicBlock.cpp
The file was modified/llvm/trunk/lib/CodeGen/MachinePipeliner.cpp (diff)llvm.src/lib/CodeGen/MachinePipeliner.cpp
Revision 370461 by martong:
[ASTImporter] Do not look up lambda classes

Summary:
Consider this code:
```
      void f() {
        auto L0 = [](){};
        auto L1 = [](){};
      }

```
First we import `L0` then `L1`. Currently we end up having only one
CXXRecordDecl for the two different lambdas. And that is a problem if
the body of their op() is different. This happens because when we import
`L1` then lookup finds the existing `L0` and since they are structurally
equivalent we just map the imported L0 to be the counterpart of L1.

We have the same problem in this case:
```
      template <typename F0, typename F1>
      void f(F0 L0 = [](){}, F1 L1 = [](){}) {}

```

In StructuralEquivalenceContext we could distinquish lambdas only by
their source location in these cases. But we the lambdas are actually
structrually equivalent they differn only by the source location.

Thus, the  solution is to disable lookup completely if the decl in
the "from" context is a lambda.
However, that could have other problems: what if the lambda is defined
in a header file and included in several TUs? I think we'd have as many
duplicates as many includes we have. I think we could live with that,
because the lambda classes are TU local anyway, we cannot just access
them from another TU.

Reviewers: a_sidorin, a.sidorin, shafik

Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D66348
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/AST/ASTImporter.cpp (diff)clang.src/lib/AST/ASTImporter.cpp
The file was modified/cfe/trunk/unittests/AST/ASTImporterTest.cpp (diff)clang.src/unittests/AST/ASTImporterTest.cpp
Revision 370460 by rksimon:
[DAGCombine] visitMULHS/visitMULHU - isBuildVectorAllZeros doesn't mean node is all zeros

Return a proper zero vector, just in case some elements are undef.

Noticed by inspection after dealing with a similar issue in PR43159.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (diff)llvm.src/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Revision 370459 by rksimon:
Fix Wdocumentation warning. NFCI.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/Transforms/IPO/Attributor.h (diff)llvm.src/include/llvm/Transforms/IPO/Attributor.h
Revision 370458 by chrisj:
[llvm-objcopy] Allow the visibility of symbols created by --binary and
--add-symbol to be specified with --new-symbol-visibility
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/docs/CommandGuide/llvm-objcopy.rst (diff)llvm.src/docs/CommandGuide/llvm-objcopy.rst
The file was added/llvm/trunk/test/tools/llvm-objcopy/ELF/add-symbol-new-symbol-visibility.testllvm.src/test/tools/llvm-objcopy/ELF/add-symbol-new-symbol-visibility.test
The file was added/llvm/trunk/test/tools/llvm-objcopy/ELF/new-symbol-visibility.testllvm.src/test/tools/llvm-objcopy/ELF/new-symbol-visibility.test
The file was modified/llvm/trunk/tools/llvm-objcopy/COFF/COFFObjcopy.cpp (diff)llvm.src/tools/llvm-objcopy/COFF/COFFObjcopy.cpp
The file was modified/llvm/trunk/tools/llvm-objcopy/CopyConfig.cpp (diff)llvm.src/tools/llvm-objcopy/CopyConfig.cpp
The file was modified/llvm/trunk/tools/llvm-objcopy/CopyConfig.h (diff)llvm.src/tools/llvm-objcopy/CopyConfig.h
The file was modified/llvm/trunk/tools/llvm-objcopy/ELF/ELFObjcopy.cpp (diff)llvm.src/tools/llvm-objcopy/ELF/ELFObjcopy.cpp
The file was modified/llvm/trunk/tools/llvm-objcopy/ELF/Object.cpp (diff)llvm.src/tools/llvm-objcopy/ELF/Object.cpp
The file was modified/llvm/trunk/tools/llvm-objcopy/ELF/Object.h (diff)llvm.src/tools/llvm-objcopy/ELF/Object.h
The file was modified/llvm/trunk/tools/llvm-objcopy/MachO/MachOObjcopy.cpp (diff)llvm.src/tools/llvm-objcopy/MachO/MachOObjcopy.cpp
The file was modified/llvm/trunk/tools/llvm-objcopy/ObjcopyOpts.td (diff)llvm.src/tools/llvm-objcopy/ObjcopyOpts.td
Revision 370457 by balazske:
[ASTImporter] Propagate errors during import of overridden methods.

Summary:
If importing overridden methods fails for a method it can be seen
incorrectly as non-virtual. To avoid this inconsistency the method
is marked with import error to avoid later use of it.

Reviewers: martong, a.sidorin, shafik, a_sidorin

Reviewed By: martong, shafik

Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D66933
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/AST/ASTImporter.cpp (diff)clang.src/lib/AST/ASTImporter.cpp
The file was modified/cfe/trunk/unittests/AST/ASTImporterTest.cpp (diff)clang.src/unittests/AST/ASTImporterTest.cpp
Revision 370456 by uenoku:
[Attributor] Implement AANoAliasCallSiteArgument initialization

Summary: This patch adds an appropriate `initialize` method for `AANoAliasCallSiteArgument`.

Reviewers: jdoerfert, sstefan1

Reviewed By: jdoerfert

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D66927
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/IPO/Attributor.cpp (diff)llvm.src/lib/Transforms/IPO/Attributor.cpp
The file was modified/llvm/trunk/test/Transforms/FunctionAttrs/noalias_returned.ll (diff)llvm.src/test/Transforms/FunctionAttrs/noalias_returned.ll
Revision 370455 by sureyeaah:
[Clangd] ExtractFunction Added checks for broken control flow

Summary:
- Added checks for broken control flow
- Added unittests

Reviewers: sammccall, kadircet

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D66732
Change TypePath in RepositoryPath in Workspace
The file was modified/clang-tools-extra/trunk/clangd/refactor/tweaks/ExtractFunction.cpp (diff)clang-tools-extra.src/clangd/refactor/tweaks/ExtractFunction.cpp
The file was modified/clang-tools-extra/trunk/clangd/unittests/TweakTests.cpp (diff)clang-tools-extra.src/clangd/unittests/TweakTests.cpp
Revision 370454 by lebedevri:
[LoopIdiomRecognize] BCmp loop idiom recognition

Summary:
@mclow.lists brought up this issue up in IRC.
It is a reasonably common problem to compare some two values for equality.
Those may be just some integers, strings or arrays of integers.

In C, there is `memcmp()`, `bcmp()` functions.
In C++, there exists `std::equal()` algorithm.
One can also write that function manually.

libstdc++'s `std::equal()` is specialized to directly call `memcmp()` for
various types, but not `std::byte` from C++2a. https://godbolt.org/z/mx2ejJ

libc++ does not do anything like that, it simply relies on simple C++'s
`operator==()`. https://godbolt.org/z/er0Zwf (GOOD!)

So likely, there exists a certain performance opportunities.
Let's compare performance of naive `std::equal()` (no `memcmp()`) with one that
is using `memcmp()` (in this case, compiled with modified compiler). {F8768213}

```
#include <algorithm>
#include <cmath>
#include <cstdint>
#include <iterator>
#include <limits>
#include <random>
#include <type_traits>
#include <utility>
#include <vector>

#include "benchmark/benchmark.h"

template <class T>
bool equal(T* a, T* a_end, T* b) noexcept {
  for (; a != a_end; ++a, ++b) {
    if (*a != *b) return false;
  }
  return true;
}

template <typename T>
std::vector<T> getVectorOfRandomNumbers(size_t count) {
  std::random_device rd;
  std::mt19937 gen(rd());
  std::uniform_int_distribution<T> dis(std::numeric_limits<T>::min(),
                                       std::numeric_limits<T>::max());
  std::vector<T> v;
  v.reserve(count);
  std::generate_n(std::back_inserter(v), count,
                  [&dis, &gen]() { return dis(gen); });
  assert(v.size() == count);
  return v;
}

struct Identical {
  template <typename T>
  static std::pair<std::vector<T>, std::vector<T>> Gen(size_t count) {
    auto Tmp = getVectorOfRandomNumbers<T>(count);
    return std::make_pair(Tmp, std::move(Tmp));
  }
};

struct InequalHalfway {
  template <typename T>
  static std::pair<std::vector<T>, std::vector<T>> Gen(size_t count) {
    auto V0 = getVectorOfRandomNumbers<T>(count);
    auto V1 = V0;
    V1[V1.size() / size_t(2)]++;  // just change the value.
    return std::make_pair(std::move(V0), std::move(V1));
  }
};

template <class T, class Gen>
void BM_bcmp(benchmark::State& state) {
  const size_t Length = state.range(0);

  const std::pair<std::vector<T>, std::vector<T>> Data =
      Gen::template Gen<T>(Length);
  const std::vector<T>& a = Data.first;
  const std::vector<T>& b = Data.second;
  assert(a.size() == Length && b.size() == a.size());

  benchmark::ClobberMemory();
  benchmark::DoNotOptimize(a);
  benchmark::DoNotOptimize(a.data());
  benchmark::DoNotOptimize(b);
  benchmark::DoNotOptimize(b.data());

  for (auto _ : state) {
    const bool is_equal = equal(a.data(), a.data() + a.size(), b.data());
    benchmark::DoNotOptimize(is_equal);
  }
  state.SetComplexityN(Length);
  state.counters["eltcnt"] =
      benchmark::Counter(Length, benchmark::Counter::kIsIterationInvariant);
  state.counters["eltcnt/sec"] =
      benchmark::Counter(Length, benchmark::Counter::kIsIterationInvariantRate);
  const size_t BytesRead = 2 * sizeof(T) * Length;
  state.counters["bytes_read/iteration"] =
      benchmark::Counter(BytesRead, benchmark::Counter::kDefaults,
                         benchmark::Counter::OneK::kIs1024);
  state.counters["bytes_read/sec"] = benchmark::Counter(
      BytesRead, benchmark::Counter::kIsIterationInvariantRate,
      benchmark::Counter::OneK::kIs1024);
}

template <typename T>
static void CustomArguments(benchmark::internal::Benchmark* b) {
  const size_t L2SizeBytes = []() {
    for (const benchmark::CPUInfo::CacheInfo& I :
         benchmark::CPUInfo::Get().caches) {
      if (I.level == 2) return I.size;
    }
    return 0;
  }();
  // What is the largest range we can check to always fit within given L2 cache?
  const size_t MaxLen = L2SizeBytes / /*total bufs*/ 2 /
                        /*maximal elt size*/ sizeof(T) / /*safety margin*/ 2;
  b->RangeMultiplier(2)->Range(1, MaxLen)->Complexity(benchmark::oN);
}

BENCHMARK_TEMPLATE(BM_bcmp, uint8_t, Identical)
    ->Apply(CustomArguments<uint8_t>);
BENCHMARK_TEMPLATE(BM_bcmp, uint16_t, Identical)
    ->Apply(CustomArguments<uint16_t>);
BENCHMARK_TEMPLATE(BM_bcmp, uint32_t, Identical)
    ->Apply(CustomArguments<uint32_t>);
BENCHMARK_TEMPLATE(BM_bcmp, uint64_t, Identical)
    ->Apply(CustomArguments<uint64_t>);

BENCHMARK_TEMPLATE(BM_bcmp, uint8_t, InequalHalfway)
    ->Apply(CustomArguments<uint8_t>);
BENCHMARK_TEMPLATE(BM_bcmp, uint16_t, InequalHalfway)
    ->Apply(CustomArguments<uint16_t>);
BENCHMARK_TEMPLATE(BM_bcmp, uint32_t, InequalHalfway)
    ->Apply(CustomArguments<uint32_t>);
BENCHMARK_TEMPLATE(BM_bcmp, uint64_t, InequalHalfway)
    ->Apply(CustomArguments<uint64_t>);
```
{F8768210}
```
$ ~/src/googlebenchmark/tools/compare.py --no-utest benchmarks build-{old,new}/test/llvm-bcmp-bench
RUNNING: build-old/test/llvm-bcmp-bench --benchmark_out=/tmp/tmpb6PEUx
2019-04-25 21:17:11
Running build-old/test/llvm-bcmp-bench
Run on (8 X 4000 MHz CPU s)
CPU Caches:
  L1 Data 16K (x8)
  L1 Instruction 64K (x4)
  L2 Unified 2048K (x4)
  L3 Unified 8192K (x1)
Load Average: 0.65, 3.90, 4.14
---------------------------------------------------------------------------------------------------
Benchmark                                         Time             CPU   Iterations UserCounters...
---------------------------------------------------------------------------------------------------
<...>
BM_bcmp<uint8_t, Identical>/512000           432131 ns       432101 ns         1613 bytes_read/iteration=1000k bytes_read/sec=2.20706G/s eltcnt=825.856M eltcnt/sec=1.18491G/s
BM_bcmp<uint8_t, Identical>_BigO               0.86 N          0.86 N
BM_bcmp<uint8_t, Identical>_RMS                   8 %             8 %
<...>
BM_bcmp<uint16_t, Identical>/256000          161408 ns       161409 ns         4027 bytes_read/iteration=1000k bytes_read/sec=5.90843G/s eltcnt=1030.91M eltcnt/sec=1.58603G/s
BM_bcmp<uint16_t, Identical>_BigO              0.67 N          0.67 N
BM_bcmp<uint16_t, Identical>_RMS                 25 %            25 %
<...>
BM_bcmp<uint32_t, Identical>/128000           81497 ns        81488 ns         8415 bytes_read/iteration=1000k bytes_read/sec=11.7032G/s eltcnt=1077.12M eltcnt/sec=1.57078G/s
BM_bcmp<uint32_t, Identical>_BigO              0.71 N          0.71 N
BM_bcmp<uint32_t, Identical>_RMS                 42 %            42 %
<...>
BM_bcmp<uint64_t, Identical>/64000            50138 ns        50138 ns        10909 bytes_read/iteration=1000k bytes_read/sec=19.0209G/s eltcnt=698.176M eltcnt/sec=1.27647G/s
BM_bcmp<uint64_t, Identical>_BigO              0.84 N          0.84 N
BM_bcmp<uint64_t, Identical>_RMS                 27 %            27 %
<...>
BM_bcmp<uint8_t, InequalHalfway>/512000      192405 ns       192392 ns         3638 bytes_read/iteration=1000k bytes_read/sec=4.95694G/s eltcnt=1.86266G eltcnt/sec=2.66124G/s
BM_bcmp<uint8_t, InequalHalfway>_BigO          0.38 N          0.38 N
BM_bcmp<uint8_t, InequalHalfway>_RMS              3 %             3 %
<...>
BM_bcmp<uint16_t, InequalHalfway>/256000     127858 ns       127860 ns         5477 bytes_read/iteration=1000k bytes_read/sec=7.45873G/s eltcnt=1.40211G eltcnt/sec=2.00219G/s
BM_bcmp<uint16_t, InequalHalfway>_BigO         0.50 N          0.50 N
BM_bcmp<uint16_t, InequalHalfway>_RMS             0 %             0 %
<...>
BM_bcmp<uint32_t, InequalHalfway>/128000      49140 ns        49140 ns        14281 bytes_read/iteration=1000k bytes_read/sec=19.4072G/s eltcnt=1.82797G eltcnt/sec=2.60478G/s
BM_bcmp<uint32_t, InequalHalfway>_BigO         0.40 N          0.40 N
BM_bcmp<uint32_t, InequalHalfway>_RMS            18 %            18 %
<...>
BM_bcmp<uint64_t, InequalHalfway>/64000       32101 ns        32099 ns        21786 bytes_read/iteration=1000k bytes_read/sec=29.7101G/s eltcnt=1.3943G eltcnt/sec=1.99381G/s
BM_bcmp<uint64_t, InequalHalfway>_BigO         0.50 N          0.50 N
BM_bcmp<uint64_t, InequalHalfway>_RMS             1 %             1 %
RUNNING: build-new/test/llvm-bcmp-bench --benchmark_out=/tmp/tmpQ46PP0
2019-04-25 21:19:29
Running build-new/test/llvm-bcmp-bench
Run on (8 X 4000 MHz CPU s)
CPU Caches:
  L1 Data 16K (x8)
  L1 Instruction 64K (x4)
  L2 Unified 2048K (x4)
  L3 Unified 8192K (x1)
Load Average: 1.01, 2.85, 3.71
---------------------------------------------------------------------------------------------------
Benchmark                                         Time             CPU   Iterations UserCounters...
---------------------------------------------------------------------------------------------------
<...>
BM_bcmp<uint8_t, Identical>/512000            18593 ns        18590 ns        37565 bytes_read/iteration=1000k bytes_read/sec=51.2991G/s eltcnt=19.2333G eltcnt/sec=27.541G/s
BM_bcmp<uint8_t, Identical>_BigO               0.04 N          0.04 N
BM_bcmp<uint8_t, Identical>_RMS                  37 %            37 %
<...>
BM_bcmp<uint16_t, Identical>/256000           18950 ns        18948 ns        37223 bytes_read/iteration=1000k bytes_read/sec=50.3324G/s eltcnt=9.52909G eltcnt/sec=13.511G/s
BM_bcmp<uint16_t, Identical>_BigO              0.08 N          0.08 N
BM_bcmp<uint16_t, Identical>_RMS                 34 %            34 %
<...>
BM_bcmp<uint32_t, Identical>/128000           18627 ns        18627 ns        37895 bytes_read/iteration=1000k bytes_read/sec=51.198G/s eltcnt=4.85056G eltcnt/sec=6.87168G/s
BM_bcmp<uint32_t, Identical>_BigO              0.16 N          0.16 N
BM_bcmp<uint32_t, Identical>_RMS                 35 %            35 %
<...>
BM_bcmp<uint64_t, Identical>/64000            18855 ns        18855 ns        37458 bytes_read/iteration=1000k bytes_read/sec=50.5791G/s eltcnt=2.39731G eltcnt/sec=3.3943G/s
BM_bcmp<uint64_t, Identical>_BigO              0.32 N          0.32 N
BM_bcmp<uint64_t, Identical>_RMS                 33 %            33 %
<...>
BM_bcmp<uint8_t, InequalHalfway>/512000        9570 ns         9569 ns        73500 bytes_read/iteration=1000k bytes_read/sec=99.6601G/s eltcnt=37.632G eltcnt/sec=53.5046G/s
BM_bcmp<uint8_t, InequalHalfway>_BigO          0.02 N          0.02 N
BM_bcmp<uint8_t, InequalHalfway>_RMS             29 %            29 %
<...>
BM_bcmp<uint16_t, InequalHalfway>/256000       9547 ns         9547 ns        74343 bytes_read/iteration=1000k bytes_read/sec=99.8971G/s eltcnt=19.0318G eltcnt/sec=26.8159G/s
BM_bcmp<uint16_t, InequalHalfway>_BigO         0.04 N          0.04 N
BM_bcmp<uint16_t, InequalHalfway>_RMS            29 %            29 %
<...>
BM_bcmp<uint32_t, InequalHalfway>/128000       9396 ns         9394 ns        73521 bytes_read/iteration=1000k bytes_read/sec=101.518G/s eltcnt=9.41069G eltcnt/sec=13.6255G/s
BM_bcmp<uint32_t, InequalHalfway>_BigO         0.08 N          0.08 N
BM_bcmp<uint32_t, InequalHalfway>_RMS            30 %            30 %
<...>
BM_bcmp<uint64_t, InequalHalfway>/64000        9499 ns         9498 ns        73802 bytes_read/iteration=1000k bytes_read/sec=100.405G/s eltcnt=4.72333G eltcnt/sec=6.73808G/s
BM_bcmp<uint64_t, InequalHalfway>_BigO         0.16 N          0.16 N
BM_bcmp<uint64_t, InequalHalfway>_RMS            28 %            28 %
Comparing build-old/test/llvm-bcmp-bench to build-new/test/llvm-bcmp-bench
Benchmark                                                  Time             CPU      Time Old      Time New       CPU Old       CPU New
---------------------------------------------------------------------------------------------------------------------------------------
<...>
BM_bcmp<uint8_t, Identical>/512000                      -0.9570         -0.9570        432131         18593        432101         18590
<...>
BM_bcmp<uint16_t, Identical>/256000                     -0.8826         -0.8826        161408         18950        161409         18948
<...>
BM_bcmp<uint32_t, Identical>/128000                     -0.7714         -0.7714         81497         18627         81488         18627
<...>
BM_bcmp<uint64_t, Identical>/64000                      -0.6239         -0.6239         50138         18855         50138         18855
<...>
BM_bcmp<uint8_t, InequalHalfway>/512000                 -0.9503         -0.9503        192405          9570        192392          9569
<...>
BM_bcmp<uint16_t, InequalHalfway>/256000                -0.9253         -0.9253        127858          9547        127860          9547
<...>
BM_bcmp<uint32_t, InequalHalfway>/128000                -0.8088         -0.8088         49140          9396         49140          9394
<...>
BM_bcmp<uint64_t, InequalHalfway>/64000                 -0.7041         -0.7041         32101          9499         32099          9498
```

What can we tell from the benchmark?
* Performance of naive equality check somewhat improves with element size,
  maxing out at eltcnt/sec=1.58603G/s for uint16_t, or bytes_read/sec=19.0209G/s
  for uint64_t. I think, that instability implies performance problems.
* Performance of `memcmp()`-aware benchmark always maxes out at around
  bytes_read/sec=51.2991G/s for every type. That is 2.6x the throughput of the
  naive variant!
* eltcnt/sec metric for the `memcmp()`-aware benchmark maxes out at
  eltcnt/sec=27.541G/s for uint8_t (was: eltcnt/sec=1.18491G/s, so 24x) and
  linearly decreases with element size.
  For uint64_t, it's ~4x+ the elements/second.
* The call obvious is more pricey than the loop, with small element count.
  As it can be seen from the full output {F8768210}, the `memcmp()` is almost
  universally worse, independent of the element size (and thus buffer size) when
  element count is less than 8.

So all in all, bcmp idiom does indeed pose untapped performance headroom.
This diff does implement said idiom recognition. I think a reasonable test
coverage is present, but do tell if there is anything obvious missing.

Now, quality. This does succeed to build and pass the test-suite, at least
without any non-bundled elements. {F8768216} {F8768217}
This transform fires 91 times:
```
$ /build/test-suite/utils/compare.py -m loop-idiom.NumBCmp result-new.json
Tests: 1149
Metric: loop-idiom.NumBCmp

Program                                         result-new

MultiSourc...Benchmarks/7zip/7zip-benchmark    79.00
MultiSource/Applications/d/make_dparser         3.00
SingleSource/UnitTests/vla                      2.00
MultiSource/Applications/Burg/burg              1.00
MultiSourc.../Applications/JM/lencod/lencod     1.00
MultiSource/Applications/lemon/lemon            1.00
MultiSource/Benchmarks/Bullet/bullet            1.00
MultiSourc...e/Benchmarks/MallocBench/gs/gs     1.00
MultiSourc...gs-C/TimberWolfMC/timberwolfmc     1.00
MultiSourc...Prolangs-C/simulator/simulator     1.00
```
The size changes are:
I'm not sure what's going on with SingleSource/UnitTests/vla.test yet, did not look.
```
$ /build/test-suite/utils/compare.py -m size..text result-{old,new}.json --filter-hash
Tests: 1149
Same hash: 907 (filtered out)
Remaining: 242
Metric: size..text

Program                                        result-old result-new diff
test-suite...ingleSource/UnitTests/vla.test   753.00     833.00     10.6%
test-suite...marks/7zip/7zip-benchmark.test   1001697.00 966657.00  -3.5%
test-suite...ngs-C/simulator/simulator.test   32369.00   32321.00   -0.1%
test-suite...plications/d/make_dparser.test   89585.00   89505.00   -0.1%
test-suite...ce/Applications/Burg/burg.test   40817.00   40785.00   -0.1%
test-suite.../Applications/lemon/lemon.test   47281.00   47249.00   -0.1%
test-suite...TimberWolfMC/timberwolfmc.test   250065.00  250113.00   0.0%
test-suite...chmarks/MallocBench/gs/gs.test   149889.00  149873.00  -0.0%
test-suite...ications/JM/lencod/lencod.test   769585.00  769569.00  -0.0%
test-suite.../Benchmarks/Bullet/bullet.test   770049.00  770049.00   0.0%
test-suite...HMARK_ANISTROPIC_DIFFUSION/128    NaN        NaN        nan%
test-suite...HMARK_ANISTROPIC_DIFFUSION/256    NaN        NaN        nan%
test-suite...CHMARK_ANISTROPIC_DIFFUSION/64    NaN        NaN        nan%
test-suite...CHMARK_ANISTROPIC_DIFFUSION/32    NaN        NaN        nan%
test-suite...ENCHMARK_BILATERAL_FILTER/64/4    NaN        NaN        nan%
Geomean difference                                                   nan%
         result-old    result-new       diff
count  1.000000e+01  10.00000      10.000000
mean   3.152090e+05  311695.40000  0.006749
std    3.790398e+05  372091.42232  0.036605
min    7.530000e+02  833.00000    -0.034981
25%    4.243300e+04  42401.00000  -0.000866
50%    1.197370e+05  119689.00000 -0.000392
75%    6.397050e+05  639705.00000 -0.000005
max    1.001697e+06  966657.00000  0.106242
```

I don't have timings though.

And now to the code. The basic idea is to completely replace the whole loop.
If we can't fully kill it, don't transform.
I have left one or two comments in the code, so hopefully it can be understood.

Also, there is a few TODO's that i have left for follow-ups:
* widening of `memcmp()`/`bcmp()`
* step smaller than the comparison size
* Metadata propagation
* more than two blocks as long as there is still a single backedge?
* ???

Reviewers: reames, fhahn, mkazantsev, chandlerc, craig.topper, courbet

Reviewed By: courbet

Subscribers: hiraditya, xbolva00, nikic, jfb, gchatelet, courbet, llvm-commits, mclow.lists

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D61144
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/docs/ReleaseNotes.rst (diff)llvm.src/docs/ReleaseNotes.rst
The file was modified/llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp (diff)llvm.src/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
The file was modified/llvm/trunk/test/Transforms/LoopIdiom/bcmp-basic.ll (diff)llvm.src/test/Transforms/LoopIdiom/bcmp-basic.ll
The file was modified/llvm/trunk/test/Transforms/LoopIdiom/bcmp-debugify-remarks.ll (diff)llvm.src/test/Transforms/LoopIdiom/bcmp-debugify-remarks.ll
The file was modified/llvm/trunk/test/Transforms/LoopIdiom/bcmp-negative-tests.ll (diff)llvm.src/test/Transforms/LoopIdiom/bcmp-negative-tests.ll
The file was modified/llvm/trunk/test/Transforms/LoopIdiom/bcmp-widening.ll (diff)llvm.src/test/Transforms/LoopIdiom/bcmp-widening.ll
Revision 370453 by lebedevri:
[NFC] SCEVExpander: add SetCurrentDebugLocation() / getCurrentDebugLocation() wrappers

Summary:
The internal `Builder` is private, which means there is
currently no way to set the debuginfo locations for `SCEVExpander`.
This only adds the wrappers, but does not use them anywhere.

Reviewers: mkazantsev, sanjoy, gberry, jyknight, dneilson

Reviewed By: sanjoy

Subscribers: javed.absar, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D61007
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpander.h (diff)llvm.src/include/llvm/Analysis/ScalarEvolutionExpander.h
Revision 370452 by jvikstrom:
[clangd] Collecting main file macro expansion locations in ParsedAST.

Summary: TokenBuffer does not collect macro expansions inside macro arguments which is needed for semantic higlighting. Therefore collects macro expansions in the main file in a PPCallback when building the ParsedAST instead.

Reviewers: hokein, ilya-biryukov

Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D66928
Change TypePath in RepositoryPath in Workspace
The file was modified/clang-tools-extra/trunk/clangd/ClangdUnit.cpp (diff)clang-tools-extra.src/clangd/ClangdUnit.cpp
The file was modified/clang-tools-extra/trunk/clangd/ClangdUnit.h (diff)clang-tools-extra.src/clangd/ClangdUnit.h
The file was modified/clang-tools-extra/trunk/clangd/unittests/ClangdUnitTests.cpp (diff)clang-tools-extra.src/clangd/unittests/ClangdUnitTests.cpp
Revision 370451 by gribozavr:
[Tooling] Migrated APIs that take ownership of objects to unique_ptr

Subscribers: jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D66960
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/docs/LibTooling.rst (diff)clang.src/docs/LibTooling.rst
The file was modified/cfe/trunk/docs/RAVFrontendAction.rst (diff)clang.src/docs/RAVFrontendAction.rst
The file was modified/cfe/trunk/docs/ReleaseNotes.rst (diff)clang.src/docs/ReleaseNotes.rst
The file was modified/cfe/trunk/include/clang/Tooling/Tooling.h (diff)clang.src/include/clang/Tooling/Tooling.h
The file was modified/cfe/trunk/lib/Tooling/Tooling.cpp (diff)clang.src/lib/Tooling/Tooling.cpp
The file was modified/cfe/trunk/unittests/AST/EvaluateAsRValueTest.cpp (diff)clang.src/unittests/AST/EvaluateAsRValueTest.cpp
The file was modified/cfe/trunk/unittests/AST/RecursiveASTVisitorTest.cpp (diff)clang.src/unittests/AST/RecursiveASTVisitorTest.cpp
The file was modified/cfe/trunk/unittests/CrossTU/CrossTranslationUnitTest.cpp (diff)clang.src/unittests/CrossTU/CrossTranslationUnitTest.cpp
The file was modified/cfe/trunk/unittests/Index/IndexTests.cpp (diff)clang.src/unittests/Index/IndexTests.cpp
The file was modified/cfe/trunk/unittests/Sema/CodeCompleteTest.cpp (diff)clang.src/unittests/Sema/CodeCompleteTest.cpp
The file was modified/cfe/trunk/unittests/Sema/ExternalSemaSourceTest.cpp (diff)clang.src/unittests/Sema/ExternalSemaSourceTest.cpp
The file was modified/cfe/trunk/unittests/StaticAnalyzer/CallDescriptionTest.cpp (diff)clang.src/unittests/StaticAnalyzer/CallDescriptionTest.cpp
The file was modified/cfe/trunk/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp (diff)clang.src/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp
The file was modified/cfe/trunk/unittests/StaticAnalyzer/StoreTest.cpp (diff)clang.src/unittests/StaticAnalyzer/StoreTest.cpp
The file was modified/cfe/trunk/unittests/StaticAnalyzer/SymbolReaperTest.cpp (diff)clang.src/unittests/StaticAnalyzer/SymbolReaperTest.cpp
The file was modified/cfe/trunk/unittests/Tooling/CommentHandlerTest.cpp (diff)clang.src/unittests/Tooling/CommentHandlerTest.cpp
The file was modified/cfe/trunk/unittests/Tooling/RefactoringTest.cpp (diff)clang.src/unittests/Tooling/RefactoringTest.cpp
The file was modified/cfe/trunk/unittests/Tooling/TestVisitor.h (diff)clang.src/unittests/Tooling/TestVisitor.h
The file was modified/cfe/trunk/unittests/Tooling/ToolingTest.cpp (diff)clang.src/unittests/Tooling/ToolingTest.cpp
The file was modified/clang-tools-extra/trunk/clangd/unittests/IndexActionTests.cpp (diff)clang-tools-extra.src/clangd/unittests/IndexActionTests.cpp
The file was modified/clang-tools-extra/trunk/unittests/clang-tidy/ClangTidyTest.h (diff)clang-tools-extra.src/unittests/clang-tidy/ClangTidyTest.h
Revision 370448 by dstenb:
[LiveDebugValues] Insert entry values after bundles

Summary:
Change LiveDebugValues so that it inserts entry values after the bundle
which contains the clobbering instruction. Previously it would insert
the debug value after the bundle head using insertAfter(), breaking the
bundle.

Reviewers: djtodoro, NikolaPrica, aprantl, vsk

Reviewed By: vsk

Subscribers: hiraditya, llvm-commits

Tags: #debug-info, #llvm

Differential Revision: https://reviews.llvm.org/D66888
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h (diff)llvm.src/include/llvm/CodeGen/MachineBasicBlock.h
The file was modified/llvm/trunk/lib/CodeGen/LiveDebugValues.cpp (diff)llvm.src/lib/CodeGen/LiveDebugValues.cpp
The file was added/llvm/trunk/test/DebugInfo/MIR/Hexagonllvm.src/test/DebugInfo/MIR/Hexagon
The file was added/llvm/trunk/test/DebugInfo/MIR/Hexagon/lit.local.cfgllvm.src/test/DebugInfo/MIR/Hexagon/lit.local.cfg
The file was added/llvm/trunk/test/DebugInfo/MIR/Hexagon/live-debug-values-bundled-entry-values.mirllvm.src/test/DebugInfo/MIR/Hexagon/live-debug-values-bundled-entry-values.mir
Revision 370446 by hokein:
[clangd] Add .vscode-test to .gitignore.

Reviewers: jvikstrom

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D66949
Change TypePath in RepositoryPath in Workspace
The file was modified/clang-tools-extra/trunk/clangd/clients/clangd-vscode/.gitignore (diff)clang-tools-extra.src/clangd/clients/clangd-vscode/.gitignore
Revision 370444 by glider:
[CodeGen]: fix error message for "=r" asm constraint

Summary:
Nico Weber reported that the following code:
  char buf[9];
  asm("" : "=r" (buf));

yields the "impossible constraint in asm: can't store struct into a register"
error message, although |buf| is not a struct (see
http://crbug.com/999160).

Make the error message more generic and add a test for it.
Also make sure other tests in x86_64-PR42672.c check for the full error
message.

Reviewers: eli.friedman, thakis

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D66948
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/CodeGen/CGStmt.cpp (diff)clang.src/lib/CodeGen/CGStmt.cpp
The file was modified/cfe/trunk/test/CodeGen/x86_64-PR42672.c (diff)clang.src/test/CodeGen/x86_64-PR42672.c
Revision 370443 by svenvh:
vim: add `immarg` keyword

The `immarg` attribute was added in r355981.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/utils/vim/syntax/llvm.vim (diff)llvm.src/utils/vim/syntax/llvm.vim
Revision 370442 by nico:
gn build: Merge r370441
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/utils/gn/secondary/llvm/unittests/ADT/BUILD.gn (diff)llvm.src/utils/gn/secondary/llvm/unittests/ADT/BUILD.gn
Revision 370441 by gribozavr:
[ADT] Removed VariadicFunction

Summary:
It is not used. It uses macro-based unrolling instead of variadic
templates, so it is not idiomatic anymore, and therefore it is a
questionable API to keep "just in case".

Subscribers: mgorny, dmgreen, dexonsmith, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D66961
Change TypePath in RepositoryPath in Workspace
The file was removed/llvm/trunk/include/llvm/ADT/VariadicFunction.hllvm.src/include/llvm/ADT/VariadicFunction.h
The file was modified/llvm/trunk/unittests/ADT/CMakeLists.txt (diff)llvm.src/unittests/ADT/CMakeLists.txt
The file was removed/llvm/trunk/unittests/ADT/VariadicFunctionTest.cppllvm.src/unittests/ADT/VariadicFunctionTest.cpp
Revision 370436 by mstorsjo:
[LLD] [COFF] Support merging resource object files

Extend WindowsResourceParser to support using a ResourceSectionRef for
loading resources from an object file.

Only allow merging resource object files in mingw mode; keep the
existing error on multiple resource objects in link mode.

If there only is one resource object file and no .res resources,
don't parse and recreate the .rsrc section, but just link it in without
inspecting it. This allows users to produce any .rsrc section (outside
of what the parser supports), just like before. (I don't have a specific
need for this, but it reduces the risk of this new feature.)

Separate out the .rsrc section chunks in InputFiles.cpp, and only include
them in the list of section chunks to link if we've determined that there
only was one single resource object. (We need to keep other chunks from
those object files, as they can legitimately contain other sections as
well, in addition to .rsrc section chunks.)

Differential Revision: https://reviews.llvm.org/D66824
Change TypePath in RepositoryPath in Workspace
The file was modified/lld/trunk/COFF/Driver.cpp (diff)N/A
The file was modified/lld/trunk/COFF/Driver.h (diff)N/A
The file was modified/lld/trunk/COFF/DriverUtils.cpp (diff)N/A
The file was modified/lld/trunk/COFF/InputFiles.cpp (diff)N/A
The file was modified/lld/trunk/COFF/InputFiles.h (diff)N/A
The file was added/lld/trunk/test/COFF/Inputs/combined-resources-2.yamlN/A
The file was added/lld/trunk/test/COFF/Inputs/combined-resources.yamlN/A
The file was modified/lld/trunk/test/COFF/combined-resources.test (diff)N/A
The file was modified/lld/trunk/test/COFF/force-multipleres.test (diff)N/A
The file was added/lld/trunk/test/COFF/mixed-resource-obj.yamlN/A
The file was modified/llvm/trunk/include/llvm/Object/WindowsResource.h (diff)llvm.src/include/llvm/Object/WindowsResource.h
The file was modified/llvm/trunk/lib/Object/WindowsResource.cpp (diff)llvm.src/lib/Object/WindowsResource.cpp
Revision 370435 by mstorsjo:
[WindowsResource] Remove use of global variables in WindowsResourceParser

Instead of updating a global variable counter for the next index of
strings and data blobs, pass along a reference to actual data/string
vectors and let the TreeNode insertion methods add their data/strings to
the vectors when a new entry is needed.

Additionally, if the resource tree had duplicates, that were ignored
with -force:multipleres in lld, we no longer store all versions of the
duplicated resource data, now we only keep the one that actually ends
up referenced.

Differential Revision: https://reviews.llvm.org/D66823
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/Object/WindowsResource.h (diff)llvm.src/include/llvm/Object/WindowsResource.h
The file was modified/llvm/trunk/lib/Object/WindowsResource.cpp (diff)llvm.src/lib/Object/WindowsResource.cpp
Revision 370434 by mstorsjo:
[WindowsResource] Avoid duplicating the input filenames for each resource. NFC.

Differential Revision: https://reviews.llvm.org/D66821
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Object/WindowsResource.cpp (diff)llvm.src/lib/Object/WindowsResource.cpp
Revision 370433 by mstorsjo:
[COFF] Add a ResourceSectionRef method for getting resource contents

This allows llvm-readobj to print the contents of each resource
when printing resources from an object file or executable, like it
already does for plain .res files.

This requires providing the whole COFFObjectFile to ResourceSectionRef.

This supports both object files and executables. For executables,
the DataRVA field is used as is to look up the right section.

For object files, ideally we would need to complete linking of them
and fix up all relocations to know what the DataRVA field would end up
being. In practice, the only thing that makes sense for an RVA field
is an ADDR32NB relocation. Thus, find a relocation pointing at this
field, verify that it has the expected type, locate the symbol it
points at, look up the section the symbol points at, and read from the
right offset in that section.

This works both for GNU windres object files (which use one single
.rsrc section, with all relocations against the base of the .rsrc
section, with the original value of the DataRVA field being the
offset of the data from the beginning of the .rsrc section) and
cvtres object files (with two separate .rsrc$01 and .rsrc$02 sections,
and one symbol per data entry, with the original pre-relocated DataRVA
field being set to zero).

Differential Revision: https://reviews.llvm.org/D66820
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/Object/COFF.h (diff)llvm.src/include/llvm/Object/COFF.h
The file was modified/llvm/trunk/lib/Object/COFFObjectFile.cpp (diff)llvm.src/lib/Object/COFFObjectFile.cpp
The file was modified/llvm/trunk/test/tools/llvm-cvtres/combined.test (diff)llvm.src/test/tools/llvm-cvtres/combined.test
The file was modified/llvm/trunk/test/tools/llvm-cvtres/object.test (diff)llvm.src/test/tools/llvm-cvtres/object.test
The file was modified/llvm/trunk/test/tools/llvm-readobj/coff-resources.test (diff)llvm.src/test/tools/llvm-readobj/coff-resources.test
The file was modified/llvm/trunk/tools/llvm-readobj/COFFDumper.cpp (diff)llvm.src/tools/llvm-readobj/COFFDumper.cpp
Revision 370432 by petar.avramovic:
[MIPS GlobalISel] Lower uitofp

Add custom lowering for G_UITOFP for MIPS32.

Differential Revision: https://reviews.llvm.org/D66930
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/Mips/MipsLegalizerInfo.cpp (diff)llvm.src/lib/Target/Mips/MipsLegalizerInfo.cpp
The file was modified/llvm/trunk/test/CodeGen/Mips/GlobalISel/legalizer/sitofp_and_uitofp.mir (diff)llvm.src/test/CodeGen/Mips/GlobalISel/legalizer/sitofp_and_uitofp.mir
The file was modified/llvm/trunk/test/CodeGen/Mips/GlobalISel/llvm-ir/sitofp_and_uitofp.ll (diff)llvm.src/test/CodeGen/Mips/GlobalISel/llvm-ir/sitofp_and_uitofp.ll
Revision 370431 by petar.avramovic:
[MIPS GlobalISel] Lower fptoui

Add lower for G_FPTOUI. Algorithm is similar to the SDAG version
in TargetLowering::expandFP_TO_UINT.
Lower G_FPTOUI for MIPS32.

Differential Revision: https://reviews.llvm.org/D66929
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/CodeGen/GlobalISel/LegalizerHelper.h (diff)llvm.src/include/llvm/CodeGen/GlobalISel/LegalizerHelper.h
The file was modified/llvm/trunk/lib/CodeGen/GlobalISel/LegalizerHelper.cpp (diff)llvm.src/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
The file was modified/llvm/trunk/lib/Target/Mips/MipsLegalizerInfo.cpp (diff)llvm.src/lib/Target/Mips/MipsLegalizerInfo.cpp
The file was modified/llvm/trunk/test/CodeGen/Mips/GlobalISel/legalizer/fptosi_and_fptoui.mir (diff)llvm.src/test/CodeGen/Mips/GlobalISel/legalizer/fptosi_and_fptoui.mir
The file was modified/llvm/trunk/test/CodeGen/Mips/GlobalISel/llvm-ir/fptosi_and_fptoui.ll (diff)llvm.src/test/CodeGen/Mips/GlobalISel/llvm-ir/fptosi_and_fptoui.ll
Revision 370430 by djg:
[CodeGen] Fix lowering for returning the result of an extractvalue

When the number of return values exceeds the number of registers available,
SelectionDAGBuilder::visitRet transforms a function's return to use a
pointer to a buffer to hold return values. When the returned value is an
operator such as extractvalue, the value may have a non-zero result number.
Add that number to the indexing when obtaining the values to store.

This fixes https://bugs.llvm.org/show_bug.cgi?id=43132.

Differential Revision: https://reviews.llvm.org/D66978
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (diff)llvm.src/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
The file was added/llvm/trunk/test/CodeGen/WebAssembly/multi-return.llllvm.src/test/CodeGen/WebAssembly/multi-return.ll
Revision 370429 by nridge:
[clangd] Add distinct highlightings for static fields and methods

Reviewers: hokein, ilya-biryukov, jvikstrom

Reviewed By: hokein

Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D66828
Change TypePath in RepositoryPath in Workspace
The file was modified/clang-tools-extra/trunk/clangd/SemanticHighlighting.cpp (diff)clang-tools-extra.src/clangd/SemanticHighlighting.cpp
The file was modified/clang-tools-extra/trunk/clangd/SemanticHighlighting.h (diff)clang-tools-extra.src/clangd/SemanticHighlighting.h
The file was modified/clang-tools-extra/trunk/clangd/test/semantic-highlighting.test (diff)clang-tools-extra.src/clangd/test/semantic-highlighting.test
The file was modified/clang-tools-extra/trunk/clangd/unittests/SemanticHighlightingTests.cpp (diff)clang-tools-extra.src/clangd/unittests/SemanticHighlightingTests.cpp
Revision 370428 by jsji:
[PowerPC][NFC] Use inline Subtarget->isPPC64()

To be consistent with all the other instances.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp (diff)llvm.src/lib/Target/PowerPC/PPCAsmPrinter.cpp
Revision 370427 by jsji:
[PowerPC][NFC] Use -mtriple in RUN line, remove target triple in tls.ll

To avoid confusion, especially when -mtriple are also added for PPC32.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/CodeGen/PowerPC/tls.ll (diff)llvm.src/test/CodeGen/PowerPC/tls.ll
Revision 370426 by maskray:
[PPC32] Emit R_PPC_GOT_TPREL16 instead R_PPC_GOT_TPREL16_LO

Unlike ppc64, which has ADDISgotTprelHA+LDgotTprelL pairs,
ppc32 just uses LDgotTprelL32, so it does not make lots of sense to use
_LO without a paired _HA.

Emit R_PPC_GOT_TPREL16 instead R_PPC_GOT_TPREL16_LO to match GCC, and
get better linker relocation check. Note, R_PPC_GOT_TPREL16_{HA,LO}
don't have good linker support:

(a) lld does not support R_PPC_GOT_TPREL16_{HA,LO}.
(b) Top of tree ld.bfd does not support R_PPC_GOT_REL16_HA Initial-Exec -> Local-Exec relaxation:

  // a.o
  addis 3, 3, tsd_tls@got@tprel@ha
  lwz 3, tsd_tls@got@tprel@l(3)
  add 3, 3, tsd_tls@tls
  // b.o
  .section .tdata,"awT"; .globl tsd_tls; tsd_tls:

  // ld/ld-new a.o b.o
  internal error, aborting at ../../bfd/elf32-ppc.c:7952 in ppc_elf_relocate_section

Reviewed By: adalava

Differential Revision: https://reviews.llvm.org/D66925
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp (diff)llvm.src/lib/Target/PowerPC/PPCAsmPrinter.cpp
The file was modified/llvm/trunk/test/CodeGen/PowerPC/tls.ll (diff)llvm.src/test/CodeGen/PowerPC/tls.ll
Revision 370425 by arphaman:
[clang-scan-deps] NFC, refactor the DependencyScanningWorker to use a consumer
to report the dependencies to the client

This will allow the scanner to report modular dependencies to the consumer.
This will also allow the scanner to accept regular cc1 clang invocations, e.g.
in an implementation of a libclang C API for clang-scan-deps, that I will add
follow-up patches for in the future.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/Tooling/DependencyScanning/DependencyScanningWorker.h (diff)clang.src/include/clang/Tooling/DependencyScanning/DependencyScanningWorker.h
The file was modified/cfe/trunk/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp (diff)clang.src/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp
The file was modified/cfe/trunk/tools/clang-scan-deps/ClangScanDeps.cpp (diff)clang.src/tools/clang-scan-deps/ClangScanDeps.cpp
Revision 370424 by ctopper:
[X86] Explicitly list all the always trivially rematerializable instructions.

Add a default with an llvm_unreachable for anything we don't expect.

This seems safer that just blindly returning true for anything
missing from the switch.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (diff)llvm.src/lib/Target/X86/X86InstrInfo.cpp