summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.Galina Kistanova2017-06-011-2/+3
| | | | llvm-svn: 304475
* [InstSimplify][ConstantFolding] Add test demonstrating failure to simplify ↵Craig Topper2017-06-011-0/+16
| | | | | | (icmp eq null, inttoptr x) when the null is on the left hand side. NFC llvm-svn: 304474
* Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.Galina Kistanova2017-06-011-0/+1
| | | | llvm-svn: 304473
* Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.Galina Kistanova2017-06-011-0/+4
| | | | llvm-svn: 304472
* DbgValueHistoryCalculator: Ignore call instructions that claim to clobber SP.Adrian Prantl2017-06-013-0/+188
| | | | | | | | | | | The AArch64 backend marks calls that involve aggregate function arguments as having an implicit def of SP. We already have the same workaround in LiveDebugValues and in DbgValueHistoryCalculator for SP clobbers in register masks. This adds register defs to the list. Fixes rdar://problem/30361929 and Swift SR-3851. llvm-svn: 304471
* [CGDebugInfo] Finalize SubPrograms when we're done with themKeno Fischer2017-06-013-4/+7
| | | | | | | | | | | | | | | | | | `GenerateVarArgsThunk` in `CGVTables` clones a function before the frontend is done emitting the compilation unit. Because of the way that DIBuilder works, this means that the attached subprogram had incomplete (temporary) metadata. Cloning such metadata is semantically disallowed, but happened to work anyway due to bugs in the cloning logic. rL304226 attempted to fix up that logic, but in the process exposed the incorrect API use here and had to be reverted. To be able to fix this, I added a new method to DIBuilder in rL304467, to allow finalizing a subprogram independently of the entire compilation unit. Use that here, in preparation of re-applying rL304226. Reviewers: aprantl, dblaikie Differential Revision: https://reviews.llvm.org/D33705 llvm-svn: 304470
* [PGO] Adjust indirect call promotion thresholdTeresa Johnson2017-06-011-1/+1
| | | | | | | | | | | | | | Summary: Reduce min percent required for indirect call promotion from 33% to 30%, which matches gcc's threshold and catches the same hot opportunities. Reviewers: davidxl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D33798 llvm-svn: 304469
* [llvm-config] Don't use PATH_MAXKeno Fischer2017-06-011-1/+1
| | | | | | | | It doesn't exist on Windows. The number we use here doesn't really matter, the storage will expand automatically but 256 seems like a reasonable default. Should fix windows buildbots that complained about rL304458. llvm-svn: 304468
* [DIBuilder] Add a more fine-grained finalization methodKeno Fischer2017-06-012-16/+21
| | | | | | | | | | | | | | | | | | | | Summary: Clang wants to clone a function before it is done building the entire compilation unit. As of now, there is no good way to do that, because CloneFunction doesn't like dealing with temporary metadata. However, as long as clang doesn't want to add any variables to this SP, it should be fine to just prematurely finalize it. Add an API to allow this. This is done in preparation of a clang commit to fix the assertion that necessitated the revert of D33655. Reviewers: aprantl, dblaikie Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D33704 llvm-svn: 304467
* (NFC) Track global summary liveness in GVFlags.Evgeniy Stepanov2017-06-018-103/+114
| | | | | | | | Replace GVFlags::LiveRoot with GVFlags::Live and use that instead of all the DeadSymbols sets. This is refactoring in order to make liveness information available in the RegularLTO pipeline. llvm-svn: 304466
* Don't assume that a store source is a vector type just because the ↵Simon Pilgrim2017-06-012-2/+14
| | | | | | destination is (PR26099) llvm-svn: 304465
* Escape filenames in module map line marker directives, to unbreak Windows ↵Richard Smith2017-06-012-4/+10
| | | | | | build bots. llvm-svn: 304464
* [Modules] Handle sanitizer feature mismatches when importing modulesVedant Kumar2017-06-017-5/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes it an error to have a mismatch between the enabled sanitizers in a CU, and in any module being imported into the CU. Only mismatches between non-modular sanitizers are treated as errors. This patch also includes non-modular sanitizers in module hashes, in order to ensure module rebuilds occur when -fsanitize=X is toggled on and off for non-modular sanitizers, and to cut down on module rebuilds when the option is toggled for modular sanitizers. This fixes a longstanding issue with implicit modules and sanitizers, which Duncan originally diagnosed. When building with implicit modules it's possible to hit a scenario where modules are built without -fsanitize=address, and are subsequently imported into CUs with -fsanitize=address enabled. This causes strange failures at runtime. The case Duncan found affects libcxx, since its vector implementation behaves differently when ASan is enabled. Implicit module builds should "just work" when -fsanitize=X is toggled on and off across multiple compiler invocations, which is what this patch does. Differential Revision: https://reviews.llvm.org/D32724 llvm-svn: 304463
* Mark two coroutine tests as unsupported under ubsanVedant Kumar2017-06-012-0/+6
| | | | | | | | | They appear to crash inside of SelectionDAG on some Linux bots, when ubsan is enabled. https://bugs.llvm.org/show_bug.cgi?id=33271 llvm-svn: 304462
* [ubsan] Runtime support for pointer overflow checkingVedant Kumar2017-06-015-0/+60
| | | | | | | | Patch by John Regehr and Will Dietz! Differential Revision: https://reviews.llvm.org/D20323 llvm-svn: 304461
* [SDAG] Fix CombineTo ordering in visitZERO_EXTEND and visitSIGN_EXTENDNirav Dave2017-06-012-89/+140
| | | | | | | | | | | | Reorder CombineTo Calls to prevent references to stale/deleted SDNodes which caused undue assertions. Reviewers: dbabokin Subscribers: aemerson, rengolin, llvm-commits Differential Revision: https://reviews.llvm.org/D31625 llvm-svn: 304460
* [ubsan] Add a check for pointer overflow UBVedant Kumar2017-06-017-58/+391
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check pointer arithmetic for overflow. For some more background on this check, see: https://wdtz.org/catching-pointer-overflow-bugs.html https://reviews.llvm.org/D20322 Patch by Will Dietz and John Regehr! This version of the patch is different from the original in a few ways: - It introduces the EmitCheckedInBoundsGEP utility which inserts checks when the pointer overflow check is enabled. - It does some constant-folding to reduce instrumentation overhead. - It does not check some GEPs in CGExprCXX. I'm not sure that inserting checks here, or in CGClass, would catch many bugs. Possible future directions for this check: - Introduce CGF.EmitCheckedStructGEP, to detect overflows when accessing structures. Testing: Apart from the added lit test, I ran check-llvm and check-clang with a stage2, ubsan-instrumented clang. Will and John have also done extensive testing on numerous open source projects. Differential Revision: https://reviews.llvm.org/D33305 llvm-svn: 304459
* [llvm-config] Report --bindir based on LLVM_TOOLS_INSTALL_DIRKeno Fischer2017-06-012-1/+4
| | | | | | | | | | | | | | | | | | | Summary: `LLVM_TOOLS_INSTALL_DIR` was introduced in r272200 in order to override the directory name into which to install LLVM's executable. However, `llvm-config --bindir` still reported `$PREFIX/bin` independent of what LLVM_TOOLS_INSTALL_DIR was set to. This fixes the out-of-tree clang standalone build for me. Reviewers: beanz, tstellar Reviewed By: tstellar Subscribers: chapuni, tstellar, llvm-commits Differential Revision: https://reviews.llvm.org/D22499 llvm-svn: 304458
* Prefer static namespace-scoped variables over anon namespacing per style guideDavid Blaikie2017-06-011-6/+5
| | | | | | | Also for consistency with the immediately preceeding variable definition. llvm-svn: 304457
* Add compatibility alias for -Wno-#warningsDavid Blaikie2017-06-012-0/+2
| | | | | | | GCC uses -Wno-cpp for this, so seems reasonable to add an alias to match. llvm-svn: 304456
* Fixed broken test (strict-vtable-pointers)Piotr Padlewski2017-06-011-1/+1
| | | | llvm-svn: 304455
* [InlineCost] Add a test case for GEP costHaicheng Wu2017-06-011-2/+23
| | | | | | | | | The added test case is to check whether the simplified value is passed to getGEPCost(). Differential Revision: https://reviews.llvm.org/D33779 llvm-svn: 304454
* [Profile] Fix builtin_expect lowering bugXinliang David Li2017-06-012-4/+116
| | | | | | | | | | | | | | | | | | | | The lowerer wrongly assumes the ICMP instruction 1) always has a constant operand; 2) the operand has value 0. It also assumes the expected value can only be one, thus other values other than one will be considered 'zero'. This leads to wrong profile annotation when other integer values are used other than 0, 1 in the comparison or in the expect intrinsic. Also missing is handling of equal predicate. This patch fixes all the above problems. Differential Revision: http://reviews.llvm.org/D33757 llvm-svn: 304453
* [PartialInlining] Emit branch info and profile data as remarksXinliang David Li2017-06-012-0/+69
| | | | | | | | | This allows us to collect profile statistics to tune static branch prediction. Differential Revision: http://reviews.llvm.org/D33746 llvm-svn: 304452
* [SemaCXX] Add diagnostics to require_constant_initializationKeno Fischer2017-06-012-9/+74
| | | | | | | | | | | | | Summary: This hooks up the detailed diagnostics of why constant initialization was not possible if require_constant_initialization reports an error. I have updated the test to account for the new notes. Reviewed By: EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D24371 llvm-svn: 304451
* Remove ubsan XFAILS in two testsVedant Kumar2017-06-012-6/+0
| | | | | | | These two tests are ubsan-clean now: http://lab.llvm.org:8080/green/job/clang-stage2-cmake-RgSan_check/3553/ llvm-svn: 304450
* [CodeGen][ObjC] Fix assertion failure in EmitARCStoreStrongCall.Akira Hatanaka2017-06-012-1/+33
| | | | | | | | | | | | | The assertion fails because EmitValueForIvarAtOffset doesn't get the correct type of the ivar when the class the ivar belongs to is parameterized. This commit fixes the function to compute the ivar's type based on the type argument provided to the parameterized class. rdar://problem/32461723 Differential Revision: https://reviews.llvm.org/D33698 llvm-svn: 304449
* Emit invariant.group.barrier when using union fieldPiotr Padlewski2017-06-012-1/+141
| | | | | | | | | | | | | | | | Summary: We need to emit barrier if the union field is CXXRecordDecl because it might have vptrs. The testcode was wrongly devirtualized. It also proves that having different groups for different dynamic types is not sufficient. Reviewers: rjmccall, rsmith, mehdi_amini Subscribers: amharc, cfe-commits Differential Revision: https://reviews.llvm.org/D31830 llvm-svn: 304448
* [PredicateInfo] Fix non-determinism in codegen uncovered by reverse ↵Mandeep Singh Grang2017-06-013-17/+52
| | | | | | | | | | | | | | | | | | | iterating SmallPtrSet Summary: Sort OpsToRename before iterating to make iteration order deterministic. Thanks to Daniel Berlin for the sorting logic. Reviewers: dberlin, RKSimon, efriedma, davide Reviewed By: dberlin, davide Subscribers: sanjoy, davide, llvm-commits Differential Revision: https://reviews.llvm.org/D33265 llvm-svn: 304447
* [DWARF] Introduce Dump OptionsAdrian Prantl2017-06-018-13/+31
| | | | | | | | | | | This commit introduces a structure that holds all the flags that control the pretty printing of dwarf output. Patch by Spyridoula Gravani! Differential Revision: https://reviews.llvm.org/D33749 llvm-svn: 304446
* Strip trailing whitespace. NFCI.Simon Pilgrim2017-06-011-147/+147
| | | | llvm-svn: 304445
* Remove late nullptr pointer test (PR32447)Simon Pilgrim2017-06-011-2/+2
| | | | | | IgnoreNarrowingConversion should never return nullptr, but I've added an assert just in case. llvm-svn: 304444
* Re-enable assertion after the problem that caused it to be hit had been fixedAndrey Churbanov2017-06-011-5/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D31421 llvm-svn: 304443
* [Hexagon] Fix dependence check in the packetizerKrzysztof Parzyszek2017-06-014-189/+52
| | | | | | | An incorrect check in the packetizer lead to an attempt to convert an unconditional branch to a .new (conditional) form. llvm-svn: 304442
* [Hexagon] Handle long-running simplification loop in idiom recognitionKrzysztof Parzyszek2017-06-012-3/+67
| | | | | | | | | | | | | The initial assumption was that the simplification would converge to a fixed point relatvely quickly. Turns out that there are legitimate situa- tions where the complexity of the code causes it to take a large number of iterations. Two main changes: - Instead of aborting upon hitting the limit, simply return nullptr. - Reduce the limit to 10,000 from 100,000. llvm-svn: 304441
* Tighten up test to address bot failure. NFC.Vedant Kumar2017-06-011-3/+7
| | | | | | http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/32035 llvm-svn: 304440
* Move maybeCompress to OutputSectionCommand.Rafael Espindola2017-06-015-38/+38
| | | | | | | This removes a call to getCmd and allows us to move clearOutputSections earlier. llvm-svn: 304439
* Fix minor formatting issuesJonathan Peyton2017-06-014-35/+27
| | | | | | | | | | | Some code was restructured to move it under KMP_DEBUG. The rest is formatting changes to fix some things broken by clang-format Patch by Terry Wilmarth Differential Revision: https://reviews.llvm.org/D33744 llvm-svn: 304438
* Bug 33221 [UBSAN] segfault with -fsanitize=undefinedVedant Kumar2017-06-012-1/+25
| | | | | | | | | | | | | | | There is can be a situation when vptr is not initializing by constructor of the object, and has a junk data which should be properly checked, because c++ standard says: "if default constructor is not specified 16 (7.3) no initialization is performed." Patch by Denis Khalikov! Differential Revision: https://reviews.llvm.org/D33712 llvm-svn: 304437
* Move synchronize earlier.Rafael Espindola2017-06-011-1/+2
| | | | | | | | This is probably the correct location for it: next to fabricateDefaultCommands. If we don't have a linker script, we fabricate one. If we have one, we patch it. llvm-svn: 304436
* Remove ADDC, ADDE, SUBC, SUBE and SETCCE support from the X86 backend, use ↵Amaury Sechet2017-06-013-64/+0
| | | | | | | | | | | | | | | | | the CARRY ops instead. Summary: As per title. This cleanup some technical debt. Depends on D33374 Reviewers: jyknight, nemanjai, mkuper, spatel, RKSimon, zvi, bkramer Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D33390 llvm-svn: 304435
* Move clearOutputSections earlier.Rafael Espindola2017-06-011-1/+2
| | | | | | | Now it is as early as it can go: just before synchronize. We now have to move synchronize earlier too. llvm-svn: 304434
* Synchronize the linker script with -r.Rafael Espindola2017-06-011-1/+2
| | | | | | | I don't have a testcase in mind, but there is no reason to have the linker script out of sync during a -r link. llvm-svn: 304433
* Convert a few more uses of OutputSections. NFC.Rafael Espindola2017-06-013-10/+18
| | | | | | Also needed to move clearOutputSections earlier. llvm-svn: 304420
* Convert a few user of OutputSections NFC.Rafael Espindola2017-06-011-5/+9
| | | | | | This is needed to move clearOutputSections earlier. llvm-svn: 304419
* AMDGPU: Remove error on call in AsmPrinterMatt Arsenault2017-06-011-29/+26
| | | | | | | Partial revert of r301938 which is making it harder to split patches up. llvm-svn: 304418
* DAG: Remove pointless type checkMatt Arsenault2017-06-011-1/+1
| | | | | | These are only integer operations. llvm-svn: 304417
* AMDGPU: Set high getCSRFirstUseCostMatt Arsenault2017-06-011-0/+6
| | | | llvm-svn: 304416
* Fix addcarry-crash.llAmaury Sechet2017-06-011-1/+1
| | | | llvm-svn: 304415
* Add regression test for the addcarry crash. See D33770 for context.Amaury Sechet2017-06-011-0/+23
| | | | llvm-svn: 304414
OpenPOWER on IntegriCloud