summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [PowerPC] fix incorrect vectorization of abs() on POWER9Hiroshi Inoue2018-04-213-23/+112
| | | | | | | | | | | | | | | | | | | | Vectorized loops with abs() returns incorrect results on POWER9. This patch fixes it. For example the following code returns negative result if input values are negative though it sums up the absolute value of the inputs. int vpx_satd_c(const int16_t *coeff, int length) { int satd = 0; for (int i = 0; i < length; ++i) satd += abs(coeff[i]); return satd; } This problem causes test failures for libvpx. For vector absolute and vector absolute difference on POWER9, LLVM generates VABSDUW (Vector Absolute Difference Unsigned Word) instruction or variants. Since these instructions are for unsigned integers, we need adjustment for signed integers. For abs(sub(a, b)), we generate VABSDUW(a+0x80000000, b+0x80000000). Otherwise, abs(sub(-1, 0)) returns 0xFFFFFFFF(=-1) instead of 1. For abs(a), we generate VABSDUW(a+0x80000000, 0x80000000). Differential Revision: https://reviews.llvm.org/D45522 llvm-svn: 330497
* Update isl to isl-0.19-107-gc4fe33d8Tobias Grosser2018-04-2188-979/+4985
| | | | | | This is a regular maintenance update. llvm-svn: 330496
* [AArch64] Don't crash trying to resolve __stack_chk_guard.Eli Friedman2018-04-212-2/+26
| | | | | | | | | | In certain cases, the compiler might try to merge __stack_chk_guard with another global variable. (Or someone could theoretically define __stack_chk_guard as an alias.) In that case, make sure we don't crash. Differential Revision: https://reviews.llvm.org/D45746 llvm-svn: 330495
* Fix typo in test (verify-machine-instrs -> verify-machineinstrs)Jessica Paquette2018-04-201-2/+2
| | | | llvm-svn: 330494
* [MachineOutliner] XFAIL machine-outliner-noredzone.llJessica Paquette2018-04-201-2/+3
| | | | | | | | | | The verifier began complaining about an undefined physical register in this test. XFAILing for the purposes of getting a bot up while I look into it. Failure: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-expensive/11385/ llvm-svn: 330493
* [clang-tidy] add new check to find out objc ivars which do not have prefix '_'Yan Zhang2018-04-202-0/+19
| | | | | | | | | | | | | | | | | | | | | | | Summary: For code of ivar declaration: int barWithoutPrefix; The fix will be: int _barWithoutPrefix; Reviewers: benhamilton, hokein, alexfh, aaron.ballman, ilya-biryukov Reviewed By: alexfh Subscribers: Eugene.Zelenko, xazax.hun, klimek, mgorny, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D45392 llvm-svn: 330492
* [ELF] Swap argument names: use Old to refer to original symbol and New for ↵Fangrui Song2018-04-201-4/+4
| | | | | | | | | | | | incoming one Reviewers: ruiu, espindola Subscribers: emaste, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D45905 llvm-svn: 330491
* Fix nullptr passed to memcpy in lld/COFF/Chunks.cppBob Haarman2018-04-201-1/+2
| | | | | | | | | | | | | | | | Summary: ubsan found that we sometimes pass nullptr to memcpy in SectionChunk::writeTo(). This change adds a check that avoids that. Reviewers: ruiu Reviewed By: ruiu Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D45789 llvm-svn: 330490
* [ObjCARC] Take BlockColors by const reference. NFCShoaib Meenai2018-04-202-9/+8
| | | | llvm-svn: 330489
* COFF: Document /pdbaltpath.Peter Collingbourne2018-04-201-1/+1
| | | | llvm-svn: 330488
* [ObjCARC] Account for funclet token in storeStrong transformShoaib Meenai2018-04-202-16/+64
| | | | | | | | | | | | | | When creating a call to storeStrong in ObjCARCContract, ensure the call gets the correct funclet token, otherwise WinEHPrepare will turn the call (and all subsequent instructions) into unreachable. We already have logic to do this for the ARC autorelease elision marker; factor that out into a common function that's used for both. These are the only two places in this transform that create call instructions. Differential Revision: https://reviews.llvm.org/D45857 llvm-svn: 330487
* [llvm-mca][X86] Add MMX/SSE/AES/CLMUL resource SandyBridge testsSimon Pilgrim2018-04-209-0/+2733
| | | | llvm-svn: 330486
* Use /pdbaltpath to avoid a path length dependency.Peter Collingbourne2018-04-201-3/+3
| | | | llvm-svn: 330485
* COFF: Merge .xdata into .rdata by default.Peter Collingbourne2018-04-204-28/+25
| | | | | | Differential Revision: https://reviews.llvm.org/D45804 llvm-svn: 330484
* COFF: Merge .bss into .data by default.Peter Collingbourne2018-04-206-41/+14
| | | | | | Differential Revision: https://reviews.llvm.org/D45803 llvm-svn: 330483
* Add -z {combreloc,copyreloc,noexecstack,lazy,relro,text}.Rui Ueyama2018-04-208-12/+45
| | | | | | Differential Revision: https://reviews.llvm.org/D45902 llvm-svn: 330482
* COFF: Preserve section type when processing /section flag.Peter Collingbourne2018-04-205-5/+15
| | | | | | | | It turns out that we were dropping this before. Differential Revision: https://reviews.llvm.org/D45802 llvm-svn: 330481
* [X86] Add WriteFSign/WriteFLogic scheduler classesSimon Pilgrim2018-04-2018-1163/+910
| | | | | | | | | | | | | | Split the fp and integer vector logical instruction scheduler classes - older CPUs especially often handled these on different pipes. This unearthed a couple of things that are also handled in this patch: (1) We were tagging avx512 fp logic ops as WriteFAdd, probably because of the lack of WriteFLogic (2) SandyBridge had integer logic ops only using Port5, when afaict they can use Ports015. (3) Cleaned up x86 FCHS/FABS scheduling as they are typically treated as fp logic ops. Differential Revision: https://reviews.llvm.org/D45629 llvm-svn: 330480
* COFF: Use (name, output characteristics) as a key when grouping input ↵Peter Collingbourne2018-04-206-31/+222
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sections into output sections. This is what link.exe does and lets us avoid needing to worry about merging output characteristics while adding input sections to output sections. With this change we can't process /merge in the same way as before because sections with different output characteristics can still be merged into one another. So this change moves the processing of /merge to just before we assign addresses. In the case where there are multiple output sections with the same name, link.exe only merges the first section with the source name into the first section with the target name, and we do the same. At the same time I also implemented transitive merging (which means that /merge:.c=.b /merge:.b=.a merges both .c and .b into .a). This isn't quite enough though because link.exe has a special case for .CRT in 32-bit mode: it processes sections whose output characteristics are DATA | R | W as though the output characteristics were DATA | R (so that they get merged into things like constructor lists in the expected way). Chromium has a few such sections, and it turns out that those sections were causing the problem that resulted in r318699 (merge .xdata into .rdata) being reverted: because of the previous permission merging semantics, the .CRT sections were causing the entire .rdata section to become writable, which caused the SEH runtime to crash because it apparently requires .xdata to be read-only. This change also implements the same special case. This should unblock being able to merge .xdata into .rdata by default, as well as .bss into .data, both of which will be done in followups. Differential Revision: https://reviews.llvm.org/D45801 llvm-svn: 330479
* [llvm-objcopy] Fix sh_linkAlexander Shaposhnikov2018-04-204-35/+69
| | | | | | | | | | | | This diff fixes sh_link for various types of sections (i.e. for SHT_ARM_EXIDX, SHT_HASH). In particular, this change enables us to use llvm-objcopy with clang -gsplit-dwarf for the target android-arm. Test plan: make check-all Differential revision: https://reviews.llvm.org/D45851 llvm-svn: 330478
* [OpenMP] Make bc file compilation sensitive to LIBOMPTARGET_NVPTX_DEBUG flagGuansong Zhang2018-04-201-1/+7
| | | | | | | | | | | | | | Summary: The LIBOMPTARGET_NVPTX_DEBUG flag is inconsistent between using nvcc to generate .a file and clang to generate .bc file. Sync the two setting so we can get debug messages from the bc file path as well. Reviewers: grokos Subscribers: Hahnfeld, openmp-commits, mgorny Tags: #openmp Differential Revision: https://reviews.llvm.org/D45530 llvm-svn: 330477
* Revert "[Sanitizer] Internal Printf string precision argument + padding."Alex Shlyapnikov2018-04-202-9/+2
| | | | | | | | | This reverts commit r330458. There are existing code using string precision as 'max len', need more work. llvm-svn: 330476
* [HWASan] Introduce non-zero based and dynamic shadow memory (LLVM).Alex Shlyapnikov2018-04-203-43/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Support the dynamic shadow memory offset (the default case for user space now) and static non-zero shadow memory offset (-hwasan-mapping-offset option). Keeping the the latter case around for functionality and performance comparison tests (and mostly for -hwasan-mapping-offset=0 case). The implementation is stripped down ASan one, picking only the relevant parts in the following assumptions: shadow scale is fixed, the shadow memory is dynamic, it is accessed via ifunc global, shadow memory address rematerialization is suppressed. Keep zero-based shadow memory for kernel (-hwasan-kernel option) and calls instreumented case (-hwasan-instrument-with-calls option), which essentially means that the generated code is not changed in these cases. Reviewers: eugenis Subscribers: srhines, llvm-commits Differential Revision: https://reviews.llvm.org/D45840 llvm-svn: 330475
* [HWASan] Introduce non-zero based and dynamic shadow memory (compiler-rt).Alex Shlyapnikov2018-04-2013-70/+409
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Retire the fixed shadow memory mapping to avoid conflicts with default process memory mapping (currently manifests on Android). Tests on AArch64 show <1% performance loss and code size increase, making it possible to use dynamic shadow memory by default. For the simplicity and unifirmity sake, use dynamic shadow memory mapping with base address accessed via ifunc resolver on all supported platforms. Keep the fixed shadow memory mapping around to be able to run performance comparison tests later. Complementing D45840. Reviewers: eugenis Subscribers: srhines, kubamracek, dberris, mgorny, kristof.beyls, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D45847 llvm-svn: 330474
* [PartialInlining] Fix Crash from holding a reference to a destructed ORE.Sean Fertile2018-04-202-37/+190
| | | | | | | | | | | | | The callback used to create an ORE for the legacy PI pass caches the allocated object in a unique_ptr in the runOnModule function, and returns a reference to that object. Under certian circumstances we can end up holding onto that reference after the OREs destruction. Rather then allowing the new and legacy passes to create ORE object in diffrent ways, create the ORE at the point of use. Differential Revision: https://reviews.llvm.org/D43219 llvm-svn: 330473
* [Hexagon] hexagon-autohvx was left on againKrzysztof Parzyszek2018-04-201-1/+1
| | | | llvm-svn: 330472
* [Hexagon] Improve HVX instruction selection (bitcast, vsplat)Krzysztof Parzyszek2018-04-2010-71/+169
| | | | | | | | | | There was some unfortunate interaction between VSPLAT and BITCAST related to the selection of constant vectors (coming from selecting shuffles). Introduce VSPLATW that always splats a 32-bit word, and can have arbitrary result type (to avoid BITCASTs of VSPLAT). Clean up the previous selection of BITCAST/VSPLAT. llvm-svn: 330471
* Remove unused argument from emitModuleMetadata.Eric Christopher2018-04-204-15/+11
| | | | | | NFCI. llvm-svn: 330470
* asan: Mark printf-4.c as unsupported on Windows.Peter Collingbourne2018-04-201-2/+3
| | | | | | | | | Although sprintf is not intercepted on Windows, this test can pass if sprintf calls memmove, which is intercepted, so we can't XFAIL it. Differential Revision: https://reviews.llvm.org/D45894 llvm-svn: 330469
* [Hexagon] Skip fixed-stack indexes in HexagonConstExtendersKrzysztof Parzyszek2018-04-202-0/+58
| | | | | | | Fixed slots have negative values, and TRI::stackSlot2Index and TRI::index2StackSlot do not handle negative numbers. llvm-svn: 330468
* [isl++] abort() on assertion violation.Michael Kruse2018-04-201-0/+1
| | | | | | | | | | | | | | | | Before this patch, ISL_ASSERT only printed an error message to stderr. This can be easily missed if the program continues or just fails later. To fail-early and help error diagnostics (e.g. using bugpoint), call abort() when an assertion does not hold. I seem to just have forgotten to add this abort() when I originally proposed the ISL_ASSERT macro. Suggested-By: Eli Friedman <efriedma@codeaurora.org> Differential Revision: https://reviews.llvm.org/D45171 llvm-svn: 330467
* Allow arbitrary function calls for debugging purposes.Michael Kruse2018-04-206-1/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the switch -polly-debug-func to define the name of a debug function. This function is ignored for any validity check. Its purpose is to allow to observe a value after transformation by a SCoP, and to follow which statements are executed in which order. For instance, consider the following code: static void dbg_printf(int sum, int i) { fprintf(stderr, "The value of sum is %d, i=%d\n", sum, i); fflush(stderr); } void func(int n) { int sum = 0; for (int i = 0; i < 16; i+=1) { sum += i; dbg_printf(sum, i); } } Executing this after Polly's codegen with -polly-debug-func=dbg_printf reveals the new execution order and the assumed values at that point of execution. Differential Revision: https://reviews.llvm.org/D45728 llvm-svn: 330466
* [X86][SandyBridge] Remove duplciate InstRWs from Sandy Brige scheduler model.Craig Topper2018-04-201-60/+6
| | | | llvm-svn: 330465
* Under some scenarios, the current directory isn't writableSterling Augustine2018-04-201-1/+1
| | | | | | during a test. Set the output path to avoid that problem. llvm-svn: 330464
* [X86] WaitPKG intrinsicsGabor Buella2018-04-2011-0/+109
| | | | | | | | | | Reviewers: craig.topper, zvi Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D45254 llvm-svn: 330463
* [X86] WaitPKG instructionsGabor Buella2018-04-2017-13/+247
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Three new instructions: umonitor - Sets up a linear address range to be monitored by hardware and activates the monitor. The address range should be a writeback memory caching type. umwait - A hint that allows the processor to stop instruction execution and enter an implementation-dependent optimized state until occurrence of a class of events. tpause - Directs the processor to enter an implementation-dependent optimized state until the TSC reaches the value in EDX:EAX. Also modifying the description of the mfence instruction, as the rep prefix (0xF3) was allowed before, which would conflict with umonitor during disassembly. Before: $ echo 0xf3,0x0f,0xae,0xf0 | llvm-mc -disassemble .text mfence After: $ echo 0xf3,0x0f,0xae,0xf0 | llvm-mc -disassemble .text umonitor %rax Reviewers: craig.topper, zvi Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D45253 llvm-svn: 330462
* [LLD/PDB] Remove improper assert.Zachary Turner2018-04-201-1/+0
| | | | | | | | It's possible to have an empty object file, for example if you just compile an empty .c file. This file won't have any sections so asserting that a file has chunks is definitely wrong. llvm-svn: 330461
* Fix the Xcode gtest target for the move of FileSpecTest.cpp.Jim Ingham2018-04-201-1/+1
| | | | llvm-svn: 330460
* [MachineOutliner] Change B instruction for tail calls to TCRETURNdiJessica Paquette2018-04-202-4/+5
| | | | | | | | | | First off, this is more correct than having the B. Second off, this was making a bot upset. This fixes that. Update the test to include -verify-machineinstrs as well to prevent stuff like this slipping by non debug/assert builds in the future. llvm-svn: 330459
* [Sanitizer] Internal Printf string precision argument + padding.Alex Shlyapnikov2018-04-202-2/+9
| | | | | | | | | | | | | | | | | | | | | | Summary: Example: Printf("%.*s", 5, "123"); should yield: '123 ' In case Printf's requested string precision is larger than the string argument, the resulting string should be padded up to the requested precision. For the simplicity sake, implementing right padding only. Reviewers: eugenis Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D45844 llvm-svn: 330458
* [LLD/PDB] Emit first section contribution for DBI Module Descriptor.Zachary Turner2018-04-204-34/+55
| | | | | | | | | | | | | | | | Part of the DBI stream is a list of variable length structures describing each module that contributes to the final executable. One member of this structure is a section contribution entry that describes the first section contribution in the output file for the given module. We have been leaving this structure unpopulated until now, so with this patch it is now filled out correctly. Differential Revision: https://reviews.llvm.org/D45832 llvm-svn: 330457
* [WebAssembly] Implement -print-gc-sections, to better test GC of globalsNicholas Wilson2018-04-206-14/+137
| | | | | | Differential Revision: https://reviews.llvm.org/D44311 llvm-svn: 330456
* Remove llvm-build's --configure-target-def-file.Nico Weber2018-04-202-114/+1
| | | | | | | | | | It was added 6.5 years ago in r144345, but was never hooked up and has been unused since. If _you_ do use this, feel free to revert, but add a comment on where it's used. https://reviews.llvm.org/D45262 llvm-svn: 330455
* [WebAssembly] Implement GC for importsNicholas Wilson2018-04-206-17/+187
| | | | | | Differential Revision: https://reviews.llvm.org/D44313 llvm-svn: 330454
* [utils] improve AArch64 asm parserSanjay Patel2018-04-201-1/+1
| | | | | | | | If we don't mark the cfi line as optional, the script won't work with 'nounwind' code. Without that attr, there may be extra noise in the asm body that we don't want to see. llvm-svn: 330453
* Record whether a module came from a private module mapJordan Rose2018-04-205-6/+20
| | | | | | | | | | | Right now we only use this information in one place, immediately after we calculate it, but it's still nice information to have. The Swift project is going to use this to tidy up its "API notes" feature (see past discussion on cfe-dev that never quite converged). Reviewed by Bruno Cardoso Lopes. llvm-svn: 330452
* Revert r330442, CodeGen/no-ident-version.c is failing on PPCMikhail Maltsev2018-04-207-33/+3
| | | | llvm-svn: 330451
* Fix a crash when resolving overloads of C++ virtual methods.Adrian Prantl2018-04-204-1/+29
| | | | | | | | | The isOverload() method needs to account for situations where the two methods being compared don't have the same number of arguments. rdar://problem/39542960 llvm-svn: 330450
* [WebAssembly] Implement --print-gc-sections for synthetic functionsNicholas Wilson2018-04-205-9/+27
| | | | | | | | | | Enables cleaning up confusion between which name variables are mangled and which are unmangled, and --print-gc-sections then excersises and tests that. Differential Revision: https://reviews.llvm.org/D44440 llvm-svn: 330449
* [WebAssembly] Distinguish debug/symbol names in the Wasm structs. NFCNicholas Wilson2018-04-202-19/+11
| | | | | | Differential Revision: https://reviews.llvm.org/D45021 llvm-svn: 330448
OpenPOWER on IntegriCloud