FailedChanges

Summary

  1. [dsymutil] Fix handling of common symbols in multiple object files. For common symbols the linker emits only a single symbol entry in the debug map. This caused dsymutil to not relocate common symbols when linking DWARF coming form object files that did not have this entry. This patch fixes that by keeping track of common symbols in the object files and synthesizing a debug map entry for them using the address from the main binary. Differential revision: https://reviews.llvm.org/D68680
  2. [TypeSize] Fix module builds (cassert) TypeSize.h uses `assert` statements without including the <cassert> header first which leads to failures in modular builds.
  3. Optimize operator=(const basic_string&) for tail call. Patch by Martijn Vels (mvels@google.com) Reviewed as https://reviews.llvm.org/D68276 This is a non trivial win for externally templated assignment operator. x86 without tail call (current libc++) 0000000000000000 <std::string::operator=(std::string const&)>: 0: 55 push %rbp 1: 48 89 e5 mov %rsp,%rbp 4: 53 push %rbx 5: 50 push %rax 6: 48 89 fb mov %rdi,%rbx 9: 48 39 f7 cmp %rsi,%rdi c: 74 17 je 25 <std::string::operator=(std::string const&)+0x25> e: 0f b6 56 17 movzbl 0x17(%rsi),%edx 12: 84 d2 test %dl,%dl 14: 79 07 jns 1d <std::string::operator=(std::string const&)+0x1d> 16: 48 8b 56 08 mov 0x8(%rsi),%rdx 1a: 48 8b 36 mov (%rsi),%rsi 1d: 48 89 df mov %rbx,%rdi 20: e8 00 00 00 00 callq 25 <std::string::operator=(std::string const&)+0x25> 25: 48 89 d8 mov %rbx,%rax 28: 48 83 c4 08 add $0x8,%rsp 2c: 5b pop %rbx 2d: 5d pop %rbp 2e: c3 retq After: 0000000000000000 <std::string::operator=(std::string const&)>: 0: 48 39 f7 cmp %rsi,%rdi 3: 74 14 je 19 <std::string::operator=(std::string const&)+0x19> 5: 0f b6 56 17 movzbl 0x17(%rsi),%edx 9: 84 d2 test %dl,%dl b: 79 07 jns 14 <std::string::operator=(std::string const&)+0x14> d: 48 8b 56 08 mov 0x8(%rsi),%rdx 11: 48 8b 36 mov (%rsi),%rsi 14: e9 00 00 00 00 jmpq 19 <std::string::operator=(std::string const&)+0x19> 19: 48 89 f8 mov %rdi,%rax 1c: c3 retq Benchmark (pending per https://reviews.llvm.org/D67667) ``` BM_StringAssignStr_Empty_Opaque 6.23ns ± 0% 5.19ns ± 0% -16.70% (p=0.016 n=5+4) BM_StringAssignStr_Empty_Transparent 5.86ns ± 0% 5.14ns ± 0% -12.24% (p=0.008 n=5+5) BM_StringAssignStr_Small_Opaque 8.79ns ± 1% 7.69ns ± 0% -12.53% (p=0.008 n=5+5) BM_StringAssignStr_Small_Transparent 9.44ns ± 0% 8.00ns ± 0% -15.26% (p=0.008 n=5+5) BM_StringAssignStr_Large_Opaque 25.2ns ± 0% 24.3ns ± 0% -3.50% (p=0.008 n=5+5) BM_StringAssignStr_Large_Transparent 23.6ns ± 0% 22.5ns ± 0% -4.76% (p=0.008 n=5+5) BM_StringAssignStr_Huge_Opaque 319ns ± 5% 317ns ± 5% ~ (p=0.690 n=5+5) BM_StringAssignStr_Huge_Transparent 319ns ± 5% 317ns ± 5% ~ (p=0.421 n=5+5) BM_StringAssignAsciiz_Empty_Opaque 7.41ns ± 0% 7.77ns ± 0% +4.89% (p=0.008 n=5+5) BM_StringAssignAsciiz_Empty_Transparent 7.54ns ± 3% 7.30ns ± 0% -3.24% (p=0.008 n=5+5) BM_StringAssignAsciiz_Small_Opaque 9.87ns ± 0% 10.24ns ± 1% +3.76% (p=0.008 n=5+5) BM_StringAssignAsciiz_Small_Transparent 10.4ns ± 1% 9.8ns ± 2% -5.78% (p=0.008 n=5+5) BM_StringAssignAsciiz_Large_Opaque 30.1ns ± 0% 30.1ns ± 0% ~ (p=0.167 n=5+5) BM_StringAssignAsciiz_Large_Transparent 27.1ns ± 0% 27.4ns ± 0% +0.92% (p=0.016 n=4+5) BM_StringAssignAsciiz_Huge_Opaque 383ns ± 4% 382ns ± 4% ~ (p=0.548 n=5+5) BM_StringAssignAsciiz_Huge_Transparent 375ns ± 0% 380ns ± 0% +1.37% (p=0.029 n=4+4) BM_StringAssignAsciizMix_Opaque 14.0ns ± 0% 14.0ns ± 0% ~ (p=0.881 n=5+5) BM_StringAssignAsciizMix_Transparent 13.7ns ± 1% 13.8ns ± 0% ~ (p=0.056 n=5+5) ```
  4. [c++20] P1152R4: warn on any simple-assignment to a volatile lvalue whose value is not ignored. We don't warn on all the cases that are deprecated: specifically, we choose to not warn for now if there are parentheses around the assignment but its value is not actually used. This seems like a more defensible rule, particularly for cases like sizeof(v = a), where the parens are part of the operand rather than the sizeof syntax.
  5. [c++20] Implement most of P1152R4. Diagnose some now-deprecated uses of volatile types: * as function parameter types and return types * as the type of a structured binding declaration * as the type of the lvalue operand of an increment / decrement / compound assignment operator This does not implement a check for the deprecation of simple assignments whose results are used; that check requires somewhat more complexity and will be addressed separately.
  6. [cxx_status] Note that Clang has supported std::source_location since version 9.
  7. Factor out some duplication. NFC.
  8. gn build: unbreak libcxx build after r374116 by restoring gen_link_script.py for gn
  9. [Docs] Fixes broken sphinx build - undefined label Removes label ref pointing to non-existent subsystem docs page.
  10. [clang-scan-deps] Improve string/character literal skipping The existing string/character literal skipping code in the dependency directives source minimizer has two issues: - It doesn't stop the scanning when a newline is reached before the terminating character, unlike the lexer which considers the token to be done (even if it's invalid) at the end of the line. - It doesn't support whitespace between '\' and the newline when looking if the '\' is used as a line continuation character. This commit fixes both issues. Differential Revision: https://reviews.llvm.org/D68436
  11. [IRGen] Emit lifetime markers for temporary struct allocas When passing arguments using temporary allocas, we need to add the appropriate lifetime markers so that the stack coloring passes can re-use the stack space. This patch keeps track of all the lifetime.start calls emited before the codegened call, and adds the corresponding lifetime.end calls after the call. Differential Revision: https://reviews.llvm.org/D68611
  12. [sanitizer] Fix crypt.cpp on Android again
  13. [IA] Add tests for a few other edge cases Test with the last eight bits within the range [7F, FF] and with lower-case hex letters.
  14. [dsymutil] Improve verbose output (NFC) The verbose output for finding relocations assumed that we'd always dump the DIE after (which starts with a newline) and therefore didn't include one itself. However, this isn't always true, leading to garbled output. This patch adds a newline to the verbose output and adds a line that says that the DIE is being kept (which isn't obvious otherwise). It also adds a 0x prefix to the relocations.
  15. DebugInfo: Move LLE enum handling to .def to match RLE handling
  16. [libc++] Workaround old versions of CMake that don't understand list(JOIN)
  17. Fix crash or wrong code bug if a lifetime-extended temporary contains a "non-constant" value. If the constant evaluator evaluates part of a variable initializer, including the initializer for some lifetime-extended temporary, but fails to fully evaluate the initializer, it can leave behind wrong values for temporaries encountered in that initialization. Don't try to emit those from CodeGen! Instead, look at the values that constant evaluation produced if (and only if) it actually succeeds and we're emitting the lifetime-extending declaration's initializer as a constant.
  18. [libc++] Move the linker script generation step to CMake Summary: This allows the linker script generation to query CMake properties (specifically the dependencies of libc++.so) instead of having to carry these dependencies around manually in global variables. Notice the removal of the LIBCXX_INTERFACE_LIBRARIES global variable. Reviewers: phosek, EricWF Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D68343
  19. [sanitizer] Fix crypt.cpp test on Darwin
  20. [clang] enable_trivial_var_init_zero should not be Joined<> Reviewers: rnk Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68610
  21. [CVP} Replace SExt with ZExt if the input is known-non-negative Summary: zero-extension is far more friendly for further analysis. While this doesn't directly help with the shift-by-signext problem, this is not unrelated. This has the following effect on test-suite (numbers collected after the finish of middle-end module pass manager): | Statistic | old | new | delta | percent change | | correlated-value-propagation.NumSExt | 0 | 6026 | 6026 | +100.00% | | instcount.NumAddInst | 272860 | 271283 | -1577 | -0.58% | | instcount.NumAllocaInst | 27227 | 27226 | -1 | 0.00% | | instcount.NumAndInst | 63502 | 63320 | -182 | -0.29% | | instcount.NumAShrInst | 13498 | 13407 | -91 | -0.67% | | instcount.NumAtomicCmpXchgInst | 1159 | 1159 | 0 | 0.00% | | instcount.NumAtomicRMWInst | 5036 | 5036 | 0 | 0.00% | | instcount.NumBitCastInst | 672482 | 672353 | -129 | -0.02% | | instcount.NumBrInst | 702768 | 702195 | -573 | -0.08% | | instcount.NumCallInst | 518285 | 518205 | -80 | -0.02% | | instcount.NumExtractElementInst | 18481 | 18482 | 1 | 0.01% | | instcount.NumExtractValueInst | 18290 | 18288 | -2 | -0.01% | | instcount.NumFAddInst | 139035 | 138963 | -72 | -0.05% | | instcount.NumFCmpInst | 10358 | 10348 | -10 | -0.10% | | instcount.NumFDivInst | 30310 | 30302 | -8 | -0.03% | | instcount.NumFenceInst | 387 | 387 | 0 | 0.00% | | instcount.NumFMulInst | 93873 | 93806 | -67 | -0.07% | | instcount.NumFPExtInst | 7148 | 7144 | -4 | -0.06% | | instcount.NumFPToSIInst | 2823 | 2838 | 15 | 0.53% | | instcount.NumFPToUIInst | 1251 | 1251 | 0 | 0.00% | | instcount.NumFPTruncInst | 2195 | 2191 | -4 | -0.18% | | instcount.NumFSubInst | 92109 | 92103 | -6 | -0.01% | | instcount.NumGetElementPtrInst | 1221423 | 1219157 | -2266 | -0.19% | | instcount.NumICmpInst | 479140 | 478929 | -211 | -0.04% | | instcount.NumIndirectBrInst | 2 | 2 | 0 | 0.00% | | instcount.NumInsertElementInst | 66089 | 66094 | 5 | 0.01% | | instcount.NumInsertValueInst | 2032 | 2030 | -2 | -0.10% | | instcount.NumIntToPtrInst | 19641 | 19641 | 0 | 0.00% | | instcount.NumInvokeInst | 21789 | 21788 | -1 | 0.00% | | instcount.NumLandingPadInst | 12051 | 12051 | 0 | 0.00% | | instcount.NumLoadInst | 880079 | 878673 | -1406 | -0.16% | | instcount.NumLShrInst | 25919 | 25921 | 2 | 0.01% | | instcount.NumMulInst | 42416 | 42417 | 1 | 0.00% | | instcount.NumOrInst | 100826 | 100576 | -250 | -0.25% | | instcount.NumPHIInst | 315118 | 314092 | -1026 | -0.33% | | instcount.NumPtrToIntInst | 15933 | 15939 | 6 | 0.04% | | instcount.NumResumeInst | 2156 | 2156 | 0 | 0.00% | | instcount.NumRetInst | 84485 | 84484 | -1 | 0.00% | | instcount.NumSDivInst | 8599 | 8597 | -2 | -0.02% | | instcount.NumSelectInst | 45577 | 45913 | 336 | 0.74% | | instcount.NumSExtInst | 84026 | 78278 | -5748 | -6.84% | | instcount.NumShlInst | 39796 | 39726 | -70 | -0.18% | | instcount.NumShuffleVectorInst | 100272 | 100292 | 20 | 0.02% | | instcount.NumSIToFPInst | 29131 | 29113 | -18 | -0.06% | | instcount.NumSRemInst | 1543 | 1543 | 0 | 0.00% | | instcount.NumStoreInst | 805394 | 804351 | -1043 | -0.13% | | instcount.NumSubInst | 61337 | 61414 | 77 | 0.13% | | instcount.NumSwitchInst | 8527 | 8524 | -3 | -0.04% | | instcount.NumTruncInst | 60523 | 60484 | -39 | -0.06% | | instcount.NumUDivInst | 2381 | 2381 | 0 | 0.00% | | instcount.NumUIToFPInst | 5549 | 5549 | 0 | 0.00% | | instcount.NumUnreachableInst | 9855 | 9855 | 0 | 0.00% | | instcount.NumURemInst | 1305 | 1305 | 0 | 0.00% | | instcount.NumXorInst | 10230 | 10081 | -149 | -1.46% | | instcount.NumZExtInst | 60353 | 66840 | 6487 | 10.75% | | instcount.TotalBlocks | 829582 | 829004 | -578 | -0.07% | | instcount.TotalFuncs | 83818 | 83817 | -1 | 0.00% | | instcount.TotalInsts | 7316574 | 7308483 | -8091 | -0.11% | TLDR: we produce -0.11% less instructions, -6.84% less `sext`, +10.75% more `zext`. To be noted, clearly, not all new `zext`'s are produced by this fold. (And now i guess it might have been interesting to measure this for D68103 :S) Reviewers: nikic, spatel, reames, dberlin Reviewed By: nikic Subscribers: hiraditya, jfb, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68654
  22. [CVP][NFC] Revisit sext vs. zext test
  23. [clang] Add llvm-ifs in test deps
  24. Fix `compiler_rt_logbf_test.c` test failure for Builtins-i386-darwin test suite. Summary: It seems that compiler-rt's implementation and Darwin libm's implementation of `logbf()` differ when given a NaN with raised sign bit. Strangely this behaviour only happens with i386 Darwin libm. For x86_64 and x86_64h the existing compiler-rt implementation matched Darwin libm. To workaround this the `compiler_rt_logbf_test.c` has been modified to do a comparison on the `fp_t` type and if that fails check if both values are NaN. If both values are NaN they are equivalent and no error needs to be raised. rdar://problem/55565503 Reviewers: rupprecht, scanon, compnerd, echristo Subscribers: #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D67999
  25. [OPENMP50]Multiple vendors in vendor context must be treated as logical and of vendors, not or. If several vendors are provided in the same vendor context trait, the context shall match only if all vendors are matching, not one of them. This is per OpenMP 5.0, 2.3.3 Matching and Scoring Context Selectors, all selectors in the construct, device, and implementation sets of the context selector appear in the corresponding trait set of the OpenMP context.
  26. Try to get ubsan-blacklist-vfs.c pass more on Windows
  27. Try to get readability-deleted-default.cpp to pass on Windows. In MS compatibility mode, "extern inline void g()" is not a redundant declaration for "inline void g()", because of redeclForcesDefMSVC() (see PR19264, r205485). To fix, run the test with -fms-compatiblity forced on and off and explicit check for the differing behavior for extern inline. Final bit of PR43593. Differential Revision: https://reviews.llvm.org/D68640
  28. Mark several PointerIntPair methods as lvalue-only No point in mutating 'this' if it's just going to be thrown away. https://reviews.llvm.org/D63945
  29. [tblgen] Add getOperatorAsDef() to Record Summary: While working with DagInit's, it's often the case that you expect the operator to be a reference to a def. This patch adds a wrapper for this common case to reduce the amount of boilerplate callers need to duplicate repeatedly. getOperatorAsDef() returns the record if the DagInit has an operator that is a DefInit. Otherwise, it prints a fatal error. There's only a few pre-existing examples in LLVM at the moment and I've left a few instances of the code this simplifies as they had more specific error messages than the generic one this produces. I'm going to be using this a fair bit in my subsequent patches. Reviewers: bogner, volkan, nhaehnle Reviewed By: nhaehnle Subscribers: nhaehnle, hiraditya, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, lenary, s.egerton, pzheng, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68424
  30. [BPF] do compile-once run-everywhere relocation for bitfields A bpf specific clang intrinsic is introduced: u32 __builtin_preserve_field_info(member_access, info_kind) Depending on info_kind, different information will be returned to the program. A relocation is also recorded for this builtin so that bpf loader can patch the instruction on the target host. This clang intrinsic is used to get certain information to facilitate struct/union member relocations. The offset relocation is extended by 4 bytes to include relocation kind. Currently supported relocation kinds are enum { FIELD_BYTE_OFFSET = 0, FIELD_BYTE_SIZE, FIELD_EXISTENCE, FIELD_SIGNEDNESS, FIELD_LSHIFT_U64, FIELD_RSHIFT_U64, }; for __builtin_preserve_field_info. The old access offset relocation is covered by FIELD_BYTE_OFFSET = 0. An example: struct s { int a; int b1:9; int b2:4; }; enum { FIELD_BYTE_OFFSET = 0, FIELD_BYTE_SIZE, FIELD_EXISTENCE, FIELD_SIGNEDNESS, FIELD_LSHIFT_U64, FIELD_RSHIFT_U64, }; void bpf_probe_read(void *, unsigned, const void *); int field_read(struct s *arg) { unsigned long long ull = 0; unsigned offset = __builtin_preserve_field_info(arg->b2, FIELD_BYTE_OFFSET); unsigned size = __builtin_preserve_field_info(arg->b2, FIELD_BYTE_SIZE); #ifdef USE_PROBE_READ bpf_probe_read(&ull, size, (const void *)arg + offset); unsigned lshift = __builtin_preserve_field_info(arg->b2, FIELD_LSHIFT_U64); #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ lshift = lshift + (size << 3) - 64; #endif #else switch(size) { case 1: ull = *(unsigned char *)((void *)arg + offset); break; case 2: ull = *(unsigned short *)((void *)arg + offset); break; case 4: ull = *(unsigned int *)((void *)arg + offset); break; case 8: ull = *(unsigned long long *)((void *)arg + offset); break; } unsigned lshift = __builtin_preserve_field_info(arg->b2, FIELD_LSHIFT_U64); #endif ull <<= lshift; if (__builtin_preserve_field_info(arg->b2, FIELD_SIGNEDNESS)) return (long long)ull >> __builtin_preserve_field_info(arg->b2, FIELD_RSHIFT_U64); return ull >> __builtin_preserve_field_info(arg->b2, FIELD_RSHIFT_U64); } There is a minor overhead for bpf_probe_read() on big endian. The code and relocation generated for field_read where bpf_probe_read() is used to access argument data on little endian mode: r3 = r1 r1 = 0 r1 = 4 <=== relocation (FIELD_BYTE_OFFSET) r3 += r1 r1 = r10 r1 += -8 r2 = 4 <=== relocation (FIELD_BYTE_SIZE) call bpf_probe_read r2 = 51 <=== relocation (FIELD_LSHIFT_U64) r1 = *(u64 *)(r10 - 8) r1 <<= r2 r2 = 60 <=== relocation (FIELD_RSHIFT_U64) r0 = r1 r0 >>= r2 r3 = 1 <=== relocation (FIELD_SIGNEDNESS) if r3 == 0 goto LBB0_2 r1 s>>= r2 r0 = r1 LBB0_2: exit Compare to the above code between relocations FIELD_LSHIFT_U64 and FIELD_LSHIFT_U64, the code with big endian mode has four more instructions. r1 = 41 <=== relocation (FIELD_LSHIFT_U64) r6 += r1 r6 += -64 r6 <<= 32 r6 >>= 32 r1 = *(u64 *)(r10 - 8) r1 <<= r6 r2 = 60 <=== relocation (FIELD_RSHIFT_U64) The code and relocation generated when using direct load. r2 = 0 r3 = 4 r4 = 4 if r4 s> 3 goto LBB0_3 if r4 == 1 goto LBB0_5 if r4 == 2 goto LBB0_6 goto LBB0_9 LBB0_6: # %sw.bb1 r1 += r3 r2 = *(u16 *)(r1 + 0) goto LBB0_9 LBB0_3: # %entry if r4 == 4 goto LBB0_7 if r4 == 8 goto LBB0_8 goto LBB0_9 LBB0_8: # %sw.bb9 r1 += r3 r2 = *(u64 *)(r1 + 0) goto LBB0_9 LBB0_5: # %sw.bb r1 += r3 r2 = *(u8 *)(r1 + 0) goto LBB0_9 LBB0_7: # %sw.bb5 r1 += r3 r2 = *(u32 *)(r1 + 0) LBB0_9: # %sw.epilog r1 = 51 r2 <<= r1 r1 = 60 r0 = r2 r0 >>= r1 r3 = 1 if r3 == 0 goto LBB0_11 r2 s>>= r1 r0 = r2 LBB0_11: # %sw.epilog exit Considering verifier is able to do limited constant propogation following branches. The following is the code actually traversed. r2 = 0 r3 = 4 <=== relocation r4 = 4 <=== relocation if r4 s> 3 goto LBB0_3 LBB0_3: # %entry if r4 == 4 goto LBB0_7 LBB0_7: # %sw.bb5 r1 += r3 r2 = *(u32 *)(r1 + 0) LBB0_9: # %sw.epilog r1 = 51 <=== relocation r2 <<= r1 r1 = 60 <=== relocation r0 = r2 r0 >>= r1 r3 = 1 if r3 == 0 goto LBB0_11 r2 s>>= r1 r0 = r2 LBB0_11: # %sw.epilog exit For native load case, the load size is calculated to be the same as the size of load width LLVM otherwise used to load the value which is then used to extract the bitfield value. Differential Revision: https://reviews.llvm.org/D67980
  31. [NFC] Attempt to make ubsan-blacklist-vfs test pass on Windows Previously disabled in d0c2d5daa3e
  32. [driver][hip] Skip bundler if host action is nothing. Reviewers: sfantao, tra, yaxunl Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68652
  33. [OPENMP50]Do not allow multiple same context traits in the same context selector. According to OpenMP 5.0, 2.3.2 Context Selectors, Restrictions, each trait-selector-name can only be specified once. Added check for this restriction.
  34. AMDGPU: Fix i16 arithmetic pattern redundancy There were 2 problems here. First, these patterns were duplicated to handle the inverted shift operands instead of using the commuted PatFrags. Second, the point of the zext folding patterns don't apply to the non-0ing high subtargets. They should be skipped instead of inserting the extension. The zeroing high code would be emitted when necessary anyway. This was also emitting unnecessary zexts in cases where the high bits were undefined.
  35. Revert "[LoopVectorize][PowerPC] Estimate int and float register pressure separately in loop-vectorize" Also Revert "[LoopVectorize] Fix non-debug builds after rL374017" This reverts commit 9f41deccc0e648a006c9f38e11919f181b6c7e0a. This reverts commit 18b6fe07bcf44294f200bd2b526cb737ed275c04. The patch is breaking PowerPC internal build, checked with author, reverting on behalf of him for now due to timezone.
  36. [SLP] add test with prefer-vector-width function attribute; NFC (PR43578)
  37. [CodeExtractor] Factor out and reuse shrinkwrap analysis Factor out CodeExtractor's analysis of allocas (for shrinkwrapping purposes), and allow the analysis to be reused. This resolves a quadratic compile-time bug observed when compiling AMDGPUDisassembler.cpp.o. Pre-patch (Release + LTO clang): ``` ---User Time--- --System Time-- --User+System-- ---Wall Time--- --- Name --- 176.5278 ( 57.8%) 0.4915 ( 18.5%) 177.0192 ( 57.4%) 177.4112 ( 57.3%) Hot Cold Splitting ``` Post-patch (ReleaseAsserts clang): ``` ---User Time--- --System Time-- --User+System-- ---Wall Time--- --- Name --- 1.4051 ( 3.3%) 0.0079 ( 0.3%) 1.4129 ( 3.2%) 1.4129 ( 3.2%) Hot Cold Splitting ``` Testing: check-llvm, and comparing the AMDGPUDisassembler.cpp.o binary pre- vs. post-patch. An alternate approach is to hide CodeExtractorAnalysisCache from clients of CodeExtractor, and to recompute the analysis from scratch inside of CodeExtractor::extractCodeRegion(). This eliminates some redundant work in the shrinkwrapping legality check. However, some clients continue to exhibit O(n^2) compile time behavior as computing the analysis is O(n). rdar://55912966 Differential Revision: https://reviews.llvm.org/D68616
  38. [sanitizer] Disable crypt*.cpp tests on Android
  39. AMDGPU: Add offsets to MMO when lowering buffer intrinsics Summary: Without offsets on the MachineMemOperands (MMOs), MachineInstr::mayAlias() will return true for all reads and writes to the same resource descriptor. This leads to O(N^2) complexity in the MachineScheduler when analyzing dependencies of buffer loads and stores. It also limits the SILoadStoreOptimizer from merging more instructions. This patch reduces the compile time of one pathological compute shader from 12 seconds to 1 second. Reviewers: arsenm, nhaehnle Reviewed By: arsenm Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, hiraditya, jfb, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65097
  40. [Attributor][Fix] Temporary fix for windows build bot failure D65402 causes test failure related to attributor-max-iterations. This commit removes attributor-max-iterations-verify for now. I'll examine the factor and the flag should be reverted.
  41. CodeGenPrepare - silence static analyzer dyn_cast<> null dereference warnings. NFCI. The static analyzer is warning about potential null dereferences, but in these cases we should be able to use cast<> directly and if not assert will fire for us.
  42. [AMDGPU] Disable unused gfx10 dpp instructions Inhibit generation of unused real dpp instructions on gfx10 just like it is done on other subtargets. This does not change anything because these are illegal anyway and not accepted, but it does reduce the number of instruction definitions generated. Differential Revision: https://reviews.llvm.org/D68607
  43. [libc++] Make sure we link all system libraries into the benchmarks It turns out that r374056 broke _some_ build bots again, specifically the ones using sanitizers. Instead of trying to link the right system libraries to the benchmarks bit-by-bit, let's just link exactly the system libraries that libc++ itself needs.
  44. [UpdateCCTestChecks] Detect function mangled name on separate line Sometimes functions with large comment blocks in front of them have their declarations output on several lines by c-index-test. Hence the one-line function name/line/mangled pattern will not work to detect them. Break the pattern up into two patterns and keep state after seeing the name/line information until we finally see the mangled name. Differential Revision: https://reviews.llvm.org/D68272
  45. [NFC][CVP] Add tests where we can replace sext with zext If the sign bit of the value that is being sign-extended is not set, i.e. the value is non-negative (s>= 0), then zero-extension will suffice, and is better for analysis: https://rise4fun.com/Alive/a8PD
  46. (Re)generate various tests. NFC
  47. [WebAssembly] Fix a bug in 'try' placement Summary: When searching for local expression tree created by stackified registers, for 'block' placement, we start the search from the previous instruction of a BB's terminator. But in 'try''s case, we should start from the previous instruction of a call that can throw, or a EH_LABEL that precedes the call, because the return values of the call's previous instructions can be stackified and consumed by the throwing call. For example, ``` i32.call @foo call @bar ; may throw br $label0 ``` In this case, if we start the search from the previous instruction of the terminator (`br` here), we end up stopping at `call @bar` and place a 'try' between `i32.call @foo` and `call @bar`, because `call @bar` does not have a return value so it is not a local expression tree of `br`. But in this case, unlike when placing 'block's, we should start the search from `call @bar`, because the return value of `i32.call @foo` is stackified and used by `call @bar`. Reviewers: dschuff Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68619
  48. [OPENMP50]Prohibit multiple context selector sets in context selectors. According to OpenMP 5.0, 2.3.2 Context Selectors, Restrictions, each trait-set-selector-name can only be specified once. Added check to implement this restriction.
  49. [builtins] Unbreak build on FreeBSD armv7 after D60351 headers include reordering. Reviewers: phosek, echristo Reviewed-By: phosek Differential Revsion: https://reviews.llvm.org/D68045
  50. [DebugInfo][If-Converter] Update call site info during the optimization During the If-Converter optimization pay attention when copying or deleting call instructions in order to keep call site information in valid state. Reviewers: aprantl, vsk, efriedma Reviewed By: vsk, efriedma Differential Revision: https://reviews.llvm.org/D66955
  51. gn build: Merge r374062
  52. gn build: Merge r374061
  53. [Attributor][MustExec] Deduce dereferenceable and nonnull attribute using MustBeExecutedContextExplorer Summary: In D65186 and related patches, MustBeExecutedContextExplorer is introduced. This enables us to traverse instructions guaranteed to execute from function entry. If we can know the argument is used as `dereferenceable` or `nonnull` in these instructions, we can mark `dereferenceable` or `nonnull` in the argument definition: 1. Memory instruction (similar to D64258) Trace memory instruction pointer operand. Currently, only inbounds GEPs are traced. ``` define i64* @f(i64* %a) { entry: %add.ptr = getelementptr inbounds i64, i64* %a, i64 1 ; (because of inbounds GEP we can know that %a is at least dereferenceable(16)) store i64 1, i64* %add.ptr, align 8 ret i64* %add.ptr ; dereferenceable 8 (because above instruction stores into it) } ``` 2. Propagation from callsite (similar to D27855) If `deref` or `nonnull` are known in call site parameter attributes we can also say that argument also that attribute. ``` declare void @use3(i8* %x, i8* %y, i8* %z); declare void @use3nonnull(i8* nonnull %x, i8* nonnull %y, i8* nonnull %z); define void @parent1(i8* %a, i8* %b, i8* %c) { call void @use3nonnull(i8* %b, i8* %c, i8* %a) ; Above instruction is always executed so we can say that@parent1(i8* nonnnull %a, i8* nonnull %b, i8* nonnull %c) call void @use3(i8* %c, i8* %a, i8* %b) ret void } ``` Reviewers: jdoerfert, sstefan1, spatel, reames Reviewed By: jdoerfert Subscribers: xbolva00, hiraditya, jfb, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65402
  54. Revert [TextAPI] Introduce TBDv4 This reverts r374058 (git commit 5d566c5a46aeaa1fa0e5c0b823c9d5f84036dc9a)
  55. [clang][ifs] Clang Interface Stubs ToolChain plumbing. Second Landing Attempt: This patch enables end to end support for generating ELF interface stubs directly from clang. Now the following: clang -emit-interface-stubs -o libfoo.so a.cpp b.cpp c.cpp will product an ELF binary with visible symbols populated. Visibility attributes and -fvisibility can be used to control what gets populated. * Adding ToolChain support for clang Driver IFS Merge Phase * Implementing a default InterfaceStubs Merge clang Tool, used by ToolChain * Adds support for the clang Driver to involve llvm-ifs on ifs files. * Adds -emit-merged-ifs flag, to tell llvm-ifs to emit a merged ifs text file instead of the final object format (normally ELF) Differential Revision: https://reviews.llvm.org/D63978
  56. [Attributor] Add helper class to compose two structured deduction. Summary: This patch introduces a generic way to compose two structured deductions. This will be used for composing generic deduction with `MustBeExecutedExplorer` and other existing generic deduction. Reviewers: jdoerfert, sstefan1 Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66645
  57. gn build: Merge r374058
  58. [TextAPI] Introduce TBDv4 Summary: This format introduces new features and platforms The motivation for this format is to support more than 1 platform since previous versions only supported additional architectures and 1 platform, for example ios + ios-simulator and macCatalyst. Reviewers: ributzka, steven_wu Reviewed By: ributzka Subscribers: mgorny, hiraditya, mgrang, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67529
  59. [OPENMP50]Allow functions in declare variant directive to have different C linkage. After some discussion with OpenMP developers, it was decided that the functions with the different C linkage can be used in declare variant directive.
  60. [libc++] TAKE 2: Make system libraries PRIVATE dependencies of libc++ We tried doing that previously (in r373487) and failed (reverted in r373506) because the benchmarks needed to link against system libraries and relied on libc++'s dependencies being propagated. Now that this has been fixed (in r374053), this commit marks the system libraries as PRIVATE dependencies of libc++.
  61. [Mips] Emit proper ABI for _mcount calls When -pg option is present than a call to _mcount is inserted into every function. However since the proper ABI was not followed then the generated gmon.out did not give proper results. By inserting needed instructions before every _mcount we can fix this. Differential Revision: https://reviews.llvm.org/D68390
  62. [llvm-exegesis] Add options to SnippetGenerator. Summary: This adds a `-max-configs-per-opcode` option to limit the number of configs per opcode. Reviewers: gchatelet Subscribers: tschuett, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68642
  63. [libc++] Add missing link-time dependencies to the benchmarks Since the benchmarks build with -nostdlib, they need to manually link against some system libraries that are used by the benchmarks and the GoogleBenchmark library itself. Previously, we'd rely on the fact that these libraries were linked through the PUBLIC dependencies of cxx_shared/cxx_static. However, if we were to make these dependencies PRIVATE (as they should be because they are implementation details of libc++), the benchmarks would fail to link. This commit remediates that.
  64. Object/minidump: Add support for the MemoryInfoList stream Summary: This patch adds the definitions of the constants and structures necessary to interpret the MemoryInfoList minidump stream, as well as the object::MinidumpFile interface to access the stream. While the code is fairly simple, there is one important deviation from the other minidump streams, which is worth calling out explicitly. Unlike other "List" streams, the size of the records inside MemoryInfoList stream is not known statically. Instead it is described in the stream header. This makes it impossible to return ArrayRef<MemoryInfo> from the accessor method, as it is done with other streams. Instead, I create an iterator class, which can be parameterized by the runtime size of the structure, and return iterator_range<iterator> instead. Reviewers: amccarth, jhenderson, clayborg Subscribers: JosephTremoulet, zturner, markmentovai, lldb-commits, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68210
  65. [libc++] Use PRIVATE to link benchmark dependencies It's better style to use PRIVATE when linking libraries to executables, and it doesn't make a difference since executables don't need to propagate their link-time dependencies anyway.
  66. Nope, I'm wrong. It looks like someone else removed these on purpose and it just happened to break the bot right when I did my push. So I'm undoing this mornings incorrect push. I've also kicked off an email to hopefully get the bot fixed the correct way.
  67. [clangd] Disable expand auto on decltype(auto) Summary: Applying it produces incorrect code at the moment. Reviewers: sammccall Reviewed By: sammccall Subscribers: kuhnel, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68630
  68. [clangd] Bump timeouts in speculative completion tests
  69. Restore documentation that 'svn update' unexpectedly yanked out from under me.
  70. fix fmls fp16 Tim Northover remarked that the added patterns for fmls fp16 produce wrong code in case the fsub instruction has a multiplication as its first operand, i.e., all the patterns FMLSv*_OP1: > define <8 x half> @test_FMLSv8f16_OP1(<8 x half> %a, <8 x half> %b, <8 x half> %c) { > ; CHECK-LABEL: test_FMLSv8f16_OP1: > ; CHECK: fmls {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h > entry: > > %mul = fmul fast <8 x half> %c, %b > %sub = fsub fast <8 x half> %mul, %a > ret <8 x half> %sub > } > > This doesn't look right to me. The exact instruction produced is "fmls > v0.8h, v2.8h, v1.8h", which I think calculates "v0 - v2*v1", but the > IR is calculating "v2*v1-v0". The equivalent <4 x float> code also > doesn't emit an fmls. This patch generates an fmla and negates the value of the operand2 of the fsub. Inspecting the pattern match, I found that there was another mistake in the opcode to be selected: matching FMULv4*16 should generate FMLSv4*16 and not FMLSv2*32. Tested on aarch64-linux with make check-all. Differential Revision: https://reviews.llvm.org/D67990
  71. Add test for rotating truncated vectors. NFC
  72. [SVE][IR] Scalable Vector size queries and IR instruction support * Adds a TypeSize struct to represent the known minimum size of a type along with a flag to indicate that the runtime size is a integer multiple of that size * Converts existing size query functions from Type.h and DataLayout.h to return a TypeSize result * Adds convenience methods (including a transparent conversion operator to uint64_t) so that most existing code 'just works' as if the return values were still scalars. * Uses the new size queries along with ElementCount to ensure that all supported instructions used with scalable vectors can be constructed in IR. Reviewers: hfinkel, lattner, rkruppe, greened, rovka, rengolin, sdesmalen Reviewed By: rovka, sdesmalen Differential Revision: https://reviews.llvm.org/D53137
  73. AMDGPU: Propagate undef flag during pre-RA exec mask optimizations Summary: Issue: https://github.com/GPUOpen-Drivers/llpc/issues/204 Reviewers: arsenm, rampitec Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68184
  74. MachineSSAUpdater: insert IMPLICIT_DEF at top of basic block Summary: When getValueInMiddleOfBlock happens to be called for a basic block that has no incoming value at all, an IMPLICIT_DEF is inserted in that block via GetValueAtEndOfBlockInternal. This IMPLICIT_DEF must be at the top of its basic block or it will likely not reach the use that the caller intends to insert. Issue: https://github.com/GPUOpen-Drivers/llpc/issues/204 Reviewers: arsenm, rampitec Subscribers: jvesely, wdng, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68183
  75. [SLP] add test with prefer-vector-width function attribute; NFC
  76. [LoopRotate] Unconditionally get DomTree. LoopRotate is a loop pass and the DomTree should always be available. Similar to a70c5261436322a53187d67b8bdc0445d0463a9a
  77. [Diagnostics] Silence -Wsizeof-array-div for character buffers Summary: Character buffers are sometimes used to represent a pool of memory that contains non-character objects, due to them being synonymous with a stream of bytes on almost all modern architectures. Often, when interacting with hardware devices, byte buffers are therefore used as an intermediary and so we can end Character buffers are sometimes used to represent a pool of memory that contains non-character objects, due to them being synonymous with a stream of bytes on almost all modern architectures. Often, when interacting with hardware devices, byte buffers are therefore used as an intermediary and so we can end up generating lots of false-positives. Moreover, due to the ability of character pointers to alias non-character pointers, the strict aliasing violations that would generally be implied by the calculations caught by the warning (if the calculation itself is in fact correct) do not apply here, and so although the length calculation may be wrong, that is the only possible issue. Reviewers: rsmith, xbolva00, thakis Reviewed By: xbolva00, thakis Subscribers: thakis, lebedev.ri, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68526
  78. [MCA][LSUnit] Track loads and stores until retirement. Before this patch, loads and stores were only tracked by their corresponding queues in the LSUnit from dispatch until execute stage. In practice we should be more conservative and assume that memory opcodes leave their queues at retirement stage. Basically, loads should leave the load queue only when they have completed and delivered their data. We conservatively assume that a load is completed when it is retired. Stores should be tracked by the store queue from dispatch until retirement. In practice, stores can only leave the store queue if their data can be written to the data cache. This is mostly a mechanical change. With this patch, the retire stage notifies the LSUnit when a memory instruction is retired. That would triggers the release of LDQ/STQ entries. The only visible change is in memory tests for the bdver2 model. That is because bdver2 is the only model that defines the load/store queue size. This patch partially addresses PR39830. Differential Revision: https://reviews.llvm.org/D68266
  79. [ISEL][ARM][AARCH64] Tracking simple parameter forwarding registers Support for tracking registers that forward function parameters into the following function frame. For now we only support cases when parameter is forwarded through single register. Reviewers: aprantl, vsk, t.p.northover Reviewed By: vsk Differential Revision: https://reviews.llvm.org/D66953
  80. Remove an useless allocation (from by clang-analyzer/scan-build) https://llvm.org/reports/scan-build/report-TargetInfo.cpp-detectFPCCEligibleStruct-9-1.html#EndPath
  81. [llvm-exegesis] Finish plumbing the `Config` field. Summary: Right now there are no snippet generators that emit the `Config` Field, but I plan to add it to investigate LEA operands for PR32326. What was broken was: - `Config` Was not propagated up until the BenchmarkResult::Key. - Clustering should really consider different configs as measuring different things, so we should stabilize on (Opcode, Config) instead of just Opcode. Reviewers: gchatelet Subscribers: tschuett, llvm-commits, lebedev.ri Tags: #llvm Differential Revision: https://reviews.llvm.org/D68629
  82. [llvm-readobj/llvm-readelf] - Add checks for GNU-style to "all.test" test case. We do not check the GNU-style output when -all is given. This patch does that. Differential revision: https://reviews.llvm.org/D68462
  83. [NFC] Add REQUIRES for r374017 in testcase
  84. [LoopRotate] Unconditionally get ScalarEvolution. Summary: LoopRotate is a loop pass and SE should always be available. Reviewers: anemet, asbirlea Reviewed By: asbirlea Differential Revision: https://reviews.llvm.org/D68573
  85. [ARM] Generate vcmp instead of vcmpe Based on the discussion in http://lists.llvm.org/pipermail/llvm-dev/2019-October/135574.html, the conclusion was reached that the ARM backend should produce vcmp instead of vcmpe instructions by default, i.e. not be producing an Invalid Operation exception when either arguments in a floating point compare are quiet NaNs. In the future, after constrained floating point intrinsics for floating point compare have been introduced, vcmpe instructions probably should be produced for those intrinsics - depending on the exact semantics they'll be defined to have. This patch logically consists of the following parts: - Revert http://llvm.org/viewvc/llvm-project?rev=294945&view=rev and http://llvm.org/viewvc/llvm-project?rev=294968&view=rev, which implemented fine-tuning for when to produce vcmpe (i.e. not do it for equality comparisons). The complexity introduced by those patches isn't needed anymore if we just always produce vcmp instead. Maybe these patches need to be reintroduced again once support is needed to map potential LLVM-IR constrained floating point compare intrinsics to the ARM instruction set. - Simply select vcmp, instead of vcmpe, see simple changes in lib/Target/ARM/ARMInstrVFP.td - Adapt lots of tests that tested for vcmpe (instead of vcmp). For all of these test, the intent of what is tested for isn't related to whether the vcmp should produce an Invalid Operation exception or not. Fixes PR43374. Differential Revision: https://reviews.llvm.org/D68463
  86. [Tools] Mark output of tools as text if it is text Several LLVM tools write text files/streams without using OF_Text. This can cause problems on platforms which distinguish between text and binary output. This PR adds the OF_Text flag for the following tools: - llvm-dis - llvm-dwarfdump - llvm-mca - llvm-mc (assembler files only) - opt (assembler files only) - RemarkStreamer (used e.g. by opt) Reviewers: rnk, vivekvpandya, Bigcheese, andreadb Differential Revision: https://reviews.llvm.org/D67696
  87. [LoopVectorize] Fix non-debug builds after rL374017
  88. [llvm-exegesis] Add stabilization test with config In preparation for D68629.
Revision 374139 by Jonas Devlieghere:
[dsymutil] Fix handling of common symbols in multiple object files.

For common symbols the linker emits only a single symbol entry in the
debug map. This caused dsymutil to not relocate common symbols when
linking DWARF coming form object files that did not have this entry.
This patch fixes that by keeping track of common symbols in the object
files and synthesizing a debug map entry for them using the address from
the main binary.

Differential revision: https://reviews.llvm.org/D68680
Change TypePath in RepositoryPath in Workspace
The file was added/llvm/trunk/test/tools/dsymutil/Inputs/privatellvm.src/test/tools/dsymutil/Inputs/private
The file was added/llvm/trunk/test/tools/dsymutil/Inputs/private/tmpllvm.src/test/tools/dsymutil/Inputs/private/tmp
The file was added/llvm/trunk/test/tools/dsymutil/Inputs/private/tmp/commonllvm.src/test/tools/dsymutil/Inputs/private/tmp/common
The file was added/llvm/trunk/test/tools/dsymutil/Inputs/private/tmp/common/comllvm.src/test/tools/dsymutil/Inputs/private/tmp/common/com
The file was added/llvm/trunk/test/tools/dsymutil/Inputs/private/tmp/common/com1.ollvm.src/test/tools/dsymutil/Inputs/private/tmp/common/com1.o
The file was added/llvm/trunk/test/tools/dsymutil/Inputs/private/tmp/common/com2.ollvm.src/test/tools/dsymutil/Inputs/private/tmp/common/com2.o
The file was added/llvm/trunk/test/tools/dsymutil/X86/common-sym-multi.testllvm.src/test/tools/dsymutil/X86/common-sym-multi.test
The file was modified/llvm/trunk/tools/dsymutil/MachODebugMapParser.cpp (diff)llvm.src/tools/dsymutil/MachODebugMapParser.cpp
Revision 374138 by Kristina Brooks:
[TypeSize] Fix module builds (cassert)

TypeSize.h uses `assert` statements without including
the <cassert> header first which leads to failures
in modular builds.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/Support/TypeSize.h (diff)llvm.src/include/llvm/Support/TypeSize.h
Revision 374137 by ericwf:
Optimize operator=(const basic_string&) for tail call.

Patch by Martijn Vels (mvels@google.com)
Reviewed as https://reviews.llvm.org/D68276

This is a non trivial win for externally templated assignment operator.

x86 without tail call (current libc++)

0000000000000000 <std::string::operator=(std::string const&)>:
   0:   55                      push   %rbp
   1:   48 89 e5                mov    %rsp,%rbp
   4:   53                      push   %rbx
   5:   50                      push   %rax
   6:   48 89 fb                mov    %rdi,%rbx
   9:   48 39 f7                cmp    %rsi,%rdi
   c:   74 17                   je     25 <std::string::operator=(std::string const&)+0x25>
   e:   0f b6 56 17             movzbl 0x17(%rsi),%edx
  12:   84 d2                   test   %dl,%dl
  14:   79 07                   jns    1d <std::string::operator=(std::string const&)+0x1d>
  16:   48 8b 56 08             mov    0x8(%rsi),%rdx
  1a:   48 8b 36                mov    (%rsi),%rsi
  1d:   48 89 df                mov    %rbx,%rdi
  20:   e8 00 00 00 00          callq  25 <std::string::operator=(std::string const&)+0x25>
  25:   48 89 d8                mov    %rbx,%rax
  28:   48 83 c4 08             add    $0x8,%rsp
  2c:   5b                      pop    %rbx
  2d:   5d                      pop    %rbp
  2e:   c3                      retq

After:

0000000000000000 <std::string::operator=(std::string const&)>:
   0:   48 39 f7                cmp    %rsi,%rdi
   3:   74 14                   je     19 <std::string::operator=(std::string const&)+0x19>
   5:   0f b6 56 17             movzbl 0x17(%rsi),%edx
   9:   84 d2                   test   %dl,%dl
   b:   79 07                   jns    14 <std::string::operator=(std::string const&)+0x14>
   d:   48 8b 56 08             mov    0x8(%rsi),%rdx
  11:   48 8b 36                mov    (%rsi),%rsi
  14:   e9 00 00 00 00          jmpq   19 <std::string::operator=(std::string const&)+0x19>
  19:   48 89 f8                mov    %rdi,%rax
  1c:   c3                      retq

Benchmark (pending per https://reviews.llvm.org/D67667)

```
BM_StringAssignStr_Empty_Opaque                     6.23ns ± 0%             5.19ns ± 0%  -16.70%          (p=0.016 n=5+4)
BM_StringAssignStr_Empty_Transparent                5.86ns ± 0%             5.14ns ± 0%  -12.24%          (p=0.008 n=5+5)
BM_StringAssignStr_Small_Opaque                     8.79ns ± 1%             7.69ns ± 0%  -12.53%          (p=0.008 n=5+5)
BM_StringAssignStr_Small_Transparent                9.44ns ± 0%             8.00ns ± 0%  -15.26%          (p=0.008 n=5+5)
BM_StringAssignStr_Large_Opaque                     25.2ns ± 0%             24.3ns ± 0%   -3.50%          (p=0.008 n=5+5)
BM_StringAssignStr_Large_Transparent                23.6ns ± 0%             22.5ns ± 0%   -4.76%          (p=0.008 n=5+5)
BM_StringAssignStr_Huge_Opaque                       319ns ± 5%              317ns ± 5%     ~             (p=0.690 n=5+5)
BM_StringAssignStr_Huge_Transparent                  319ns ± 5%              317ns ± 5%     ~             (p=0.421 n=5+5)
BM_StringAssignAsciiz_Empty_Opaque                  7.41ns ± 0%             7.77ns ± 0%   +4.89%          (p=0.008 n=5+5)
BM_StringAssignAsciiz_Empty_Transparent             7.54ns ± 3%             7.30ns ± 0%   -3.24%          (p=0.008 n=5+5)
BM_StringAssignAsciiz_Small_Opaque                  9.87ns ± 0%            10.24ns ± 1%   +3.76%          (p=0.008 n=5+5)
BM_StringAssignAsciiz_Small_Transparent             10.4ns ± 1%              9.8ns ± 2%   -5.78%          (p=0.008 n=5+5)
BM_StringAssignAsciiz_Large_Opaque                  30.1ns ± 0%             30.1ns ± 0%     ~             (p=0.167 n=5+5)
BM_StringAssignAsciiz_Large_Transparent             27.1ns ± 0%             27.4ns ± 0%   +0.92%          (p=0.016 n=4+5)
BM_StringAssignAsciiz_Huge_Opaque                    383ns ± 4%              382ns ± 4%     ~             (p=0.548 n=5+5)
BM_StringAssignAsciiz_Huge_Transparent               375ns ± 0%              380ns ± 0%   +1.37%          (p=0.029 n=4+4)
BM_StringAssignAsciizMix_Opaque                     14.0ns ± 0%             14.0ns ± 0%     ~             (p=0.881 n=5+5)
BM_StringAssignAsciizMix_Transparent                13.7ns ± 1%             13.8ns ± 0%     ~             (p=0.056 n=5+5)
```
Change TypePath in RepositoryPath in Workspace
The file was modified/libcxx/trunk/include/string (diff)libcxx.src/include/string
Revision 374135 by rsmith:
[c++20] P1152R4: warn on any simple-assignment to a volatile lvalue
whose value is not ignored.

We don't warn on all the cases that are deprecated: specifically, we
choose to not warn for now if there are parentheses around the
assignment but its value is not actually used. This seems like a more
defensible rule, particularly for cases like sizeof(v = a), where the
parens are part of the operand rather than the sizeof syntax.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (diff)clang.src/include/clang/Basic/DiagnosticSemaKinds.td
The file was modified/cfe/trunk/include/clang/Sema/Sema.h (diff)clang.src/include/clang/Sema/Sema.h
The file was modified/cfe/trunk/lib/Sema/SemaExpr.cpp (diff)clang.src/lib/Sema/SemaExpr.cpp
The file was modified/cfe/trunk/lib/Sema/SemaExprCXX.cpp (diff)clang.src/lib/Sema/SemaExprCXX.cpp
The file was modified/cfe/trunk/test/SemaCXX/deprecated.cpp (diff)clang.src/test/SemaCXX/deprecated.cpp
The file was modified/cfe/trunk/www/cxx_status.html (diff)clang.src/www/cxx_status.html
Revision 374133 by rsmith:
[c++20] Implement most of P1152R4.

Diagnose some now-deprecated uses of volatile types:
* as function parameter types and return types
* as the type of a structured binding declaration
* as the type of the lvalue operand of an increment / decrement /
   compound assignment operator

This does not implement a check for the deprecation of simple
assignments whose results are used; that check requires somewhat
more complexity and will be addressed separately.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/Basic/DiagnosticGroups.td (diff)clang.src/include/clang/Basic/DiagnosticGroups.td
The file was modified/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (diff)clang.src/include/clang/Basic/DiagnosticSemaKinds.td
The file was modified/cfe/trunk/lib/Sema/SemaDeclCXX.cpp (diff)clang.src/lib/Sema/SemaDeclCXX.cpp
The file was modified/cfe/trunk/lib/Sema/SemaExpr.cpp (diff)clang.src/lib/Sema/SemaExpr.cpp
The file was modified/cfe/trunk/lib/Sema/SemaType.cpp (diff)clang.src/lib/Sema/SemaType.cpp
The file was modified/cfe/trunk/test/SemaCXX/deprecated.cpp (diff)clang.src/test/SemaCXX/deprecated.cpp
The file was modified/cfe/trunk/www/cxx_status.html (diff)clang.src/www/cxx_status.html
Revision 374131 by rsmith:
[cxx_status] Note that Clang has supported std::source_location since
version 9.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/www/cxx_status.html (diff)clang.src/www/cxx_status.html
Revision 374130 by rsmith:
Factor out some duplication. NFC.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/AST/ExprConstant.cpp (diff)clang.src/lib/AST/ExprConstant.cpp
Revision 374129 by nico:
gn build: unbreak libcxx build after r374116 by restoring gen_link_script.py for gn
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/utils/gn/secondary/libcxx/src/BUILD.gn (diff)llvm.src/utils/gn/secondary/libcxx/src/BUILD.gn
The file was added/llvm/trunk/utils/gn/secondary/libcxx/utilsllvm.src/utils/gn/secondary/libcxx/utils
The file was added/llvm/trunk/utils/gn/secondary/libcxx/utils/gen_link_script.pyllvm.src/utils/gn/secondary/libcxx/utils/gen_link_script.py
Revision 374128 by dr87:
[Docs] Fixes broken sphinx build - undefined label

Removes label ref pointing to non-existent subsystem docs page.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/docs/Contributing.rst (diff)llvm.src/docs/Contributing.rst
Revision 374127 by arphaman:
[clang-scan-deps] Improve string/character literal skipping

The existing string/character literal skipping code in the
dependency directives source minimizer has two issues:

- It doesn't stop the scanning when a newline is reached before the terminating character,
unlike the lexer which considers the token to be done (even if it's invalid) at the end of the line.

- It doesn't support whitespace between '\' and the newline when looking if the '\' is used as a line continuation character.

This commit fixes both issues.

Differential Revision: https://reviews.llvm.org/D68436
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/Lex/DependencyDirectivesSourceMinimizer.cpp (diff)clang.src/lib/Lex/DependencyDirectivesSourceMinimizer.cpp
The file was modified/cfe/trunk/unittests/Lex/DependencyDirectivesSourceMinimizerTest.cpp (diff)clang.src/unittests/Lex/DependencyDirectivesSourceMinimizerTest.cpp
Revision 374126 by thegameg:
[IRGen] Emit lifetime markers for temporary struct allocas

When passing arguments using temporary allocas, we need to add the
appropriate lifetime markers so that the stack coloring passes can
re-use the stack space.

This patch keeps track of all the lifetime.start calls emited before the
codegened call, and adds the corresponding lifetime.end calls after the
call.

Differential Revision: https://reviews.llvm.org/D68611
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/CodeGen/CGCall.cpp (diff)clang.src/lib/CodeGen/CGCall.cpp
The file was added/cfe/trunk/test/CodeGen/aarch64-byval-temp.cclang.src/test/CodeGen/aarch64-byval-temp.c
Revision 374125 by Vitaly Buka:
[sanitizer] Fix crypt.cpp on Android again
Change TypePath in RepositoryPath in Workspace
The file was modified/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/crypt.cpp (diff)compiler-rt.src/test/sanitizer_common/TestCases/Posix/crypt.cpp
The file was modified/compiler-rt/trunk/test/sanitizer_common/lit.common.cfg.py (diff)compiler-rt.src/test/sanitizer_common/lit.common.cfg.py
Revision 374124 by void:
[IA] Add tests for a few other edge cases

Test with the last eight bits within the range [7F, FF] and with
lower-case hex letters.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/MC/AsmParser/directive_ascii.s (diff)llvm.src/test/MC/AsmParser/directive_ascii.s
Revision 374123 by Jonas Devlieghere:
[dsymutil] Improve verbose output (NFC)

The verbose output for finding relocations assumed that we'd always dump
the DIE after (which starts with a newline) and therefore didn't include
one itself. However, this isn't always true, leading to garbled output.

This patch adds a newline to the verbose output and adds a line that
says that the DIE is being kept (which isn't obvious otherwise). It also
adds a 0x prefix to the relocations.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/tools/dsymutil/basic-linking.test (diff)llvm.src/test/tools/dsymutil/basic-linking.test
The file was modified/llvm/trunk/tools/dsymutil/DwarfLinker.cpp (diff)llvm.src/tools/dsymutil/DwarfLinker.cpp
Revision 374122 by dblaikie:
DebugInfo: Move LLE enum handling to .def to match RLE handling
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/BinaryFormat/Dwarf.def (diff)llvm.src/include/llvm/BinaryFormat/Dwarf.def
The file was modified/llvm/trunk/include/llvm/BinaryFormat/Dwarf.h (diff)llvm.src/include/llvm/BinaryFormat/Dwarf.h
The file was modified/llvm/trunk/lib/BinaryFormat/Dwarf.cpp (diff)llvm.src/lib/BinaryFormat/Dwarf.cpp
The file was modified/llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp (diff)llvm.src/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
Revision 374120 by Louis Dionne:
[libc++] Workaround old versions of CMake that don't understand list(JOIN)
Change TypePath in RepositoryPath in Workspace
The file was modified/libcxx/trunk/cmake/Modules/DefineLinkerScript.cmake (diff)libcxx.src/cmake/Modules/DefineLinkerScript.cmake
Revision 374119 by rsmith:
Fix crash or wrong code bug if a lifetime-extended temporary contains a
"non-constant" value.

If the constant evaluator evaluates part of a variable initializer,
including the initializer for some lifetime-extended temporary, but
fails to fully evaluate the initializer, it can leave behind wrong
values for temporaries encountered in that initialization. Don't try to
emit those from CodeGen! Instead, look at the values that constant
evaluation produced if (and only if) it actually succeeds and we're
emitting the lifetime-extending declaration's initializer as a constant.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/AST/ExprConstant.cpp (diff)clang.src/lib/AST/ExprConstant.cpp
The file was modified/cfe/trunk/lib/CodeGen/CodeGenModule.cpp (diff)clang.src/lib/CodeGen/CodeGenModule.cpp
The file was added/cfe/trunk/test/CodeGenCXX/no-const-init-cxx2a.cppclang.src/test/CodeGenCXX/no-const-init-cxx2a.cpp
Revision 374116 by Louis Dionne:
[libc++] Move the linker script generation step to CMake

Summary:
This allows the linker script generation to query CMake properties
(specifically the dependencies of libc++.so) instead of having to
carry these dependencies around manually in global variables. Notice
the removal of the LIBCXX_INTERFACE_LIBRARIES global variable.

Reviewers: phosek, EricWF

Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits

Tags: #libc

Differential Revision: https://reviews.llvm.org/D68343
Change TypePath in RepositoryPath in Workspace
The file was modified/libcxx/trunk/CMakeLists.txt (diff)libcxx.src/CMakeLists.txt
The file was added/libcxx/trunk/cmake/Modules/DefineLinkerScript.cmakelibcxx.src/cmake/Modules/DefineLinkerScript.cmake
The file was modified/libcxx/trunk/src/CMakeLists.txt (diff)libcxx.src/src/CMakeLists.txt
The file was removed/libcxx/trunk/utils/gen_link_script.pylibcxx.src/utils/gen_link_script.py
Revision 374115 by Vitaly Buka:
[sanitizer] Fix crypt.cpp test on Darwin
Change TypePath in RepositoryPath in Workspace
The file was modified/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/crypt.cpp (diff)compiler-rt.src/test/sanitizer_common/TestCases/Posix/crypt.cpp
The file was modified/compiler-rt/trunk/test/sanitizer_common/lit.common.cfg.py (diff)compiler-rt.src/test/sanitizer_common/lit.common.cfg.py
Revision 374113 by Vitaly Buka:
[clang] enable_trivial_var_init_zero should not be Joined<>

Reviewers: rnk

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D68610
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/Driver/Options.td (diff)clang.src/include/clang/Driver/Options.td
Revision 374112 by lebedevri:
[CVP} Replace SExt with ZExt if the input is known-non-negative

Summary:
zero-extension is far more friendly for further analysis.
While this doesn't directly help with the shift-by-signext problem, this is not unrelated.

This has the following effect on test-suite (numbers collected after the finish of middle-end module pass manager):
| Statistic                            |     old |     new | delta | percent change |
| correlated-value-propagation.NumSExt |       0 |    6026 |  6026 |   +100.00%     |
| instcount.NumAddInst                 |  272860 |  271283 | -1577 |     -0.58%     |
| instcount.NumAllocaInst              |   27227 |   27226 | -1    |      0.00%     |
| instcount.NumAndInst                 |   63502 |   63320 | -182  |     -0.29%     |
| instcount.NumAShrInst                |   13498 |   13407 | -91   |     -0.67%     |
| instcount.NumAtomicCmpXchgInst       |    1159 |    1159 |  0    |      0.00%     |
| instcount.NumAtomicRMWInst           |    5036 |    5036 |  0    |      0.00%     |
| instcount.NumBitCastInst             |  672482 |  672353 | -129  |     -0.02%     |
| instcount.NumBrInst                  |  702768 |  702195 | -573  |     -0.08%     |
| instcount.NumCallInst                |  518285 |  518205 | -80   |     -0.02%     |
| instcount.NumExtractElementInst      |   18481 |   18482 |  1    |      0.01%     |
| instcount.NumExtractValueInst        |   18290 |   18288 | -2    |     -0.01%     |
| instcount.NumFAddInst                |  139035 |  138963 | -72   |     -0.05%     |
| instcount.NumFCmpInst                |   10358 |   10348 | -10   |     -0.10%     |
| instcount.NumFDivInst                |   30310 |   30302 | -8    |     -0.03%     |
| instcount.NumFenceInst               |     387 |     387 |  0    |      0.00%     |
| instcount.NumFMulInst                |   93873 |   93806 | -67   |     -0.07%     |
| instcount.NumFPExtInst               |    7148 |    7144 | -4    |     -0.06%     |
| instcount.NumFPToSIInst              |    2823 |    2838 |  15   |      0.53%     |
| instcount.NumFPToUIInst              |    1251 |    1251 |  0    |      0.00%     |
| instcount.NumFPTruncInst             |    2195 |    2191 | -4    |     -0.18%     |
| instcount.NumFSubInst                |   92109 |   92103 | -6    |     -0.01%     |
| instcount.NumGetElementPtrInst       | 1221423 | 1219157 | -2266 |     -0.19%     |
| instcount.NumICmpInst                |  479140 |  478929 | -211  |     -0.04%     |
| instcount.NumIndirectBrInst          |       2 |       2 |  0    |      0.00%     |
| instcount.NumInsertElementInst       |   66089 |   66094 |  5    |      0.01%     |
| instcount.NumInsertValueInst         |    2032 |    2030 | -2    |     -0.10%     |
| instcount.NumIntToPtrInst            |   19641 |   19641 |  0    |      0.00%     |
| instcount.NumInvokeInst              |   21789 |   21788 | -1    |      0.00%     |
| instcount.NumLandingPadInst          |   12051 |   12051 |  0    |      0.00%     |
| instcount.NumLoadInst                |  880079 |  878673 | -1406 |     -0.16%     |
| instcount.NumLShrInst                |   25919 |   25921 |  2    |      0.01%     |
| instcount.NumMulInst                 |   42416 |   42417 |  1    |      0.00%     |
| instcount.NumOrInst                  |  100826 |  100576 | -250  |     -0.25%     |
| instcount.NumPHIInst                 |  315118 |  314092 | -1026 |     -0.33%     |
| instcount.NumPtrToIntInst            |   15933 |   15939 |  6    |      0.04%     |
| instcount.NumResumeInst              |    2156 |    2156 |  0    |      0.00%     |
| instcount.NumRetInst                 |   84485 |   84484 | -1    |      0.00%     |
| instcount.NumSDivInst                |    8599 |    8597 | -2    |     -0.02%     |
| instcount.NumSelectInst              |   45577 |   45913 |  336  |      0.74%     |
| instcount.NumSExtInst                |   84026 |   78278 | -5748 |     -6.84%     |
| instcount.NumShlInst                 |   39796 |   39726 | -70   |     -0.18%     |
| instcount.NumShuffleVectorInst       |  100272 |  100292 |  20   |      0.02%     |
| instcount.NumSIToFPInst              |   29131 |   29113 | -18   |     -0.06%     |
| instcount.NumSRemInst                |    1543 |    1543 |  0    |      0.00%     |
| instcount.NumStoreInst               |  805394 |  804351 | -1043 |     -0.13%     |
| instcount.NumSubInst                 |   61337 |   61414 |  77   |      0.13%     |
| instcount.NumSwitchInst              |    8527 |    8524 | -3    |     -0.04%     |
| instcount.NumTruncInst               |   60523 |   60484 | -39   |     -0.06%     |
| instcount.NumUDivInst                |    2381 |    2381 |  0    |      0.00%     |
| instcount.NumUIToFPInst              |    5549 |    5549 |  0    |      0.00%     |
| instcount.NumUnreachableInst         |    9855 |    9855 |  0    |      0.00%     |
| instcount.NumURemInst                |    1305 |    1305 |  0    |      0.00%     |
| instcount.NumXorInst                 |   10230 |   10081 | -149  |     -1.46%     |
| instcount.NumZExtInst                |   60353 |   66840 |  6487 |     10.75%     |
| instcount.TotalBlocks                |  829582 |  829004 | -578  |     -0.07%     |
| instcount.TotalFuncs                 |   83818 |   83817 | -1    |      0.00%     |
| instcount.TotalInsts                 | 7316574 | 7308483 | -8091 |     -0.11%     |

TLDR: we produce -0.11% less instructions, -6.84% less `sext`, +10.75% more `zext`.
To be noted, clearly, not all new `zext`'s are produced by this fold.

(And now i guess it might have been interesting to measure this for D68103 :S)

Reviewers: nikic, spatel, reames, dberlin

Reviewed By: nikic

Subscribers: hiraditya, jfb, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68654
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp (diff)llvm.src/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
The file was modified/llvm/trunk/test/Transforms/CorrelatedValuePropagation/sext.ll (diff)llvm.src/test/Transforms/CorrelatedValuePropagation/sext.ll
Revision 374111 by lebedevri:
[CVP][NFC] Revisit sext vs. zext test
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/Transforms/CorrelatedValuePropagation/sext.ll (diff)llvm.src/test/Transforms/CorrelatedValuePropagation/sext.ll
Revision 374110 by Vitaly Buka:
[clang] Add llvm-ifs in test deps
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/test/CMakeLists.txt (diff)clang.src/test/CMakeLists.txt
Revision 374109 by delcypher:
Fix `compiler_rt_logbf_test.c` test failure for Builtins-i386-darwin test suite.

Summary:
It seems that compiler-rt's implementation and Darwin
libm's implementation of `logbf()` differ when given a NaN
with raised sign bit. Strangely this behaviour only happens with
i386 Darwin libm. For x86_64 and x86_64h the existing compiler-rt
implementation matched Darwin libm.

To workaround this the `compiler_rt_logbf_test.c` has been modified
to do a comparison on the `fp_t` type and if that fails check if both
values are NaN. If both values are NaN they are equivalent and no
error needs to be raised.

rdar://problem/55565503

Reviewers: rupprecht, scanon, compnerd, echristo
Subscribers: #sanitizers, llvm-commits
Tags: #llvm, #sanitizers
Differential Revision: https://reviews.llvm.org/D67999
Change TypePath in RepositoryPath in Workspace
The file was modified/compiler-rt/trunk/test/builtins/Unit/compiler_rt_logbf_test.c (diff)compiler-rt.src/test/builtins/Unit/compiler_rt_logbf_test.c
Revision 374107 by abataev:
[OPENMP50]Multiple vendors in vendor context must be treated as logical
and of vendors, not or.

If several vendors are provided in the same vendor context trait, the
context shall match only if all vendors are matching, not one of them.
This is per OpenMP 5.0, 2.3.3 Matching and Scoring Context Selectors,
all selectors in the construct, device, and implementation sets of the
context selector appear in the corresponding trait set of the OpenMP
context.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/Basic/Attr.td (diff)clang.src/include/clang/Basic/Attr.td
The file was modified/cfe/trunk/include/clang/Sema/Sema.h (diff)clang.src/include/clang/Sema/Sema.h
The file was modified/cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp (diff)clang.src/lib/CodeGen/CGOpenMPRuntime.cpp
The file was modified/cfe/trunk/lib/Parse/ParseOpenMP.cpp (diff)clang.src/lib/Parse/ParseOpenMP.cpp
The file was modified/cfe/trunk/lib/Sema/SemaOpenMP.cpp (diff)clang.src/lib/Sema/SemaOpenMP.cpp
The file was modified/cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp (diff)clang.src/lib/Sema/SemaTemplateInstantiateDecl.cpp
The file was modified/cfe/trunk/test/OpenMP/declare_variant_ast_print.c (diff)clang.src/test/OpenMP/declare_variant_ast_print.c
The file was modified/cfe/trunk/test/OpenMP/declare_variant_ast_print.cpp (diff)clang.src/test/OpenMP/declare_variant_ast_print.cpp
The file was modified/cfe/trunk/test/OpenMP/declare_variant_implementation_vendor_codegen.cpp (diff)clang.src/test/OpenMP/declare_variant_implementation_vendor_codegen.cpp
Revision 374105 by nico:
Try to get ubsan-blacklist-vfs.c pass more on Windows
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/test/CodeGen/ubsan-blacklist-vfs.c (diff)clang.src/test/CodeGen/ubsan-blacklist-vfs.c
Revision 374103 by nico:
Try to get readability-deleted-default.cpp to pass on Windows.

In MS compatibility mode, "extern inline void g()" is not a redundant
declaration for "inline void g()", because of redeclForcesDefMSVC()
(see PR19264, r205485).

To fix, run the test with -fms-compatiblity forced on and off
and explicit check for the differing behavior for extern inline.

Final bit of PR43593.

Differential Revision: https://reviews.llvm.org/D68640
Change TypePath in RepositoryPath in Workspace
The file was modified/clang-tools-extra/trunk/test/clang-tidy/readability-redundant-declaration.cpp (diff)clang-tools-extra.src/test/clang-tidy/readability-redundant-declaration.cpp
Revision 374102 by jrose:
Mark several PointerIntPair methods as lvalue-only

No point in mutating 'this' if it's just going to be thrown away.

https://reviews.llvm.org/D63945
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/ADT/PointerIntPair.h (diff)llvm.src/include/llvm/ADT/PointerIntPair.h
Revision 374101 by dsanders:
[tblgen] Add getOperatorAsDef() to Record

Summary:
While working with DagInit's, it's often the case that you expect the
operator to be a reference to a def. This patch adds a wrapper for this
common case to reduce the amount of boilerplate callers need to duplicate
repeatedly.

getOperatorAsDef() returns the record if the DagInit has an operator that is
a DefInit. Otherwise, it prints a fatal error.

There's only a few pre-existing examples in LLVM at the moment and I've
left a few instances of the code this simplifies as they had more specific
error messages than the generic one this produces. I'm going to be using
this a fair bit in my subsequent patches.

Reviewers: bogner, volkan, nhaehnle

Reviewed By: nhaehnle

Subscribers: nhaehnle, hiraditya, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, lenary, s.egerton, pzheng, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68424
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/TableGen/Record.h (diff)llvm.src/include/llvm/TableGen/Record.h
The file was modified/llvm/trunk/lib/TableGen/Record.cpp (diff)llvm.src/lib/TableGen/Record.cpp
The file was modified/llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp (diff)llvm.src/utils/TableGen/AsmWriterEmitter.cpp
The file was modified/llvm/trunk/utils/TableGen/RISCVCompressInstEmitter.cpp (diff)llvm.src/utils/TableGen/RISCVCompressInstEmitter.cpp
Revision 374099 by yhs:
[BPF] do compile-once run-everywhere relocation for bitfields

A bpf specific clang intrinsic is introduced:
   u32 __builtin_preserve_field_info(member_access, info_kind)
Depending on info_kind, different information will
be returned to the program. A relocation is also
recorded for this builtin so that bpf loader can
patch the instruction on the target host.
This clang intrinsic is used to get certain information
to facilitate struct/union member relocations.

The offset relocation is extended by 4 bytes to
include relocation kind.
Currently supported relocation kinds are
enum {
    FIELD_BYTE_OFFSET = 0,
    FIELD_BYTE_SIZE,
    FIELD_EXISTENCE,
    FIELD_SIGNEDNESS,
    FIELD_LSHIFT_U64,
    FIELD_RSHIFT_U64,
};
for __builtin_preserve_field_info. The old
access offset relocation is covered by
    FIELD_BYTE_OFFSET = 0.

An example:
struct s {
    int a;
    int b1:9;
    int b2:4;
};
enum {
    FIELD_BYTE_OFFSET = 0,
    FIELD_BYTE_SIZE,
    FIELD_EXISTENCE,
    FIELD_SIGNEDNESS,
    FIELD_LSHIFT_U64,
    FIELD_RSHIFT_U64,
};

void bpf_probe_read(void *, unsigned, const void *);
int field_read(struct s *arg) {
  unsigned long long ull = 0;
  unsigned offset = __builtin_preserve_field_info(arg->b2, FIELD_BYTE_OFFSET);
  unsigned size = __builtin_preserve_field_info(arg->b2, FIELD_BYTE_SIZE);
#ifdef USE_PROBE_READ
  bpf_probe_read(&ull, size, (const void *)arg + offset);
  unsigned lshift = __builtin_preserve_field_info(arg->b2, FIELD_LSHIFT_U64);
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
  lshift = lshift + (size << 3) - 64;
#endif
#else
  switch(size) {
  case 1:
    ull = *(unsigned char *)((void *)arg + offset); break;
  case 2:
    ull = *(unsigned short *)((void *)arg + offset); break;
  case 4:
    ull = *(unsigned int *)((void *)arg + offset); break;
  case 8:
    ull = *(unsigned long long *)((void *)arg + offset); break;
  }
  unsigned lshift = __builtin_preserve_field_info(arg->b2, FIELD_LSHIFT_U64);
#endif
  ull <<= lshift;
  if (__builtin_preserve_field_info(arg->b2, FIELD_SIGNEDNESS))
    return (long long)ull >> __builtin_preserve_field_info(arg->b2, FIELD_RSHIFT_U64);
  return ull >> __builtin_preserve_field_info(arg->b2, FIELD_RSHIFT_U64);
}

There is a minor overhead for bpf_probe_read() on big endian.

The code and relocation generated for field_read where bpf_probe_read() is
used to access argument data on little endian mode:
        r3 = r1
        r1 = 0
        r1 = 4  <=== relocation (FIELD_BYTE_OFFSET)
        r3 += r1
        r1 = r10
        r1 += -8
        r2 = 4  <=== relocation (FIELD_BYTE_SIZE)
        call bpf_probe_read
        r2 = 51 <=== relocation (FIELD_LSHIFT_U64)
        r1 = *(u64 *)(r10 - 8)
        r1 <<= r2
        r2 = 60 <=== relocation (FIELD_RSHIFT_U64)
        r0 = r1
        r0 >>= r2
        r3 = 1  <=== relocation (FIELD_SIGNEDNESS)
        if r3 == 0 goto LBB0_2
        r1 s>>= r2
        r0 = r1
LBB0_2:
        exit

Compare to the above code between relocations FIELD_LSHIFT_U64 and
FIELD_LSHIFT_U64, the code with big endian mode has four more
instructions.
        r1 = 41   <=== relocation (FIELD_LSHIFT_U64)
        r6 += r1
        r6 += -64
        r6 <<= 32
        r6 >>= 32
        r1 = *(u64 *)(r10 - 8)
        r1 <<= r6
        r2 = 60   <=== relocation (FIELD_RSHIFT_U64)

The code and relocation generated when using direct load.
        r2 = 0
        r3 = 4
        r4 = 4
        if r4 s> 3 goto LBB0_3
        if r4 == 1 goto LBB0_5
        if r4 == 2 goto LBB0_6
        goto LBB0_9
LBB0_6:                                 # %sw.bb1
        r1 += r3
        r2 = *(u16 *)(r1 + 0)
        goto LBB0_9
LBB0_3:                                 # %entry
        if r4 == 4 goto LBB0_7
        if r4 == 8 goto LBB0_8
        goto LBB0_9
LBB0_8:                                 # %sw.bb9
        r1 += r3
        r2 = *(u64 *)(r1 + 0)
        goto LBB0_9
LBB0_5:                                 # %sw.bb
        r1 += r3
        r2 = *(u8 *)(r1 + 0)
        goto LBB0_9
LBB0_7:                                 # %sw.bb5
        r1 += r3
        r2 = *(u32 *)(r1 + 0)
LBB0_9:                                 # %sw.epilog
        r1 = 51
        r2 <<= r1
        r1 = 60
        r0 = r2
        r0 >>= r1
        r3 = 1
        if r3 == 0 goto LBB0_11
        r2 s>>= r1
        r0 = r2
LBB0_11:                                # %sw.epilog
        exit

Considering verifier is able to do limited constant
propogation following branches. The following is the
code actually traversed.
        r2 = 0
        r3 = 4   <=== relocation
        r4 = 4   <=== relocation
        if r4 s> 3 goto LBB0_3
LBB0_3:                                 # %entry
        if r4 == 4 goto LBB0_7
LBB0_7:                                 # %sw.bb5
        r1 += r3
        r2 = *(u32 *)(r1 + 0)
LBB0_9:                                 # %sw.epilog
        r1 = 51   <=== relocation
        r2 <<= r1
        r1 = 60   <=== relocation
        r0 = r2
        r0 >>= r1
        r3 = 1
        if r3 == 0 goto LBB0_11
        r2 s>>= r1
        r0 = r2
LBB0_11:                                # %sw.epilog
        exit

For native load case, the load size is calculated to be the
same as the size of load width LLVM otherwise used to load
the value which is then used to extract the bitfield value.

Differential Revision: https://reviews.llvm.org/D67980
Change TypePath in RepositoryPath in Workspace
The file was added/cfe/trunk/include/clang/Basic/BuiltinsBPF.defclang.src/include/clang/Basic/BuiltinsBPF.def
The file was modified/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (diff)clang.src/include/clang/Basic/DiagnosticSemaKinds.td
The file was modified/cfe/trunk/include/clang/Basic/TargetBuiltins.h (diff)clang.src/include/clang/Basic/TargetBuiltins.h
The file was modified/cfe/trunk/include/clang/Sema/Sema.h (diff)clang.src/include/clang/Sema/Sema.h
The file was modified/cfe/trunk/include/clang/module.modulemap (diff)clang.src/include/clang/module.modulemap
The file was modified/cfe/trunk/lib/Basic/Targets/BPF.cpp (diff)clang.src/lib/Basic/Targets/BPF.cpp
The file was modified/cfe/trunk/lib/Basic/Targets/BPF.h (diff)clang.src/lib/Basic/Targets/BPF.h
The file was modified/cfe/trunk/lib/CodeGen/CGBuiltin.cpp (diff)clang.src/lib/CodeGen/CGBuiltin.cpp
The file was modified/cfe/trunk/lib/CodeGen/CGExpr.cpp (diff)clang.src/lib/CodeGen/CGExpr.cpp
The file was modified/cfe/trunk/lib/CodeGen/CodeGenFunction.h (diff)clang.src/lib/CodeGen/CodeGenFunction.h
The file was modified/cfe/trunk/lib/Sema/SemaChecking.cpp (diff)clang.src/lib/Sema/SemaChecking.cpp
The file was added/cfe/trunk/test/CodeGen/builtins-bpf-preserve-field-info-1.cclang.src/test/CodeGen/builtins-bpf-preserve-field-info-1.c
The file was added/cfe/trunk/test/CodeGen/builtins-bpf-preserve-field-info-2.cclang.src/test/CodeGen/builtins-bpf-preserve-field-info-2.c
The file was added/cfe/trunk/test/Sema/builtins-bpf.cclang.src/test/Sema/builtins-bpf.c
The file was modified/llvm/trunk/include/llvm/IR/IntrinsicsBPF.td (diff)llvm.src/include/llvm/IR/IntrinsicsBPF.td
The file was modified/llvm/trunk/lib/Target/BPF/BPF.h (diff)llvm.src/lib/Target/BPF/BPF.h
The file was modified/llvm/trunk/lib/Target/BPF/BPFAbstractMemberAccess.cpp (diff)llvm.src/lib/Target/BPF/BPFAbstractMemberAccess.cpp
The file was modified/llvm/trunk/lib/Target/BPF/BPFCORE.h (diff)llvm.src/lib/Target/BPF/BPFCORE.h
The file was modified/llvm/trunk/lib/Target/BPF/BPFTargetMachine.cpp (diff)llvm.src/lib/Target/BPF/BPFTargetMachine.cpp
The file was modified/llvm/trunk/lib/Target/BPF/BTF.h (diff)llvm.src/lib/Target/BPF/BTF.h
The file was modified/llvm/trunk/lib/Target/BPF/BTFDebug.cpp (diff)llvm.src/lib/Target/BPF/BTFDebug.cpp
The file was modified/llvm/trunk/lib/Target/BPF/BTFDebug.h (diff)llvm.src/lib/Target/BPF/BTFDebug.h
The file was modified/llvm/trunk/test/CodeGen/BPF/CORE/intrinsic-array.ll (diff)llvm.src/test/CodeGen/BPF/CORE/intrinsic-array.ll
The file was added/llvm/trunk/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-byte-size-1.llllvm.src/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-byte-size-1.ll
The file was added/llvm/trunk/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-byte-size-2.llllvm.src/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-byte-size-2.ll
The file was added/llvm/trunk/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-byte-size-3.llllvm.src/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-byte-size-3.ll
The file was added/llvm/trunk/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-existence-1.llllvm.src/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-existence-1.ll
The file was added/llvm/trunk/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-existence-2.llllvm.src/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-existence-2.ll
The file was added/llvm/trunk/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-existence-3.llllvm.src/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-existence-3.ll
The file was added/llvm/trunk/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-lshift-1.llllvm.src/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-lshift-1.ll
The file was added/llvm/trunk/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-lshift-2.llllvm.src/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-lshift-2.ll
The file was added/llvm/trunk/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-rshift-1.llllvm.src/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-rshift-1.ll
The file was added/llvm/trunk/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-rshift-2.llllvm.src/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-rshift-2.ll
The file was added/llvm/trunk/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-rshift-3.llllvm.src/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-rshift-3.ll
The file was added/llvm/trunk/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-signedness-1.llllvm.src/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-signedness-1.ll
The file was added/llvm/trunk/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-signedness-2.llllvm.src/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-signedness-2.ll
The file was added/llvm/trunk/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-signedness-3.llllvm.src/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-signedness-3.ll
The file was modified/llvm/trunk/test/CodeGen/BPF/CORE/intrinsic-struct.ll (diff)llvm.src/test/CodeGen/BPF/CORE/intrinsic-struct.ll
The file was modified/llvm/trunk/test/CodeGen/BPF/CORE/intrinsic-union.ll (diff)llvm.src/test/CodeGen/BPF/CORE/intrinsic-union.ll
The file was modified/llvm/trunk/test/CodeGen/BPF/CORE/offset-reloc-access-str.ll (diff)llvm.src/test/CodeGen/BPF/CORE/offset-reloc-access-str.ll
The file was modified/llvm/trunk/test/CodeGen/BPF/CORE/offset-reloc-basic.ll (diff)llvm.src/test/CodeGen/BPF/CORE/offset-reloc-basic.ll
The file was modified/llvm/trunk/test/CodeGen/BPF/CORE/offset-reloc-cast-array-1.ll (diff)llvm.src/test/CodeGen/BPF/CORE/offset-reloc-cast-array-1.ll
The file was modified/llvm/trunk/test/CodeGen/BPF/CORE/offset-reloc-cast-array-2.ll (diff)llvm.src/test/CodeGen/BPF/CORE/offset-reloc-cast-array-2.ll
The file was modified/llvm/trunk/test/CodeGen/BPF/CORE/offset-reloc-cast-struct-1.ll (diff)llvm.src/test/CodeGen/BPF/CORE/offset-reloc-cast-struct-1.ll
The file was modified/llvm/trunk/test/CodeGen/BPF/CORE/offset-reloc-cast-struct-2.ll (diff)llvm.src/test/CodeGen/BPF/CORE/offset-reloc-cast-struct-2.ll
The file was modified/llvm/trunk/test/CodeGen/BPF/CORE/offset-reloc-cast-struct-3.ll (diff)llvm.src/test/CodeGen/BPF/CORE/offset-reloc-cast-struct-3.ll
The file was modified/llvm/trunk/test/CodeGen/BPF/CORE/offset-reloc-cast-union-1.ll (diff)llvm.src/test/CodeGen/BPF/CORE/offset-reloc-cast-union-1.ll
The file was modified/llvm/trunk/test/CodeGen/BPF/CORE/offset-reloc-cast-union-2.ll (diff)llvm.src/test/CodeGen/BPF/CORE/offset-reloc-cast-union-2.ll
The file was modified/llvm/trunk/test/CodeGen/BPF/CORE/offset-reloc-end-load.ll (diff)llvm.src/test/CodeGen/BPF/CORE/offset-reloc-end-load.ll
The file was modified/llvm/trunk/test/CodeGen/BPF/CORE/offset-reloc-end-ret.ll (diff)llvm.src/test/CodeGen/BPF/CORE/offset-reloc-end-ret.ll
The file was added/llvm/trunk/test/CodeGen/BPF/CORE/offset-reloc-fieldinfo-1.llllvm.src/test/CodeGen/BPF/CORE/offset-reloc-fieldinfo-1.ll
The file was added/llvm/trunk/test/CodeGen/BPF/CORE/offset-reloc-fieldinfo-2.llllvm.src/test/CodeGen/BPF/CORE/offset-reloc-fieldinfo-2.ll
The file was modified/llvm/trunk/test/CodeGen/BPF/CORE/offset-reloc-global-1.ll (diff)llvm.src/test/CodeGen/BPF/CORE/offset-reloc-global-1.ll
The file was modified/llvm/trunk/test/CodeGen/BPF/CORE/offset-reloc-global-2.ll (diff)llvm.src/test/CodeGen/BPF/CORE/offset-reloc-global-2.ll
The file was modified/llvm/trunk/test/CodeGen/BPF/CORE/offset-reloc-global-3.ll (diff)llvm.src/test/CodeGen/BPF/CORE/offset-reloc-global-3.ll
The file was modified/llvm/trunk/test/CodeGen/BPF/CORE/offset-reloc-ignore.ll (diff)llvm.src/test/CodeGen/BPF/CORE/offset-reloc-ignore.ll
The file was modified/llvm/trunk/test/CodeGen/BPF/CORE/offset-reloc-middle-chain.ll (diff)llvm.src/test/CodeGen/BPF/CORE/offset-reloc-middle-chain.ll
The file was modified/llvm/trunk/test/CodeGen/BPF/CORE/offset-reloc-multi-array-1.ll (diff)llvm.src/test/CodeGen/BPF/CORE/offset-reloc-multi-array-1.ll
The file was modified/llvm/trunk/test/CodeGen/BPF/CORE/offset-reloc-multi-array-2.ll (diff)llvm.src/test/CodeGen/BPF/CORE/offset-reloc-multi-array-2.ll
The file was modified/llvm/trunk/test/CodeGen/BPF/CORE/offset-reloc-multilevel.ll (diff)llvm.src/test/CodeGen/BPF/CORE/offset-reloc-multilevel.ll
The file was modified/llvm/trunk/test/CodeGen/BPF/CORE/offset-reloc-pointer-1.ll (diff)llvm.src/test/CodeGen/BPF/CORE/offset-reloc-pointer-1.ll
The file was modified/llvm/trunk/test/CodeGen/BPF/CORE/offset-reloc-pointer-2.ll (diff)llvm.src/test/CodeGen/BPF/CORE/offset-reloc-pointer-2.ll
The file was modified/llvm/trunk/test/CodeGen/BPF/CORE/offset-reloc-struct-anonymous.ll (diff)llvm.src/test/CodeGen/BPF/CORE/offset-reloc-struct-anonymous.ll
The file was modified/llvm/trunk/test/CodeGen/BPF/CORE/offset-reloc-struct-array.ll (diff)llvm.src/test/CodeGen/BPF/CORE/offset-reloc-struct-array.ll
The file was modified/llvm/trunk/test/CodeGen/BPF/CORE/offset-reloc-typedef-array.ll (diff)llvm.src/test/CodeGen/BPF/CORE/offset-reloc-typedef-array.ll
The file was modified/llvm/trunk/test/CodeGen/BPF/CORE/offset-reloc-typedef-struct.ll (diff)llvm.src/test/CodeGen/BPF/CORE/offset-reloc-typedef-struct.ll
The file was modified/llvm/trunk/test/CodeGen/BPF/CORE/offset-reloc-typedef-union.ll (diff)llvm.src/test/CodeGen/BPF/CORE/offset-reloc-typedef-union.ll
The file was modified/llvm/trunk/test/CodeGen/BPF/CORE/offset-reloc-typedef.ll (diff)llvm.src/test/CodeGen/BPF/CORE/offset-reloc-typedef.ll
The file was modified/llvm/trunk/test/CodeGen/BPF/CORE/offset-reloc-union.ll (diff)llvm.src/test/CodeGen/BPF/CORE/offset-reloc-union.ll
Revision 374098 by Jan Korous:
[NFC] Attempt to make ubsan-blacklist-vfs test pass on Windows

Previously disabled in d0c2d5daa3e
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/test/CodeGen/ubsan-blacklist-vfs.c (diff)clang.src/test/CodeGen/ubsan-blacklist-vfs.c
Revision 374097 by hliao:
[driver][hip] Skip bundler if host action is nothing.

Reviewers: sfantao, tra, yaxunl

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D68652
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/Driver/Driver.cpp (diff)clang.src/lib/Driver/Driver.cpp
The file was added/cfe/trunk/test/Driver/hip-syntax-only.hipclang.src/test/Driver/hip-syntax-only.hip
Revision 374093 by abataev:
[OPENMP50]Do not allow multiple same context traits in the same context
selector.

According to OpenMP 5.0, 2.3.2 Context Selectors, Restrictions, each
trait-selector-name can only be specified once. Added check for this
restriction.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td (diff)clang.src/include/clang/Basic/DiagnosticParseKinds.td
The file was modified/cfe/trunk/lib/Parse/ParseOpenMP.cpp (diff)clang.src/lib/Parse/ParseOpenMP.cpp
The file was modified/cfe/trunk/test/OpenMP/declare_variant_ast_print.c (diff)clang.src/test/OpenMP/declare_variant_ast_print.c
The file was modified/cfe/trunk/test/OpenMP/declare_variant_ast_print.cpp (diff)clang.src/test/OpenMP/declare_variant_ast_print.cpp
The file was modified/cfe/trunk/test/OpenMP/declare_variant_messages.c (diff)clang.src/test/OpenMP/declare_variant_messages.c
The file was modified/cfe/trunk/test/OpenMP/declare_variant_messages.cpp (diff)clang.src/test/OpenMP/declare_variant_messages.cpp
Revision 374092 by arsenm:
AMDGPU: Fix i16 arithmetic pattern redundancy

There were 2 problems here. First, these patterns were duplicated to
handle the inverted shift operands instead of using the commuted
PatFrags.

Second, the point of the zext folding patterns don't apply to the
non-0ing high subtargets. They should be skipped instead of inserting
the extension. The zeroing high code would be emitted when necessary
anyway. This was also emitting unnecessary zexts in cases where the
high bits were undefined.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/AMDGPU/VOP2Instructions.td (diff)llvm.src/lib/Target/AMDGPU/VOP2Instructions.td
The file was modified/llvm/trunk/test/CodeGen/AMDGPU/GlobalISel/inst-select-ashr.s16.mir (diff)llvm.src/test/CodeGen/AMDGPU/GlobalISel/inst-select-ashr.s16.mir
The file was modified/llvm/trunk/test/CodeGen/AMDGPU/GlobalISel/inst-select-lshr.s16.mir (diff)llvm.src/test/CodeGen/AMDGPU/GlobalISel/inst-select-lshr.s16.mir
The file was modified/llvm/trunk/test/CodeGen/AMDGPU/GlobalISel/inst-select-shl.s16.mir (diff)llvm.src/test/CodeGen/AMDGPU/GlobalISel/inst-select-shl.s16.mir
The file was modified/llvm/trunk/test/CodeGen/AMDGPU/idot2.ll (diff)llvm.src/test/CodeGen/AMDGPU/idot2.ll
The file was modified/llvm/trunk/test/CodeGen/AMDGPU/idot4s.ll (diff)llvm.src/test/CodeGen/AMDGPU/idot4s.ll
The file was modified/llvm/trunk/test/CodeGen/AMDGPU/idot4u.ll (diff)llvm.src/test/CodeGen/AMDGPU/idot4u.ll
The file was modified/llvm/trunk/test/CodeGen/AMDGPU/idot8s.ll (diff)llvm.src/test/CodeGen/AMDGPU/idot8s.ll
The file was modified/llvm/trunk/test/CodeGen/AMDGPU/idot8u.ll (diff)llvm.src/test/CodeGen/AMDGPU/idot8u.ll
The file was modified/llvm/trunk/test/CodeGen/AMDGPU/preserve-hi16.ll (diff)llvm.src/test/CodeGen/AMDGPU/preserve-hi16.ll
The file was modified/llvm/trunk/test/CodeGen/AMDGPU/sdwa-peephole.ll (diff)llvm.src/test/CodeGen/AMDGPU/sdwa-peephole.ll
Revision 374091 by jsji:
Revert "[LoopVectorize][PowerPC] Estimate int and float register pressure separately in loop-vectorize"

Also Revert "[LoopVectorize] Fix non-debug builds after rL374017"

This reverts commit 9f41deccc0e648a006c9f38e11919f181b6c7e0a.
This reverts commit 18b6fe07bcf44294f200bd2b526cb737ed275c04.

The patch is breaking PowerPC internal build, checked with author, reverting
on behalf of him for now due to timezone.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/Analysis/TargetTransformInfo.h (diff)llvm.src/include/llvm/Analysis/TargetTransformInfo.h
The file was modified/llvm/trunk/include/llvm/Analysis/TargetTransformInfoImpl.h (diff)llvm.src/include/llvm/Analysis/TargetTransformInfoImpl.h
The file was modified/llvm/trunk/include/llvm/CodeGen/BasicTTIImpl.h (diff)llvm.src/include/llvm/CodeGen/BasicTTIImpl.h
The file was modified/llvm/trunk/lib/Analysis/TargetTransformInfo.cpp (diff)llvm.src/lib/Analysis/TargetTransformInfo.cpp
The file was modified/llvm/trunk/lib/Target/AArch64/AArch64TargetTransformInfo.h (diff)llvm.src/lib/Target/AArch64/AArch64TargetTransformInfo.h
The file was modified/llvm/trunk/lib/Target/ARM/ARMTargetTransformInfo.h (diff)llvm.src/lib/Target/ARM/ARMTargetTransformInfo.h
The file was modified/llvm/trunk/lib/Target/PowerPC/PPCTargetTransformInfo.cpp (diff)llvm.src/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
The file was modified/llvm/trunk/lib/Target/PowerPC/PPCTargetTransformInfo.h (diff)llvm.src/lib/Target/PowerPC/PPCTargetTransformInfo.h
The file was modified/llvm/trunk/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp (diff)llvm.src/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp
The file was modified/llvm/trunk/lib/Target/SystemZ/SystemZTargetTransformInfo.h (diff)llvm.src/lib/Target/SystemZ/SystemZTargetTransformInfo.h
The file was modified/llvm/trunk/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp (diff)llvm.src/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp
The file was modified/llvm/trunk/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.h (diff)llvm.src/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.h
The file was modified/llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp (diff)llvm.src/lib/Target/X86/X86TargetTransformInfo.cpp
The file was modified/llvm/trunk/lib/Target/X86/X86TargetTransformInfo.h (diff)llvm.src/lib/Target/X86/X86TargetTransformInfo.h
The file was modified/llvm/trunk/lib/Target/XCore/XCoreTargetTransformInfo.h (diff)llvm.src/lib/Target/XCore/XCoreTargetTransformInfo.h
The file was modified/llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (diff)llvm.src/lib/Transforms/Scalar/LoopStrengthReduce.cpp
The file was modified/llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp (diff)llvm.src/lib/Transforms/Vectorize/LoopVectorize.cpp
The file was modified/llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp (diff)llvm.src/lib/Transforms/Vectorize/SLPVectorizer.cpp
The file was removed/llvm/trunk/test/Transforms/LoopVectorize/PowerPC/reg-usage.llllvm.src/test/Transforms/LoopVectorize/PowerPC/reg-usage.ll
The file was modified/llvm/trunk/test/Transforms/LoopVectorize/X86/reg-usage-debug.ll (diff)llvm.src/test/Transforms/LoopVectorize/X86/reg-usage-debug.ll
The file was modified/llvm/trunk/test/Transforms/LoopVectorize/X86/reg-usage.ll (diff)llvm.src/test/Transforms/LoopVectorize/X86/reg-usage.ll
Revision 374090 by spatel:
[SLP] add test with prefer-vector-width function attribute; NFC (PR43578)
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/Transforms/SLPVectorizer/X86/load-merge.ll (diff)llvm.src/test/Transforms/SLPVectorizer/X86/load-merge.ll
Revision 374089 by Vedant Kumar:
[CodeExtractor] Factor out and reuse shrinkwrap analysis

Factor out CodeExtractor's analysis of allocas (for shrinkwrapping
purposes), and allow the analysis to be reused.

This resolves a quadratic compile-time bug observed when compiling
AMDGPUDisassembler.cpp.o.

Pre-patch (Release + LTO clang):

```
   ---User Time---   --System Time--   --User+System--   ---Wall Time---  --- Name ---
  176.5278 ( 57.8%)   0.4915 ( 18.5%)  177.0192 ( 57.4%)  177.4112 ( 57.3%)  Hot Cold Splitting
```

Post-patch (ReleaseAsserts clang):

```
   ---User Time---   --System Time--   --User+System--   ---Wall Time---  --- Name ---
  1.4051 (  3.3%)   0.0079 (  0.3%)   1.4129 (  3.2%)   1.4129 (  3.2%)  Hot Cold Splitting
```

Testing: check-llvm, and comparing the AMDGPUDisassembler.cpp.o binary
pre- vs. post-patch.

An alternate approach is to hide CodeExtractorAnalysisCache from clients
of CodeExtractor, and to recompute the analysis from scratch inside of
CodeExtractor::extractCodeRegion(). This eliminates some redundant work
in the shrinkwrapping legality check. However, some clients continue to
exhibit O(n^2) compile time behavior as computing the analysis is O(n).

rdar://55912966

Differential Revision: https://reviews.llvm.org/D68616
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/Transforms/IPO/HotColdSplitting.h (diff)llvm.src/include/llvm/Transforms/IPO/HotColdSplitting.h
The file was modified/llvm/trunk/include/llvm/Transforms/Utils/CodeExtractor.h (diff)llvm.src/include/llvm/Transforms/Utils/CodeExtractor.h
The file was modified/llvm/trunk/lib/Transforms/IPO/BlockExtractor.cpp (diff)llvm.src/lib/Transforms/IPO/BlockExtractor.cpp
The file was modified/llvm/trunk/lib/Transforms/IPO/HotColdSplitting.cpp (diff)llvm.src/lib/Transforms/IPO/HotColdSplitting.cpp
The file was modified/llvm/trunk/lib/Transforms/IPO/LoopExtractor.cpp (diff)llvm.src/lib/Transforms/IPO/LoopExtractor.cpp
The file was modified/llvm/trunk/lib/Transforms/IPO/PartialInlining.cpp (diff)llvm.src/lib/Transforms/IPO/PartialInlining.cpp
The file was modified/llvm/trunk/lib/Transforms/Utils/CodeExtractor.cpp (diff)llvm.src/lib/Transforms/Utils/CodeExtractor.cpp
The file was modified/llvm/trunk/unittests/Transforms/Utils/CodeExtractorTest.cpp (diff)llvm.src/unittests/Transforms/Utils/CodeExtractorTest.cpp
Revision 374088 by Vitaly Buka:
[sanitizer] Disable crypt*.cpp tests on Android
Change TypePath in RepositoryPath in Workspace
The file was modified/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/crypt_r.cpp (diff)compiler-rt.src/test/sanitizer_common/TestCases/Linux/crypt_r.cpp
The file was modified/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/crypt.cpp (diff)compiler-rt.src/test/sanitizer_common/TestCases/Posix/crypt.cpp
Revision 374087 by tstellar:
AMDGPU: Add offsets to MMO when lowering buffer intrinsics

Summary:
Without offsets on the MachineMemOperands (MMOs),
MachineInstr::mayAlias() will return true for all reads and writes to the
same resource descriptor.  This leads to O(N^2) complexity in the MachineScheduler
when analyzing dependencies of buffer loads and stores.  It also limits
the SILoadStoreOptimizer from merging more instructions.

This patch reduces the compile time of one pathological compute shader
from 12 seconds to 1 second.

Reviewers: arsenm, nhaehnle

Reviewed By: arsenm

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

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D65097
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/AMDGPU/SIISelLowering.cpp (diff)llvm.src/lib/Target/AMDGPU/SIISelLowering.cpp
The file was modified/llvm/trunk/lib/Target/AMDGPU/SIISelLowering.h (diff)llvm.src/lib/Target/AMDGPU/SIISelLowering.h
The file was added/llvm/trunk/test/CodeGen/AMDGPU/buffer-intrinsics-mmo-offsets.llllvm.src/test/CodeGen/AMDGPU/buffer-intrinsics-mmo-offsets.ll
Revision 374086 by uenoku:
[Attributor][Fix] Temporary fix for windows build bot failure

D65402 causes test failure related to attributor-max-iterations.
This commit removes attributor-max-iterations-verify for now.
I'll examine the factor and the flag should be reverted.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/Transforms/FunctionAttrs/callbacks.ll (diff)llvm.src/test/Transforms/FunctionAttrs/callbacks.ll
Revision 374085 by rksimon:
CodeGenPrepare - silence static analyzer dyn_cast<> null dereference warnings. NFCI.

The static analyzer is warning about potential null dereferences, but in these cases we should be able to use cast<> directly and if not assert will fire for us.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp (diff)llvm.src/lib/CodeGen/CodeGenPrepare.cpp
Revision 374083 by rampitec:
[AMDGPU] Disable unused gfx10 dpp instructions

Inhibit generation of unused real dpp instructions on gfx10 just
like it is done on other subtargets. This does not change anything
because these are illegal anyway and not accepted, but it does
reduce the number of instruction definitions generated.

Differential Revision: https://reviews.llvm.org/D68607
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/AMDGPU/VOP1Instructions.td (diff)llvm.src/lib/Target/AMDGPU/VOP1Instructions.td
The file was modified/llvm/trunk/lib/Target/AMDGPU/VOP2Instructions.td (diff)llvm.src/lib/Target/AMDGPU/VOP2Instructions.td
Revision 374079 by Louis Dionne:
[libc++] Make sure we link all system libraries into the benchmarks

It turns out that r374056 broke _some_ build bots again, specifically
the ones using sanitizers. Instead of trying to link the right system
libraries to the benchmarks bit-by-bit, let's just link exactly the
system libraries that libc++ itself needs.
Change TypePath in RepositoryPath in Workspace
The file was modified/libcxx/trunk/CMakeLists.txt (diff)libcxx.src/CMakeLists.txt
The file was modified/libcxx/trunk/benchmarks/CMakeLists.txt (diff)libcxx.src/benchmarks/CMakeLists.txt
The file was modified/libcxx/trunk/src/CMakeLists.txt (diff)libcxx.src/src/CMakeLists.txt
Revision 374078 by greened:
[UpdateCCTestChecks] Detect function mangled name on separate line

Sometimes functions with large comment blocks in front of them have their
declarations output on several lines by c-index-test.  Hence the one-line
function name/line/mangled pattern will not work to detect them.  Break the
pattern up into two patterns and keep state after seeing the name/line
information until we finally see the mangled name.

Differential Revision: https://reviews.llvm.org/D68272
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/utils/update_cc_test_checks.py (diff)llvm.src/utils/update_cc_test_checks.py
Revision 374075 by lebedevri:
[NFC][CVP] Add tests where we can replace sext with zext

If the sign bit of the value that is being sign-extended is not set,
i.e. the value is non-negative (s>= 0), then zero-extension will suffice,
and is better for analysis: https://rise4fun.com/Alive/a8PD
Change TypePath in RepositoryPath in Workspace
The file was added/llvm/trunk/test/Transforms/CorrelatedValuePropagation/sext.llllvm.src/test/Transforms/CorrelatedValuePropagation/sext.ll
Revision 374074 by deadalnix:
(Re)generate various tests. NFC
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/CodeGen/AArch64/arm64-rev.ll (diff)llvm.src/test/CodeGen/AArch64/arm64-rev.ll
The file was modified/llvm/trunk/test/CodeGen/AMDGPU/lshr.v2i16.ll (diff)llvm.src/test/CodeGen/AMDGPU/lshr.v2i16.ll
The file was modified/llvm/trunk/test/CodeGen/AMDGPU/shl.v2i16.ll (diff)llvm.src/test/CodeGen/AMDGPU/shl.v2i16.ll
The file was modified/llvm/trunk/test/CodeGen/ARM/rev.ll (diff)llvm.src/test/CodeGen/ARM/rev.ll
The file was modified/llvm/trunk/test/CodeGen/Thumb/rev.ll (diff)llvm.src/test/CodeGen/Thumb/rev.ll
Revision 374073 by aheejin:
[WebAssembly] Fix a bug in 'try' placement

Summary:
When searching for local expression tree created by stackified
registers, for 'block' placement, we start the search from the previous
instruction of a BB's terminator. But in 'try''s case, we should start
from the previous instruction of a call that can throw, or a EH_LABEL
that precedes the call, because the return values of the call's previous
instructions can be stackified and consumed by the throwing call.

For example,
```
  i32.call @foo
  call @bar         ; may throw
  br $label0
```
In this case, if we start the search from the previous instruction of
the terminator (`br` here), we end up stopping at `call @bar` and place
a 'try' between `i32.call @foo` and `call @bar`, because `call @bar`
does not have a return value so it is not a local expression tree of
`br`.

But in this case, unlike when placing 'block's, we should start the
search from `call @bar`, because the return value of `i32.call @foo` is
stackified and used by `call @bar`.

Reviewers: dschuff

Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68619
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp (diff)llvm.src/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
The file was modified/llvm/trunk/test/CodeGen/WebAssembly/cfg-stackify-eh.ll (diff)llvm.src/test/CodeGen/WebAssembly/cfg-stackify-eh.ll
Revision 374072 by abataev:
[OPENMP50]Prohibit multiple context selector sets in context selectors.

According to OpenMP 5.0, 2.3.2 Context Selectors, Restrictions, each
trait-set-selector-name can only be specified once. Added check to
implement this restriction.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td (diff)clang.src/include/clang/Basic/DiagnosticParseKinds.td
The file was modified/cfe/trunk/lib/Parse/ParseOpenMP.cpp (diff)clang.src/lib/Parse/ParseOpenMP.cpp
The file was modified/cfe/trunk/test/OpenMP/declare_variant_ast_print.c (diff)clang.src/test/OpenMP/declare_variant_ast_print.c
The file was modified/cfe/trunk/test/OpenMP/declare_variant_ast_print.cpp (diff)clang.src/test/OpenMP/declare_variant_ast_print.cpp
The file was modified/cfe/trunk/test/OpenMP/declare_variant_messages.c (diff)clang.src/test/OpenMP/declare_variant_messages.c
The file was modified/cfe/trunk/test/OpenMP/declare_variant_messages.cpp (diff)clang.src/test/OpenMP/declare_variant_messages.cpp
Revision 374070 by David CARLIER:
[builtins] Unbreak build on FreeBSD armv7 after D60351

headers include reordering.

Reviewers: phosek, echristo

Reviewed-By: phosek

Differential Revsion: https://reviews.llvm.org/D68045
Change TypePath in RepositoryPath in Workspace
The file was modified/compiler-rt/trunk/lib/builtins/atomic.c (diff)compiler-rt.src/lib/builtins/atomic.c
The file was modified/compiler-rt/trunk/lib/builtins/clear_cache.c (diff)compiler-rt.src/lib/builtins/clear_cache.c
Revision 374068 by nikolaprica:
[DebugInfo][If-Converter] Update call site info during the optimization

During the If-Converter optimization pay attention when copying or
deleting call instructions in order to keep call site information in
valid state.

Reviewers: aprantl, vsk, efriedma

Reviewed By: vsk, efriedma

Differential Revision: https://reviews.llvm.org/D66955
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/CodeGen/MachineFunction.h (diff)llvm.src/include/llvm/CodeGen/MachineFunction.h
The file was modified/llvm/trunk/lib/CodeGen/BranchFolding.cpp (diff)llvm.src/lib/CodeGen/BranchFolding.cpp
The file was modified/llvm/trunk/lib/CodeGen/IfConversion.cpp (diff)llvm.src/lib/CodeGen/IfConversion.cpp
The file was modified/llvm/trunk/lib/CodeGen/InlineSpiller.cpp (diff)llvm.src/lib/CodeGen/InlineSpiller.cpp
The file was modified/llvm/trunk/lib/CodeGen/LiveRangeEdit.cpp (diff)llvm.src/lib/CodeGen/LiveRangeEdit.cpp
The file was modified/llvm/trunk/lib/CodeGen/MachineFunction.cpp (diff)llvm.src/lib/CodeGen/MachineFunction.cpp
The file was modified/llvm/trunk/lib/CodeGen/MachineOutliner.cpp (diff)llvm.src/lib/CodeGen/MachineOutliner.cpp
The file was modified/llvm/trunk/lib/CodeGen/PeepholeOptimizer.cpp (diff)llvm.src/lib/CodeGen/PeepholeOptimizer.cpp
The file was modified/llvm/trunk/lib/CodeGen/TargetInstrInfo.cpp (diff)llvm.src/lib/CodeGen/TargetInstrInfo.cpp
The file was modified/llvm/trunk/lib/CodeGen/UnreachableBlockElim.cpp (diff)llvm.src/lib/CodeGen/UnreachableBlockElim.cpp
The file was modified/llvm/trunk/lib/CodeGen/XRayInstrumentation.cpp (diff)llvm.src/lib/CodeGen/XRayInstrumentation.cpp
The file was modified/llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp (diff)llvm.src/lib/Target/ARM/ARMExpandPseudoInsts.cpp
The file was modified/llvm/trunk/lib/Target/X86/X86ExpandPseudo.cpp (diff)llvm.src/lib/Target/X86/X86ExpandPseudo.cpp
The file was modified/llvm/trunk/test/CodeGen/ARM/smml.ll (diff)llvm.src/test/CodeGen/ARM/smml.ll
The file was added/llvm/trunk/test/DebugInfo/MIR/ARM/if-coverter-call-site-info.mirllvm.src/test/DebugInfo/MIR/ARM/if-coverter-call-site-info.mir
Revision 374065 by gnsyncbot:
gn build: Merge r374062
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/utils/gn/secondary/llvm/unittests/TextAPI/BUILD.gn (diff)llvm.src/utils/gn/secondary/llvm/unittests/TextAPI/BUILD.gn
Revision 374064 by gnsyncbot:
gn build: Merge r374061
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/utils/gn/secondary/clang/lib/Driver/BUILD.gn (diff)llvm.src/utils/gn/secondary/clang/lib/Driver/BUILD.gn
Revision 374063 by uenoku:
[Attributor][MustExec] Deduce dereferenceable and nonnull attribute using MustBeExecutedContextExplorer

Summary:
In D65186 and related patches, MustBeExecutedContextExplorer is introduced. This enables us to traverse instructions guaranteed to execute from function entry. If we can know the argument is used as `dereferenceable` or `nonnull` in these instructions, we can mark `dereferenceable` or `nonnull` in the argument definition:

1. Memory instruction (similar to D64258)
Trace memory instruction pointer operand. Currently, only inbounds GEPs are traced.
```
define i64* @f(i64* %a) {
entry:
  %add.ptr = getelementptr inbounds i64, i64* %a, i64 1
; (because of inbounds GEP we can know that %a is at least dereferenceable(16))
  store i64 1, i64* %add.ptr, align 8
  ret i64* %add.ptr ; dereferenceable 8 (because above instruction stores into it)
}
```

2. Propagation from callsite (similar to D27855)
If `deref` or `nonnull` are known in call site parameter attributes we can also say that argument also that attribute.

```
declare void @use3(i8* %x, i8* %y, i8* %z);
declare void @use3nonnull(i8* nonnull %x, i8* nonnull %y, i8* nonnull %z);

define void @parent1(i8* %a, i8* %b, i8* %c) {
  call void @use3nonnull(i8* %b, i8* %c, i8* %a)
; Above instruction is always executed so we can say that@parent1(i8* nonnnull %a, i8* nonnull %b, i8* nonnull %c)
  call void @use3(i8* %c, i8* %a, i8* %b)
  ret void
}
```

Reviewers: jdoerfert, sstefan1, spatel, reames

Reviewed By: jdoerfert

Subscribers: xbolva00, hiraditya, jfb, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D65402
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/callbacks.ll (diff)llvm.src/test/Transforms/FunctionAttrs/callbacks.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/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/nocapture.ll (diff)llvm.src/test/Transforms/FunctionAttrs/nocapture.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/norecurse.ll (diff)llvm.src/test/Transforms/FunctionAttrs/norecurse.ll
The file was modified/llvm/trunk/test/Transforms/FunctionAttrs/nosync.ll (diff)llvm.src/test/Transforms/FunctionAttrs/nosync.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
The file was modified/llvm/trunk/test/Transforms/FunctionAttrs/readattrs.ll (diff)llvm.src/test/Transforms/FunctionAttrs/readattrs.ll
The file was modified/llvm/trunk/test/Transforms/InferFunctionAttrs/dereferenceable.ll (diff)llvm.src/test/Transforms/InferFunctionAttrs/dereferenceable.ll
Revision 374062 by cishida:
Revert [TextAPI] Introduce TBDv4

This reverts r374058 (git commit 5d566c5a46aeaa1fa0e5c0b823c9d5f84036dc9a)
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/TextAPI/MachO/InterfaceFile.h (diff)llvm.src/include/llvm/TextAPI/MachO/InterfaceFile.h
The file was modified/llvm/trunk/include/llvm/TextAPI/MachO/Symbol.h (diff)llvm.src/include/llvm/TextAPI/MachO/Symbol.h
The file was modified/llvm/trunk/include/llvm/TextAPI/MachO/Target.h (diff)llvm.src/include/llvm/TextAPI/MachO/Target.h
The file was modified/llvm/trunk/lib/TextAPI/MachO/Target.cpp (diff)llvm.src/lib/TextAPI/MachO/Target.cpp
The file was modified/llvm/trunk/lib/TextAPI/MachO/TextStub.cpp (diff)llvm.src/lib/TextAPI/MachO/TextStub.cpp
The file was modified/llvm/trunk/lib/TextAPI/MachO/TextStubCommon.cpp (diff)llvm.src/lib/TextAPI/MachO/TextStubCommon.cpp
The file was modified/llvm/trunk/unittests/TextAPI/CMakeLists.txt (diff)llvm.src/unittests/TextAPI/CMakeLists.txt
The file was removed/llvm/trunk/unittests/TextAPI/TextStubV4Tests.cppllvm.src/unittests/TextAPI/TextStubV4Tests.cpp
Revision 374061 by zer0:
[clang][ifs] Clang Interface Stubs ToolChain plumbing.

Second Landing Attempt:

This patch enables end to end support for generating ELF interface stubs
directly from clang. Now the following:

clang -emit-interface-stubs -o libfoo.so a.cpp b.cpp c.cpp

will product an ELF binary with visible symbols populated. Visibility attributes
and -fvisibility can be used to control what gets populated.

* Adding ToolChain support for clang Driver IFS Merge Phase
* Implementing a default InterfaceStubs Merge clang Tool, used by ToolChain
* Adds support for the clang Driver to involve llvm-ifs on ifs files.
* Adds -emit-merged-ifs flag, to tell llvm-ifs to emit a merged ifs text file
  instead of the final object format (normally ELF)


Differential Revision: https://reviews.llvm.org/D63978
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/Driver/Action.h (diff)clang.src/include/clang/Driver/Action.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/include/clang/Driver/Phases.h (diff)clang.src/include/clang/Driver/Phases.h
The file was modified/cfe/trunk/include/clang/Driver/ToolChain.h (diff)clang.src/include/clang/Driver/ToolChain.h
The file was modified/cfe/trunk/include/clang/Driver/Types.def (diff)clang.src/include/clang/Driver/Types.def
The file was modified/cfe/trunk/lib/Driver/Action.cpp (diff)clang.src/lib/Driver/Action.cpp
The file was modified/cfe/trunk/lib/Driver/CMakeLists.txt (diff)clang.src/lib/Driver/CMakeLists.txt
The file was modified/cfe/trunk/lib/Driver/Driver.cpp (diff)clang.src/lib/Driver/Driver.cpp
The file was modified/cfe/trunk/lib/Driver/Phases.cpp (diff)clang.src/lib/Driver/Phases.cpp
The file was modified/cfe/trunk/lib/Driver/ToolChain.cpp (diff)clang.src/lib/Driver/ToolChain.cpp
The file was modified/cfe/trunk/lib/Driver/ToolChains/Clang.cpp (diff)clang.src/lib/Driver/ToolChains/Clang.cpp
The file was added/cfe/trunk/lib/Driver/ToolChains/InterfaceStubs.cppclang.src/lib/Driver/ToolChains/InterfaceStubs.cpp
The file was added/cfe/trunk/lib/Driver/ToolChains/InterfaceStubs.hclang.src/lib/Driver/ToolChains/InterfaceStubs.h
The file was modified/cfe/trunk/lib/Driver/Types.cpp (diff)clang.src/lib/Driver/Types.cpp
The file was modified/cfe/trunk/lib/Frontend/CompilerInvocation.cpp (diff)clang.src/lib/Frontend/CompilerInvocation.cpp
The file was modified/cfe/trunk/test/InterfaceStubs/bad-format.cpp (diff)clang.src/test/InterfaceStubs/bad-format.cpp
The file was modified/cfe/trunk/test/InterfaceStubs/class-template-specialization.cpp (diff)clang.src/test/InterfaceStubs/class-template-specialization.cpp
The file was added/cfe/trunk/test/InterfaceStubs/conflict-type.ifsclang.src/test/InterfaceStubs/conflict-type.ifs
The file was added/cfe/trunk/test/InterfaceStubs/driver-test.cclang.src/test/InterfaceStubs/driver-test.c
The file was modified/cfe/trunk/test/InterfaceStubs/externstatic.c (diff)clang.src/test/InterfaceStubs/externstatic.c
The file was added/cfe/trunk/test/InterfaceStubs/func.ifsclang.src/test/InterfaceStubs/func.ifs
The file was modified/cfe/trunk/test/InterfaceStubs/function-template-specialization.cpp (diff)clang.src/test/InterfaceStubs/function-template-specialization.cpp
The file was modified/cfe/trunk/test/InterfaceStubs/inline.c (diff)clang.src/test/InterfaceStubs/inline.c
The file was added/cfe/trunk/test/InterfaceStubs/merge-conflict-test.cclang.src/test/InterfaceStubs/merge-conflict-test.c
The file was added/cfe/trunk/test/InterfaceStubs/object-double.cclang.src/test/InterfaceStubs/object-double.c
The file was added/cfe/trunk/test/InterfaceStubs/object-float.cclang.src/test/InterfaceStubs/object-float.c
The file was added/cfe/trunk/test/InterfaceStubs/object.cclang.src/test/InterfaceStubs/object.c
The file was removed/cfe/trunk/test/InterfaceStubs/object.cppclang.src/test/InterfaceStubs/object.cpp
The file was added/cfe/trunk/test/InterfaceStubs/object.ifsclang.src/test/InterfaceStubs/object.ifs
The file was modified/cfe/trunk/test/InterfaceStubs/template-namespace-function.cpp (diff)clang.src/test/InterfaceStubs/template-namespace-function.cpp
The file was modified/cfe/trunk/test/InterfaceStubs/weak.cpp (diff)clang.src/test/InterfaceStubs/weak.cpp
The file was modified/cfe/trunk/test/lit.cfg.py (diff)clang.src/test/lit.cfg.py
Revision 374060 by uenoku:
[Attributor] Add helper class to compose two structured deduction.

Summary: This patch introduces a generic way to compose two structured deductions.  This will be used for composing generic deduction with `MustBeExecutedExplorer` and other existing generic deduction.

Reviewers: jdoerfert, sstefan1

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D66645
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 374059 by gnsyncbot:
gn build: Merge r374058
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/utils/gn/secondary/llvm/unittests/TextAPI/BUILD.gn (diff)llvm.src/utils/gn/secondary/llvm/unittests/TextAPI/BUILD.gn
Revision 374058 by cishida:
[TextAPI] Introduce TBDv4

Summary:
This format introduces new features and platforms
The motivation for this format is to support more than 1 platform since previous versions only supported additional architectures and 1 platform,
for example ios + ios-simulator and macCatalyst.

Reviewers: ributzka, steven_wu

Reviewed By: ributzka

Subscribers: mgorny, hiraditya, mgrang, dexonsmith, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67529
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/TextAPI/MachO/InterfaceFile.h (diff)llvm.src/include/llvm/TextAPI/MachO/InterfaceFile.h
The file was modified/llvm/trunk/include/llvm/TextAPI/MachO/Symbol.h (diff)llvm.src/include/llvm/TextAPI/MachO/Symbol.h
The file was modified/llvm/trunk/include/llvm/TextAPI/MachO/Target.h (diff)llvm.src/include/llvm/TextAPI/MachO/Target.h
The file was modified/llvm/trunk/lib/TextAPI/MachO/Target.cpp (diff)llvm.src/lib/TextAPI/MachO/Target.cpp
The file was modified/llvm/trunk/lib/TextAPI/MachO/TextStub.cpp (diff)llvm.src/lib/TextAPI/MachO/TextStub.cpp
The file was modified/llvm/trunk/lib/TextAPI/MachO/TextStubCommon.cpp (diff)llvm.src/lib/TextAPI/MachO/TextStubCommon.cpp
The file was modified/llvm/trunk/unittests/TextAPI/CMakeLists.txt (diff)llvm.src/unittests/TextAPI/CMakeLists.txt
The file was added/llvm/trunk/unittests/TextAPI/TextStubV4Tests.cppllvm.src/unittests/TextAPI/TextStubV4Tests.cpp
Revision 374057 by abataev:
[OPENMP50]Allow functions in declare variant directive to have different
C linkage.

After some discussion with OpenMP developers, it was decided that the
functions with the different C linkage can be used in declare variant
directive.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/Sema/Sema.h (diff)clang.src/include/clang/Sema/Sema.h
The file was modified/cfe/trunk/lib/Sema/SemaDecl.cpp (diff)clang.src/lib/Sema/SemaDecl.cpp
The file was modified/cfe/trunk/lib/Sema/SemaOpenMP.cpp (diff)clang.src/lib/Sema/SemaOpenMP.cpp
The file was modified/cfe/trunk/test/OpenMP/declare_variant_ast_print.cpp (diff)clang.src/test/OpenMP/declare_variant_ast_print.cpp
The file was modified/cfe/trunk/test/OpenMP/declare_variant_implementation_vendor_codegen.cpp (diff)clang.src/test/OpenMP/declare_variant_implementation_vendor_codegen.cpp
The file was modified/cfe/trunk/test/OpenMP/declare_variant_messages.cpp (diff)clang.src/test/OpenMP/declare_variant_messages.cpp
Revision 374056 by Louis Dionne:
[libc++] TAKE 2: Make system libraries PRIVATE dependencies of libc++

We tried doing that previously (in r373487) and failed (reverted in
r373506) because the benchmarks needed to link against system libraries
and relied on libc++'s dependencies being propagated. Now that this has
been fixed (in r374053), this commit marks the system libraries as
PRIVATE dependencies of libc++.
Change TypePath in RepositoryPath in Workspace
The file was modified/libcxx/trunk/src/CMakeLists.txt (diff)libcxx.src/src/CMakeLists.txt
Revision 374055 by mbrkusanin:
[Mips] Emit proper ABI for _mcount calls

When -pg option is present than a call to _mcount is inserted into every
function. However since the proper ABI was not followed then the generated
gmon.out did not give proper results. By inserting needed instructions
before every _mcount we can fix this.

Differential Revision: https://reviews.llvm.org/D68390
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/Mips/MipsSEISelDAGToDAG.cpp (diff)llvm.src/lib/Target/Mips/MipsSEISelDAGToDAG.cpp
The file was modified/llvm/trunk/lib/Target/Mips/MipsSEISelDAGToDAG.h (diff)llvm.src/lib/Target/Mips/MipsSEISelDAGToDAG.h
The file was added/llvm/trunk/test/CodeGen/Mips/mcount.llllvm.src/test/CodeGen/Mips/mcount.ll
Revision 374054 by courbet:
[llvm-exegesis] Add options to SnippetGenerator.

Summary:
This adds a `-max-configs-per-opcode` option to limit the number of
configs per opcode.

Reviewers: gchatelet

Subscribers: tschuett, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68642
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/docs/CommandGuide/llvm-exegesis.rst (diff)llvm.src/docs/CommandGuide/llvm-exegesis.rst
The file was added/llvm/trunk/test/tools/llvm-exegesis/X86/max-configs.testllvm.src/test/tools/llvm-exegesis/X86/max-configs.test
The file was modified/llvm/trunk/tools/llvm-exegesis/lib/Latency.h (diff)llvm.src/tools/llvm-exegesis/lib/Latency.h
The file was modified/llvm/trunk/tools/llvm-exegesis/lib/SnippetGenerator.cpp (diff)llvm.src/tools/llvm-exegesis/lib/SnippetGenerator.cpp
The file was modified/llvm/trunk/tools/llvm-exegesis/lib/SnippetGenerator.h (diff)llvm.src/tools/llvm-exegesis/lib/SnippetGenerator.h
The file was modified/llvm/trunk/tools/llvm-exegesis/lib/Target.cpp (diff)llvm.src/tools/llvm-exegesis/lib/Target.cpp
The file was modified/llvm/trunk/tools/llvm-exegesis/lib/Target.h (diff)llvm.src/tools/llvm-exegesis/lib/Target.h
The file was modified/llvm/trunk/tools/llvm-exegesis/lib/Uops.h (diff)llvm.src/tools/llvm-exegesis/lib/Uops.h
The file was modified/llvm/trunk/tools/llvm-exegesis/lib/X86/Target.cpp (diff)llvm.src/tools/llvm-exegesis/lib/X86/Target.cpp
The file was modified/llvm/trunk/tools/llvm-exegesis/llvm-exegesis.cpp (diff)llvm.src/tools/llvm-exegesis/llvm-exegesis.cpp
The file was modified/llvm/trunk/unittests/tools/llvm-exegesis/X86/SnippetGeneratorTest.cpp (diff)llvm.src/unittests/tools/llvm-exegesis/X86/SnippetGeneratorTest.cpp
Revision 374053 by Louis Dionne:
[libc++] Add missing link-time dependencies to the benchmarks

Since the benchmarks build with -nostdlib, they need to manually link
against some system libraries that are used by the benchmarks and the
GoogleBenchmark library itself.

Previously, we'd rely on the fact that these libraries were linked
through the PUBLIC dependencies of cxx_shared/cxx_static. However,
if we were to make these dependencies PRIVATE (as they should be
because they are implementation details of libc++), the benchmarks
would fail to link. This commit remediates that.
Change TypePath in RepositoryPath in Workspace
The file was modified/libcxx/trunk/benchmarks/CMakeLists.txt (diff)libcxx.src/benchmarks/CMakeLists.txt
Revision 374051 by labath:
Object/minidump: Add support for the MemoryInfoList stream

Summary:
This patch adds the definitions of the constants and structures
necessary to interpret the MemoryInfoList minidump stream, as well as
the object::MinidumpFile interface to access the stream.

While the code is fairly simple, there is one important deviation from
the other minidump streams, which is worth calling out explicitly.
Unlike other "List" streams, the size of the records inside
MemoryInfoList stream is not known statically. Instead it is described
in the stream header. This makes it impossible to return
ArrayRef<MemoryInfo> from the accessor method, as it is done with other
streams. Instead, I create an iterator class, which can be parameterized
by the runtime size of the structure, and return
iterator_range<iterator> instead.

Reviewers: amccarth, jhenderson, clayborg

Subscribers: JosephTremoulet, zturner, markmentovai, lldb-commits, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68210
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/BinaryFormat/Minidump.h (diff)llvm.src/include/llvm/BinaryFormat/Minidump.h
The file was modified/llvm/trunk/include/llvm/BinaryFormat/MinidumpConstants.def (diff)llvm.src/include/llvm/BinaryFormat/MinidumpConstants.def
The file was modified/llvm/trunk/include/llvm/Object/Minidump.h (diff)llvm.src/include/llvm/Object/Minidump.h
The file was modified/llvm/trunk/lib/Object/Minidump.cpp (diff)llvm.src/lib/Object/Minidump.cpp
The file was modified/llvm/trunk/unittests/Object/MinidumpTest.cpp (diff)llvm.src/unittests/Object/MinidumpTest.cpp
Revision 374050 by Louis Dionne:
[libc++] Use PRIVATE to link benchmark dependencies

It's better style to use PRIVATE when linking libraries to executables,
and it doesn't make a difference since executables don't need to propagate
their link-time dependencies anyway.
Change TypePath in RepositoryPath in Workspace
The file was modified/libcxx/trunk/benchmarks/CMakeLists.txt (diff)libcxx.src/benchmarks/CMakeLists.txt
Revision 374049 by kpn:
Nope, I'm wrong. It looks like someone else removed these on purpose and
it just happened to break the bot right when I did my push. So I'm undoing
this mornings incorrect push. I've also kicked off an email to hopefully
get the bot fixed the correct way.
Change TypePath in RepositoryPath in Workspace
The file was removed/llvm/trunk/docs/ProgrammingDocumentation.rstllvm.src/docs/ProgrammingDocumentation.rst
The file was removed/llvm/trunk/docs/SubsystemDocumentation.rstllvm.src/docs/SubsystemDocumentation.rst
Revision 374048 by ibiryukov:
[clangd] Disable expand auto on decltype(auto)

Summary: Applying it produces incorrect code at the moment.

Reviewers: sammccall

Reviewed By: sammccall

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

Tags: #clang

Differential Revision: https://reviews.llvm.org/D68630
Change TypePath in RepositoryPath in Workspace
The file was modified/clang-tools-extra/trunk/clangd/refactor/tweaks/ExpandAutoType.cpp (diff)clang-tools-extra.src/clangd/refactor/tweaks/ExpandAutoType.cpp
The file was modified/clang-tools-extra/trunk/clangd/unittests/TweakTests.cpp (diff)clang-tools-extra.src/clangd/unittests/TweakTests.cpp
Revision 374047 by kadircet:
[clangd] Bump timeouts in speculative completion tests
Change TypePath in RepositoryPath in Workspace
The file was modified/clang-tools-extra/trunk/clangd/unittests/CodeCompleteTests.cpp (diff)clang-tools-extra.src/clangd/unittests/CodeCompleteTests.cpp
Revision 374045 by kpn:
Restore documentation that 'svn update' unexpectedly yanked out from under me.
Change TypePath in RepositoryPath in Workspace
The file was added/llvm/trunk/docs/ProgrammingDocumentation.rstllvm.src/docs/ProgrammingDocumentation.rst
The file was added/llvm/trunk/docs/SubsystemDocumentation.rstllvm.src/docs/SubsystemDocumentation.rst
Revision 374044 by spop:
fix fmls fp16

Tim Northover remarked that the added patterns for fmls fp16
produce wrong code in case the fsub instruction has a
multiplication as its first operand, i.e., all the patterns FMLSv*_OP1:

> define <8 x half> @test_FMLSv8f16_OP1(<8 x half> %a, <8 x half> %b, <8 x half> %c) {
> ; CHECK-LABEL: test_FMLSv8f16_OP1:
> ; CHECK: fmls {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
> entry:
>
>   %mul = fmul fast <8 x half> %c, %b
>   %sub = fsub fast <8 x half> %mul, %a
>   ret <8 x half> %sub
> }
>
> This doesn't look right to me. The exact instruction produced is "fmls
> v0.8h, v2.8h, v1.8h", which I think calculates "v0 - v2*v1", but the
> IR is calculating "v2*v1-v0". The equivalent <4 x float> code also
> doesn't emit an fmls.

This patch generates an fmla and negates the value of the operand2 of the fsub.

Inspecting the pattern match, I found that there was another mistake in the
opcode to be selected: matching FMULv4*16 should generate FMLSv4*16
and not FMLSv2*32.

Tested on aarch64-linux with make check-all.

Differential Revision: https://reviews.llvm.org/D67990
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/CodeGen/MachineCombinerPattern.h (diff)llvm.src/include/llvm/CodeGen/MachineCombinerPattern.h
The file was modified/llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.cpp (diff)llvm.src/lib/Target/AArch64/AArch64InstrInfo.cpp
The file was modified/llvm/trunk/test/CodeGen/AArch64/fp16-fmla.ll (diff)llvm.src/test/CodeGen/AArch64/fp16-fmla.ll
Revision 374043 by deadalnix:
Add test for rotating truncated vectors. NFC
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/CodeGen/X86/rot16.ll (diff)llvm.src/test/CodeGen/X86/rot16.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-rotate-128.ll (diff)llvm.src/test/CodeGen/X86/vector-rotate-128.ll
Revision 374042 by huntergr:
[SVE][IR] Scalable Vector size queries and IR instruction support

* Adds a TypeSize struct to represent the known minimum size of a type
  along with a flag to indicate that the runtime size is a integer multiple
  of that size
* Converts existing size query functions from Type.h and DataLayout.h to
  return a TypeSize result
* Adds convenience methods (including a transparent conversion operator
  to uint64_t) so that most existing code 'just works' as if the return
  values were still scalars.
* Uses the new size queries along with ElementCount to ensure that all
  supported instructions used with scalable vectors can be constructed
  in IR.

Reviewers: hfinkel, lattner, rkruppe, greened, rovka, rengolin, sdesmalen

Reviewed By: rovka, sdesmalen

Differential Revision: https://reviews.llvm.org/D53137
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/CodeGen/CGCall.cpp (diff)clang.src/lib/CodeGen/CGCall.cpp
The file was modified/cfe/trunk/lib/CodeGen/CGStmt.cpp (diff)clang.src/lib/CodeGen/CGStmt.cpp
The file was modified/cfe/trunk/lib/CodeGen/CodeGenFunction.cpp (diff)clang.src/lib/CodeGen/CodeGenFunction.cpp
The file was modified/llvm/trunk/include/llvm/ADT/DenseMapInfo.h (diff)llvm.src/include/llvm/ADT/DenseMapInfo.h
The file was modified/llvm/trunk/include/llvm/IR/DataLayout.h (diff)llvm.src/include/llvm/IR/DataLayout.h
The file was modified/llvm/trunk/include/llvm/IR/DerivedTypes.h (diff)llvm.src/include/llvm/IR/DerivedTypes.h
The file was modified/llvm/trunk/include/llvm/IR/InstrTypes.h (diff)llvm.src/include/llvm/IR/InstrTypes.h
The file was modified/llvm/trunk/include/llvm/IR/Type.h (diff)llvm.src/include/llvm/IR/Type.h
The file was modified/llvm/trunk/include/llvm/Support/MachineValueType.h (diff)llvm.src/include/llvm/Support/MachineValueType.h
The file was removed/llvm/trunk/include/llvm/Support/ScalableSize.hllvm.src/include/llvm/Support/ScalableSize.h
The file was added/llvm/trunk/include/llvm/Support/TypeSize.hllvm.src/include/llvm/Support/TypeSize.h
The file was modified/llvm/trunk/lib/Analysis/InlineCost.cpp (diff)llvm.src/lib/Analysis/InlineCost.cpp
The file was modified/llvm/trunk/lib/CodeGen/Analysis.cpp (diff)llvm.src/lib/CodeGen/Analysis.cpp
The file was modified/llvm/trunk/lib/IR/DataLayout.cpp (diff)llvm.src/lib/IR/DataLayout.cpp
The file was modified/llvm/trunk/lib/IR/Instructions.cpp (diff)llvm.src/lib/IR/Instructions.cpp
The file was modified/llvm/trunk/lib/IR/Type.cpp (diff)llvm.src/lib/IR/Type.cpp
The file was modified/llvm/trunk/lib/Target/AArch64/AArch64ISelLowering.cpp (diff)llvm.src/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was modified/llvm/trunk/lib/Transforms/Scalar/SROA.cpp (diff)llvm.src/lib/Transforms/Scalar/SROA.cpp
The file was added/llvm/trunk/test/Other/scalable-vectors-core-ir.llllvm.src/test/Other/scalable-vectors-core-ir.ll
The file was modified/llvm/trunk/unittests/CodeGen/ScalableVectorMVTsTest.cpp (diff)llvm.src/unittests/CodeGen/ScalableVectorMVTsTest.cpp
The file was modified/llvm/trunk/unittests/IR/VectorTypesTest.cpp (diff)llvm.src/unittests/IR/VectorTypesTest.cpp
Revision 374041 by nha:
AMDGPU: Propagate undef flag during pre-RA exec mask optimizations

Summary: Issue: https://github.com/GPUOpen-Drivers/llpc/issues/204

Reviewers: arsenm, rampitec

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

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68184
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp (diff)llvm.src/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp
The file was modified/llvm/trunk/test/CodeGen/AMDGPU/optimize-exec-masking-pre-ra.mir (diff)llvm.src/test/CodeGen/AMDGPU/optimize-exec-masking-pre-ra.mir
Revision 374040 by nha:
MachineSSAUpdater: insert IMPLICIT_DEF at top of basic block

Summary:
When getValueInMiddleOfBlock happens to be called for a basic block
that has no incoming value at all, an IMPLICIT_DEF is inserted in that
block via GetValueAtEndOfBlockInternal. This IMPLICIT_DEF must be at
the top of its basic block or it will likely not reach the use that
the caller intends to insert.

Issue: https://github.com/GPUOpen-Drivers/llpc/issues/204

Reviewers: arsenm, rampitec

Subscribers: jvesely, wdng, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68183
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/CodeGen/MachineSSAUpdater.cpp (diff)llvm.src/lib/CodeGen/MachineSSAUpdater.cpp
The file was added/llvm/trunk/test/CodeGen/AMDGPU/si-i1-copies.mirllvm.src/test/CodeGen/AMDGPU/si-i1-copies.mir
Revision 374039 by spatel:
[SLP] add test with prefer-vector-width function attribute; NFC
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/Transforms/SLPVectorizer/X86/pr19657.ll (diff)llvm.src/test/Transforms/SLPVectorizer/X86/pr19657.ll
Revision 374036 by fhahn:
[LoopRotate] Unconditionally get DomTree.

LoopRotate is a loop pass and the DomTree should always be available.

Similar to a70c5261436322a53187d67b8bdc0445d0463a9a
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp (diff)llvm.src/lib/Transforms/Scalar/LoopRotation.cpp
Revision 374035 by jrtc27:
[Diagnostics] Silence -Wsizeof-array-div for character buffers

Summary:
Character buffers are sometimes used to represent a pool of memory that
contains non-character objects, due to them being synonymous with a stream of
bytes on almost all modern architectures. Often, when interacting with hardware
devices, byte buffers are therefore used as an intermediary and so we can end
Character buffers are sometimes used to represent a pool of memory that
contains non-character objects, due to them being synonymous with a stream of
bytes on almost all modern architectures. Often, when interacting with hardware
devices, byte buffers are therefore used as an intermediary and so we can end
up generating lots of false-positives.

Moreover, due to the ability of character pointers to alias non-character
pointers, the strict aliasing violations that would generally be implied by the
calculations caught by the warning (if the calculation itself is in fact
correct) do not apply here, and so although the length calculation may be
wrong, that is the only possible issue.

Reviewers: rsmith, xbolva00, thakis

Reviewed By: xbolva00, thakis

Subscribers: thakis, lebedev.ri, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D68526
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/Sema/SemaExpr.cpp (diff)clang.src/lib/Sema/SemaExpr.cpp
The file was modified/cfe/trunk/test/Sema/div-sizeof-array.cpp (diff)clang.src/test/Sema/div-sizeof-array.cpp
Revision 374034 by adibiagio:
[MCA][LSUnit] Track loads and stores until retirement.

Before this patch, loads and stores were only tracked by their corresponding
queues in the LSUnit from dispatch until execute stage. In practice we should be
more conservative and assume that memory opcodes leave their queues at
retirement stage.

Basically, loads should leave the load queue only when they have completed and
delivered their data. We conservatively assume that a load is completed when it
is retired. Stores should be tracked by the store queue from dispatch until
retirement. In practice, stores can only leave the store queue if their data can
be written to the data cache.

This is mostly a mechanical change. With this patch, the retire stage notifies
the LSUnit when a memory instruction is retired. That would triggers the release
of LDQ/STQ entries.  The only visible change is in memory tests for the bdver2
model. That is because bdver2 is the only model that defines the load/store
queue size.

This patch partially addresses PR39830.

Differential Revision: https://reviews.llvm.org/D68266
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/MCA/HardwareUnits/LSUnit.h (diff)llvm.src/include/llvm/MCA/HardwareUnits/LSUnit.h
The file was modified/llvm/trunk/include/llvm/MCA/Stages/RetireStage.h (diff)llvm.src/include/llvm/MCA/Stages/RetireStage.h
The file was modified/llvm/trunk/lib/MCA/Context.cpp (diff)llvm.src/lib/MCA/Context.cpp
The file was modified/llvm/trunk/lib/MCA/HardwareUnits/LSUnit.cpp (diff)llvm.src/lib/MCA/HardwareUnits/LSUnit.cpp
The file was modified/llvm/trunk/lib/MCA/Stages/RetireStage.cpp (diff)llvm.src/lib/MCA/Stages/RetireStage.cpp
The file was modified/llvm/trunk/test/tools/llvm-mca/X86/BdVer2/load-store-throughput.s (diff)llvm.src/test/tools/llvm-mca/X86/BdVer2/load-store-throughput.s
The file was modified/llvm/trunk/test/tools/llvm-mca/X86/BdVer2/load-throughput.s (diff)llvm.src/test/tools/llvm-mca/X86/BdVer2/load-throughput.s
The file was modified/llvm/trunk/test/tools/llvm-mca/X86/BdVer2/store-throughput.s (diff)llvm.src/test/tools/llvm-mca/X86/BdVer2/store-throughput.s
Revision 374033 by nikolaprica:
[ISEL][ARM][AARCH64] Tracking simple parameter forwarding registers

Support for tracking registers that forward function parameters into the
following function frame. For now we only support cases when parameter
is forwarded through single register.

Reviewers: aprantl, vsk, t.p.northover

Reviewed By: vsk

Differential Revision: https://reviews.llvm.org/D66953
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/AArch64/AArch64ISelLowering.cpp (diff)llvm.src/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was modified/llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp (diff)llvm.src/lib/Target/ARM/ARMExpandPseudoInsts.cpp
The file was modified/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (diff)llvm.src/lib/Target/ARM/ARMISelLowering.cpp
The file was added/llvm/trunk/test/DebugInfo/AArch64/call-site-info-output.llllvm.src/test/DebugInfo/AArch64/call-site-info-output.ll
The file was added/llvm/trunk/test/DebugInfo/ARM/call-site-info-output.llllvm.src/test/DebugInfo/ARM/call-site-info-output.ll
Revision 374032 by sylvestre:
Remove an useless allocation (from by clang-analyzer/scan-build)
https://llvm.org/reports/scan-build/report-TargetInfo.cpp-detectFPCCEligibleStruct-9-1.html#EndPath
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/CodeGen/TargetInfo.cpp (diff)clang.src/lib/CodeGen/TargetInfo.cpp
Revision 374031 by courbet:
[llvm-exegesis] Finish plumbing the `Config` field.

Summary:
Right now there are no snippet generators that emit the `Config` Field,
but I plan to add it to investigate LEA operands for PR32326.

What was broken was:
- `Config` Was not propagated up until the BenchmarkResult::Key.
- Clustering should really consider different configs as measuring
different things, so we should stabilize on (Opcode, Config) instead of
just Opcode.

Reviewers: gchatelet

Subscribers: tschuett, llvm-commits, lebedev.ri

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68629
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/tools/llvm-exegesis/X86/analysis-cluster-stabilization-config.test (diff)llvm.src/test/tools/llvm-exegesis/X86/analysis-cluster-stabilization-config.test
The file was modified/llvm/trunk/tools/llvm-exegesis/lib/BenchmarkCode.h (diff)llvm.src/tools/llvm-exegesis/lib/BenchmarkCode.h
The file was modified/llvm/trunk/tools/llvm-exegesis/lib/BenchmarkResult.h (diff)llvm.src/tools/llvm-exegesis/lib/BenchmarkResult.h
The file was modified/llvm/trunk/tools/llvm-exegesis/lib/BenchmarkRunner.cpp (diff)llvm.src/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
The file was modified/llvm/trunk/tools/llvm-exegesis/lib/Clustering.cpp (diff)llvm.src/tools/llvm-exegesis/lib/Clustering.cpp
The file was modified/llvm/trunk/tools/llvm-exegesis/lib/CodeTemplate.h (diff)llvm.src/tools/llvm-exegesis/lib/CodeTemplate.h
The file was modified/llvm/trunk/tools/llvm-exegesis/lib/SnippetFile.cpp (diff)llvm.src/tools/llvm-exegesis/lib/SnippetFile.cpp
The file was modified/llvm/trunk/tools/llvm-exegesis/lib/SnippetGenerator.cpp (diff)llvm.src/tools/llvm-exegesis/lib/SnippetGenerator.cpp
The file was modified/llvm/trunk/unittests/tools/llvm-exegesis/X86/SnippetFileTest.cpp (diff)llvm.src/unittests/tools/llvm-exegesis/X86/SnippetFileTest.cpp
Revision 374028 by grimar:
[llvm-readobj/llvm-readelf] - Add checks for GNU-style to "all.test" test case.

We do not check the GNU-style output when -all is given.
This patch does that.

Differential revision: https://reviews.llvm.org/D68462
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/tools/llvm-readobj/all.test (diff)llvm.src/test/tools/llvm-readobj/all.test
Revision 374027 by wuzish:
[NFC] Add REQUIRES for r374017 in testcase
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/Transforms/LoopVectorize/PowerPC/reg-usage.ll (diff)llvm.src/test/Transforms/LoopVectorize/PowerPC/reg-usage.ll
Revision 374026 by fhahn:
[LoopRotate] Unconditionally get ScalarEvolution.

Summary: LoopRotate is a loop pass and SE should always be available.

Reviewers: anemet, asbirlea

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D68573
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp (diff)llvm.src/lib/Transforms/Scalar/LoopRotation.cpp
Revision 374025 by kbeyls:
[ARM] Generate vcmp instead of vcmpe

Based on the discussion in
http://lists.llvm.org/pipermail/llvm-dev/2019-October/135574.html, the
conclusion was reached that the ARM backend should produce vcmp instead
of vcmpe instructions by default, i.e. not be producing an Invalid
Operation exception when either arguments in a floating point compare
are quiet NaNs.

In the future, after constrained floating point intrinsics for floating
point compare have been introduced, vcmpe instructions probably should
be produced for those intrinsics - depending on the exact semantics
they'll be defined to have.

This patch logically consists of the following parts:
- Revert http://llvm.org/viewvc/llvm-project?rev=294945&view=rev and
  http://llvm.org/viewvc/llvm-project?rev=294968&view=rev, which
  implemented fine-tuning for when to produce vcmpe (i.e. not do it for
  equality comparisons). The complexity introduced by those patches
  isn't needed anymore if we just always produce vcmp instead. Maybe
  these patches need to be reintroduced again once support is needed to
  map potential LLVM-IR constrained floating point compare intrinsics to
  the ARM instruction set.
- Simply select vcmp, instead of vcmpe, see simple changes in
  lib/Target/ARM/ARMInstrVFP.td
- Adapt lots of tests that tested for vcmpe (instead of vcmp). For all
  of these test, the intent of what is tested for isn't related to
  whether the vcmp should produce an Invalid Operation exception or not.

Fixes PR43374.

Differential Revision: https://reviews.llvm.org/D68463
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/ARM/ARMFastISel.cpp (diff)llvm.src/lib/Target/ARM/ARMFastISel.cpp
The file was modified/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (diff)llvm.src/lib/Target/ARM/ARMISelLowering.cpp
The file was modified/llvm/trunk/lib/Target/ARM/ARMISelLowering.h (diff)llvm.src/lib/Target/ARM/ARMISelLowering.h
The file was modified/llvm/trunk/lib/Target/ARM/ARMInstrInfo.td (diff)llvm.src/lib/Target/ARM/ARMInstrInfo.td
The file was modified/llvm/trunk/lib/Target/ARM/ARMInstrVFP.td (diff)llvm.src/lib/Target/ARM/ARMInstrVFP.td
The file was modified/llvm/trunk/test/CodeGen/ARM/2009-07-18-RewriterBug.ll (diff)llvm.src/test/CodeGen/ARM/2009-07-18-RewriterBug.ll
The file was modified/llvm/trunk/test/CodeGen/ARM/arm-shrink-wrapping.ll (diff)llvm.src/test/CodeGen/ARM/arm-shrink-wrapping.ll
The file was modified/llvm/trunk/test/CodeGen/ARM/compare-call.ll (diff)llvm.src/test/CodeGen/ARM/compare-call.ll
The file was modified/llvm/trunk/test/CodeGen/ARM/fcmp-xo.ll (diff)llvm.src/test/CodeGen/ARM/fcmp-xo.ll
The file was modified/llvm/trunk/test/CodeGen/ARM/float-helpers.s (diff)llvm.src/test/CodeGen/ARM/float-helpers.s
The file was modified/llvm/trunk/test/CodeGen/ARM/fp16-instructions.ll (diff)llvm.src/test/CodeGen/ARM/fp16-instructions.ll
The file was modified/llvm/trunk/test/CodeGen/ARM/fp16-promote.ll (diff)llvm.src/test/CodeGen/ARM/fp16-promote.ll
The file was modified/llvm/trunk/test/CodeGen/ARM/fpcmp.ll (diff)llvm.src/test/CodeGen/ARM/fpcmp.ll
The file was modified/llvm/trunk/test/CodeGen/ARM/ifcvt11.ll (diff)llvm.src/test/CodeGen/ARM/ifcvt11.ll
The file was modified/llvm/trunk/test/CodeGen/ARM/swifterror.ll (diff)llvm.src/test/CodeGen/ARM/swifterror.ll
The file was removed/llvm/trunk/test/CodeGen/ARM/vcmp-crash.llllvm.src/test/CodeGen/ARM/vcmp-crash.ll
The file was modified/llvm/trunk/test/CodeGen/ARM/vfp.ll (diff)llvm.src/test/CodeGen/ARM/vfp.ll
The file was modified/llvm/trunk/test/CodeGen/ARM/vsel-fp16.ll (diff)llvm.src/test/CodeGen/ARM/vsel-fp16.ll
The file was modified/llvm/trunk/test/CodeGen/ARM/vsel.ll (diff)llvm.src/test/CodeGen/ARM/vsel.ll
The file was modified/llvm/trunk/test/CodeGen/Thumb2/float-cmp.ll (diff)llvm.src/test/CodeGen/Thumb2/float-cmp.ll
The file was modified/llvm/trunk/test/CodeGen/Thumb2/mve-vcmpf.ll (diff)llvm.src/test/CodeGen/Thumb2/mve-vcmpf.ll
The file was modified/llvm/trunk/test/CodeGen/Thumb2/mve-vcmpfr.ll (diff)llvm.src/test/CodeGen/Thumb2/mve-vcmpfr.ll
The file was modified/llvm/trunk/test/CodeGen/Thumb2/mve-vcmpfz.ll (diff)llvm.src/test/CodeGen/Thumb2/mve-vcmpfz.ll
Revision 374024 by redstar:
[Tools] Mark output of tools as text if it is text

Several LLVM tools write text files/streams without using OF_Text.
This can cause problems on platforms which distinguish between
text and binary output. This PR adds the OF_Text flag for the
following tools:

- llvm-dis
- llvm-dwarfdump
- llvm-mca
- llvm-mc (assembler files only)
- opt (assembler files only)
- RemarkStreamer (used e.g. by opt)

Reviewers: rnk, vivekvpandya, Bigcheese, andreadb

Differential Revision: https://reviews.llvm.org/D67696
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/IR/RemarkStreamer.cpp (diff)llvm.src/lib/IR/RemarkStreamer.cpp
The file was modified/llvm/trunk/tools/llvm-dis/llvm-dis.cpp (diff)llvm.src/tools/llvm-dis/llvm-dis.cpp
The file was modified/llvm/trunk/tools/llvm-dwarfdump/llvm-dwarfdump.cpp (diff)llvm.src/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
The file was modified/llvm/trunk/tools/llvm-mc/llvm-mc.cpp (diff)llvm.src/tools/llvm-mc/llvm-mc.cpp
The file was modified/llvm/trunk/tools/llvm-mca/llvm-mca.cpp (diff)llvm.src/tools/llvm-mca/llvm-mca.cpp
The file was modified/llvm/trunk/tools/opt/opt.cpp (diff)llvm.src/tools/opt/opt.cpp
Revision 374021 by kadircet:
[LoopVectorize] Fix non-debug builds after rL374017
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp (diff)llvm.src/lib/Transforms/Vectorize/LoopVectorize.cpp
Revision 374020 by courbet:
[llvm-exegesis] Add stabilization test with config

In preparation for D68629.
Change TypePath in RepositoryPath in Workspace
The file was added/llvm/trunk/test/tools/llvm-exegesis/X86/analysis-cluster-stabilization-config.testllvm.src/test/tools/llvm-exegesis/X86/analysis-cluster-stabilization-config.test