summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add a description about multiple linker scriptsRui Ueyama2019-08-231-0/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D66630 llvm-svn: 369737
* [X86] Add a further unrolled madd reduction test case that shows several ↵Craig Topper2019-08-231-6/+115
| | | | | | | | | | | | | | deficiencies. The AVX2 check lines show two issues. An ADD that became an OR because we knew the input was disjoint, but really it was zero so we should have just removed the ADD/OR all together. Relatedly we use 128-bit VPMADDWD instructions followed by 256-bit VPADDD operations. We should be able to narrow these VPADDDs. llvm-svn: 369736
* [Symbol] Decouple clang from DeclVendorAlex Langford2019-08-2310-10/+69
| | | | | | | | | | Summary: This removes DeclVendor's dependency on clang (and ClangASTContext). DeclVendor has no need to know about specific TypeSystems. Differential Revision: https://reviews.llvm.org/D66628 llvm-svn: 369735
* [X86] Make combineLoopSADPattern use CONCAT_VECTORS instead of ↵Craig Topper2019-08-231-3/+5
| | | | | | | | | INSERT_SUBVECTORS for widening with zeros. CONCAT_VECTORS is more canonical for the early DAG combine runs until we start getting into the op legalization phases. llvm-svn: 369734
* [X86] Improve lowering of v2i32 SAD handling in combineLoopSADPattern.Craig Topper2019-08-232-5/+10
| | | | | | | | | | | | | | | | | | | | | For v2i32 we only feed 2 i8 elements into the psadbw instructions with 0s in the other 14 bytes. The resulting psadbw instruction will produce zeros in bits [127:16] of the output. We need to take the result and feed it to a v2i32 add where the first element includes bits [15:0] of the sad result. The other element should be zero. Prior to this patch we were using a truncate to take 0 from bits 95:64 of the psadbw. This results in a pshufd to move those bits to 63:32. But since we also have zeroes in bits 63:32 of the psadbw output, we should just take those bits. The previous code probably worked better with promoting legalization, but now we use widening legalization. I've preserved the old behavior if -x86-experimental-vector-widening-legalization=false until we get that option removed. llvm-svn: 369733
* [clang-format] Recognize ECMAScript module .mjs as JavaScriptFangrui Song2019-08-231-2/+3
| | | | | | | | | | | | | | PR43085. Recognize .mjs files as JavaScript. .mjs is the extension for ECMAScript modules. A specific extension (and associated content type javascript/esm) is introduced to differentiate it from CommonJS modules and solve some interoperability problems. Differential Revision: https://reviews.llvm.org/D66584 Patch by Fergal Daly llvm-svn: 369732
* [LLDB] Address post-commit code review feedback.Jonas Devlieghere2019-08-232-4/+2
| | | | | | | This patch addresses Adrian McCarthy's code review feedback in https://reviews.llvm.org/D66447 llvm-svn: 369731
* [IndVars] Fix a bug noticed by inspectionPhilip Reames2019-08-232-1/+63
| | | | | | We were computing the loop exit value, but not ensuring the addrec belonged to the loop whose exit value we were computing. I couldn't actually trip this; the test case shows the basic setup which *might* trip this, but none of the variations I've tried actually do. llvm-svn: 369730
* [analyzer] CastValueChecker: Correctly model results of based-to-derived casts.Artem Dergachev2019-08-233-12/+39
| | | | | | | | | | Our SVal hierarchy doesn't allow modeling pointer casts as no-op. The pointer type is instead encoded into the pointer object. Defer to our usual pointer casting facility, SValBuilder::evalBinOp(). Fixes a crash. llvm-svn: 369729
* [analyzer] CastValueChecker: Provide DynamicTypeMap with pointer types only.Artem Dergachev2019-08-235-31/+37
| | | | | | | | | The idea to drop this requirement is good, but for now every other user of DynamicTypeInfo expects pointer types. Fixes a crash. llvm-svn: 369728
* [analyzer] CastValueChecker: Avoid modeling casts between objects.Artem Dergachev2019-08-235-10/+27
| | | | | | | | | Our method only works correctly when casting a pointer to a pointer or a reference to a reference. Fixes a crash. llvm-svn: 369727
* [analyzer] DynamicTypeInfo: Avoid putting null regions into dynamic typemap.Artem Dergachev2019-08-232-0/+8
| | | | | | Fixes a crash. llvm-svn: 369726
* Revert "PR42587: diagnose unexpanded uses of a pack parameter of a generic" ↵Richard Smith2019-08-233-18/+3
| | | | | | | | due to buildbot breakage. This reverts commit r369722. llvm-svn: 369725
* [AlignmentFromAssumptions] getNewAlignmentDiff(): use getURemExpr()Fangrui Song2019-08-232-3/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The alignment is calculated incorrectly, thus sometimes it doesn't generate aligned mov instructions, as shown by the example below: ``` // b.cc typedef long long index; extern "C" index g_tid; extern "C" index g_num; void add3(float* __restrict__ a, float* __restrict__ b, float* __restrict__ c) { index n = 64*1024; index m = 16*1024; index k = 4*1024; index tid = g_tid; index num = g_num; __builtin_assume_aligned(a, 32); __builtin_assume_aligned(b, 32); __builtin_assume_aligned(c, 32); for (index i0=tid*k; i0<m; i0+=num*k) for (index i1=0; i1<n*m; i1+=m) for (index i2=0; i2<k; i2++) c[i1+i0+i2] = b[i0+i2] + a[i1+i0+i2]; } ``` Compile with `clang b.cc -Ofast -march=skylake -mavx2 -S` ``` vmovaps -224(%rdi,%rbx,4), %ymm0 vmovups -192(%rdi,%rbx,4), %ymm1 # should be movaps vmovups -160(%rdi,%rbx,4), %ymm2 # should be movaps vmovups -128(%rdi,%rbx,4), %ymm3 # should be movaps vaddps -224(%rsi,%rbx,4), %ymm0, %ymm0 vaddps -192(%rsi,%rbx,4), %ymm1, %ymm1 vaddps -160(%rsi,%rbx,4), %ymm2, %ymm2 vaddps -128(%rsi,%rbx,4), %ymm3, %ymm3 vmovaps %ymm0, -224(%rdx,%rbx,4) vmovups %ymm1, -192(%rdx,%rbx,4) # should be movaps vmovups %ymm2, -160(%rdx,%rbx,4) # should be movaps vmovups %ymm3, -128(%rdx,%rbx,4) # should be movaps ``` Differential Revision: https://reviews.llvm.org/D66575 Patch by Dun Liang llvm-svn: 369723
* PR42587: diagnose unexpanded uses of a pack parameter of a genericRichard Smith2019-08-233-3/+18
| | | | | | lambda from within the lambda-declarator. llvm-svn: 369722
* hwasan: Untag unwound stack frames by wrapping personality functions.Peter Collingbourne2019-08-238-15/+277
| | | | | | | | | | | | | | | | | | | | | | | One problem with untagging memory in landing pads is that it only works correctly if the function that catches the exception is instrumented. If the function is uninstrumented, we have no opportunity to untag the memory. To address this, replace landing pad instrumentation with personality function wrapping. Each function with an instrumented stack has its personality function replaced with a wrapper provided by the runtime. Functions that did not have a personality function to begin with also get wrappers if they may be unwound past. As the unwinder calls personality functions during stack unwinding, the original personality function is called and the function's stack frame is untagged by the wrapper if the personality function instructs the unwinder to keep unwinding. If unwinding stops at a landing pad, the function is still responsible for untagging its stack frame if it resumes unwinding. The old landing pad mechanism is preserved for compatibility with old runtimes. Differential Revision: https://reviews.llvm.org/D66377 llvm-svn: 369721
* [MC] Minor cleanup to MCFixup::Kind handling. NFC.Sam Clegg2019-08-2320-51/+49
| | | | | | | | | | Prefer `MCFixupKind` where possible and add getTargetKind() to convert to `unsigned` when needed rather than scattering cast operators around the place. Differential Revision: https://reviews.llvm.org/D59890 llvm-svn: 369720
* [clang][ifs] Dropping older experimental interface stub formats.Puyan Lotfi2019-08-2217-227/+104
| | | | | | | | | | | | I've been working on a new tool, llvm-ifs, for merging interface stub files generated by clang and I've iterated on my derivative format of TBE to a newer format. llvm-ifs will only support the new format, so I am going to drop the older experimental interface stubs formats in this commit to make things simpler. Differential Revision: https://reviews.llvm.org/D66573 llvm-svn: 369719
* [ARM] Automatically generate dsp-mlal.ll . NFCAmaury Sechet2019-08-221-46/+177
| | | | llvm-svn: 369718
* [utils] Update shebang to use the environment.Jonas Devlieghere2019-08-221-1/+1
| | | | | | This changes the shebang to launch bash through /usr/bin/env. llvm-svn: 369717
* [sanitizer] Resubmit D66620 from monorepoTaewook Oh2019-08-222-1/+3
| | | | | | | | | | | | | | | | Summary: https://reviews.llvm.org/D66620 is accepted but was based on the multi-repo setup, so I was not able to `arc patch` it. Resubmit the diff under monorepo Committed on behalf of @sugak (Igor Sugak) Reviewers: sugak Subscribers: #sanitizers, llvm-commits, vitalybuka Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D66624 llvm-svn: 369716
* [clang][ifs] New interface stubs format (llvm triple based).Puyan Lotfi2019-08-226-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | After posting llvm-ifs on phabricator, I made some progress in hardening up how I think the format for Interface Stubs should look. There are a number of things I think the TBE format was missing (no endianness, no info about the Object Format because it assumes ELF), so I have added those and broken off from being as similar to the TBE schema. In a subsequent commit I can drop the other formats. An example of how The format will look is as follows: --- !experimental-ifs-v1 IfsVersion: 1.0 Triple: x86_64-unknown-linux-gnu ObjectFileFormat: ELF Symbols: _Z9nothiddenv: { Type: Func } _Z10cmdVisiblev: { Type: Func } ... The format is still marked experimental. Differential Revision: https://reviews.llvm.org/D66446 llvm-svn: 369715
* [libclang][NFC] Remove debug commentJan Korous2019-08-221-3/+1
| | | | llvm-svn: 369714
* [Bugfix] fix r369705 unit testNick Desaulniers2019-08-221-1/+1
| | | | | | | | | | | | | | | | | | | | Summary: Aliases aren't supported on OSX. Add a GNU target triple. Reported-by: leonardchan Reported-by: erik.pilkington Reviewers: leonardchan, erik.pilkington Reviewed By: leonardchan, erik.pilkington Subscribers: dexonsmith, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66622 llvm-svn: 369713
* Add missing dot.Adrian Prantl2019-08-221-1/+1
| | | | llvm-svn: 369712
* Fixing buildbot due to style.David Carlier2019-08-221-2/+4
| | | | llvm-svn: 369711
* Extend FindTypes with CompilerContext to allow filtering by language.Adrian Prantl2019-08-2227-198/+219
| | | | | | | | | | | | | | | | | | | This patch is also motivated by the Swift branch and is effectively NFC for the single-TypeSystem llvm.org branch. In multi-language projects it is extremely common to have, e.g., a Clang type and a similarly-named rendition of that same type in another language. When searching for a type It is much cheaper to pass a set of supported languages to the SymbolFile than having it materialize every result and then rejecting the materialized types that have the wrong language. Differential Revision: https://reviews.llvm.org/D66546 <rdar://problem/54471165> This reapplies r369690 with a previously missing constructor for LanguageSet. llvm-svn: 369710
* TestAppleSimulatorOSType: Pass the --standalone argument to simctlFrederic Riss2019-08-221-1/+1
| | | | | | | | It looks like running without this argument was supported for legacy reasons, but a Xcode 11 beta made the argument mandatory for our usecase. llvm-svn: 369709
* [Sanitizer] checks ASLR on FreeBSDDavid Carlier2019-08-223-2/+29
| | | | | | | | | | | | - Especially MemorySanitizer fails if those sysctl configs are enabled. Reviewers: vitalybuka, emaste, dim Reviewed By: dim Differential Revision: https://reviews.llvm.org/D66582 llvm-svn: 369708
* Revert [heap.py] Add missing declaration for malloc_get_all_zonesVedant Kumar2019-08-221-1/+0
| | | | | | | | This reverts r369684 (git commit cc62e38d258f414c196b566374c606e83a85a034) Adding a declaration doesn't appear to be a sufficient fix. llvm-svn: 369706
* [Clang][CodeGen] set alias linkage on QualTypeNick Desaulniers2019-08-222-4/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: It seems that CodeGen was always using ExternalLinkage when emitting a GlobalDecl with __attribute__((alias)). This leads to symbol redefinitions (ODR) that cause failures at link time for static aliases. This is readily attempting to link an ARM (32b) allyesconfig Linux kernel built with Clang. Reported-by: nathanchance Suggested-by: ihalip Link: https://bugs.llvm.org/show_bug.cgi?id=42377 Link: https://github.com/ClangBuiltLinux/linux/issues/631 Reviewers: rsmith, aaron.ballman, erichkeane Reviewed By: aaron.ballman Subscribers: javed.absar, kristof.beyls, cfe-commits, srhines, ihalip, nathanchance Tags: #clang Differential Revision: https://reviews.llvm.org/D66492 llvm-svn: 369705
* LibFuzzer support for 32bit MSVCMatthew G McGovern2019-08-221-4/+18
| | | | | | | | | This fixes the two build errors when trying to compile LibFuzzer for 32bit with MSVC. - authored by Max Shavrick (mxms at microsoft) llvm-svn: 369704
* [PowerPC] Automatically generate vec_buildvector_loadstore.ll . NFCAmaury Sechet2019-08-221-3/+15
| | | | llvm-svn: 369703
* Revert Extend FindTypes with CompilerContext to allow filtering by language.Adrian Prantl2019-08-2225-201/+198
| | | | | | This reverts r369690 (git commit aa3a564efa6b5fff2129f81a4041069a0233168f) llvm-svn: 369702
* [NFC][InstCombine] Fixup few new tests in unrecognized_three-way-comparison.llRoman Lebedev2019-08-221-6/+6
| | | | llvm-svn: 369701
* [PowerPC] Automatically generate various tests. NFCAmaury Sechet2019-08-2244-1134/+2844
| | | | llvm-svn: 369700
* Rename lldb/source/Interpreter/OptionValueFileSpecListTmp.cpp toAdrian Prantl2019-08-222-1/+1
| | | | | | lldb/source/Interpreter/OptionValueFileSpecList.cpp (NFC) llvm-svn: 369699
* Rename lldb/source/Interpreter/OptionValueFileSpecLIst.cpp toAdrian Prantl2019-08-222-2/+2
| | | | | | lldb/source/Interpreter/OptionValueFileSpecListTmp.cpp (NFC) llvm-svn: 369698
* IR. Change strip* family of functions to not look through aliases.Peter Collingbourne2019-08-2218-298/+253
| | | | | | | | | | | | | | | | | | | | | | | | I noticed another instance of the issue where references to aliases were being replaced with aliasees, this time in InstCombine. In the instance that I saw it turned out to be only a QoI issue (a symbol ended up being missing from the symbol table due to the last reference to the alias being removed, preventing HWASAN from symbolizing a global reference), but it could easily have manifested as incorrect behaviour. Since this is the third such issue encountered (previously: D65118, D65314) it seems to be time to address this common error/QoI issue once and for all and make the strip* family of functions not look through aliases. Includes a test for the specific issue that I saw, but no doubt there are other similar bugs fixed here. As with D65118 this has been tested to make sure that the optimization isn't load bearing. I built Clang, Chromium for Linux, Android and Windows as well as the test-suite and there were no size regressions. Differential Revision: https://reviews.llvm.org/D66606 llvm-svn: 369697
* [NFC][InstCombine] New tests: unrecognized_three-way-comparison.ll is ↵Roman Lebedev2019-08-221-0/+121
| | | | | | ignorant about commutative variants part 2 llvm-svn: 369696
* Fight a bit against global initializers. NFC.Benjamin Kramer2019-08-226-664/+664
| | | | llvm-svn: 369695
* [COFF] Add libcall symbols to the link when LTO is being usedAmy Huang2019-08-228-0/+69
| | | | llvm-svn: 369694
* [libc++] Fix broken <random> testLouis Dionne2019-08-221-16/+23
| | | | | | | | | | | | In r369429, I hoisted a floating point computation to a variable in order to remove a warning. However, it turns out this doesn't play well with floating point arithmetic. This commit reverts r369429 and instead casts the result of the floating point computation to remove the warning. Whether hoisting the computaiton to a variable should give the same result can be investigated independently. llvm-svn: 369693
* Add missing includeAdrian Prantl2019-08-221-0/+1
| | | | llvm-svn: 369692
* Add missing includeAdrian Prantl2019-08-221-0/+1
| | | | llvm-svn: 369691
* Extend FindTypes with CompilerContext to allow filtering by language.Adrian Prantl2019-08-2225-198/+201
| | | | | | | | | | | | | | | | | This patch is also motivated by the Swift branch and is effectively NFC for the single-TypeSystem llvm.org branch. In multi-language projects it is extremely common to have, e.g., a Clang type and a similarly-named rendition of that same type in another language. When searching for a type It is much cheaper to pass a set of supported languages to the SymbolFile than having it materialize every result and then rejecting the materialized types that have the wrong language. Differential Revision: https://reviews.llvm.org/D66546 <rdar://problem/54471165> llvm-svn: 369690
* [llvm-objcopy][NFC] Refactor symbol/section matchingJordan Rupprecht2019-08-224-44/+58
| | | | | | | | | | | | | | | | | | | Summary: The matchers for section/symbol related flags (e.g. `--keep-symbol=Name` or `--regex --keep-symbol=foo.*`) are currently just vectors that are matched linearlly. However, adding wildcard support would require negative matching too, e.g. a symbol should be removed if it matches a wildcard *but* doesn't match some other wildcard. To make the next patch simpler, consolidate matching logic to a class defined in CopyConfig that takes care of matching. Reviewers: jhenderson, seiya, MaskRay, espindola, alexshap Reviewed By: jhenderson, MaskRay Subscribers: emaste, arichardson, jakehehrlich, abrachet, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66432 llvm-svn: 369689
* Disable the ScanDepsReuseFilemanager test on WindowsAlex Lorenz2019-08-221-0/+4
| | | | | | | Right now it fails. I'm going to investigate it and fix it in follow-up commits. llvm-svn: 369688
* Improve the documentation for OpenCL vector types.Aaron Ballman2019-08-221-3/+3
| | | | | | This fixes some minor grammatical issues I noticed when reading the docs, and changes the recommended feature testing approach to use __has_attribute instead of __has_extension. llvm-svn: 369687
* Fix the nullPointerConstant() test to get bots back to green.Aaron Ballman2019-08-221-1/+1
| | | | llvm-svn: 369686
OpenPOWER on IntegriCloud