summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [gdb-remote] Sanity check platform pointerAaron Smith2019-02-141-2/+5
| | | | llvm-svn: 354012
* [llvm-readobj][test] Add all GNU_PROPERTY_X86_FEATURE_2_{NEEDED,USED} bitsFangrui Song2019-02-141-13/+13
| | | | | | And delete trailing whitespace llvm-svn: 354011
* [lldb-server] Add remote platform capabilities for WindowsAaron Smith2019-02-146-275/+217
| | | | | | | | | | | | | | | | | | Summary: Implement a few routines for Windows to support some basic process interaction and file system operations. Reviewers: zturner, llvm-commits, labath, jingham Reviewed By: labath Subscribers: emaste, jdoerfert, Hui, labath, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D56232 llvm-svn: 354010
* Print a note to the called macro when diagnosing err_embedded_directiveNico Weber2019-02-146-2/+12
| | | | | | | | Fixes PR40713, see there for the motivation for this. Differential Revision: https://reviews.llvm.org/D58161 llvm-svn: 354009
* [NewPM] Add explicit triple to testFrancis Visoiu Mistrih2019-02-141-0/+2
| | | | | | | | | | This prevents warnings like: > warning: overriding the module target triple with x86_64-apple-darwin on macOS. llvm-svn: 354008
* Relax test to check for a valid number instead of a specific numberDouglas Yung2019-02-141-1/+1
| | | | | | to be like every other check in this test. llvm-svn: 354007
* lld/coff: Simplify error message for comdat selection mismatchesNico Weber2019-02-143-107/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Turns out nobody understands what "conflicting comdat type" is supposed to mean, so just emit a regular "duplicate symbol" error and move the comdat selection information into /verbose output. This also fixes a problem where the error output would depend on the order of .obj files passed. Before this patch: - If passed `one_only.obj discard.obj`, lld-link would only err "conflicting comdat type" - If passed `discard.obj one_only.obj`, lld-link would err "conflicting comdat type" and then "duplicate symbol" Now lld-link only errs "duplicate symbol" in both cases. I considered adding a "Detail" parameter to reportDuplicate() that's printed in parens at the end of the "duplicate symbol" diag if present, and then put the comdat selection mismatch details there, but since users don't know what it's supposed to mean decided against it. I also considered special-casing the Detail message for one_only/discard mismatches, which in practice means "function defined as inline in TU 1 but as out-of-line in TU 2", but I wasn't sure how useful it is so I omitted that too. Differential Revision: https://reviews.llvm.org/D58180 llvm-svn: 354006
* [msan] Don't delete MSanAtExitRecordVitaly Buka2019-02-142-1/+40
| | | | | | | | | | | | | | | | | | Summary: Pre 2.27 libc can run same atexit handler twice We will keep MSanAtExitRecord and reset fun to mark it as executed. Fix PR40162 Reviewers: eugenis Subscribers: jfb, jdoerfert, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D58221 llvm-svn: 354005
* [CUDA][HIP] Use device side kernel and variable names when registering themYaxun Liu2019-02-146-50/+114
| | | | | | | | | | | | | | | | | | __hipRegisterFunction and __hipRegisterVar need to accept device side kernel and variable names so that HIP runtime can associate kernel stub functions in host code with kernel symbols in fat binaries, and associate shadow variables in host code with device variables in fat binaries. Currently, clang assumes kernel functions and device variables have the same name as the kernel stub functions and shadow variables. However, when host is compiled in windows with MSVC C++ ABI and device is compiled with Itanium C++ ABI (e.g. AMDGPU), kernels and device symbols in fat binary are mangled differently than host. This patch gets the device side kernel and variable name by mangling them in the mangle context of aux target. Differential Revision: https://reviews.llvm.org/D58163 llvm-svn: 354004
* [X86] Make (f80 (sint_to_fp (i16))) use fistps/fisttps instead of ↵Craig Topper2019-02-142-27/+23
| | | | | | | | | | fistpl/fisttpl when SSE is enabled. When SSE is enabled sint_to_fp with i16 is blindly promoted to i32, but that changes the behavior of f80 conversion. Move the promotion to i16 to LowerFP_TO_INT so we can limit it based on the floating point type. llvm-svn: 354003
* Revert "[llvm-objdump] Allow short options without arguments to be grouped"Matthew Voss2019-02-144-30/+20
| | | | | | | | Reverted due to failures on the llvm-hexagon-elf. This reverts commit 77e1f27476c89f65eeb496d131065177e6417f23. llvm-svn: 354002
* Relax restriction in tests to where "-emit-llvm-bc" and "-emit-obj" must appear.Douglas Yung2019-02-143-28/+40
| | | | | | | The CHECK lines as structured were requiring them to appear only in a certain position while all that is really needed is to check that they are present. llvm-svn: 354001
* [libFuzzer] trying to fix the bot (can't reproduce the build failure locally)Kostya Serebryany2019-02-141-1/+2
| | | | llvm-svn: 354000
* Fix for asan botsLeonard Chan2019-02-141-9/+12
| | | | llvm-svn: 353999
* [llvm-objdump] Allow short options without arguments to be groupedMatthew Voss2019-02-144-20/+30
| | | | | | | | | | | | | | | | Summary: https://bugs.llvm.org/show_bug.cgi?id=31679 Reviewers: kristina, jhenderson, grimar, jakehehrlich, rupprecht Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57904 llvm-svn: 353998
* [libFuzzer] add threads to the fork mode: now you can pass -fork=N to run N ↵Kostya Serebryany2019-02-143-90/+147
| | | | | | concurrent workers. Fork mode is still work-in-progress. llvm-svn: 353997
* [globalisel][combine] Split existing rules into a match and apply stepDaniel Sanders2019-02-142-21/+51
| | | | | | | | | | | | | | | | | | | Summary: The declarative tablegen definitions split rules into match and apply steps. Prepare for that by doing the same in the C++ implementations. This aids some of the migration effort while the tablegen version is incomplete. Reviewers: bogner, volkan, aditya_nandakumar, paquette, aemerson Reviewed By: aditya_nandakumar Subscribers: rovka, kristof.beyls, Petar.Avramovic, jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58150 llvm-svn: 353996
* [llvm-ar][libObject] Fix relative paths when nesting thin archives.Jordan Rupprecht2019-02-138-72/+115
| | | | | | | | | | | | | | | | | | | | | Summary: When adding one thin archive to another, we currently chop off the relative path to the flattened members. For instance, when adding `foo/child.a` (which contains `x.txt`) to `parent.a`, when flattening it we should add it as `foo/x.txt` (which exists) instead of `x.txt` (which does not exist). As a note, this also undoes the `IsNew` parameter of handling relative paths in r288280. The unit test there still passes. This was reported as part of testing the kernel build with llvm-ar: https://patchwork.kernel.org/patch/10767545/ (see the second point). Reviewers: mstorsjo, pcc, ruiu, davide, david2050, inglorion Reviewed By: ruiu Subscribers: void, jdoerfert, tpimh, mgorny, hans, nickdesaulniers, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57842 llvm-svn: 353995
* [PowerPC][NFC] Added tests for prologue and epilogue code gen.Stefan Pintilie2019-02-134-0/+494
| | | | | | | | | | Added four test files to check the existing behaviour of prologue and epilogue code generation. This patch was done as a setup for the upcoming patch listed on Phabricator that will change how the prologue and epilogue work. The upcoming patch is: https://reviews.llvm.org/D42590 llvm-svn: 353994
* [ConstProp] add IR tests to show miscompiles; NFCSanjay Patel2019-02-131-0/+36
| | | | | | A fix for these is proposed in D51216. llvm-svn: 353992
* [llvm-readobj] Dump GNU_PROPERTY_X86_ISA_1_{NEEDED,USED} notes in ↵Fangrui Song2019-02-133-4/+86
| | | | | | | | | | | | | | | | .note.gnu.property Reviewers: grimar, rupprecht Reviewed By: rupprecht Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58175 llvm-svn: 353991
* [HWASAN] Updated HWASAN design document to better portray the chance of ↵Mitch Phillips2019-02-131-1/+2
| | | | | | | | | | | | | | missing a bug. Summary: Provided rule of thumb percentage chances of miss for 4 and 8 bit tag sizes. Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58195 llvm-svn: 353990
* [SelectionDAG] Inline a single use helper function, and remove last non-MMO ↵Philip Reames2019-02-133-39/+22
| | | | | | | | interface [NFC] For D57601, we need to know whether the instruction is volatile. We'd either have to pass yet another parameter, or just standardize on the MMO interface. I chose the second. llvm-svn: 353989
* [RegAllocGreedy] Take last chance recoloring into account in evicting.Mark Lacey2019-02-131-6/+20
| | | | | | | | | | | | | | | | | | | | | | Last chance recoloring inserts into FixedRegisters those virtual registers it is attempting to assign a physical register to. We must consider these when we consider candidates for eviction so that we do not end up evicting something while we are attempting to recolor to assign it. This is hitting in an out-of-tree target and no longer reproduces on trunk. That does not appear to be a result of it having been fixed, but rather, it appears that optimization changes and/or other changes to register allocation mask the problem. I haven't found a way to come up with a reasonable test case for this (i.e. one that I can actually commit to open source, is reasonable in size, and actually reproduces the issue). rdar://problem/45708741 llvm-svn: 353988
* [AVR] Fix a typo - 's/analisys/analysis'Dylan McKay2019-02-131-1/+1
| | | | llvm-svn: 353987
* [WebAssembly] memory.fillThomas Lively2019-02-137-13/+102
| | | | | | | | | | | | | | | | Summary: memset lowering, fix argument types in memcpy lowering, and test encodings. Depends on D57736. Reviewers: aheejin Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57791 llvm-svn: 353986
* [NewPM] Second attempt at porting ASanLeonard Chan2019-02-1311-200/+489
| | | | | | | | | | | | | | | | | | | | This is the second attempt to port ASan to new PM after D52739. This takes the initialization requried by ASan from the Module by moving it into a separate class with it's own analysis that the new PM ASan can use. Changes: - Split AddressSanitizer into 2 passes: 1 for the instrumentation on the function, and 1 for the pass itself which creates an instance of the first during it's run. The same is done for AddressSanitizerModule. - Add new PM AddressSanitizer and AddressSanitizerModule. - Add legacy and new PM analyses for reading data needed to initialize ASan with. - Removed DominatorTree dependency from ASan since it was unused. - Move GlobalsMetadata and ShadowMapping out of anonymous namespace since the new PM analysis holds these 2 classes and will need to expose them. Differential Revision: https://reviews.llvm.org/D56470 llvm-svn: 353985
* Restore Check for Unreachable Exit Block in -Winfinite-recursionRobert Widmann2019-02-132-2/+15
| | | | | | | | | | | | | | | | | | | Summary: When this was rewritten in D43737, the logic changed to better explore infinite loops. The check for a reachable exit block was deleted which accidentally introduced false positives in case the exit node was unreachable. We were testing for cases like this, but @steven_wu provided an additional test case that I've included in the regression tests for this patch. Reviewers: steven_wu, rtrieu Reviewed By: steven_wu, rtrieu Subscribers: cfe-commits, steven_wu Tags: #clang Differential Revision: https://reviews.llvm.org/D58122 llvm-svn: 353984
* [WebAssembly] Bulk memory intrinsics and builtinsThomas Lively2019-02-138-36/+145
| | | | | | | | | | | | | | | | Summary: implements llvm intrinsics and clang intrinsics for memory.init and data.drop. Reviewers: aheejin Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57736 llvm-svn: 353983
* Revert r353962Serge Guelton2019-02-132-85/+28
| | | | | | | Specialization of Optional for trivially copyable types yields failure on the buildbots I fail to reproduce locally. Better safe than sorry, reverting. llvm-svn: 353982
* ELF: Allow GOT relocs pointing to non-preemptable ifunc to resolve to an ↵Peter Collingbourne2019-02-1316-117/+345
| | | | | | | | | | | | | | | | IRELATIVE where possible. Non-GOT non-PLT relocations to non-preemptible ifuncs result in the creation of a canonical PLT, which now takes the identity of the IFUNC in the symbol table. This (a) ensures address consistency inside and outside the module, and (b) fixes a bug where some of these relocations end up pointing to the resolver. Fixes (at least) PR40474 and PR40501. Differential Revision: https://reviews.llvm.org/D57371 llvm-svn: 353981
* gn build: Merge r353957.Peter Collingbourne2019-02-131-0/+7
| | | | llvm-svn: 353980
* Add missing includeAdrian Prantl2019-02-131-0/+1
| | | | llvm-svn: 353979
* [CMake] Make lldb-test-deps a dependency of check-lldbJonas Devlieghere2019-02-132-1/+4
| | | | | | | We have a custom target for lldb's test dependencies but it must have gotten lost in one of the recent CMake refactorings. llvm-svn: 353978
* [SelectionDAG] Kill last uses of getAtomic w/o a MMO operand [NFC]Philip Reames2019-02-133-48/+36
| | | | | | The helper function was used by only two callers, and largely ended up providing distinct functionality based on optional arguments and opcode. Inline and simply to make the functionality much more clear. llvm-svn: 353977
* [Sema] Delay checking whether objc_designated_initializer is being applied ↵Erik Pilkington2019-02-135-11/+43
| | | | | | | | | | | | | | | | to an init method This fixes a regression that was caused by r335084, which reversed the order that attributes are applied. objc_method_family can change whether a method is an init method, so the order that these attributes are applied matters. The commit fixes this by delaying the init check until after all attributes have been applied. rdar://47829358 Differential revision: https://reviews.llvm.org/D58152 llvm-svn: 353976
* [PowerPC] Stop defining _ARCH_PWR6X on POWER7 and upHubert Tong2019-02-132-17/+16
| | | | | | | | | | | | | | | | | | | | | | | | Summary: The predefined macro `_ARCH_PWR6X` is associated with GCC's `-mcpu=power6x` option, which enables generation of P6 "raw mode" instructions such as `mftgpr`. Later POWER processors build upon the "architected mode", not the raw one. `_ARCH_PWR6X` should not be defined for these later processors. Fixes PR#40236. Reviewers: echristo, hfinkel, kbarton, nemanjai, wschmidt Reviewed By: hfinkel Subscribers: jsji, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58128 llvm-svn: 353975
* [X86] Add 'mpx' to getHostCPUFeatures.Craig Topper2019-02-131-0/+1
| | | | llvm-svn: 353974
* [CodeExtractor] Only lift lifetime markers present in the extraction regionVedant Kumar2019-02-133-37/+194
| | | | | | | | | | | | | | | When CodeExtractor finds liftime markers referencing inputs to the extraction region, it lifts these markers out of the region and inserts them around the call to the extracted function (see r350420, PR39671). However, it should *only* lift lifetime markers that are actually present in the extraction region. I.e., if a start marker is present in the extraction region but a corresponding end marker isn't (or vice versa), only the start marker (or end marker, resp.) should be lifted. Differential Revision: https://reviews.llvm.org/D57834 llvm-svn: 353973
* [Tests] More unordered atomic lowering testsPhilip Reames2019-02-131-1/+324
| | | | | | This time, focused around narrowing and widening transformations. Also, include a few simple memory optimization tests to highlight missed oppurtunities. This is part of building up the test base for D57601. llvm-svn: 353972
* Add missing includeAdrian Prantl2019-02-131-0/+1
| | | | llvm-svn: 353971
* [clang] Make sure C99/C11 features in <float.h> are provided in C++11Louis Dionne2019-02-132-9/+12
| | | | | | | | | | | | | | | | Summary: Previously, those #defines were only provided in C or when GNU extensions were enabled. We need those #defines in C++11 and above, too. Reviewers: jfb, eli.friedman Subscribers: jkorous, dexonsmith, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58149 llvm-svn: 353970
* Re-enable the test disabled in r353836 and hopefully make it pass in gcc buildsNico Weber2019-02-132-20/+17
| | | | | | | | | Argument evaluation order is different between gcc and clang, so pull out the Builder calls to make the generated IR independent of the host compiler's argument evaluation order. Thanks to rnk for reminding me of this clang/gcc difference. llvm-svn: 353969
* Recover elf32-bigmips and elf32-powerpc support in LLDRui Ueyama2019-02-134-2/+43
| | | | | | | | | | | | | This fixes a 7.0 -> 8.0 regression when parsing OUTPUT_FORMAT("elf32-powerpc"); or elf32-bigmips directive in ldscripts as well as an unknown emulation error when lld is invoked by clang due to missed elf32ppclinux case. Patch by vit9696 Differential Revision: https://reviews.llvm.org/D58005 llvm-svn: 353968
* Show "Unknown -z option" error message even if --version or --help are given.Rui Ueyama2019-02-132-1/+2
| | | | | | | | | | Previously, we validated -z options after we process --version or --help flags. So, if one of these flags is given, we wouldn't show an "unknown -z option" error. This patch fixes that behavior. Differential Revision: https://reviews.llvm.org/D55446 llvm-svn: 353967
* [Tests] RMW folding tests w/unordered atomic operationsPhilip Reames2019-02-131-0/+618
| | | | | | We get a suprising number of these today actually, but some are missed. The main point of this is strengthen the test set for D57601. llvm-svn: 353966
* [Headers][mips] Add `__attribute__((__mode__(__unwind_word__)))` to the ↵Simon Atanasyan2019-02-134-3/+28
| | | | | | | | | | | | | | | | | | _Unwind_Word / _Unwind_SWord definitions The rationale of this change is to fix _Unwind_Word / _Unwind_SWord definitions for MIPS N32 ABI. This ABI uses 32-bit pointers, but _Unwind_Word and _Unwind_SWord types are eight bytes long. # The __attribute__((__mode__(__unwind_word__))) is added to the type definitions. It makes them equal to the corresponding definitions used by GCC and allows to override types using `getUnwindWordWidth` function. # The `getUnwindWordWidth` virtual function override in the `MipsTargetInfo` class and provides correct type size values. Differential revision: https://reviews.llvm.org/D58165 llvm-svn: 353965
* [Tests] Add a bunch of tests for load folding w/unordered atomicsPhilip Reames2019-02-131-0/+904
| | | | llvm-svn: 353964
* [X86] Add 'fxsr' to the getHostCPUFeatures detection code.Craig Topper2019-02-131-0/+1
| | | | | | We implicitly mark this feature as enabled when the target is 64-bits, but our detection code for -march=native didn't support it so you can't detect it on 32-bit targets. llvm-svn: 353963
* Re-commit rL353927, patch includedSerge Guelton2019-02-132-28/+85
| | | | | | | | | | | | | | | Make llvm::Optional<T> trivially copyable when T is trivially copyable This is an ever-recurring issue (see https://bugs.llvm.org/show_bug.cgi?id=39427 and https://bugs.llvm.org/show_bug.cgi?id=35978) but I believe that thanks to https://reviews.llvm.org/D54472 we can now ship a decent implementation of this. Basically the fact that llvm::is_trivially_copyable has a consistent behavior across compilers should prevent any ABI issue, and using in-place new instead of memcpy should keep compiler bugs away. This patch is slightly different from the original revision https://reviews.llvm.org/rL353927 but achieves the same goal. It just avoids going through std::conditional which may the code more explicit. llvm-svn: 353962
OpenPOWER on IntegriCloud