summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Remove unneeded typename from testRoger Ferrer Ibanez2017-10-102-2/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D38628 llvm-svn: 315278
* [clang-tidy] Use a more efficient map for the virtual near miss check.Benjamin Kramer2017-10-101-3/+3
| | | | | | DenseMap performs better here. No functionality change intended. llvm-svn: 315277
* [ASTMatchers] Don't create a copy of a std::set when iterating over it.Benjamin Kramer2017-10-101-1/+4
| | | | | | | This is a bit awkward because lookup returns a copy instead of a reference. No functionality change intended. llvm-svn: 315276
* [RISCV] Fix build after r315254Alex Bradbury2017-10-101-2/+3
| | | | | | | createELFObjectWriter now takes a std::unique_ptr<MCELFObjectTargetWriter> rather than a MCELFObjectTargetWriter*. llvm-svn: 315275
* [AVX512] Add patterns to commute integer comparison instructions during isel.Craig Topper2017-10-102-106/+95
| | | | | | This enables broadcast loads to be commuted and allows normal loads to be folded without the peephole pass. llvm-svn: 315274
* [COFF] Don't error out on relocations to discarded sections in .eh_frameMartin Storsjo2017-10-102-2/+6
| | | | | | | | This allows linking code with dwarf exception handling. Differential Revision: https://reviews.llvm.org/D38681 llvm-svn: 315273
* Renable r314928Xinliang David Li2017-10-109-0/+767
| | | | | | | | | | | Eliminate inttype phi with inttoptr/ptrtoint. This version fixed a bug in finding the matching phi -- the order of the incoming blocks may be different (triggered in self build on Windows). A new test case is added. llvm-svn: 315272
* Make a local variable name shorter. NFC.Rui Ueyama2017-10-101-7/+7
| | | | llvm-svn: 315271
* Simplify.Rui Ueyama2017-10-101-6/+6
| | | | llvm-svn: 315270
* Remove dead function.Rui Ueyama2017-10-101-5/+0
| | | | llvm-svn: 315269
* Add comments.Rui Ueyama2017-10-101-0/+5
| | | | llvm-svn: 315268
* Add more comments.Rui Ueyama2017-10-101-0/+9
| | | | llvm-svn: 315267
* Add comment to InputSectionBase::File.Rui Ueyama2017-10-102-21/+18
| | | | | | | This patch also moves declarations so that related declarations next to each other. llvm-svn: 315266
* Remove dead function.Rui Ueyama2017-10-101-4/+0
| | | | llvm-svn: 315265
* [MC] Properly diagnose badly scoped .cfi_ directivesReid Kleckner2017-10-103-41/+84
| | | | | | | | | | Removes two report_fatal_errors. Implement this by removing EmitCFICommon, and do the checking in getCurrentDwarfFrameInfo. Have the callers check for null before dereferencing it. llvm-svn: 315264
* Give a test a tripleReid Kleckner2017-10-101-1/+1
| | | | llvm-svn: 315263
* [SEH] Use reportError instead of report_fatal_error for bad directivesReid Kleckner2017-10-109-173/+309
| | | | | | | | | | This makes the .seh_ directives slightly more usable from standalone assembly files. This removes a large number of report_fatal_errors and recovers from the error by ignoring the directive. llvm-svn: 315262
* [Sema][ObjC] Preserve syntactic sugar when removingAkira Hatanaka2017-10-102-8/+32
| | | | | | | | | | | | | | | | | ARCReclaimReturnedObject cast. This is a follow-up to r314370. Rather than throwing away the enclosing parentheses, this commit walks down the expression until an ARCReclaimReturnedObject cast is found and removes just the cast, preserving the syntactic sugar expressions (parens and casts) that were visited up to that point. rdar://problem/34705720 Differential Revision: https://reviews.llvm.org/D38659 llvm-svn: 315261
* [MC] Plumb unique_ptr<MCWasmObjectTargetWriter> through createWasmObjectWriterLang Hames2017-10-103-9/+13
| | | | | | | | | | to WasmObjectWriter's constructor. Fixes the same ownership issue for COFF that r315245 did for MachO: WasmObjectWriter takes ownership of its MCWasmObjectTargetWriter, so we want to pass this through to the constructor via a unique_ptr, rather than a raw ptr. llvm-svn: 315260
* [MC] Suppress .Lcfi labels when emitting textual assemblyReid Kleckner2017-10-1095-2957/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This suppresses the generation of .Lcfi labels in our textual assembler. It was annoying that this generated cascading .Lcfi labels: llc foo.ll -o - | llvm-mc | llvm-mc After three trips through MCAsmStreamer, we'd have three labels in the output when none are necessary. We should only bother creating the labels and frame data when making a real object file. This supercedes D38605, which moved the entire .seh_ implementation into MCObjectStreamer. This has the advantage that we do more checking when emitting textual assembly, as a minor efficiency cost. Outputting textual assembly is not performance critical, so this shouldn't matter. Reviewers: majnemer, MatzeB Subscribers: qcolombet, nemanjai, javed.absar, eraman, hiraditya, JDevlieghere, llvm-commits Differential Revision: https://reviews.llvm.org/D38638 llvm-svn: 315259
* Fix Wasm build after r315254Reid Kleckner2017-10-101-3/+2
| | | | llvm-svn: 315258
* [MC] Plumb unique_ptr<MCWinCOFFObjectTargetWriter> throughLang Hames2017-10-105-16/+17
| | | | | | | | | | | createWinCOFFObjectWriter to WinCOFFObjectWriter's constructor. Fixes the same ownership issue for COFF that r315245 did for MachO: WinCOFFObjectWriter takes ownership of its MCWinCOFFObjectTargetWriter, so we want to pass this through to the constructor via a unique_ptr, rather than a raw ptr. llvm-svn: 315257
* [Modules TS] Avoid computing the linkage of the enclosing DeclContext for a ↵Richard Smith2017-10-104-4/+24
| | | | | | | | | | declaration in the global module. This works around a language issue where adding a typedef name for linkage purposes changes the linkage of an already-defined class after it becomes complete. llvm-svn: 315256
* R13575: Fix USR mangling for function pointer typesJan Korous2017-10-102-1/+23
| | | | | | Differential Revision: https://reviews.llvm.org/D38707 llvm-svn: 315255
* [MC] Plumb unique_ptr<MCELFObjectTargetWriter> through createELFObjectWriter toLang Hames2017-10-0913-36/+36
| | | | | | | | | | ELFObjectWriter's constructor. Fixes the same ownership issue for ELF that r315245 did for MachO: ELFObjectWriter takes ownership of its MCELFObjectTargetWriter, so we want to pass this through to the constructor via a unique_ptr, rather than a raw ptr. llvm-svn: 315254
* Rename OptimizationDiagnosticInfo.h to OptimizationRemarkEmitter.hAdam Nemet2017-10-096-6/+6
| | | | | | Polly version of r315249 on LLVM trunk. llvm-svn: 315253
* Fix typos in documentationJan Korous2017-10-091-2/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D38711 llvm-svn: 315252
* [Modules TS] Module ownership semantics for redeclarations.Richard Smith2017-10-0920-79/+353
| | | | | | | | | | When declaring an entity in the "purview" of a module, it's never a redeclaration of an entity in the purview of a default module or in no module ("in the global module"). Don't consider those other declarations as possible redeclaration targets if they're not visible, and reject any cases where we pick a prior visible declaration that violates this rule. llvm-svn: 315251
* [Analyzer] Do not segfault on unexpected call_once implementationGeorge Karpenkov2017-10-092-16/+31
| | | | | | | | Fixes https://bugs.llvm.org/show_bug.cgi?id=34869 Differential Revision: https://reviews.llvm.org/D38702 llvm-svn: 315250
* Rename OptimizationDiagnosticInfo.* to OptimizationRemarkEmitter.*Adam Nemet2017-10-0933-34/+34
| | | | | | | Sync it up with the name of the class actually defined here. This has been bothering me for a while... llvm-svn: 315249
* [llvm-rc] Try again to fix errors on big endian systems.Zachary Turner2017-10-091-10/+8
| | | | llvm-svn: 315248
* [ubsan] Fix Asan internal alloc corruption in PR33221 test.Evgeniy Stepanov2017-10-091-1/+1
| | | | | | MAP_FIXED discards the existing mapping at the given address. llvm-svn: 315247
* Fix LLDB build for Android.Eugene Zemtsov2017-10-091-1/+1
| | | | | | | | Currently libstdc++ on Android doesn't support std::to_string(). Differential Revision: https://reviews.llvm.org/D38701 llvm-svn: 315246
* [MC] Plumb unique_ptr<MCMachObjectTargetWriter> through createMachObjectWriterLang Hames2017-10-096-20/+19
| | | | | | | | | | | to MCObjectWriter's constructor. MCObjectWriter takes ownership of its MCMachObjectTargetWriter argument -- this patch plumbs that ownership relationship through the constructor (which previously took raw MCMachObjectTargetWriter*) and the createMachObjectWriter function. llvm-svn: 315245
* [DWARF] DW_TAG_imported_unit is not a unit type.Jonas Devlieghere2017-10-091-1/+0
| | | | | | | As pointed out by David in D38453 and confirmed with the DWARF mailing list, DW_TAG_imported_unit is not a valid unit type. llvm-svn: 315244
* [llvm-objdump] Use initializer list for scoped xar api constructorsFrancis Ricci2017-10-091-4/+3
| | | | llvm-svn: 315243
* Revert r315214 since diff -Z isn't portable, this is breaking:Bruno Cardoso Lopes2017-10-094-208/+14
| | | | | | | http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-expensive http://green.lab.llvm.org/green/job/clang-stage1-configure-RA llvm-svn: 315242
* PR13575: Fix testJan Korous2017-10-091-3/+3
| | | | | | Ignore OS-specific mangled name. llvm-svn: 315241
* [GISel]: Fix generation of illegal COPYs during CallLoweringAditya Nandakumar2017-10-0913-89/+180
| | | | | | | | | | | We end up creating COPY's that are either truncating/extending and this should be illegal. https://reviews.llvm.org/D37640 Patch for X86 and ARM by igorb, rovka llvm-svn: 315240
* Add a helper to build Copy instructions in MachineIRBuilderAditya Nandakumar2017-10-091-0/+8
| | | | llvm-svn: 315239
* AMDGPU: Add read_exec_lo/hi builtinsMatt Arsenault2017-10-093-0/+25
| | | | llvm-svn: 315238
* [X86] Unsigned saturation subtraction canonicalization [the backend part]Zvi Rackover2017-10-092-236/+248
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: On behalf of julia.koval@intel.com The patch transforms canonical version of unsigned saturation, which is sub(max(a,b),a) or sub(a,min(a,b)) to special psubus insturuction on targets, which support it(8bit and 16bit uints). umax(a,b) - b -> subus(a,b) a - umin(a,b) -> subus(a,b) There is also extra case handled, when right part of sub is 32 bit and can be truncated, using UMIN(this transformation was discussed in https://reviews.llvm.org/D25987). The example of special case code: ``` void foo(unsigned short *p, int max, int n) { int i; unsigned m; for (i = 0; i < n; i++) { m = *--p; *p = (unsigned short)(m >= max ? m-max : 0); } } ``` Max in this example is truncated to max_short value, if it is greater than m, or just truncated to 16 bit, if it is not. It is vaid transformation, because if max > max_short, result of the expression will be zero. Here is the table of types, I try to support, special case items are bold: | Size | 128 | 256 | 512 | ----- | ----- | ----- | ----- | i8 | v16i8 | v32i8 | v64i8 | i16 | v8i16 | v16i16 | v32i16 | i32 | | **v8i32** | **v16i32** | i64 | | | **v8i64** Reviewers: zvi, spatel, DavidKreitzer, RKSimon Reviewed By: zvi Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D37534 llvm-svn: 315237
* PR13575: Fix USR mangling for fixed-size arraysJan Korous2017-10-092-0/+30
| | | | | | Differential Revision: https://reviews.llvm.org/D38643 llvm-svn: 315236
* Implement mem_fence on ptxJeroen Ketema2017-10-092-0/+16
| | | | | | | | | | | | | PTX does not differentiate between read and write fences. Hence, these a lowered to a mem_fence call. The mem_fence function compiles to the “member.cta” instruction, which commits all outstanding reads and writes of a thread such that these become visible to all other threads in the same CTA (i.e., work-group). The instruction does not differentiate between global and local memory. Hence, the flags parameter is ignored, except for deciding whether a “member.cta” instruction should be issued at all. Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 315235
* [libc++] Support Microsoft ABI without vcruntime headersShoaib Meenai2017-10-0912-27/+137
| | | | | | | | | | | | | | | | | The vcruntime headers are hairy and clash with both libc++ headers themselves and other libraries. libc++ normally deals with the clashes by deferring to the vcruntime headers and silencing its own definitions, but for clients which don't want to depend on vcruntime headers, it's desirable to support the opposite, i.e. have libc++ provide its own definitions. Certain operator new/delete replacement scenarios are not currently supported in this mode, which requires some tests to be marked XFAIL. The added documentation has more details. Differential Revision: https://reviews.llvm.org/D38522 llvm-svn: 315234
* [SLP] Add test for reversed load, NFC.Alexey Bataev2017-10-091-0/+30
| | | | llvm-svn: 315232
* Testing commit access.Hamza Sood2017-10-091-1/+1
| | | | llvm-svn: 315231
* Fix some C++ value / reference semantics issues.Zachary Turner2017-10-094-12/+8
| | | | | | | | | Some functions were taking Twine's not by const&, these are all fixed to take by const&. We also had a case where some functions were overloaded to accept by const& and &&. Now there is only one version which accepts by value and move's the value. llvm-svn: 315229
* Make ptx barrier work irrespective of the cl_mem_fence_flagsJeroen Ketema2017-10-091-3/+1
| | | | | | | | | | | | This generates a "bar.sync 0” instruction, which not only causes the threads to wait, but does acts as a memory fence, as required by OpenCL. The fence does not differentiate between local and global memory. Unfortunately, there is no similar instruction which does not include a memory fence. Hence, we cannot optimize the case where neither CLK_LOCAL_MEM_FENCE nor CLK_GLOBAL_MEM_FENCE is passed. llvm-svn: 315228
* [sanitizer] Don't intercept signal and sigaction on FuchsiaPetr Hosek2017-10-092-1/+5
| | | | | | | | | Fuchsia doesn't support signals, so don't use interceptors for signal or sigaction. Differential Revision: https://reviews.llvm.org/D38669 llvm-svn: 315227
OpenPOWER on IntegriCloud