summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* cmake: Fix install of libclang-cpp.so when LLVM_INSTALL_TOOLCHAIN_ONLY=ONTom Stellard2019-07-121-0/+5
| | | | | | | | | | | | | | | | | | | | | Summary: If CLANG_LINK_CLANG_DYLIB is also enabled, then this library needs to be installed. Fixes PR42575. Reviewers: beanz, smeenai Subscribers: mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64582 Conflicts: clang/tools/clang-shlib/CMakeLists.txt llvm-svn: 365905
* [AMDGPU] Restrict v_cndmask_b32 abs/neg modifiers to f32Jay Foad2019-07-124-2/+62
| | | | | | | | | | | | | | | | | | Summary: D64497 allowed abs/neg source modifiers on v_cndmask_b32 but it doesn't make any sense to apply them to f16 operands; they would interpret the bits of the value as an f32, giving nonsensical results. This patch restricts them to f32 operands. Reviewers: arsenm, hakzsam Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64636 llvm-svn: 365904
* Delete dead storesFangrui Song2019-07-1217-58/+27
| | | | llvm-svn: 365903
* cmake: Add INSTALL_WITH_TOOLCHAIN option to add_*_library macrosTom Stellard2019-07-126-13/+12
| | | | | | | | | | | | | | | | | | | Summary: This will simplify the macros by allowing us to remove the hard-coded list of libraries that should be installed when LLVM_INSTALL_TOOLCHAIN_ONLY is enabled. Reviewers: beanz, smeenai Reviewed By: beanz Subscribers: aheejin, mehdi_amini, mgorny, steven_wu, dexonsmith, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D64580 llvm-svn: 365902
* Delete dead storesFangrui Song2019-07-124-6/+2
| | | | llvm-svn: 365901
* Dump floating-point values as strings when dumping to JSON.Aaron Ballman2019-07-123-5063/+5086
| | | | | | This fixes a bug where we would have an invalid JSON attribute (e.g., "value": inf). It also increases the precision of the values because they're not represented as approximate doubles with the host architecture's floating-point model. llvm-svn: 365900
* Revert "[clangd] Implement typeHierarchy/resolve for subtypes"Russell Gallop2019-07-1210-187/+13
| | | | | | | | Causing test failure on Windows bot This reverts commit 5b9484e559d44bd923fc290e335891b1dd2e17c4. llvm-svn: 365899
* [Driver] Delete dead codeFangrui Song2019-07-122-7/+1
| | | | llvm-svn: 365898
* [gn] Tag unneeded variable.Bryant Wong2019-07-121-0/+3
| | | | | | | | | | When only building targets without assembly parsers (e.g. `llvm_targets_to_build = ["NVPTX"]`), `all_targets` is empty and causes GN to warn about an assigned-but-unused variable. Differential Revision: https://reviews.llvm.org/D31727 llvm-svn: 365897
* [DAGCombine] narrowExtractedVectorBinOp - wrap subvector extraction in ↵Simon Pilgrim2019-07-121-9/+11
| | | | | | | | helper. NFCI. First step towards supporting 'free' subvector extractions other than concat_vectors. llvm-svn: 365896
* [LIT] Emit timeout error message only if timeout was reachedAlexey Bader2019-07-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | Summary: This improves readability of LIT output: previously error messages gets emitted that say that there was no error: error: command reached timeout: False Patch by Alexey Sachkov. Reviewers: ddunbar, mgorny, modocache Reviewed By: mgorny Subscribers: delcypher, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64240 llvm-svn: 365895
* [clangd] Fixed toHalfOpenFileRangeShaurya Gupta2019-07-123-10/+144
| | | | | | | | | | | | | | | | | | | | | | | | Summary: - Fixed toHalfOpenFileRange to work for macros as well as template instantiations - Added unit tests Breaking test case for older version of toHalfOpenFileRange: \# define FOO(X) X++ int a = 1; int b = FOO(a); toHalfOpenFileRange for the sourceRange of VarDecl for b returned the wrong Range. Reviewers: sammccall, kadircet Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64562 llvm-svn: 365894
* [InstCombine] Fold select (icmp sgt x, -1), lshr (X, Y), ashr (X, Y) to ashr ↵David Bolvansky2019-07-122-105/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (X, Y)) Summary: (select (icmp sgt x, -1), lshr (X, Y), ashr (X, Y)) -> ashr (X, Y)) (select (icmp slt x, 1), ashr (X, Y), lshr (X, Y)) -> ashr (X, Y)) Fixes PR41173 Alive proof by @lebedev.ri (thanks) Name: PR41173 %cmp = icmp slt i32 %x, 1 %shr = lshr i32 %x, %y %shr1 = ashr i32 %x, %y %retval.0 = select i1 %cmp, i32 %shr1, i32 %shr => %retval.0 = ashr i32 %x, %y Optimization: PR41173 Done: 1 Optimization is correct! Reviewers: lebedev.ri, spatel Reviewed By: lebedev.ri Subscribers: nikic, craig.topper, llvm-commits, lebedev.ri Tags: #llvm Differential Revision: https://reviews.llvm.org/D64285 llvm-svn: 365893
* Fix test case of llvm-nm using implicit a.outAlex Brachet2019-07-121-1/+1
| | | | llvm-svn: 365892
* [test/Object, obj2yaml] - Move test cases from test/Object and cleanup.George Rimar2019-07-1214-189/+223
| | | | | | | | | | | | | | | test/Object is not correct place to have tests that check obj2yaml functionality, because we have test/tools/obj2yaml folder for that. In this patch I merged a few test cases with their YAMLs from Inputs folder, converted one of binary inputs and moved them to tools/obj2yaml folder. There are still another tests that might need the same, so it is initial step. Differential revision: https://reviews.llvm.org/D64555 llvm-svn: 365891
* [libomptarget] Fix typos and grammar in error messages, NFC.Jonas Hahnfeld2019-07-121-4/+4
| | | | llvm-svn: 365890
* [tools] [llvm-nm] Default to reading from stdin not a.outAlex Brachet2019-07-123-4/+43
| | | | | | | | | | | | | | | | Summary: This moves away from defaulting to a.out and uses stdin only if stdin has a file redirected to it. This has been discussed on the llvm-dev mailing list [[ https://lists.llvm.org/pipermail/llvm-dev/2019-July/133642.html | here ]]. Reviewers: jhenderson, rupprecht, MaskRay, chrisjackson Reviewed By: jhenderson, MaskRay Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64290 llvm-svn: 365889
* [clangd] Prioritize indexing of files that share a basename with the open file.Sam McCall2019-07-127-8/+97
| | | | | | | | | | | | | | | | | Summary: In practice, opening Foo.h will still often result in Foo.cpp making the second index build instead of the first, as the rebuild policy doesn't know to wait. Reviewers: kadircet Subscribers: ilya-biryukov, javed.absar, MaskRay, jkorous, arphaman, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64575 llvm-svn: 365888
* [JSONCompilationDatabase] Strip distcc/ccache/gomacc wrappers from parsed ↵Sam McCall2019-07-122-4/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commands. Summary: It's common to use compiler wrappers by setting CC="gomacc clang++". This results in both args appearing in compile_commands.json, and clang's driver can't handle this. This patch attempts to recognize this pattern (by looking for well-known wrappers) and dropping argv0 in this case. It conservatively ignores other cases for now: - wrappers with unknown names - wrappers that accept -flags - wrappers where the compiler to use is implied (usually cc or gcc) This is done at the JSONCompilationDatabase level rather than somewhere more fundamental, as (hopefully) this isn't a general conceptual problem, but a messy aspect of the nature of the ecosystem around compile_commands.json. i.e. compilation databases more tightly tied to the build system should not have this problem. Reviewers: phosek, klimek Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64297 llvm-svn: 365887
* Revert "[DwarfDebug] Dump call site debug info"Djordje Todorovic2019-07-1223-1103/+54
| | | | | | | | A build failure was found on the SystemZ platform. This reverts commit 9e7e73578e54cd22b3c7af4b54274d743b6607cc. llvm-svn: 365886
* [clangd] Move the expandAuto tweak from global namespace into annoymous ↵Haojian Wu2019-07-122-2/+4
| | | | | | namespace. llvm-svn: 365885
* [Object/ELF] - Improve error reporting for notes.George Rimar2019-07-122-89/+128
| | | | | | | | | | This patch improves the error messages reported for note sections and phdrs and also makes a cleanup for existent test case. Differential revision: https://reviews.llvm.org/D64470 llvm-svn: 365884
* [NFC][PowerPC] Added test for MachinePRE.Kai Luo2019-07-121-0/+141
| | | | llvm-svn: 365883
* [clangd] Don't run the prepare for tweaks that are disabled.Haojian Wu2019-07-125-24/+25
| | | | | | | | | | | | | | Summary: Previously, we ran the prepare, even for the tweaks that are disabled. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64565 llvm-svn: 365882
* [RISCV] Allow parsing dot '.' in assemblySam Elliott2019-07-124-0/+13
| | | | | | | | | | | | | | | | | | | | | Summary: Useful for jumps, such as `j .`. I am not sure who should review this. Do not hesitate to change the reviewers if needed. Reviewers: asb, jrtc27, lenary Reviewed By: lenary Subscribers: MaskRay, lenary, hiraditya, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63669 Patch by John LLVM (JohnLLVM) llvm-svn: 365881
* Enable compiler-rt on SPARCRainer Orth2019-07-129-12/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enables compiler-rt on SPARC targets. Most of the changes are straightforward: - Add 32 and 64-bit sparc to compiler-rt - lib/builtins/fp_lib.h needed to check if the int128_t and uint128_t types exist (which they don't on sparc) There's one issue of note: many asan tests fail to compile on Solaris/SPARC: fatal error: error in backend: Function "_ZN7testing8internal16BoolFromGTestEnvEPKcb": over-aligned dynamic alloca not supported. Therefore, while asan is still built, both asan and ubsan-with-asan testing is disabled. The goal is to check if asan keeps compiling on Solaris/SPARC. This serves asan in gcc, which doesn't have the problem above and works just fine. With this patch, sparcv9-sun-solaris2.11 test results are pretty good: Failing Tests (9): Builtins-sparc-sunos :: divtc3_test.c Builtins-sparcv9-sunos :: compiler_rt_logbl_test.c Builtins-sparcv9-sunos :: divtc3_test.c [...] UBSan-Standalone-sparc :: TestCases/TypeCheck/misaligned.cpp UBSan-Standalone-sparcv9 :: TestCases/TypeCheck/misaligned.cpp The builtin failures are due to Bugs 42493 and 42496. The tree contained a few additonal patches either currently in review or about to be submitted. Tested on sparcv9-sun-solaris2.11. Differential Revision: https://reviews.llvm.org/D40943 llvm-svn: 365880
* [Sanitizers] Fix SanitizerCommon-Unit :: ↵Rainer Orth2019-07-121-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | ./Sanitizer-*-Test/MemoryMappingLayout.DumpListOfModules on Solaris The MemoryMappingLayout.DumpListOfModules currently FAILs on Solaris: [ RUN ] MemoryMappingLayout.DumpListOfModules /vol/llvm/src/compiler-rt/local/lib/sanitizer_common/tests/sanitizer_procmaps_test.cc:52: Failure Value of: found Actual: false Expected: true [ FAILED ] MemoryMappingLayout.DumpListOfModules (22 ms) The problem is that the test expects the executable name from modules[i].full_name(), however the pr_mapname field of struct prmap is just the entry in /proc/<pid>/object, which is "a.out" instead of "Sanitizer-i386-Test". Fortunately, the real name can be determined by looking in proc/<pid>/path where "a.out" is a symlink to the real path. Tested on x86_64-pc-solaris2.11. Differential Revision: https://reviews.llvm.org/D64559 llvm-svn: 365879
* Test commit. NFC.Bryant Wong2019-07-121-0/+1
| | | | | | Formatting fix. llvm-svn: 365878
* [Driver] Delete --no-add-needed for RHEL7 or newerFangrui Song2019-07-121-3/+0
| | | | | | | | This is really not needed. gcc driver doesn't add this option. BTW, since binutils 2.22, --no-copy-dt-needed-entries (new name of --no-add-needed) is the default. llvm-svn: 365877
* [YAMLIO] Wrap explicit specialization in llvm::yaml to appease build botsFangrui Song2019-07-121-0/+4
| | | | llvm-svn: 365876
* Fix odd variable names.Rui Ueyama2019-07-125-7/+7
| | | | llvm-svn: 365875
* [test] Delete trailing spaces from YAML tests after D65566/r365869Fangrui Song2019-07-122-51/+51
| | | | llvm-svn: 365874
* [test] Delete trailing spaces from YAML testsFangrui Song2019-07-124-16/+16
| | | | llvm-svn: 365873
* test/Driver/fsanitize.c: delete -target x86_64-linux-gnu from tests that ↵Fangrui Song2019-07-121-21/+21
| | | | | | | | should always be available Follow-up of D64317/r365587. llvm-svn: 365872
* [AMDGPU] Fixed comment. NFC.Stanislav Mekhanoshin2019-07-121-4/+1
| | | | llvm-svn: 365871
* [mips] Fix JmpLink to texternalsym and tglobaladdr on mcroMIPS R6Simon Atanasyan2019-07-126-16/+39
| | | | | | | | | | | | | | | | There is not match for the `MipsJmpLink texternalsym` and `MipsJmpLink tglobaladdr` patterns for microMIPS R6. As a result LLVM incorrectly selects the `JALRC16` compact 2-byte instruction which takes a target instruction address from a register only and assign `R_MIPS_32` relocation for this instruction. This relocation completely overwrites `JALRC16` and nearby instructions. This patch adds missed matching patterns, selects `BALC` instruction and assign a correct `R_MICROMIPS_PC26_S1` relocation. Differential Revision: https://reviews.llvm.org/D64552 llvm-svn: 365870
* [YAMLIO] Remove trailing spaces when outputting mapsFangrui Song2019-07-127-24/+74
| | | | | | | | | | | | | | | | | | llvm::yaml::Output::paddedKey unconditionally outputs spaces, which are superfluous if the value to be dumped is a sequence or map. Change `bool NeedsNewLine` to `StringRef Padding` so that it can be overridden to `\n` if the value is a sequence or map. An empty map/sequence is special. It is printed as `{}` or `[]` without a newline, while a non-empty map/sequence follows a newline. To handle this distinction, add another variable `PaddingBeforeContainer` and does the special handling in endMapping/endSequence. Reviewed By: grimar, jhenderson Differential Revision: https://reviews.llvm.org/D64566 llvm-svn: 365869
* [windows] re-call signal in sigint_handler for WindowsNathan Lanza2019-07-121-0/+3
| | | | | | | | | | | | Summary: Windows requires re-setting the signal handler each time it is used and thus ctrl-c was not behaving properly on Windows Reviewers: jfb Differential Revision: https://reviews.llvm.org/D64046 llvm-svn: 365868
* [clangd] Implement typeHierarchy/resolve for subtypesNathan Ridge2019-07-1210-17/+191
| | | | | | | | | | | | | | | | | | Summary: This allows the client to resolve subtypes one level at a time. For supertypes, this is not necessary, because we eagerly compute supertypes and return all levels. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64308 llvm-svn: 365867
* [X86][PowerPC] Support -mlong-double-128Fangrui Song2019-07-129-12/+52
| | | | | | | | | | | | | | | This patch makes the driver option -mlong-double-128 available for X86 and PowerPC. The CC1 option -mlong-double-128 is available on all targets for users to test on unsupported targets. On PowerPC, -mlong-double-128 uses the IBM extended double format because we don't support -mabi=ieeelongdouble yet (D64283). Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D64277 llvm-svn: 365866
* docs/GithubMove.rst: Add link to GitHub migration status pageTom Stellard2019-07-121-0/+7
| | | | llvm-svn: 365865
* Return Undef from isBytewiseValue for empty arrays or structsVitaly Buka2019-07-122-4/+8
| | | | | | | | | | | | Reviewers: pcc, eugenis Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64052 llvm-svn: 365864
* NFC: Unforget a colon in a few CHECK: directives.Artem Dergachev2019-07-126-6/+7
| | | | | | Differential Revision: https://reviews.llvm.org/D64526 llvm-svn: 365863
* [PowerPC] Default to -fomit-frame-pointer when optimization is enabledFangrui Song2019-07-122-3/+8
| | | | | | | NetBSD, Linux, CloudABI and Hurd already omit frame pointer for PowerPC. Make it do so for other platforms. llvm-svn: 365862
* [analyzer] exploded-graph-rewriter: Improve source location dumps.Artem Dergachev2019-07-1210-65/+134
| | | | | | | | - Correctly display macro expansion and spelling locations. - Use the same procedure to display location context call site locations. - Display statement IDs for program points. llvm-svn: 365861
* [Driver] Refactor interaction between -f(no-)?omit-frame-pointer and ↵Fangrui Song2019-07-125-69/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -m(no-)?omit-leaf-frame-pointer Use a tri-state enum to represent shouldUseFramePointer() and shouldUseLeafFramePointer(). This simplifies the logic and fixes PR9825: -fno-omit-frame-pointer doesn't imply -mno-omit-leaf-frame-pointer. and PR24003: /Oy- /O2 should not omit leaf frame pointer: this matches MSVC x86-32. (/Oy- is a no-op on MSVC x86-64.) and: when CC1 option -mdisable-fp-elim if absent, -momit-leaf-frame-pointer can also be omitted. The new behavior matches GCC: -fomit-frame-pointer wins over -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer loses out to -momit-leaf-frame-pointer The behavior makes lots of sense. We have 4 states: - 00) leaf retained, non-leaf retained - 01) leaf retained, non-leaf omitted (this is invalid) - 10) leaf omitted, non-leaf retained (what -momit-leaf-frame-pointer was designed for) - 11) leaf omitted, non-leaf omitted "omit" options taking precedence over "no-omit" options is the only way to make 3 valid states representable with -f(no-)?omit-frame-pointer and -m(no-)?omit-leaf-pointer. Reviewed By: ychen Differential Revision: https://reviews.llvm.org/D64294 llvm-svn: 365860
* [MachinePipeliner] Fix order for nodes with Anti dependence in same cycleJinsong Ji2019-07-122-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Problem exposed in PowerPC functional testing. We did not consider Anti dependence for nodes in same cycle, so we may end up generating bad machine code. eg: the reduced test won't verify. *** Bad machine code: Using an undefined physical register *** - function: lame_encode_buffer_interleaved - basic block: %bb.4 (0x4bde4e12928) - instruction: %29:gprc = ADDZE %27:gprc, implicit-def dead $carry, implicit $carry - operand 3: implicit $carry Reviewers: bcahoon, kparzysz, hfinkel Subscribers: MaskRay, wuzish, nemanjai, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64192 llvm-svn: 365859
* Handle IntToPtr in isBytewiseValueVitaly Buka2019-07-123-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This helps with more efficient use of memset for pattern initialization From @pcc prototype for -ftrivial-auto-var-init=pattern optimizations Binary size change on CTMark, (with -fuse-ld=lld -Wl,--icf=all, similar results with default linker options) ``` master patch diff Os 8.238864e+05 8.238864e+05 0.0 O3 1.054797e+06 1.054797e+06 0.0 Os zero 8.292384e+05 8.292384e+05 0.0 O3 zero 1.062626e+06 1.062626e+06 0.0 Os pattern 8.579712e+05 8.338048e+05 -0.030299 O3 pattern 1.090502e+06 1.067574e+06 -0.020481 ``` Zero vs Pattern on master ``` zero pattern diff Os 8.292384e+05 8.579712e+05 0.036578 O3 1.062626e+06 1.090502e+06 0.025124 ``` Zero vs Pattern with the patch ``` zero pattern diff Os 8.292384e+05 8.338048e+05 0.003333 O3 1.062626e+06 1.067574e+06 0.003193 ``` Reviewers: pcc, eugenis Subscribers: hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D63967 llvm-svn: 365858
* Codegen, NFC: 32bit test in auto-var-init.cppVitaly Buka2019-07-121-115/+107
| | | | llvm-svn: 365857
* Mark destroying delete test as UNSUPPORTED with clang 7Eric Fiselier2019-07-121-1/+1
| | | | llvm-svn: 365856
OpenPOWER on IntegriCloud