summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [SCCP] Get rid of redundant call for getPredicateInfoFor (NFC).Florian Hahn2018-12-181-1/+1
| | | | | | We can use the result fetched a few lines above. llvm-svn: 349527
* [X86] Don't use SplitOpsAndApply to create ISD::UADDSAT/ISD::USUBSAT nodes. ↵Craig Topper2018-12-181-30/+8
| | | | | | | | Let type legalization and op legalization deal with it. Now that we've switched to target independent nodes we can rely on generic infrastructure to do the legalization for us. llvm-svn: 349526
* [OPENMP][NVPTX]Added extra sync point to the inter-warp copy function.Alexey Bataev2018-12-182-0/+9
| | | | | | | The parallel reduction operation requires an extra synchronization point in the inter-warp copy function to avoid divergence. llvm-svn: 349525
* [ELF] Place .note in the first page to ensure they are available in core filesFangrui Song2018-12-182-21/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Other large sections (e.g. .rela.dyn .dynstr) may push .note.* off the first page. They won't be available in core files if RLIMIT_CORE is limited. This patch gives priority to alloctable SHT_NOTE sections so that they are assuredly in the first page and will be available in core files. They are small and contain important information (e.g. .note.gnu.build-id identifies the origin of the core, .note.tag stores NT_FREEBSD_ABI_TAG). Note: gold Output_section_order has a similar rule: // Loadable read-only note sections come next so that the PT_NOTE // segment is on the first page of the executable. ORDER_RO_NOTE, Reviewers: ruiu, pcc, espindola Subscribers: emaste, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D55800 llvm-svn: 349524
* [InstCombine] refactor isCheapToScalarize(); NFCSanjay Patel2018-12-181-33/+25
| | | | | | | | | As the FIXME indicates, this has the potential to go overboard. So I'm not sure if it's even worth keeping this vs. iteratively doing simple matches, but we might as well clean it up. llvm-svn: 349523
* Rework the C strings tests to use ASSERT_SAME_TYPE. NFC there. Also change ↵Marshall Clow2018-12-185-135/+148
| | | | | | cwchar.pass.cpp to avoid constructing a couple things from zero - since apparently they can be enums in some weird C library. NFC there, either, since the values were never used. llvm-svn: 349522
* [Tests] [OpenMP] XFAIL also for ppc64le.Stefan Pintilie2018-12-182-2/+2
| | | | | | | Two tests were XFAILed for powerpc64le in r349512. They should have also been XFAILed for ppc64le. llvm-svn: 349521
* [X86] Use SADDSAT/SSUBSAT instead of ADDS/SUBSNikita Popov2018-12-188-38059/+499
| | | | | | | | | | | | Migrate the X86 backend from X86ISD opcodes ADDS and SUBS to generic ISD opcodes SADDSAT and SSUBSAT. This also improves scodegen for @llvm.sadd.sat() and @llvm.ssub.sat() intrinsics. This is a followup to D55787 and part of PR40056. Differential Revision: https://reviews.llvm.org/D55833 llvm-svn: 349520
* [X86] Create PSUBUS from (add (umax X, C), -C)Craig Topper2018-12-182-310/+146
| | | | | | | | | | | | InstCombine seems to canonicalize or PSUB patter into a max with the cosntant and an add with an inverse of the constant. This patch recognizes this pattern and turns it into PSUBUS. Future work could improve undef element handling. Fixes some of PR40053 Differential Revision: https://reviews.llvm.org/D55780 llvm-svn: 349519
* Buildfix for r345516 (Clang compilation failing).Alexandre Ganea2018-12-181-1/+1
| | | | llvm-svn: 349518
* [CMake] Default options for faster executables on MSVCAlexandre Ganea2018-12-183-0/+21
| | | | | | | | | | - Disable incremental linking by default. /INCREMENTAL adds extra thunks in the EXE, which makes execution slower. - Set /MT (static CRT lib) by default instead of CMake's default /MD (dll CRT lib). The previous default /MD makes all DLL functions to be thunked, thus making execution slower (memcmp, memset, etc.) - Adds LLVM_ENABLE_INCREMENTAL_LINK which is set to OFF by default. Differential revision: https://reviews.llvm.org/D55056 llvm-svn: 349517
* [llvm-symbolizer] Omit stderr output when symbolizing a crashAlexandre Ganea2018-12-181-3/+11
| | | | | | Differential revision: https://reviews.llvm.org/D55723 llvm-svn: 349516
* [InstCombine] add tests for scalarization; NFCSanjay Patel2018-12-181-4/+59
| | | | | | We miss pattern matching a splat constant if it has undef elements. llvm-svn: 349515
* Add FMF management to common fp intrinsics in GlobalIselMichael Berg2018-12-182-38/+66
| | | | | | | | | | | | | | Summary: This the initial code change to facilitate managing FMF flags from Instructions to MI wrt Intrinsics in Global Isel. Eventually the GlobalObserver interface will be added as well, where FMF additions can be tracked for the builder and CSE. Reviewers: aditya_nandakumar, bogner Reviewed By: bogner Subscribers: rovka, kristof.beyls, javed.absar Differential Revision: https://reviews.llvm.org/D55668 llvm-svn: 349514
* [LoopVectorize] Rename pass options. NFC.Michael Kruse2018-12-186-25/+31
| | | | | | | | | | | | | | | | | | | | | | Rename: NoUnrolling to InterleaveOnlyWhenForced and AlwaysVectorize to !VectorizeOnlyWhenForced Contrary to what the name 'AlwaysVectorize' suggests, it does not unconditionally vectorize all loops, but applies a cost model to determine whether vectorization is profitable to all loops. Hence, passing false will disable the cost model, except when a loop is marked with llvm.loop.vectorize.enable. The 'OnlyWhenForced' suffix (suggested by @hfinkel in D55716) better matches this behavior. Similarly, 'NoUnrolling' disables the profitability cost model for interleaving (a term to distinguish it from unrolling by the LoopUnrollPass); rename it for consistency. Differential Revision: https://reviews.llvm.org/D55785 llvm-svn: 349513
* XFAIL Pair of OpenMP Tests for PowerPC LE LinuxStefan Pintilie2018-12-184-1/+3
| | | | | | | | | | | | | | | XFAIL two tests that fail on PowerPC LE Linux due to the change of default from PIC to no-PIC on that platform. A Bug has been opened for this: https://bugs.llvm.org/show_bug.cgi?id=40082 The tests are: runtime/test/ompt/misc/control_tool.c runtime/test/ompt/synchronization/taskwait.c llvm-svn: 349512
* [PPC64] Support got-based relocations.Sean Fertile2018-12-182-2/+67
| | | | | | Differential Revison: https://reviews.llvm.org/D54859 llvm-svn: 349511
* [X86][SSE] Don't use 'sign bit select' vXi8 ROTL lowering for constant ↵Simon Pilgrim2018-12-184-333/+269
| | | | | | | | rotation amounts Noticed by @spatel on D55747 - we get much better codegen if we use the regular shift expansion. llvm-svn: 349510
* [LoopUnroll] Honor '#pragma unroll' even with -fno-unroll-loops.Michael Kruse2018-12-185-37/+98
| | | | | | | | | | | | | | | | | | | | | | | | When using clang with `-fno-unroll-loops` (implicitly added with `-O1`), the LoopUnrollPass is not not added to the (legacy) pass pipeline. This also means that it will not process any loop metadata such as llvm.loop.unroll.enable (which is generated by #pragma unroll or WarnMissedTransformationsPass emits a warning that a forced transformation has not been applied (see https://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20181210/610833.html). Such explicit transformations should take precedence over disabling heuristics. This patch unconditionally adds LoopUnrollPass to the optimizing pipeline (that is, it is still not added with `-O0`), but passes a flag indicating whether automatic unrolling is dis-/enabled. This is the same approach as LoopVectorize uses. The new pass manager's pipeline builder has no option to disable unrolling, hence the problem does not apply. Differential Revision: https://reviews.llvm.org/D55716 llvm-svn: 349509
* [Driver][PS4] Do not implicitly link against asan or ubsan if -nostdlib or ↵Pierre Gousseau2018-12-184-3/+17
| | | | | | | | | | | | -nodefaultlibs on PS4. NFC for targets other than PS4. Respect -nostdlib and -nodefaultlibs when enabling asan or ubsan. Differential Revision: https://reviews.llvm.org/D55712 llvm-svn: 349508
* [NFC] Fix usage of Builder.insert(new Bitcast...)in CodeGenFunctionErich Keane2018-12-182-3/+2
| | | | | | | | | | | | This is exactly a "CreateBitCast", so refactor this to get rid of a 'new'. Note that this slightly changes the test, as the Builder is now seemingly smart enough to fold one of the bitcasts into the annotation call. Change-Id: I1733fb1fdf91f5c9d88651067130b9a4e7b5ab67 llvm-svn: 349506
* Portable Python script across Python versionSerge Guelton2018-12-1823-23/+23
| | | | | | | | Make scripts more future-proof by importing most __future__ stuff. Differential Revision: https://reviews.llvm.org/D55208 llvm-svn: 349504
* Portable Python script across Python versionSerge Guelton2018-12-182-4/+6
| | | | | | | | commands.getoutput has been move to subprocess module in Python3 Differential Revision: https://reviews.llvm.org/D55205 llvm-svn: 349503
* [clangd] Try to fix buildbot failure after r349496Eric Liu2018-12-181-3/+3
| | | | | | | Increase timeout from 10ms to 100ms. See http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/27959 llvm-svn: 349502
* Portable Python script across Python versionSerge Guelton2018-12-1811-23/+22
| | | | | | | | | | | In Python3, dict.items, dict.keys, dict.values, zip, map and filter no longer return lists, they create generator instead. The portability patch consists in forcing an extra `list` call if the result is actually used as a list. `map` are replaced by list comprehension and `filter` by filtered list comprehension. Differential Revision: https://reviews.llvm.org/D55197 llvm-svn: 349501
* [X86][SSE] Don't use 'sign bit select' vXi8 ROTL lowering for splat rotation ↵Simon Pilgrim2018-12-186-556/+326
| | | | | | | | amounts Noticed by @spatel on D55747 - we get much better codegen if we use the regular shift expansion. llvm-svn: 349500
* [MIPS GlobalISel] Select G_SDIV, G_UDIV, G_SREM and G_UREMPetar Avramovic2018-12-188-9/+1126
| | | | | | | | | | | | Add support for s64 libcalls for G_SDIV, G_UDIV, G_SREM and G_UREM and use integer type of correct size when creating arguments for CLI.lowerCall. Select G_SDIV, G_UDIV, G_SREM and G_UREM for types s8, s16, s32 and s64 on MIPS32. Differential Revision: https://reviews.llvm.org/D55651 llvm-svn: 349499
* ELF: Don't create sections for section header index 0Pavel Labath2018-12-185-24/+24
| | | | | | | | | | | | | | | | | | | Summary: The first section header does not define a real section. Instead it is used for various elf extensions. This patch skips creation of a section for index 0. This has one furtunate side-effect, in that it allows us to use the section header index as the Section ID (where 0 is also invalid). This way, we can get rid of a lot of spurious +1s in the ObjectFileELF code. Reviewers: clayborg, krytarowski, joerg, espindola Subscribers: emaste, lldb-commits, arichardson Differential Revision: https://reviews.llvm.org/D55757 llvm-svn: 349498
* Emit -Wformat properly for bit-field promotions.Aaron Ballman2018-12-183-4/+67
| | | | | | | | Only explicitly look through integer and floating-point promotion where the result type is actually a promotion, which is not always the case for bit-fields in C. Patch by Bevin Hansson. llvm-svn: 349497
* [clangd] BackgroundIndex rebuilds symbol index periodically.Eric Liu2018-12-187-9/+108
| | | | | | | | | | | | | | | | | | Summary: Currently, background index rebuilds symbol index on every indexed file, which can be inefficient. This patch makes it only rebuild symbol index periodically. As the rebuild no longer happens too often, we could also build more efficient dex index. Reviewers: ilya-biryukov, kadircet Reviewed By: kadircet Subscribers: dblaikie, MaskRay, jkorous, arphaman, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D55770 llvm-svn: 349496
* Fix the "dangerous use of tempnam" warning in Host/SocketTest.cppPavel Labath2018-12-181-9/+10
| | | | | | | instead, create a unique temporary directory, and place the socket file there. llvm-svn: 349495
* [AST] Unify the code paths of traversing lambda expressions.Haojian Wu2018-12-183-37/+24
| | | | | | | | | | | | | | | | | | | | | | Summary: This supposes to be a non-functional change. We have two code paths when traversing lambda expressions: 1) traverse the function proto typeloc when parameters and return type are explicit; 2) otherwise fallback to traverse parameter decls and return type loc individually; This patch unifies the code path to always traverse parameters and return type, rather than relying on traversing the full type-loc. Reviewers: ilya-biryukov Subscribers: arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D55820 llvm-svn: 349494
* Fix a gcc -Wpedantix warningNico Weber2018-12-181-1/+1
| | | | llvm-svn: 349492
* de-flake TestThreadStates.test_process_interruptPavel Labath2018-12-181-1/+5
| | | | | | | | | | | | | | | | the "self.assertEqual(thread.GetStopReason(), lldb.eStopReasonSignal)" was occasionally failing because the stop reason would come out as "trace" this happened if we issued the interrupt just as the processed stopped due to single-stepping over the breakpoint (i.e., the it was not necessary to send any signal). Fix this by removing the breakpoint before resuming the process. This ensures the process can run unobstructed. After this, the test passed 200 consecutive runs successfully for me, even while the system was under heavy load. llvm-svn: 349491
* [gn build] Add build file for llvm-pdbutilNico Weber2018-12-182-0/+36
| | | | | | | | Needed for check-lld. Differential Revision: https://reviews.llvm.org/D55826 llvm-svn: 349490
* [PowerPC] Make no-PIC default to match GCC - CLANGStefan Pintilie2018-12-183-5/+41
| | | | | | | | Make -fno-PIC default on PowerPC for Little Endian Linux. Differential Revision: https://reviews.llvm.org/D53384 llvm-svn: 349489
* [gn build] Add build file for llvm-bcanalyzerNico Weber2018-12-182-0/+10
| | | | | | | | Needed for check-lld. Differential Revision: https://reviews.llvm.org/D55824 llvm-svn: 349488
* Skip TestMultithreaded.test_sb_api_listener_resume on linuxPavel Labath2018-12-181-1/+1
| | | | | | | The test still fails occasionally (1/100 runs). Upgrade the xfail to skip. llvm-svn: 349487
* [gn build] Add build files for llvm-ar, llvm-nm, llvm-objdump, llvm-readelfNico Weber2018-12-1811-4/+267
| | | | | | | | | | | | | | | Also add build files for deps DebugInfo/Symbolize, ToolDrivers/dll-tool. Also add gn/build/libs/xar (needed by llvm-objdump). Also delete an incorrect part of the symlink description in //BUILD.gn (it used to be true before I made the symlink step write a stamp file; now it's no longer true). These are all binaries needed by check-lld that need symlinks. Differential Revision: https://reviews.llvm.org/D55743 llvm-svn: 349486
* Un-XFail TestYMMRegister on linuxPavel Labath2018-12-181-1/+0
| | | | | | | | | | This test was disabled in r326756 as a part of "upstreaming debugserver support for AVX-512 (zmm register set)". This looks like an error because both register set and remote stubs are different. In any case, the test passes now. llvm-svn: 349485
* [libcxx] Remove XFAILs for older macOS versionsLouis Dionne2018-12-181-3/+0
| | | | | | | That test doesn't fail anymore since r349378, since the assertions that r349378 removed must have been bugs in the dylib at some point. llvm-svn: 349484
* [X86][SSE] Add shift combine 'out of range' tests with UNDEFsSimon Pilgrim2018-12-183-0/+40
| | | | | | Shows failure to simplify out of range shift amounts to UNDEF if any element is UNDEF. llvm-svn: 349483
* Un-XFail TestThreadStates.test_process_interruptPavel Labath2018-12-181-12/+7
| | | | | | | | | | This test is passing now on linux. The same test is claimed to be flaky on darwin, so it's possible that's true on linux too. If that's the case we'll have to skip it here too (or fix it). I mark the test as not-debug-info-dependent as a drive-by. llvm-svn: 349482
* [X86] Use UADDSAT/USUBSAT instead of ADDUS/SUBUSNikita Popov2018-12-187-25728/+482
| | | | | | | | | | | | | Replace the X86ISD opcodes ADDUS and SUBUS with generic ISD opcodes UADDSAT and USUBSAT. As a side-effect, this also makes codegen for the @llvm.uadd.sat and @llvm.usub.sat intrinsics reasonable. This only replaces use in the X86 backend, and does not move any of the ADDUS/SUBUS X86 specific combines into generic codegen. Differential Revision: https://reviews.llvm.org/D55787 llvm-svn: 349481
* [SelectionDAG][X86] Fix [US](ADD|SUB)SAT vector legalization, add testsNikita Popov2018-12-186-2/+67651
| | | | | | | | | Integer result promotion needs to use the scalar size, and we need support for result widening. This is in preparation for D55787. llvm-svn: 349480
* Un-XFAIL TestExitDuringBreak.py for linuxPavel Labath2018-12-181-3/+0
| | | | | | | This test is passing now on linux, and probably has been passing since r282993. llvm-svn: 349479
* Un-XFAIL TestNamespaceLookup for linuxPavel Labath2018-12-181-12/+3
| | | | | | | | These tests are now passing on linux, at least with top-of-tree clang, clang-6 and gcc-7.3. It's possible it may still be failing with some older compilers, but I don't have those around to test. llvm-svn: 349478
* [docs] Improve HowToCrossCompilerBuiltinsOnArmPeter Smith2018-12-181-51/+140
| | | | | | | | | | | | | | | | | | | | | | Some recent experience on llvm-dev pointed out some errors in the document: - Assumption of ninja - Use of --march rather than -march - Problems with host include files when a multiarch setup was used - Insufficient target information passed to assembler - Instructions on using the cmake cache file BaremetalARM.cmake were incomplete There was also insufficient guidance on what to do when various stages failed due to misconfiguration or missing steps. Summary of changes: - Fixed problems above - Added a troubleshooting section with common errors. - Cleared up one "at time of writing" that is no longer a problem. Differential Revision: https://reviews.llvm.org/D55709 llvm-svn: 349477
* [llvm-dwarfdump] - Do not error out on R_X86_64_DTPOFF64/R_X86_64_DTPOFF32 ↵George Rimar2018-12-182-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | relocations. This is https://bugs.llvm.org/show_bug.cgi?id=39992, If we have the following code (test.cpp): thread_local int tdata = 24; and build an .o file with debug information: clang --target=x86_64-pc-linux -c bar.cpp -g Then object produced may have R_X86_64_DTPOFF64/R_X86_64_DTPOFF32 relocations. (clang emits R_X86_64_DTPOFF64 and gcc emits R_X86_64_DTPOFF32 for the code above for me) Currently, llvm-dwarfdump fails to compute this TLS relocation when dumping object and reports an error: failed to compute relocation: R_X86_64_DTPOFF64, Invalid data was encountered while parsing the file This relocation represents the offset in the TLS block and resolved by the linker, but this info is unavailable at the point when the object file is dumped by this tool. The patch adds the simple evaluation for such relocations to avoid emitting errors. Resulting behavior seems to be equal to GNU dwarfdump. Differential revision: https://reviews.llvm.org/D55762 llvm-svn: 349476
* [MIPS GlobalISel] ClampScalar G_AND G_OR and G_XORPetar Avramovic2018-12-187-79/+538
| | | | | | | | | | Add narrowScalar for G_AND and G_XOR. Legalize G_AND G_OR and G_XOR for types other then s32 with clampScalar on MIPS32. Differential Revision: https://reviews.llvm.org/D55362 llvm-svn: 349475
OpenPOWER on IntegriCloud