summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Move -fms-compatibility-version=19 into target cflagsReid Kleckner2016-03-225-20/+7
| | | | | | | This reduces cflags duplication and allows us to build sanitizer_common/tests with clang and the VS 2015 STL. llvm-svn: 264017
* [asan] Relax strdup test check linesReid Kleckner2016-03-221-2/+2
| | | | | | | On the buildbot, strdup appears as frame 1 instead of frame 0. Either is an acceptable user experience. llvm-svn: 264016
* Add "first class" lowering for deopt operand bundlesSanjoy Das2016-03-226-24/+204
| | | | | | | | | | | | | | | | | Summary: After this change, deopt operand bundles can be lowered directly by SelectionDAG into STATEPOINT instructions (which are then lowered to a call or sequence of nop, with an associated __llvm_stackmaps entry0. This obviates the need to round-trip deoptimization state through gc.statepoint via RewriteStatepointsForGC. Reviewers: reames, atrick, majnemer, JosephTremoulet, pgavlin Subscribers: sanjoy, mcrosier, majnemer, llvm-commits Differential Revision: http://reviews.llvm.org/D18257 llvm-svn: 264015
* Wrap 81 character line to satisfy linterReid Kleckner2016-03-221-1/+2
| | | | llvm-svn: 264014
* [asan] Intercept strdup on WindowsReid Kleckner2016-03-225-11/+7
| | | | | | | | Some unit tests were failing because we didn't intercept strdup. It turns out it works just fine on 2013 and 2015 with a small patch to the interception logic. llvm-svn: 264013
* [JITLoaderGDB] Pack the jit entry struct according to the target arch.Siva Chandra2016-03-222-8/+25
| | | | | | | | | | Reviewers: clayborg Subscribers: tberghammer, dsrbecky, lldb-commits Differential Revision: http://reviews.llvm.org/D18334 llvm-svn: 264012
* [asan] Also apply r264006 to asan_win_dynamic_runtime_thunk.ccReid Kleckner2016-03-221-2/+2
| | | | llvm-svn: 264011
* Fix coverage-related asan tests for VS 2015Reid Kleckner2016-03-222-2/+9
| | | | | | | | printf is an inline function in VS 2015, giving these tests an unexpected extra point of coverage. This change works around that by avoiding printf. llvm-svn: 264010
* [CUDA] Implement atomicInc and atomicDec builtinsJustin Lebar2016-03-222-1/+23
| | | | | | | | | | | | | | | These functions cannot be implemented as atomicrmw or cmpxchg instructions, so they are implemented as a call to the NVVM intrinsics @llvm.nvvm.atomic.load.inc.32.p0i32 and @llvm.nvvm.atomic.load.dec.32.p0i32. Patch by Jason Henline. Reviewers: jlebar Differential Revision: http://reviews.llvm.org/D18322 llvm-svn: 264009
* [sema] [CUDA] Use std algorithms in EraseUnwantedCUDAMatchesImpl.Justin Lebar2016-03-221-17/+14
| | | | | | | | | | | | Summary: NFC Reviewers: tra Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18327 llvm-svn: 264008
* Revert r263974, "clang-cl: With -fmsc-version=1900, use MSVS2015 diag ↵NAKAMURA Takumi2016-03-213-23/+9
| | | | | | | | formatting." It seems the test wouldn't expect if default target is *-win32. llvm-svn: 264007
* [asan] Set the unhandled exception filter slightly later during startupReid Kleckner2016-03-211-4/+10
| | | | | | | | | | | VS 2015 moved the priority of their exception filter initializer from XIY to XCAA. We now set ours to XCAB, which makes it run after both CRT versions but before user constructors, as it should. Fixes null_deref.cc and a variety of related tests with VS 2015. Only 4 failures remain. llvm-svn: 264006
* [asan] Add new _*_base interceptors for VS 2015Reid Kleckner2016-03-212-0/+24
| | | | | | | | | There are some places in the CRT (such as mbctype) that directly call _malloc_base. If you are incrementally linking a binary with ASan from before this change, this change appears to result in a linker error. Retrying the link succeeds for some reason. llvm-svn: 264005
* Move ownership of Pass File's to the MachoLinkingContext.Pete Cooper2016-03-217-12/+27
| | | | | | | | | In trying to fix the leaks in the MachO lld codebase, we need to have a better model for file and atom ownership. Having the context own everything seems like the simplest model, so change all the passes to allocate File's on the context instead of owning files as a member. llvm-svn: 264004
* [sancov] do not instrument nodes that are full pre-dominatorsMike Aizatsky2016-03-211-10/+17
| | | | | | | | | | | | | Summary: Without tree pruning clang has 2,667,552 points. Wiht only dominators pruning: 1,515,586. With both dominators & predominators pruning: 1,340,534. Resubmit of r262103. Differential Revision: http://reviews.llvm.org/D18341 llvm-svn: 264003
* [CUDA] Add documentation explaining how to detect clang vs nvcc.Justin Lebar2016-03-211-0/+28
| | | | llvm-svn: 264002
* Fixed some cases in the modularize assistant mode where header file names ↵John Thompson2016-03-212-1/+19
| | | | | | didn't translate to valid module names. llvm-svn: 264001
* AMDGPU: Fix dangling references introduced by r263982Nicolai Haehnle2016-03-211-3/+5
| | | | | | | Fixes Valgrind errors on the test cases that were reported as failing by buildbots. llvm-svn: 264000
* [ELF] Simplify code a bit. No functional change.Davide Italiano2016-03-211-3/+1
| | | | llvm-svn: 263999
* [asan] Add strrchr to asan_win_dll_thunk.Evgeniy Stepanov2016-03-211-0/+1
| | | | | | "dll_host.cc" test says there is a mismatch. llvm-svn: 263998
* [Perf-training] Adding support for tests to skip the clang driverChris Bieneman2016-03-215-2/+69
| | | | | | | | | | This patch adds a new set of substitutions to the lit run lines for order files and PGO generation which run the clang driver to get the cc1 command, then execute the cc1 command directly. This allows the scripts to bypass profiling the clang driver over and over again. The approach in this patch was discussed via IRC with Sean Silvas. Special thanks to Daniel Dunbar whose out-of-tree code I liberally plagiarized. llvm-svn: 263997
* [modules] Store mangling numbers in a deterministic order so they don't ↵Richard Smith2016-03-212-6/+5
| | | | | | cause the resulting .pcm files to be nondeterministic. llvm-svn: 263996
* Collect IRExecutionUnits as part of persistent expression state.Sean Callanan2016-03-216-82/+436
| | | | | | | | | | | | | IRExecutionUnits contain code and data that persistent declarations can depend on. In order to keep them alive and provide for lookup of these symbols, we now allow any PersistentExpressionState to keep a list of execution units. Then, when doing symbol lookup on behalf of an expression, any IRExecutionUnit can consult the persistent expression states on a particular Target to find the appropriate symbol. <rdar://problem/22864976> llvm-svn: 263995
* [InstCombine] Ensure all undef operands are handled before binary ↵Simon Pilgrim2016-03-211-2/+16
| | | | | | | | | | instruction constant folding As noted in PR18355, this patch makes it clear that all cases with undef operands have been handled before further constant folding is attempted. Differential Revision: http://reviews.llvm.org/D18305 llvm-svn: 263994
* Fix -Wdocumentation warnings from r263853Duncan P. N. Exon Smith2016-03-211-4/+7
| | | | | | Thanks to chapuni for catching this. llvm-svn: 263993
* [sanitizer] Add strchr* to the common interceptorsEvgeniy Stepanov2016-03-216-48/+64
| | | | | | | | | | | | | | | | Adds strchr, strchrnul, and strrchr to the common interceptors, under a new common flag intercept_strchr. Removes the now-duplicate strchr interceptor from asan and all 3 interceptors from tsan. Previously, asan did not intercept strchrnul, but does now; previously, msan did not intercept strchr, strchrnul, or strrchr, but does now. http://reviews.llvm.org/D18329 Patch by Derek Bruening! llvm-svn: 263992
* [MemorySSA] Consider def-only BBs for live-in calculations.George Burgess IV2016-03-212-6/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | If we have a BB with only MemoryDefs, live-in calculations will ignore it. This means we get results like this: define void @foo(i8* %p) { ; 1 = MemoryDef(liveOnEntry) store i8 0, i8* %p br i1 undef, label %if.then, label %if.end if.then: ; 2 = MemoryDef(1) store i8 1, i8* %p br label %if.end if.end: ; 3 = MemoryDef(1) store i8 2, i8* %p ret void } ...When there should be a MemoryPhi in the `if.end` BB. This patch fixes that behavior. llvm-svn: 263991
* Remove leftover options from multiline.llKrzysztof Parzyszek2016-03-211-2/+2
| | | | | | | I added -march=hexagon to force using Hexagon target when testing locally, and I forgot to take it out. llvm-svn: 263990
* [modules] Renumber DECL_UPDATES from 30 to 50, so it no longer collides withRichard Smith2016-03-211-6/+10
| | | | | | | | TYPE_TEMPLATE_SPECIALIZATION. This was fine in practice because both record kinds are only ever found by offset, but made the llvm-bcanalyzer -dump output very confusing. llvm-svn: 263989
* Add a testcase that would have found the bug in r263971.Rafael Espindola2016-03-212-0/+12
| | | | llvm-svn: 263988
* Revert "[llvm-objdump] Printing relocations in executable and shared object ↵Rafael Espindola2016-03-215-23/+20
| | | | | | | | | files. This partially reverts r215844 by removing test objdump-reloc-shared.test which stated GNU objdump doesn't print relocations, it does." This reverts commit r263971. It produces the wrong results for .rela.dyn. I will add a test. llvm-svn: 263987
* Unxfail test/DebugInfo/Generic/multiline.ll on HexagonKrzysztof Parzyszek2016-03-211-3/+2
| | | | llvm-svn: 263986
* [sanitizier] initializing common flags.Mike Aizatsky2016-03-211-0/+1
| | | | | | | | Summary: Without SetDefaults() CommonFlags contain garbage. Differential Revision: http://reviews.llvm.org/D18326 llvm-svn: 263985
* Revert "Convert some ObjC msgSends to runtime calls."Pete Cooper2016-03-2110-336/+18
| | | | | | | | | | | | | | This reverts commit r263607. This change caused more objc_retain/objc_release calls in the IR but those are then incorrectly optimized by the ARC optimizer. Work is going to have to be done to ensure the ARC optimizer doesn't optimize user written RR, but that should land before this change. This change will also need to be updated to take account for any changes required to ensure that user written calls to RR are distinct from those inserted by ARC. llvm-svn: 263984
* AMDGPU: Coding style fixesNicolai Haehnle2016-03-211-4/+2
| | | | | | | I meant to add these before committing r263982 as per the review, but I forgot to squash. llvm-svn: 263983
* AMDGPU: Add SIWholeQuadMode passNicolai Haehnle2016-03-2110-15/+863
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Whole quad mode is already enabled for pixel shaders that compute derivatives, but it must be suspended for instructions that cause a shader to have side effects (i.e. stores and atomics). This pass addresses the issue by storing the real (initial) live mask in a register, masking EXEC before instructions that require exact execution and (re-)enabling WQM where required. This pass is run before register coalescing so that we can use machine SSA for analysis. The changes in this patch expose a problem with the second machine scheduling pass: target independent instructions like COPY implicitly use EXEC when they operate on VGPRs, but this fact is not encoded in the MIR. This can lead to miscompilation because instructions are moved past changes to EXEC. This patch fixes the problem by adding use-implicit operands to target independent instructions. Some general codegen passes are relaxed to work with such implicit use operands. Reviewers: arsenm, tstellarAMD, mareko Subscribers: MatzeB, arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D18162 llvm-svn: 263982
* [Hexagon] Add handling fixups and instruction relaxationKrzysztof Parzyszek2016-03-212-112/+476
| | | | llvm-svn: 263981
* [Hexagon] Properly encode registers in duplex instructionsKrzysztof Parzyszek2016-03-214-6/+136
| | | | llvm-svn: 263980
* [asan] Disable thread-safe static initilization with VS 2015Reid Kleckner2016-03-211-0/+6
| | | | | | | | ASan interceptors contain local statics which run before the CRT is initialized. Thread-safe statics appear to rely on CRT-internal state, and will crash without this flag. llvm-svn: 263979
* [Hexagon] Fix reserving emergency spill slots for register scavengerKrzysztof Parzyszek2016-03-213-35/+11
| | | | | | | - R10 and R11 are not reserved registers. - Check for reserved registers when finding unused caller-saved registers. llvm-svn: 263977
* [WebAssembly] Implement the eqz instructions.Dan Gohman2016-03-213-0/+29
| | | | llvm-svn: 263976
* [SLP] Remove unnecessary member variables by using container APIs.Chad Rosier2016-03-211-13/+6
| | | | | | | This changes the debug output, but still retains its usefulness. Differential Revision: http://reviews.llvm.org/D18324 llvm-svn: 263975
* clang-cl: With -fmsc-version=1900, use MSVS2015 diag formatting.Nico Weber2016-03-213-9/+23
| | | | llvm-svn: 263974
* [asan] Pass -fms-compatibility-version=19 with VS 2015Reid Kleckner2016-03-214-0/+18
| | | | | | | This resolves errors about char16_t and char32_t when compiling 2015 STL headers with clang. llvm-svn: 263973
* Compilation can end up calling functions (e.g. to resolve indirect ↵Jim Ingham2016-03-2114-14/+52
| | | | | | | | | | functions) so I added a way for compilation to take a "thread to use for compilation". If it isn't set then the compilation will use the currently selected thread. This should help keep function execution to the one thread intended. llvm-svn: 263972
* [llvm-objdump] Printing relocations in executable and shared object files. ↵Colin LeMahieu2016-03-215-20/+23
| | | | | | | | | | This partially reverts r215844 by removing test objdump-reloc-shared.test which stated GNU objdump doesn't print relocations, it does. In executable and shared object ELF files, relocations in the file contain the final virtual address rather than section offset so this is adjusted to display section offset. Differential revision: http://reviews.llvm.org/D15965 llvm-svn: 263971
* [modules] Don't invent a module cache path unless implicit module builds are ↵Richard Smith2016-03-212-22/+24
| | | | | | enabled. llvm-svn: 263970
* AMDGPU/SI: Fix threshold calculation for branching when exec is zeroTom Stellard2016-03-212-3/+39
| | | | | | | | | | | | | | | | | | | Summary: When control flow is implemented using the exec mask, the compiler will insert branch instructions to skip over the masked section when exec is zero if the section contains more than a certain number of instructions. The previous code would only count instructions in successor blocks, and this patch modifies the code to start counting instructions in all blocks between the start and end of the branch. Reviewers: nhaehnle, arsenm Subscribers: arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D18282 llvm-svn: 263969
* Fix Clang-tidy modernize-deprecated-headers warnings; other minor fixes.Eugene Zelenko2016-03-213-22/+0
| | | | | | Differential revision: http://reviews.llvm.org/D18232 llvm-svn: 263968
* [STATS] Add OMP_critical and OMP_critical_wait timersJonathan Peyton2016-03-212-1/+6
| | | | | | | OMP_critical - time spent in critical section OMP_critical_wait - time spent waiting to enter a critical section llvm-svn: 263967
OpenPOWER on IntegriCloud