summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [WebAssembly] Check more details in call-indirect test. NFC.Sam Clegg2017-12-121-9/+14
| | | | | | | | | Also make function bodies unique so they can be distinguished in the output. This is helpful for adding support for --gc-sections. Differential Revision: https://reviews.llvm.org/D41093 llvm-svn: 320441
* [llvm-cov] Simplify a test case. NFC.Vedant Kumar2017-12-111-24/+5
| | | | llvm-svn: 320439
* [ELF] Don't set the executable bit for relocatable filesPetr Hosek2017-12-113-2/+28
| | | | | | | | These are not executable files so they shouldn't be marked as such. Differential Revision: https://reviews.llvm.org/D41041 llvm-svn: 320438
* [ELF] Change default output section type to SHT_NOBITSJake Ehrlich2017-12-117-9/+10
| | | | | | | | | | | | | | | | When an output section has no byte commands and has no input sections then it would be ideal if the type of the section is SHT_NOBITS so that the file can take up less space. This change sets the default type of of output sections to SHT_NOBITS instead of SHT_PROGBITS to allow this. This required some minor test changes (which double as tests for this new behavior) but extend-pt-load.s had be changed in a non-trivial way. Since it seems to me that the point of the test is to point out the consequences of how flags are assigned to output sections that don't have input sections I changed the test to work and still show how the memsize of the executable segment was changed. Differential Revision: https://reviews.llvm.org/D41082 llvm-svn: 320437
* Remove redundant local variables.Rui Ueyama2017-12-113-7/+4
| | | | llvm-svn: 320436
* [llvm-cov] Add an option for "export" command to emit only file summary data.Max Moroz2017-12-115-40/+63
| | | | | | | | | | | | | | Summary: That allows to get the same data as produced by "llvm-cov report", but in JSON format, which is better for further processing by end users. Reviewers: vsk Reviewed By: vsk Differential Revision: https://reviews.llvm.org/D41085 llvm-svn: 320435
* Do not read the same .lib file more than once.Rui Ueyama2017-12-112-0/+10
| | | | | | | | | | | | | | | In the following command line, lld-link foo/bar.lib /defaultlib:bar.lib "/defaultlib:bar.lib" should be a nop even if a file with the same name exists in other library search path. Fixes https://bugs.llvm.org/show_bug.cgi?id=35476 Differential Revision: https://reviews.llvm.org/D41094 llvm-svn: 320434
* Reduce indentation.Rui Ueyama2017-12-111-2/+2
| | | | llvm-svn: 320433
* Reland "[WebAssembly] Import the linear memory and function table."Sam Clegg2017-12-119-72/+81
| | | | | | Original change: https://reviews.llvm.org/D40875 llvm-svn: 320432
* ELF: Do not follow relocation edges to output sections during GC.Peter Collingbourne2017-12-112-2/+5
| | | | | | | | This fixes an assertion error introduced by r320390. Differential Revision: https://reviews.llvm.org/D41095 llvm-svn: 320431
* Return R_PLT_PC for R_PPC_PLTREL24.Rafael Espindola2017-12-111-8/+1
| | | | | | | | The PPC port doesn't support PLT yet, but the architecture independent code optimizes PLT access for non preemptible symbols, which is exactly what returning R_PC was trying to implement. llvm-svn: 320430
* Revert r318704 - [Sparc] efficient pattern for UINT_TO_FP conversionRichard Trieu2017-12-114-144/+30
| | | | | | | | See bug https://bugs.llvm.org/show_bug.cgi?id=35631 r318704 is giving a fatal error on some code with unsigned to floating point conversions. llvm-svn: 320429
* [WebAssembly] De-dup indirect function table.Sam Clegg2017-12-117-70/+106
| | | | | | | | | | | | | | | | Create the indirect function table based on symbols rather than just duplicating the input entries. This has the effect of de-duplicating the table. This is a followup to the equivalent change made for globals: https://reviews.llvm.org/D40859 Partially based on a patch by Nicholas Wilson: https://reviews.llvm.org/D40845 Differential Revision: https://reviews.llvm.org/D40989 llvm-svn: 320428
* Use ErrorOS for log messages as well as errorSam Clegg2017-12-1120-26/+25
| | | | | | | | | | | | | | | | log are also diagnostics so it seems like they should to the same place as errors and debug messages. Without this change when I enable --verbose those messages go to stdout, but when I enable "-mllvm -debug" those messages go to stderr (because dbgs() goes to stderr by default). So I end up having to do this a lot: lld <args> > output_message 2>&1 Differential Revision: https://reviews.llvm.org/D41033 llvm-svn: 320427
* [WebAssembly] Preserve ordering of global symbolsSam Clegg2017-12-112-12/+10
| | | | | | | | | | This change restores the behavior that global indexes are assigned in object file order. This was accidentally changed in https://reviews.llvm.org/D40859. Differential Revision: https://reviews.llvm.org/D41038 llvm-svn: 320426
* [test-suite] Un'XFAIL a test that's not failing anymore.Davide Italiano2017-12-111-1/+0
| | | | | | | | | | This is the first of a series of commits aiming to improve overall LLDB's hygiene. Feel free to shout at me in case I break something. <rdar://problem/30915340> llvm-svn: 320425
* LSR: Check more intrinsic pointer operandsMatt Arsenault2017-12-115-23/+167
| | | | llvm-svn: 320424
* Fix x86-64-reloc-8.s test after r320416.Hans Wennborg2017-12-111-1/+0
| | | | llvm-svn: 320423
* [Testsuite] Rename this file from *m -> *mm.Davide Italiano2017-12-111-0/+0
| | | | | | | | Should hopefully bring the bots back. <rdar://problem/35976115> llvm-svn: 320422
* Revert r320407 "[InstCombine] Fix PR35618: Instcombine hangs on single ↵Hans Wennborg2017-12-112-47/+2
| | | | | | | | | | | | | | | | | | | | | minmax load bitcast." The tests fail (opt asserts) on Windows. > Summary: > If we have pattern `store (load(bitcast(select (cmp(V1, V2), &V1, > &V2)))), bitcast)`, but the load is used in other instructions, it leads > to looping in InstCombiner. Patch adds additional check that all users > of the load instructions are stores and then replaces all uses of load > instruction by the new one with new type. > > Reviewers: RKSimon, spatel, majnemer > > Subscribers: llvm-commits > > Differential Revision: https://reviews.llvm.org/D41072 llvm-svn: 320421
* [CodeGen] Improve the consistency of instruction fusion*Evandro Menezes2017-12-111-24/+55
| | | | | | | | | | | When either instruction in a fused pair has no other dependency, besides on the other instruction, make sure that other instructions do not get scheduled between them. Additionally, avoid fusing an instruction more than once along the same dependency chain. Differential revision: https://reviews.llvm.org/D36704 llvm-svn: 320420
* [Driver][CodeGen] Add -mprefer-vector-width driver option and attribute ↵Craig Topper2017-12-118-0/+79
| | | | | | | | | | | | | | | | during CodeGen. This adds a new command line option -mprefer-vector-width to specify a preferred vector width for the vectorizers. Valid values are 'none' and unsigned integers. The driver will check that it meets those constraints. Specific supported integers will be managed by the targets in the backend. Clang will take the value and add it as a new function attribute during CodeGen. This represents the alternate direction proposed by Sanjay in this RFC: http://lists.llvm.org/pipermail/llvm-dev/2017-November/118734.html The syntax here matches gcc, though gcc treats it as an x86 specific command line argument. gcc only allows values of 128, 256, and 512. I'm not having clang check any values. Differential Revision: https://reviews.llvm.org/D40230 llvm-svn: 320419
* [Docs] Regenerate command line documentation.Craig Topper2017-12-111-8/+22
| | | | llvm-svn: 320418
* [sanitizer] Revert rL320409Kostya Kortchinsky2017-12-1112-59/+6
| | | | | | | | | | | | | | Summary: D40679 broke a couple of builds, reverting while investigating. Reviewers: alekseyshl Reviewed By: alekseyshl Subscribers: srhines, kubamracek, krytarowski, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D41088 llvm-svn: 320417
* [ELF] When a relocation is out of range print the value and the rangeAlexander Richardson2017-12-1116-22/+30
| | | | | | | | | | | | Reviewers: ruiu, grimar Reviewed By: ruiu Subscribers: emaste, nemanjai, javed.absar, kbarton, llvm-commits Differential Revision: https://reviews.llvm.org/D40962 llvm-svn: 320416
* ASAN: Provide reliable debug info for local variables at -O0.Adrian Prantl2017-12-116-5/+73
| | | | | | | | | | | | | | | | | | | | | | The function stack poisioner conditionally stores local variables either in an alloca or in malloc'ated memory, which has the unfortunate side-effect, that the actual address of the variable is only materialized when the variable is accessed, which means that those variables are mostly invisible to the debugger even when compiling without optimizations. This patch stores the address of the local stack base into an alloca, which can be referred to by the debug info and is available throughout the function. This adds one extra pointer-sized alloca to each stack frame (but mem2reg can optimize it away again when optimizations are enabled, yielding roughly the same debug info quality as before in optimized code). rdar://problem/30433661 Differential Revision: https://reviews.llvm.org/D41034 llvm-svn: 320415
* [PowerPC] Partially enable the ISEL expansion pass.Tony Jiang2017-12-116-97/+295
| | | | | | | | | | | The pass to expand ISEL instructions into if-then-else sequences in patch D23630 is currently disabled. This patch partially enable it by always removing the unnecessary ISELs (all registers used by the ISELs are the same one) and folding the ISELs which have the same input registers into unconditional copies. Differential Revision: https://reviews.llvm.org/D40497 llvm-svn: 320414
* [cmake] Pass TARGETS_TO_BUILD through to host tools buildJustin Bogner2017-12-111-1/+6
| | | | | | | | | | | | | | | | | | | | In r319620, the host build was changed to use Native for TARGETS_TO_BUILD because passing semicolons through add_custom_command is surprisingly difficult. However, Native really doesn't make any sense here, and it only works because we don't technically do any codegen in the host tools so pretty well anything will "work". The problem here is that passing something other than the correct value is very fragile - as evidence note how the llvm-config in the host tools acts differently than the target one now, and misreports the targets to build. Similarly, if there is any logic conditional on the targets in tablegen (now or in the future), it will do the wrong thing. To fix this, we need to escape the semicolons in the targets string and pass it through to the child cmake invocation. llvm-svn: 320413
* Handle symbols pointing to output sections.Rafael Espindola2017-12-112-1/+17
| | | | | | | | | Now that gc sections runs after linker defined symbols are added it can see symbols that point to an OutputSection. Should fix a bot failure. llvm-svn: 320412
* PR35586: Relax two asserts that are overly restrictiveErich Keane2017-12-112-2/+9
| | | | | | | | | The two asserts are too aggressive. In C++ mode, an enum is NOT considered an integral type, but an enum value is allowed to be an enum. This patch relaxes the two asserts to allow the enum value as well (as typechecking does). llvm-svn: 320411
* [Hexagon] Remove unsupported vlut intrinsicsKrzysztof Parzyszek2017-12-111-16/+0
| | | | llvm-svn: 320410
* [sanitizer] Introduce a vDSO aware time function, and use it in the ↵Kostya Kortchinsky2017-12-1112-6/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | allocator [redo] Summary: Redo of D40657, which had the initial discussion. The initial code had to move into a libcdep file, and things had to be shuffled accordingly. `NanoTime` is a time sink when checking whether or not to release memory to the OS. While reducing the amount of calls to said function is in the works, another solution that was found to be beneficial was to use a timing function that can leverage the vDSO. We hit a couple of snags along the way, like the fact that the glibc crashes when clock_gettime is called from a preinit_array, or the fact that `__vdso_clock_gettime` is mangled (for security purposes) and can't be used directly, and also that clock_gettime can be intercepted. The proposed solution takes care of all this as far as I can tell, and significantly improve performances and some Scudo load tests with memory reclaiming enabled. @mcgrathr: please feel free to follow up on https://reviews.llvm.org/D40657#940857 here. I posted a reply at https://reviews.llvm.org/D40657#940974. Reviewers: alekseyshl, krytarowski, flowerhack, mcgrathr, kubamracek Reviewed By: alekseyshl, krytarowski Subscribers: #sanitizers, mcgrathr, srhines, llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D40679 llvm-svn: 320409
* Ensure moved-from container is cleared on moveGeorge Burgess IV2017-12-112-0/+7
| | | | | | | | | In all cases except for this optimistic attempt to reuse memory, the moved-from TinyPtrVector was left `empty()` at the end of this assignment. Though using a container after it's been moved from can be a bit sketchy, it's probably best to just be consistent here. llvm-svn: 320408
* [InstCombine] Fix PR35618: Instcombine hangs on single minmax load bitcast.Alexey Bataev2017-12-112-2/+47
| | | | | | | | | | | | | | | | | Summary: If we have pattern `store (load(bitcast(select (cmp(V1, V2), &V1, &V2)))), bitcast)`, but the load is used in other instructions, it leads to looping in InstCombiner. Patch adds additional check that all users of the load instructions are stores and then replaces all uses of load instruction by the new one with new type. Reviewers: RKSimon, spatel, majnemer Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41072 llvm-svn: 320407
* [clang-tidy] Correctly classify constant arrays and constant strings as ↵Alexander Kornienko2017-12-112-33/+84
| | | | | | | | | | | | | | | | | | | | constants when checking identifiers naming Summary: They are not locally const qualified so they weren't classified as constants by the readability-identifier-naming check. Reviewers: alexfh Reviewed By: alexfh Subscribers: klimek, cfe-commits, xazax.hun Patch by Beren Minor! Differential Revision: https://reviews.llvm.org/D39363 llvm-svn: 320406
* Fix warn-enum-compare.cpp on WindowsHans Wennborg2017-12-111-1/+6
| | | | | | It's been failing since r319875. llvm-svn: 320405
* [Hexagon] Add support for Hexagon V65Krzysztof Parzyszek2017-12-1169-5709/+13168
| | | | llvm-svn: 320404
* [X86] Add LODS schedule testsSimon Pilgrim2017-12-111-6/+103
| | | | llvm-svn: 320403
* [X86] Add CMP/TEST schedule testsSimon Pilgrim2017-12-111-2/+1184
| | | | llvm-svn: 320402
* P0620 follow-up: deducing `auto` from braced-init-list in new exprZhihao Yuan2017-12-116-10/+41
| | | | | | | | | | | | | | | | | | | Summary: This is a side-effect brought in by p0620r0, which allows other placeholder types (derived from `auto` and `decltype(auto)`) to be usable in a `new` expression with a single-clause //braced-init-list// as its initializer (8.3.4 [expr.new]/2). N3922 defined its semantics. References: http://wg21.link/p0620r0 http://wg21.link/n3922 Reviewers: rsmith, aaron.ballman Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D39451 llvm-svn: 320401
* [X86] Add AND/OR/XOR schedule testsSimon Pilgrim2017-12-111-3/+1926
| | | | llvm-svn: 320400
* [dwarfdump] Fix off-by-one bug in accelerator table extractor.Jonas Devlieghere2017-12-116-10/+16
| | | | | | | | | | | | | | | This fixes a bug where the verifier was complaining about empty accelerator tables. When the table is empty, its size is not a valid offset as it points after the end of the section. This patch also makes the extractor return llvm:Error instead of bool for better error reporting in the verifier. Differential revision: https://reviews.llvm.org/D41063 rdar://35932007 llvm-svn: 320399
* Revert 320391: Certain targets are failing, pulling back to diagnose.Erich Keane2017-12-1124-155/+58
| | | | llvm-svn: 320398
* [X86] Add ADD/SUB schedule testsSimon Pilgrim2017-12-111-2/+1285
| | | | llvm-svn: 320397
* [Sema] Fix crash in unused-lambda-capture warning for VLAsMalcolm Parsons2017-12-113-0/+13
| | | | | | | | | | | | | | | | | | | | Summary: Clang was crashing when diagnosing an unused-lambda-capture for a VLA because From.getVariable() is null for the capture of a VLA bound. Warning about the VLA bound capture is not helpful, so only warn for the VLA itself. Fixes: PR35555 Reviewers: aaron.ballman, dim, rsmith Reviewed By: aaron.ballman, dim Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D41016 llvm-svn: 320396
* [X86] Add ADC/SBB schedule testsSimon Pilgrim2017-12-111-2/+1284
| | | | llvm-svn: 320395
* Sort.Rui Ueyama2017-12-111-2/+2
| | | | llvm-svn: 320394
* Change function type more LLVM-ish.Rui Ueyama2017-12-111-2/+2
| | | | | | Also fix variable naming style. llvm-svn: 320393
* [X86] Add MOVSLQ schedule testsSimon Pilgrim2017-12-111-1/+97
| | | | llvm-svn: 320392
* For Linux/gnu compatibility, preinclude <stdc-predef.h> if the file is availableErich Keane2017-12-1124-58/+155
| | | | | | | | | | | | | | | | | | | | As reported in llvm bugzilla 32377. Here’s a patch to add preinclude of stdc-predef.h. The gcc documentation says “On GNU/Linux, <stdc-predef.h> is pre-included.” See https://gcc.gnu.org/gcc-4.8/porting_to.html; The preinclude is inhibited with –ffreestanding. Basically I fixed the failing test cases by adding –ffreestanding which inhibits this behavior. I fixed all the failing tests, including some in extra/test, there's a separate patch for that which is linked here Note: this is a recommit after a test failure took down the original (r318669) Patch By: mibintc Differential Revision: https://reviews.llvm.org/D34158 llvm-svn: 320391
OpenPOWER on IntegriCloud