summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [profiling] Make a test more explicit. NFC.Vedant Kumar2017-02-181-7/+15
| | | | | | | | The cxx-structors.cpp test checks that some instrumentation doesn't appear, but it should be more explicit about which instrumentation it actually expects to appear. llvm-svn: 295532
* OptDiag: Allow constructing DiagnosticLocation from DISubprogramsJustin Bogner2017-02-183-3/+11
| | | | | | | | This avoids creating a DILocation just to represent a line number, since creating Metadata is expensive. Creating a DiagnosticLocation directly is much cheaper. llvm-svn: 295531
* Update the location of ModuleCacheTest.cpp fromJason Molenda2017-02-181-10438/+10446
| | | | | | | | | | | | unittest/Utility to unittest/Target so the unit tests can be run from xcode again. The diff is enormous - I think zachary might have put windows line endings or something with his last commit? didn't look too closely but his commit & this commit have every line being different. llvm-svn: 295530
* Remove the is_trivially_copyable check entirely.Zachary Turner2017-02-182-13/+0
| | | | | | | | | This is still breaking builds because some compilers think this type is not trivially copyable even when it should be. Reverting this static_assert until I have time to investigate. llvm-svn: 295529
* [profiling] Tighten test cases which refer to "profn" vars. NFC.Vedant Kumar2017-02-182-7/+7
| | | | | | | | The frontend can't see "__profn" profile name variables after IRGen because llvm throws these away now. Tighten up some test cases which checked for the non-existence of those variables. llvm-svn: 295528
* Reuse a local variable. NFC.Vedant Kumar2017-02-181-5/+3
| | | | llvm-svn: 295527
* Use llvm workaround for missing is_trivially_copyable.Zachary Turner2017-02-182-6/+9
| | | | | | | some versions of GCC don't have this, so LLVM provides a workaround. llvm-svn: 295526
* Don't assume little endian in StreamReader / StreamWriter.Zachary Turner2017-02-1821-187/+144
| | | | | | | In an effort to generalize this so it can be used by more than just PDB code, we shouldn't assume little endian. llvm-svn: 295525
* Cleanup: use range-based for rather than separate calls to begin and end.Richard Smith2017-02-182-15/+12
| | | | llvm-svn: 295524
* Enable PROFILE, TSAN and UBSAN for AndroidPirama Arumuga Nainar2017-02-181-3/+3
| | | | | | | | | | | | | | | Summary: These sanitizers are enabled and used in Android but got built with Android's build system. This change enables them in the CMake build system. Reviewers: eugenis Subscribers: llvm-commits, danalbert, srhines, mgorny Differential Revision: https://reviews.llvm.org/D30127 llvm-svn: 295523
* Updated the results formatter to eliminate redundant data.Sean Callanan2017-02-181-27/+4
| | | | | | | | | | | | | | | | | | The testsuite's results formatter maintains a result_status_counts structure solely for the purpose of setting the return status code after the testsuite has run. This data is redundant with the result_events structure that contains the results of individual tests. There are subtle bugs arising from this redundancy that make some builds report no errors but a nonzero status. Rather than try to make sure these two are always in agreement, I've just rewritten the code that used to use the counts to now use the per-test results. <rdar://problem/30496966> llvm-svn: 295522
* Handle deduction guides better in -ast-print.Richard Smith2017-02-182-5/+20
| | | | llvm-svn: 295521
* machine-region-info.mir: Slightly simplify test, -mtripleMatthias Braun2017-02-181-16/+13
| | | | llvm-svn: 295520
* OptDiag: Decouple backend diagnostics from debug info metadataJustin Bogner2017-02-183-121/+143
| | | | | | | | | This creates and uses a DiagnosticLocation type rather than using DebugLoc for this purpose in the backend diagnostics. This is NFC for now, but will allow us to create locations for diagnostics without having to create new metadata nodes when we don't have a DILocation. llvm-svn: 295519
* MachineRegionInfo: Fix pass initializationMatthias Braun2017-02-185-10/+101
| | | | | | | | | | | | | | | | - Adapt MachineBasicBlock::getName() to have the same behavior as the IR BasicBlock (Value::getName()). - Add it to lib/CodeGen/CodeGen.cpp::initializeCodeGen so that it is linked in the CodeGen library. - MachineRegionInfoPass's name conflicts with RegionInfoPass's name ("region"). - MachineRegionInfo should depend on MachineDominatorTree, MachinePostDominatorTree and MachineDominanceFrontier instead of their respective IR versions. - Since there were no tests for this, add a X86 MIR test. Patch by Francis Visoiu Mistrih<fvisoiumistrih@apple.com> llvm-svn: 295518
* [modules] Load the ModuleOffsetMap from the module header lazily.Richard Smith2017-02-185-91/+126
| | | | | | | | If we never need to map any ID within the module to its global ID, we don't need the module offset map. If a compilation transitively depends on lots of unused module files, this can result in a modest performance improvement. llvm-svn: 295517
* Verifier: Disallow a line number without a file in DISubprogramJustin Bogner2017-02-179-10/+26
| | | | | | | | A line number doesn't make much sense if you don't say where it's from. Add a verifier check for this and update some tests that had bogus debug info. llvm-svn: 295516
* Retry^2: [ubsan] Reduce null checking of C++ object pointers (PR27581)Vedant Kumar2017-02-178-30/+276
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch teaches ubsan to insert exactly one null check for the 'this' pointer per method/lambda. Previously, given a load of a member variable from an instance method ('this->x'), ubsan would insert a null check for 'this', and another null check for '&this->x', before allowing the load to occur. Similarly, given a call to a method from another method bound to the same instance ('this->foo()'), ubsan would a redundant null check for 'this'. There is also a redundant null check in the case where the object pointer is a reference ('Ref.foo()'). This patch teaches ubsan to remove the redundant null checks identified above. Testing: check-clang, check-ubsan, and a stage2 ubsan build. I also compiled X86FastISel.cpp with -fsanitize=null using patched/unpatched clangs based on r293572. Here are the number of null checks emitted: ------------------------------------- | Setup | # of null checks | ------------------------------------- | unpatched, -O0 | 21767 | | patched, -O0 | 10758 | ------------------------------------- Changes since the initial commit: - Don't introduce any unintentional object-size or alignment checks. - Don't rely on IRGen of C labels in the test. Differential Revision: https://reviews.llvm.org/D29530 llvm-svn: 295515
* [ubsan] Pass a set of checks to skip to EmitTypeCheck() (NFC)Vedant Kumar2017-02-173-7/+16
| | | | | | | | | | | CodeGenFunction::EmitTypeCheck accepts a bool flag which controls whether or not null checks are emitted. Make this a bit more flexible by changing the bool to a SanitizerSet. Needed for an upcoming change which deals with a scenario in which we only want to emit null checks. llvm-svn: 295514
* [InstCombine] add tests for trunc(shuffle X, C, M); NFCSanjay Patel2017-02-171-2/+29
| | | | llvm-svn: 295513
* AArch64LoadStoreOptimizer: Correctly clear kill flagsMatthias Braun2017-02-172-8/+24
| | | | | | | | | | | When promoting the Load of a Store-Load pair to a COPY all kill flags between the store and the load need to be cleared. rdar://30402435 Differential Revision: https://reviews.llvm.org/D30110 llvm-svn: 295512
* test: prevent incorrect quoting of pathsSaleem Abdulrasool2017-02-171-13/+11
| | | | | | | | | The path would previously get an extra leading space as the arguments would be parsed when generating the final command to run. Pretokenise the arguments to permit proper quoting of the paths. This avoids a number of ignoring non-existent path warnings from clang. llvm-svn: 295511
* math: fix typo in macroSaleem Abdulrasool2017-02-172-8/+8
| | | | | | MAJOR was misspelt as NAJOR. Fix the spelling. llvm-svn: 295510
* cmath: Use c99 math on a new enough msvcrtSaleem Abdulrasool2017-02-171-4/+4
| | | | | | | MSVCRT 14+ supports the C99 math routines that we need. Use them accordingly. llvm-svn: 295509
* [X86] Add MOVBE targets to load combine testsSimon Pilgrim2017-02-171-101/+165
| | | | | | Test folded endian swap tests with MOVBE instructions. llvm-svn: 295508
* [COFF] support /ERRORLIMIT optionBob Haarman2017-02-175-29/+92
| | | | | | | | | | | | Summary: This adds support for reporting multiple errors in a single invocation of lld-link. The limit defaults to 20 and can be changed with the /ERRORLIMIT command line parameter, or set to unlimited by passing a value of 0. Reviewers: pcc, ruiu Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D29691 llvm-svn: 295507
* [PPC] Give unaligned memory access lower cost on processor that supports itGuozhi Wei2017-02-173-1/+31
| | | | | | | | | | | | Newer ppc supports unaligned memory access, it reduces the cost of unaligned memory access significantly. This patch handles this case in PPCTTIImpl::getMemoryOpCost. This patch fixes pr31492. Differential Revision: https://reviews.llvm.org/D28630 This is resubmit of r292680, which was reverted by r293092. The internal application failures were actually caused by a source code bug. llvm-svn: 295506
* [CodeGen] Revert changes in LowLevelType to pre-r295499 to fix broken buildbots.Eugene Zelenko2017-02-172-35/+25
| | | | llvm-svn: 295505
* [Hexagon] Start using regmasks on callsKrzysztof Parzyszek2017-02-1720-119/+273
| | | | | | Reapply r295371 with a fix for the Windows bot failures. llvm-svn: 295504
* [NewGVN] isOnlyReachableViaThisEdge() is dead now. NFCI.Davide Italiano2017-02-171-18/+0
| | | | llvm-svn: 295503
* [X86] Simplify by pulling out valuetype. NFCI.Simon Pilgrim2017-02-171-2/+2
| | | | llvm-svn: 295502
* [CodeGen] Attempt to fix buildbots broken in r295499.Eugene Zelenko2017-02-171-1/+1
| | | | llvm-svn: 295501
* [NewGVN] createVariableOrConstant is not required anymore. NFCI.Davide Italiano2017-02-171-8/+0
| | | | llvm-svn: 295500
* [CodeGen] Fix some Clang-tidy modernize and Include What You Use warnings; ↵Eugene Zelenko2017-02-1712-127/+190
| | | | | | other minor fixes (NFC). llvm-svn: 295499
* Fix windows buildbots that don't have full shell supportSimon Pilgrim2017-02-171-0/+1
| | | | llvm-svn: 295498
* [OpenMP] Prepare Sema for initial implementation for pragma 'distribute ↵Carlo Bertolli2017-02-176-4/+129
| | | | | | | | | | | | | | | parallel for' https://reviews.llvm.org/D29922 This patch adds two fields for use in the implementation of 'distribute parallel for': The increment expression for the distribute loop. As the chunk assigned to a team is executed by multiple threads within the 'parallel for' region, the increment expression has to correspond to the value returned by the related runtime call (for_static_init). The upper bound of the innermost loop ('for' in 'distribute parallel for') is not the globalUB expression normally used for pragma 'for' when found in isolation. It is instead the upper bound of the chunk assigned to the team ('distribute' loop). In this way, we prevent teams from executing chunks assigned to other teams. The use of these two fields can be see in a related explanatory patch: https://reviews.llvm.org/D29508 llvm-svn: 295497
* [X86] Add subborrow stack folding testsSimon Pilgrim2017-02-171-0/+18
| | | | llvm-svn: 295496
* [x86] add tests for sext (not bool); NFCSanjay Patel2017-02-171-0/+72
| | | | llvm-svn: 295495
* Revert "Retry: [ubsan] Reduce null checking of C++ object pointers (PR27581)"Vedant Kumar2017-02-177-249/+30
| | | | | | | | This reverts commit r295401. It breaks the ubsan self-host. It inserts object size checks once per C++ method which fire when the structure is empty. llvm-svn: 295494
* [LAA] Remove unused code (NFC)Matthew Simpson2017-02-171-5/+0
| | | | llvm-svn: 295493
* [X86][SSE] Add (V)MOVD folding pattern with zextloadi64i32 load node.Simon Pilgrim2017-02-173-5/+9
| | | | | | Fixes PRPR31309 llvm-svn: 295492
* Add an explicit derived class of FunctionDecl to model deduction guides ratherRichard Smith2017-02-1720-87/+202
| | | | | | | | than just treating them as FunctionDecls with a funny name. No functionality change intended. llvm-svn: 295491
* Fix windows bots by locking down the target triple on this testcase.Adrian Prantl2017-02-171-1/+1
| | | | llvm-svn: 295490
* AMDGPU: Fix crashes on invalid icmp/fcmp intrinsicsMatt Arsenault2017-02-173-5/+26
| | | | llvm-svn: 295489
* [ELF] - Added support of linkerscript's "/DISCARD/" for --emit-relocsGeorge Rimar2017-02-173-2/+31
| | | | | | | | | | | | Previously LLD crashed on on provided testcases because "/DISCARD/" was not supported. Patch implements that. After this I think there is no known issues with --emit-relocs implementation required for linux kernel linking. Differential revision: https://reviews.llvm.org/D29273 llvm-svn: 295488
* WholeProgramDevirt: For VCP use a 32-bit ConstantInt for the byte offset.Peter Collingbourne2017-02-174-10/+10
| | | | | | | | | | | | | | | A future change will cause this byte offset to be inttoptr'd and then exported via an absolute symbol. On the importing end we will expect the symbol to be in range [0,2^32) so that it will fit into a 32-bit relocation. The problem is that on 64-bit architectures if the offset is negative it will not be in the correct range once we inttoptr it. This change causes us to use a 32-bit integer so that it can be inttoptr'd (which zero extends) into the correct range. Differential Revision: https://reviews.llvm.org/D30016 llvm-svn: 295487
* Debug Info: Sort frame index expressions before emitting them.Adrian Prantl2017-02-174-36/+129
| | | | | | | | | | This fixes PR31381, which caused an assertion and/or invalid debug info. This affects debug variables that have multiple fragments in the MMI side (i.e.: in the stack frame) table. rdar://problem/30571676 llvm-svn: 295486
* Fix --print-gc-sections with linker scripts.Rafael Espindola2017-02-172-2/+8
| | | | | | | | Before it would never print anything. Thanks to George Rimar for pointing it out. llvm-svn: 295485
* [Test] Make Lit tests C++11 compatible - miscCharles Li2017-02-175-18/+38
| | | | | | | | Updated 5 tests. Differential Revision: https://reviews.llvm.org/D24812 llvm-svn: 295484
* [ELF] - Move DependentSections vector from InputSection to InputSectionBaseGeorge Rimar2017-02-173-10/+5
| | | | | | | | | | | | | | | | I splitted it from D29273. Since we plan to make relocatable sections as dependent for target ones for --emit-relocs implementation, this change is required to support .eh_frame case. EhInputSection inherets from InputSectionBase and not from InputSection. So for case when it has relocation section, it should be able to access DependentSections vector. This case is real for Linux kernel. Differential revision: https://reviews.llvm.org/D30084 llvm-svn: 295483
OpenPOWER on IntegriCloud