summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Make naming in Host.h in line with coding standards.Kristof Beyls2017-03-304-30/+27
| | | | | | | Based on post-commit review comments by Chandler Carruth on https://reviews.llvm.org/D31236. Thanks! llvm-svn: 299062
* [sanitizer] Move fread and fwrite interceptors to sanitizer_commonMaxim Ostapenko2017-03-307-40/+104
| | | | | | | | {M, T, E}San have fread and fwrite interceptors, let's move them to sanitizer_common to enable ASan checks as well. Differential Revision: https://reviews.llvm.org/D31456 llvm-svn: 299061
* Refactor getHostCPUName to allow testing on non-native hardware.Kristof Beyls2017-03-303-214/+256
| | | | | | | | | | | | | | | | | | | | | | | | | This refactors getHostCPUName so that for the architectures that get the host cpu info on linux from /proc/cpuinfo, the /proc/cpuinfo parsing logic is present in the build, even if it wasn't built on a linux system for that architecture. Since the code is present in the build, we can then test that code also on other systems, i.e. we don't need to have buildbots setup for all architectures on linux to be able to test this. Instead, developers will test this as part of the regression test run. As an example, a few unit tests are added to test getHostCPUName for ARM running linux. A unit test is preferred over a lit-based test, since the expectation is that in the future, the functionality here will grow over what can be tested with "llc -mcpu=native". This is a preparation step to enable implementing the range of improvements discussed on PR30516, such as adding AArch64 support, support for big.LITTLE systems, reducing code duplication. Differential Revision: https://reviews.llvm.org/D31236 llvm-svn: 299060
* [APInt] Remove references to integerPartWidth outside of APFloat implentation.Craig Topper2017-03-301-3/+3
| | | | | | Turns out integerPartWidth only explicitly defines the width of the tc functions in the APInt class. Functions that aren't used by APInt implementation itself. Many places in the code base already assume APInt is made up of 64-bit pieces. Explicitly assuming 64-bit here doesn't make that situation much worse. A full audit would need to be done if it ever changes. llvm-svn: 299059
* [APInt] Remove references to integerPartWidth and integerPart outside of ↵Craig Topper2017-03-301-3/+2
| | | | | | | | APFloat implentation. Turns out integerPartWidth only explicitly defines the width of the tc functions in the APInt class. Functions that aren't used by APInt implementation itself. Many places in the code base already assume APInt is made up of 64-bit pieces. Explicitly assuming 64-bit here doesn't make that situation much worse. A full audit would need to be done if it ever changes. llvm-svn: 299058
* libc++ testing: fix invalid python syntaxMehdi Amini2017-03-301-1/+1
| | | | llvm-svn: 299057
* libc++ testing: fix assertion around `use_system_cxx_lib`Mehdi Amini2017-03-301-2/+2
| | | | | | | Actually fix (hopefully) the assertions about `use_system_cxx_lib`, the previous attempt failed because I misread the error. llvm-svn: 299056
* libc++ config testing: `use_system_cxx_lib` can be a boolMehdi Amini2017-03-301-1/+1
| | | | | | Fix the libc++ Green Dragon bot. llvm-svn: 299055
* Reexport operator new / delete from libc++abiMehdi Amini2017-03-301-8/+8
| | | | | | | | | | | | | Both libc++ and libc++abi export a weak definition of operator new/delete. On Darwin, this can often cause dirty __DATA in the shared cache when having to switch from one to the other. Instead, libc++ should reexport libc++abi's implementation of these symbols. Patch by: Ted Kremenek <kremenek@apple.com> Differential Revision: https://reviews.llvm.org/D30765 llvm-svn: 299054
* libc++ testing: allow to provide a path for `use_system_cxx_lib`Mehdi Amini2017-03-302-5/+18
| | | | | | | | | | As we're trying to setup testing / bots for all shipping version of libc++ on macOS/iOS, we'll need to be able to pass a path to where to find the dylib for each previous version of the OS. Differential Revision: https://reviews.llvm.org/D31486 llvm-svn: 299053
* Do not pass an explicit reexported symbol list when building libc++ dylib if ↵Mehdi Amini2017-03-301-1/+5
| | | | | | also defining new/delete llvm-svn: 299052
* [libFuzzer] remove a stale flag from tests, run value-profile-strncmp.test ↵Kostya Serebryany2017-03-304-4/+4
| | | | | | longer (hopefully, will fix the OSX bot) llvm-svn: 299051
* [XRay][compiler-rt] Spell REQUIRES properly for x86_64-linuxDean Michael Berris2017-03-302-2/+2
| | | | | | | | | | Until llvm-xray starts running/supporting binaries that are not ELF64 we only run the FDR tests on x86_64-linux. Previous changes caused the tests to not actually run on x86_64. Follow-up on D31454. llvm-svn: 299050
* [XRay][compiler-rt] Only run tests using llvm-xray in x86_64 for nowDean Michael Berris2017-03-302-3/+4
| | | | | | Followup on D31454. llvm-svn: 299049
* [XRay][compiler-rt] XFAIL the FDR mode tests on aarch64-42vmaDean Michael Berris2017-03-302-0/+3
| | | | | | Followup on D31454. llvm-svn: 299048
* [DAGCombine] A shuffle of a splat is always the splat itselfZvi Rackover2017-03-302-10/+12
| | | | | | | | | | | | | | | | | | | | Summary: Add a simplification: shuffle (splat-shuffle), undef, M --> splat-shuffle Fixes pr32449 Patch by Sanjay Patel Reviewers: eli.friedman, RKSimon, spatel Reviewed By: spatel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31426 llvm-svn: 299047
* [libFuzzer] best effort support for -fsanitize-coverage=trace-pc ↵Kostya Serebryany2017-03-305-1/+32
| | | | | | instrumentation. It is less efficient and precise than -fsanitize-coverage=trace-pc-guard, but still works llvm-svn: 299046
* Use 'unsigned' for enum bitfieldsReid Kleckner2017-03-301-1/+1
| | | | | | | | | Fixes this clang warning on Windows: warning: implicit truncation from 'clang::LangOptions::FPContractModeKind' to bit-field changes value from 2 to -2 [-Wbitfield-constant-conversion] fp_contract = LangOptions::FPC_Fast; ^ ~~~~~~~~~~~~~~~~~~~~~ llvm-svn: 299045
* [XRay][clang] Use llvm::to_string instead of std::stringDean Michael Berris2017-03-301-1/+2
| | | | | | | | This should unbreak some bots. Follow-up on D30388. llvm-svn: 299044
* [asan] Support line numbers in StackVarDescrKuba Mracek2017-03-3032-51/+63
| | | | | | | | When -fsanitize-address-use-after-scope is used, the instrumentation produces line numbers in stack frame descriptions. This patch make sure the ASan runtime supports this format (ParseFrameDescription needs to be able to parse "varname:line") and prepares lit tests to allow line numbers in ASan report output. Differential Revision: https://reviews.llvm.org/D31484 llvm-svn: 299043
* [XRay][compiler-rt] Use llvm-xray in FDR mode testsDean Michael Berris2017-03-302-3/+57
| | | | | | | | | | | | | | | Summary: This change allows us to do an end-to-end test of the FDR mode implementation that uses the llvm-xray tooling to verify that what we are both writing and reading the data in a consistent manner. Reviewers: kpw, pelikan Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31454 llvm-svn: 299042
* [XRay] Add -fxray-{always,never}-instrument= flags to clangDean Michael Berris2017-03-3020-34/+367
| | | | | | | | | | | | | | | | | | | | | | Summary: The -fxray-always-instrument= and -fxray-never-instrument= flags take filenames that are used to imbue the XRay instrumentation attributes using a whitelist mechanism (similar to the sanitizer special cases list). We use the same syntax and semantics as the sanitizer blacklists files in the implementation. As implemented, we respect the attributes that are already defined in the source file (i.e. those that have the [[clang::xray_{always,never}_instrument]] attributes) before applying the always/never instrument lists. Reviewers: rsmith, chandlerc Subscribers: jfb, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D30388 llvm-svn: 299041
* Mask out EXC_SYSCALL exceptions as well.Jason Molenda2017-03-301-1/+1
| | | | | | <rdar://problem/31335814> llvm-svn: 299040
* If the DIUnit has flags passed on it then have DW_AT_producer be a ↵Eric Christopher2017-03-292-1/+52
| | | | | | | | | | combination of DICompileUnit::Producer and Flags. The darwin behavior is unchanged and will continue to use DW_AT_APPLE_flags. Patch by Zhizhou Yang llvm-svn: 299038
* Add the -grecord-gcc-switches option and pass the flags down on the compile ↵Eric Christopher2017-03-292-4/+31
| | | | | | | | unit. Patch by Zhizhou Yang llvm-svn: 299037
* [sanitizers] Fix get_groups interceptor in sanitizer ↵Kostya Serebryany2017-03-292-1/+17
| | | | | | (https://reviews.llvm.org/D31332, patch by Martin Liška) llvm-svn: 299036
* [codeview] Fix buggy BeginIndexMapSize assertionReid Kleckner2017-03-293-13/+41
| | | | | | | | | | | This assert is just trying to test that processing each record adds exactly one entry to the index map. The assert logic was wrong when the first record in the type stream was a field list. I've simplified the code by moving the LF_FIELDLIST-specific logic into the callback for that record type. llvm-svn: 299035
* [CodeGen] clean up and add tests for scalar and-of-setcc; NFCSanjay Patel2017-03-295-27/+104
| | | | | | https://bugs.llvm.org/show_bug.cgi?id=32401 llvm-svn: 299034
* Use FPContractModeKind universallyAdam Nemet2017-03-2911-51/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FPContractModeKind is the codegen option flag which is already ternary (off, on, fast). This makes it universally the type for the contractable info across the front-end: * In FPOptions (i.e. in the Sema + in the expression nodes). * In LangOpts::DefaultFPContractMode which is the option that initializes FPOptions in the Sema. Another way to look at this change is that before fp-contractable on/off were the only states handled to the front-end: * For "on", FMA folding was performed by the front-end * For "fast", we simply forwarded the flag to TargetOptions to handle it in LLVM Now off/on/fast are all exposed because for fast we will generate fast-math-flags during CodeGen. This is toward moving fp-contraction=fast from an LLVM TargetOption to a FastMathFlag in order to fix PR25721. --- This is a recommit of r299027 with an adjustment to the test CodeGenCUDA/fp-contract.cu. The test assumed that even though -ffp-contract=on is passed FE-based folding of FMA won't happen. This is obviously wrong since the user is asking for this explicitly with the option. CUDA is different that -ffp-contract=fast is on by default. The test used to "work" because contract=fast and contract=on were maintained separately and we didn't fold in the FE because contract=fast was on due to the target-default. This patch consolidates the contract=on/fast/off state into a ternary state hence the change in behavior. --- Differential Revision: https://reviews.llvm.org/D31167 llvm-svn: 299033
* Move current thread data out of lsan_common on linuxFrancis Ricci2017-03-292-4/+4
| | | | | | | | | | | | | | Summary: Now that we have a platform-specific non-common lsan file, use it to store non-common lsan data. Reviewers: kubamracek Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31472 llvm-svn: 299032
* Remove failing check from platform specific darwin lsan initializerFrancis Ricci2017-03-291-3/+3
| | | | | | | | | | | | | | Summary: We currently don't have any platform specific darwin lsan modules, don't force failure if they don't exist. Reviewers: kubamracek Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31473 llvm-svn: 299031
* [X86IselLowering] Remove extraneous semicolon. NFCI.Davide Italiano2017-03-291-1/+1
| | | | | | Unbreaks the build with GCC -Werror. llvm-svn: 299030
* Revert "Use FPContractModeKind universally"Adam Nemet2017-03-2910-60/+49
| | | | | | | | This reverts commit r299027. It's causing a test failure in clang's CodeGenCUDE/fp-contract.cu llvm-svn: 299029
* Centralize libc++ test skipping logicPavel Labath2017-03-2918-79/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This aims to replace the different decorators we've had on each libc++ test with a single solution. Each libc++ will be assigned to the "libc++" category and a single central piece of code will decide whether we are actually able to run libc++ test in the given configuration by enabling or disabling the category (while giving the user the opportunity to override this). I started this effort because I wanted to get libc++ tests running on android, and none of the existing decorators worked for this use case: - skipIfGcc - incorrect, we can build libc++ executables on android with gcc (in fact, after this, we can now do it on linux as well) - lldbutil.skip_if_library_missing - this checks whether libc++.so is loaded in the proces, which fails in case of a statically linked libc++ (this makes copying executables to the remote target easier to manage). To make this work I needed to split out the pseudo_barrier code from the force-included file, as libc++'s atomic does not play well with gcc on linux, and this made every test fail, even though we need the code only in the threading tests. So far, I am only annotating one of the tests with this category. If this does not break anything, I'll proceed to update the rest. Reviewers: jingham, zturner, EricWF Subscribers: srhines, lldb-commits Differential Revision: https://reviews.llvm.org/D30984 llvm-svn: 299028
* Use FPContractModeKind universallyAdam Nemet2017-03-2910-49/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | FPContractModeKind is the codegen option flag which is already ternary (off, on, fast). This makes it universally the type for the contractable info across the front-end: * In FPOptions (i.e. in the Sema + in the expression nodes). * In LangOpts::DefaultFPContractMode which is the option that initializes FPOptions in the Sema. Another way to look at this change is that before fp-contractable on/off were the only states handled to the front-end: * For "on", FMA folding was performed by the front-end * For "fast", we simply forwarded the flag to TargetOptions to handle it in LLVM Now off/on/fast are all exposed because for fast we will generate fast-math-flags during CodeGen. This is toward moving fp-contraction=fast from an LLVM TargetOption to a FastMathFlag in order to fix PR25721. Differential Revision: https://reviews.llvm.org/D31167 llvm-svn: 299027
* revert test commit r299024Huihui Zhang2017-03-291-1/+0
| | | | llvm-svn: 299026
* Remove parameter names from template instantiations to make them compact. NFC.Rui Ueyama2017-03-291-47/+35
| | | | llvm-svn: 299025
* test commit, add blank lineHuihui Zhang2017-03-291-0/+1
| | | | llvm-svn: 299024
* Add NetBSD path for Debugging Information in Separate FilesKamil Rytarowski2017-03-291-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: NetBSD stores debug information files in the `/usr/libdata/debug` path. This change fixes debugging distribution executables, e.g. `look`(1): ``` $ lldb /usr/bin/look (lldb) target create "/usr/bin/look" Current executable set to '/usr/bin/look' (x86_64). (lldb) b main Breakpoint 1: where = look`main + 22 at look.c:107, address = 0x0000000000000da6 (lldb) r Process 23473 launched: '/usr/bin/look' (x86_64) Process 23473 stopped * thread #1, stop reason = breakpoint 1.1 frame #0: 0x0000000186600da6 look`main(argc=1, argv=0x00007f7fffc7c488) at look.c:107 104 105 string = NULL; 106 file = _PATH_WORDS; -> 107 termchar = '\0'; 108 while ((ch = getopt(argc, argv, "dft:")) != -1) 109 switch(ch) { 110 case 'd': (lldb) ``` There is no `/usr/lib/debug` path on NeBSD, so remove it from search. Sponsored by <The NetBSD Foundation> Reviewers: jingham, emaste, kettenis, labath, joerg Reviewed By: labath Subscribers: aprantl, #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D31461 llvm-svn: 299023
* [DAGCombiner] Remove else after return. NFCI.Davide Italiano2017-03-291-7/+4
| | | | llvm-svn: 299022
* Revert r298815: Do not use assert to report broken input files.Rui Ueyama2017-03-291-4/+2
| | | | | | | This reverts commit because this really shouldn't happen unless there's a bug in LLD. llvm-svn: 299021
* Move the definition of SBListener::GetSP() to SBListener.cpp.Sean Callanan2017-03-292-1/+3
| | | | | | | This is the requirement for all functions in the public API, to eliminate weak symbol definitions. llvm-svn: 299020
* Re-land: "Make NativeExeSymbol a concrete subclass of NativeRawSymbol [PDB]"Adrian McCarthy2017-03-297-35/+134
| | | | | | | | | | | | | | This should work on all platforms now that r299006 has landed. Tested locally on Windows and Linux. This moves exe symbol-specific method implementations out of NativeRawSymbol into a concrete subclass. Also adds implementations for hasCTypes and hasPrivateSymbols and a simple test to ensure the native reader can access the summary information for the executable from the PDB. Original Differential Revision: https://reviews.llvm.org/D31059 llvm-svn: 299019
* Add ifunc support to ModuleSymbolTable.Rafael Espindola2017-03-293-5/+30
| | | | | | | Do that by creating a global_values, which is similar to global_objects, but also iterates over aliases and ifuncs. llvm-svn: 299018
* [InstCombine] Correct the check for vector GEPsMatthew Simpson2017-03-292-5/+16
| | | | | | | | | | | | | | Some of the GEP combines (e.g., descaling) can't handle vector GEPs. We have an existing check that attempts to bail out if given a vector GEP. However, the check only tests the GEP's pointer operand. A GEP results in a vector of pointers if at least one of its operands is vector-typed (e.g., its pointer operand could be a scalar, but its index could be a vector). We should just check the type of the GEP itself. This should fix PR32414. Reference: https://bugs.llvm.org/show_bug.cgi?id=32414 Differential Revision: https://reviews.llvm.org/D31470 llvm-svn: 299017
* Add allocator_frees_and_returns_null_on_realloc_zero=false flag for ↵Filipe Cabecinhas2017-03-293-2/+31
| | | | | | | | | | | | | | | | | | | compatibility with allocators which allow a realloc(p, 0) and don't free the pointer. Summary: I know of two implementations that do this (ASan is not protecting against accessing the returned memory for now, just like malloc(0)): SIE libc on the PS4 dlmalloc has a flag for this This allows us to properly support this behaviour. Reviewers: vsk, kcc Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D31295 llvm-svn: 299016
* [Objective-C] Miscellaneous -fobjc-weak FixesBrian Kelley2017-03-295-18/+41
| | | | | | | | | | | | | | Summary: After examining the remaining uses of LangOptions.ObjCAutoRefCount, found a some additional places to also check for ObjCWeak not covered by previous test cases. Added a test file to verify all the code paths that were changed. Reviewers: rsmith, doug.gregor, rjmccall Reviewed By: rjmccall Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D31007 llvm-svn: 299015
* [Objective-C] Fix "weak-unavailable" warning with -fobjc-weakBrian Kelley2017-03-299-43/+56
| | | | | | | | | | | | | | Summary: clang should produce the same errors Objective-C classes that cannot be assigned to weak pointers under both -fobjc-arc and -fobjc-weak. Check for ObjCWeak along with ObjCAutoRefCount when analyzing pointer conversions. Add an -fobjc-weak pass to the existing arc-unavailable-for-weakref test cases to verify the behavior is the same. Reviewers: rsmith, doug.gregor, rjmccall Reviewed By: rjmccall Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D31006 llvm-svn: 299014
* [DAGCombiner] unify type checks and add asserts; NFCISanjay Patel2017-03-291-52/+58
| | | | | | We had a mix of type checks and usage that wasn't very clear. llvm-svn: 299013
* Unbreak windows bot.Graydon Hoare2017-03-291-1/+1
| | | | llvm-svn: 299012
OpenPOWER on IntegriCloud