summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [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
* [AArch64] autogenerate some tests. NFCAmaury Sechet2019-08-221-449/+991
| | | | llvm-svn: 369685
* [heap.py] Add missing declaration for malloc_get_all_zonesVedant Kumar2019-08-221-0/+1
| | | | | | | | The evaluation context isn't guaranteed to have this declaration. Fixes "error: use of undeclared identifier 'malloc_get_all_zones'" bugs. llvm-svn: 369684
* Implement nullPointerConstant() using a better API.Aaron Ballman2019-08-221-4/+3
| | | | | | Instead of manually attempting to identify whether something is a null pointer constant, use Expr::isNullPointerConstant(). llvm-svn: 369683
* gn build: Merge r369680Nico Weber2019-08-221-0/+1
| | | | llvm-svn: 369682
* Introduce FileEntryRef and use it when handling includes to report correct ↵Alex Lorenz2019-08-2224-342/+639
| | | | | | | | | | | | | | | | | | | | | | | dependencies when the FileManager is reused across invocations This commit introduces a parallel API to FileManager's getFile: getFileEntryRef, which returns a reference to the FileEntry, and the name that was used to access the file. In the case of a VFS with 'use-external-names', the FileEntyRef contains the external name of the file, not the filename that was used to access it. The new API is adopted only in the HeaderSearch and Preprocessor for include file lookup, so that the accessed path can be propagated to SourceManager's FileInfo. SourceManager's FileInfo now can report this accessed path, using the new getName method. This API is then adopted in the dependency collector, which now correctly reports dependencies when a file is included both using a symlink and a real path in the case when the FileManager is reused across multiple Preprocessor invocations. Note that this patch does not fix all dependency collector issues, as the same problem is still present in other cases when dependencies are obtained using FileSkipped, InclusionDirective, and HasInclude. This will be fixed in follow-up commits. Differential Revision: https://reviews.llvm.org/D65907 llvm-svn: 369680
* [clangd] Fold string copy into lambda capture. NFC.Benjamin Kramer2019-08-221-3/+2
| | | | llvm-svn: 369679
* gn build: Merge r369677Nico Weber2019-08-221-1/+0
| | | | llvm-svn: 369678
* Revert "[LifetimeAnalysis] Support more STL idioms (template forward ↵Richard Smith2019-08-228-164/+15
| | | | | | | | | | declaration and DependentNameType)" This reverts commit r369591, because it causes the formerly-reliable -Wreturn-stack-address warning to start issuing false positives. Testcase provided on the commit thread. llvm-svn: 369677
* [Clangd] Tweaktesting replace toString with consumeErrorShaurya Gupta2019-08-221-1/+1
| | | | llvm-svn: 369676
* Retire llvm::less_ptr. llvm::deref is much more flexible.Benjamin Kramer2019-08-224-18/+6
| | | | llvm-svn: 369675
* Retire llvm::less/equal in favor of C++14 std::less<>/equal_to<>.Benjamin Kramer2019-08-226-34/+23
| | | | llvm-svn: 369674
OpenPOWER on IntegriCloud