summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [ImplicitNullChecks] Hoist trivial depdendencies if possibleSanjoy Das2016-06-222-20/+425
| | | | | | | | | | | | | | | | | | | | | | When trying to convert a loading instruction into a FAULTING_LOAD, we sometimes face code like this: if %R10 is not null: %R9<def> = MOV32ri Immediate %R9<def, tied> = AND32rm %R9, 0x20(%R10) else: goto TRAP In these cases we would like to use the AND32rm instruction as the faulting operation by hoisting the "depedency" def-ing %R9 also above the control flow, transforming the program into: %R9<def> = MOV32ri Immediate %R9<def, tied> = FAULTING_LOAD_OP(AND32rm %R9, 0x20(%R10), FailPath: TRAP) This change teaches ImplicitNullChecks to do the above, when safe. llvm-svn: 273501
* builtins: tag with noexecstackSaleem Abdulrasool2016-06-22104-0/+296
| | | | | | | | | | | | These routines do not require executable stacks. However, by default ELFish linkers may assume an executable stack on GNUish environments (and some non-GNU ones too!). The GNU extension to add a note to indicate a non-executable stack is honoured by these environments to mark the stack as non-executable (the compiler normally emits this directive on appropriate targets whenever possible). This allows normal builds from getting executable stacks due to linking to the compiler rt builtins. llvm-svn: 273500
* Use shouldAssumeDSOLocal.Rafael Espindola2016-06-222-5/+21
| | | | | | With this it handle -fPIE. llvm-svn: 273499
* Extract a few variables to make 'if' smaller. NFC.Rafael Espindola2016-06-221-7/+8
| | | | llvm-svn: 273497
* AMDGPU/SI: Define an intrinsic to expose ds_swizzle_b32Changpeng Fang2016-06-223-0/+32
| | | | | | | | Reviewers: tstellarAMD, arsenm Differential Revision: http://reviews.llvm.org/D21533 llvm-svn: 273496
* [codeview] Write LF_UDT_SRC_LINE records (PR28251)Hans Wennborg2016-06-227-90/+218
| | | | | | Differential Revision: http://reviews.llvm.org/D21621 llvm-svn: 273495
* Do not require __STDC_LIMIT_MACROS and othersPawel Bylica2016-06-221-9/+6
| | | | | | | | | | | | Summary: Do not require __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS macros to be defined globally. They are not needed for C++11 compliant standard headers. Reviewers: joerg, jyknight Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D21553 llvm-svn: 273493
* [CMake] LLVM_BINARY_DIR was not being properly set in LLVMConfig.cmakeChris Bieneman2016-06-222-1/+3
| | | | | | LLVMConfig.cmake needs to set LLVM_BINARY_DIR differently based on whether or not it is the build directory or the install directory. The build directory just needs to set the value from the configuration, the install directory needs to set it to the install prefix. llvm-svn: 273479
* [MachO] Adding a few missing swapStruct functionsChris Bieneman2016-06-221-0/+14
| | | | | | These are just missing swap functions for handling endian conversion. llvm-svn: 273478
* [codeview] Fix the alignment padding that we add to list recordsReid Kleckner2016-06-222-5/+7
| | | | | | | Tweak the big-types.ll test case to catch this bug. We just need an enumerator name that doesn't have a length that is a multiple of 4. llvm-svn: 273477
* [asan] Fix global-registration.c on LinuxRyan Govostes2016-06-221-1/+1
| | | | llvm-svn: 273476
* [asan] Relax a flaky invalid-pointer-pairs testAnna Zaks2016-06-221-3/+3
| | | | | | | | | | | | | | This test is flaky. Specifically, on some Mac configurations we see the __sanitizer_ptr_cmp as the 0th frame. Let's relax it to not require that f is in frame #0. 61396==ERROR: AddressSanitizer: invalid-pointer-pair: 0x01e00510 0x01e004d0 0 0x18f5a3 in __sanitizer_ptr_cmp ... libclang_rt.asan_osx_dynamic.dylib+0xaf5a3) 1 0xdd924 in f(char, char*, char*) ... invalid-pointer-pairs.cc:14:14 Differential Revision: http://reviews.llvm.org/D21588 llvm-svn: 273475
* [IRObjectFile] Propagate .weak attribute correctly for ASM symbols.Davide Italiano2016-06-224-7/+16
| | | | | | | PR: 28256 Differential Revision: http://reviews.llvm.org/D21616 llvm-svn: 273474
* Update header documentation for API deliberately made publicDaniel Berlin2016-06-221-2/+3
| | | | llvm-svn: 273473
* [driver] Remove one more bunch of empty 'test inputs' folders. NFCSimon Atanasyan2016-06-220-0/+0
| | | | llvm-svn: 273471
* IR: Introduce Module::global_objects().Peter Collingbourne2016-06-227-43/+88
| | | | | | | | | | | | This is a convenience iterator that allows clients to enumerate the GlobalObjects within a Module. Also start using it in a few places where it is obviously the right thing to use. Differential Revision: http://reviews.llvm.org/D21580 llvm-svn: 273470
* AMDGPU: Run verifier after 2nd run of SIShrinkInstructionsMatt Arsenault2016-06-221-1/+1
| | | | llvm-svn: 273469
* [driver] Remove empty folders from the Inputs folder for the driver's tests. NFCSimon Atanasyan2016-06-220-0/+0
| | | | llvm-svn: 273468
* AMDGPU: Fix verifier errors in SILowerControlFlowMatt Arsenault2016-06-2213-144/+444
| | | | | | | | | | | | | The main sin this was committing was using terminator instructions in the middle of the block, and then not updating the block successors / predecessors. Split the blocks up to avoid this and introduce new pseudo instructions for branches taken with exec masking. Also use a pseudo instead of emitting s_endpgm and erasing it in the special case of a non-void return. llvm-svn: 273467
* [Hexagon] Add SDAG preprocessing step to expose shifted addressing modesKrzysztof Parzyszek2016-06-222-1/+104
| | | | | | | | | | | Transform: (store ch addr (add x (add (shl y c) e))) to: (store ch addr (add x (shl (add y d) c))), where e = (shl d c) for some integer d. The purpose of this is to enable generation of loads/stores with shifted addressing mode, i.e. mem(x+y<<#c). For that, the shift value c must be 0, 1 or 2. llvm-svn: 273466
* [driver][mips] Factor out findMIPSMultilibs code into separate functions. NFCSimon Atanasyan2016-06-221-189/+185
| | | | | | | | The findMIPSMultilibs is too long. One more reason for splitting is to escape redundant calls of MultilibSet::FilterOut method which lead to disk access. llvm-svn: 273465
* [asan] Add a test case for global registrationRyan Govostes2016-06-221-0/+56
| | | | | | | | This test case checks that globals from all object files are being registered after they've been linked together. It also checks that globals from libraries loaded at runtime are registered. llvm-svn: 273464
* [Coverage] Push a new region when handling CXXTryStmtsVedant Kumar2016-06-223-2/+26
| | | | | | | | Push a new region for the try block and propagate execution counts through it. This ensures that catch statements get a region counter distinct from the try block's counter. llvm-svn: 273463
* [LTO] Update after API change in LLVM. NFC.Davide Italiano2016-06-221-1/+1
| | | | llvm-svn: 273462
* [UpdateCompilerUsed] API rename and cleanup, suggested by Rafaael.Davide Italiano2016-06-224-7/+4
| | | | | | | | | * UpdateCompilerUsed() -> updateCompilerUsed() * ThinLTO doesn't use the API so we can remove the include * Clean up unused #include <functional> from the header * Rename #ifdef guard comment to be correct. llvm-svn: 273461
* [MBFI]: Add a new suboption for graph viewerXinliang David Li2016-06-222-3/+22
| | | | | | | | | -view-machine-block-freq-propagation-dags currently support integer and fraction as the suboptions. This patch adds the 'count' suboption to display actual profile count if available. llvm-svn: 273460
* [ValueTracking] improve ComputeNumSignBits for vector constantsSanjay Patel2016-06-223-9/+37
| | | | | | | | | | | This is similar to the computeKnownBits improvement in rL268479. There's probably more we can do for vector logic instructions, but this should let us see non-splat constant masking ops that can become vector selects instead of and/andn/or sequences. Differential Revision: http://reviews.llvm.org/D21610 llvm-svn: 273459
* [AArch64] Remove an overly aggressive assert.Chad Rosier2016-06-222-6/+18
| | | | llvm-svn: 273458
* Start using shouldAssumeDSOLocal on Hexagon.Rafael Espindola2016-06-222-2/+22
| | | | | | | Include a token test showing that access to private is now the same as to internal. llvm-svn: 273457
* Preserve DebugInfo when replacing values in DAGCombinerNirav Dave2016-06-228-15/+34
| | | | | | | | | | | | | | | | | | | | | Recommiting after fixing over-aggressive assertion [DAG] Previously debug values would transfer debuginfo for the selected start node for a replacement which allows for debug to be dropped. Push debug value transfer to occur with node/value replacement in SelectionDAG, remove now extraneous transfers of debug values. This refixes PR9817 which was being incompletely checked in the testsuite. Reviewers: jyknight Subscribers: dblaikie, llvm-commits Differential Revision: http://reviews.llvm.org/D21037 llvm-svn: 273456
* AMDGPU: Add convergent flag to INLINEASM instruction.Wei Ding2016-06-226-2/+58
| | | | | | Differential Revision: http://reviews.llvm.org/D21214 llvm-svn: 273455
* [codeview] Set the new IntroducedVirtual debug info flagReid Kleckner2016-06-222-3/+23
| | | | llvm-svn: 273454
* [codeview] Add IntroducingVirtual debug info flagReid Kleckner2016-06-223-22/+301
| | | | | | | | CodeView needs to know if a virtual method was introduced in the current class, and base classes may not have complete type information, so we need to thread this bit through from the frontend. llvm-svn: 273453
* Create parallel-libs subproject in LLVMJason Henline2016-06-221-0/+90
| | | | | | | This initial commit just sets up the basic directory structure and includes the charter document as README.rst to describe the purpose of the project. llvm-svn: 273452
* [LTO] Include ASM undefs in llvm.compiler_used.Davide Italiano2016-06-224-4/+54
| | | | | | | | | This fixes PR28218. Thanks to Rafael for spotting a failure in the SHARED_LIBS build! Differential Revision: http://reviews.llvm.org/D21577 llvm-svn: 273451
* Make this test a bit more strict and fix it.Rafael Espindola2016-06-221-7/+8
| | | | | | | | We do pass -pic-level to cc1 when targeting darwin. Given that codegen itself doesn't use it, the only difference is whether __PIE__ and __pie__ are defined. llvm-svn: 273450
* Removing whitespace from test commit rL273447Jason Henline2016-06-221-1/+1
| | | | | | Undoing the trivial change I introduced in rL273447. llvm-svn: 273449
* AMDGPU: Make FrameLowering stack alignment 16Matt Arsenault2016-06-221-3/+4
| | | | | | | We don't need it to be that high. The natural alignment for a single workitem's stack is 16. llvm-svn: 273448
* Add whitespace to check commit accessJason Henline2016-06-221-1/+1
| | | | | | | No functional changes. Just adding whitespace in a comment in order to check that I am able to push a commit to the repo. llvm-svn: 273447
* [codeview] Fix trivial bug in OneMethodRecord::isIntroducingVirtualReid Kleckner2016-06-221-4/+2
| | | | | | | | | | | These should be equality comparisons. Fixes assertions while self-hosting clang with codeview debug info. Ultimately this is going to be covered by real tests for virtual method emission, so I'm not adding a "don't crash on this input" test that I'll remove soon afterwards. llvm-svn: 273446
* Don't omit `this' from expression args if it couldn't be read, but warn loudly.Sean Callanan2016-06-221-5/+4
| | | | | | <rdar://problem/26935520> llvm-svn: 273445
* [asan] Do not instrument accesses to profiling globalsVedant Kumar2016-06-222-5/+23
| | | | | | | | | | | | | It's only useful to asan-itize profiling globals while debugging llvm's profiling instrumentation passes. Enabling asan along with instrprof or gcov instrumentation shouldn't incur extra overhead. This patch is in the same spirit as r264805 and r273202, which disabled tsan instrumentation of instrprof/gcov globals. Differential Revision: http://reviews.llvm.org/D21541 llvm-svn: 273444
* [codeview] Defer emission of all referenced complete recordsReid Kleckner2016-06-225-37/+323
| | | | | | | | | | | | | | | | | | | | | | | | | | This is the motivating example: struct B { int b; }; struct A { B *b; }; int f(A *p) { return p->b->b; } Clang emits complete types for both A and B because they are required to be complete, but our CodeView emission would only emit forward declarations of A and B. This was a consequence of the fact that the A* type must reference the forward declaration of A, which doesn't reference B at all. We can't eagerly emit complete definitions of A and B when we request the forward declaration's type index because of recursive types like linked lists. If we did that, our stack usage could get out of hand, and it would be possible to lower a type while attempting to lower a type, and we would need to double check if our type is already present in the TypeIndexMap after all recursive getTypeIndex calls. Instead, defer complete type emission until after all type lowering has completed. This ensures that all referenced complete types are emitted, and that type lowering is not re-entrant. llvm-svn: 273443
* [BFI]: NFC refactoringXinliang David Li2016-06-223-11/+27
| | | | | | | move getBlockProfileCount implementation to the base class so that MBFI can share too. llvm-svn: 273442
* [analyzer] Teach ObjCDeallocChecker about XCTestCaseDevin Coughlin2016-06-222-9/+33
| | | | | | | | | | | Like with SenTestCase, subclasses of XCTestCase follow a "tear down" idiom to release instance variables and so typically do not release ivars in -dealloc. This commit applies the existing special casing for SenTestCase to XCTestCase as well. rdar://problem/25884696 llvm-svn: 273441
* Add support for /Ob1 and -finline-hint-functions flagsHans Wennborg2016-06-2211-10/+130
| | | | | | | | | | | | | | | | Add support for /Ob1 (and equivalent -finline-hint-functions), which enable inlining only for functions marked inline, either explicitly (via inline keyword, for example), or implicitly (function definition in class body, for example). This works by enabling inlining pass, and adding noinline attribute to every function not marked inline. Patch by Rudy Pons <rudy.pons@ilod.org>! Differential Revision: http://reviews.llvm.org/D20647 llvm-svn: 273440
* Fix bug in futex fast path inside kmp_csupport.cJonathan Peyton2016-06-221-1/+1
| | | | llvm-svn: 273439
* Apply the KMP_USE_FUTEX feature macro everywhereJonathan Peyton2016-06-224-23/+25
| | | | llvm-svn: 273438
* Fix separator in header commentTobias Grosser2016-06-221-1/+1
| | | | | | | This cleanup was suggested by Eugene Zelenko <eugene.zelenko@gmail.com> in http://reviews.llvm.org/D21488 and was split out to increase readability. llvm-svn: 273437
* Add missing copyright headerTobias Grosser2016-06-221-0/+9
| | | | | | | This cleanup was suggested by Eugene Zelenko <eugene.zelenko@gmail.com> in http://reviews.llvm.org/D21488 and was split out to increase readability. llvm-svn: 273436
OpenPOWER on IntegriCloud