summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* AMDGPU/SI: Make a function constTom Stellard2016-12-202-4/+3
| | | | llvm-svn: 290185
* AMDGPU/SI: Add a MachineMemOperand when lowering llvm.amdgcn.buffer.load.*Tom Stellard2016-12-208-9/+94
| | | | | | | | | | Reviewers: arsenm, nhaehnle, mareko Subscribers: kzhuravl, wdng, yaxunl, llvm-commits, tony-tye Differential Revision: https://reviews.llvm.org/D27834 llvm-svn: 290184
* [X86][SSE] Ensure we're only combining shuffles with legal mask types.Simon Pilgrim2016-12-201-0/+4
| | | | | | I haven't managed to get this to fail yet but its technically possible for the AND -> shuffle decomposition to result in illegal types. llvm-svn: 290183
* [OPENMP] Fix for PR31416: Clang crashes on OMPCapturedExpr during sourceAlexey Bataev2016-12-204-15/+30
| | | | | | | | | based coverage compilation Added source location info to captured expression declaration + fixed source location info for loop based directives. llvm-svn: 290181
* [CMake] [PR31433] Fix LLDB tool installationChris Bieneman2016-12-201-13/+13
| | | | | | This resolves PR 31433. llvm-svn: 290180
* AMDGPU/SI: Add a MachineMemOperand to MIMG instructionsTom Stellard2016-12-205-7/+71
| | | | | | | | | | | | | | | Summary: Without a MachineMemOperand, the scheduler was assuming MIMG instructions were ordered memory references, so no loads or stores could be reordered across them. Reviewers: arsenm Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, tony-tye Differential Revision: https://reviews.llvm.org/D27536 llvm-svn: 290179
* clang-format: Fix bug in understanding string-label&value analysis.Daniel Jasper2016-12-202-2/+11
| | | | | | | | | | | | | | | While for <<-operators often used in log statments, a single key value pair is always on the second operator, e.g. llvm::errs() << "aaaaa=" << aaaaa; It is on the first operator for plus- or comma-concatenated strings: string s = "aaaaaaaaaa: " + aaaaaaaa; (the "=" not counting because that's a different operator precedence) llvm-svn: 290177
* [change-namespace] do not fix calls to overloaded operator functions.Eric Liu2016-12-203-0/+58
| | | | | | | | | | | | Summary: Also make sure one function reference is only processed once. Reviewers: hokein Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D27982 llvm-svn: 290176
* [OPENMP] Fix for PR31428: variable named like directive name modifierAlexey Bataev2016-12-2042-106/+110
| | | | | | | | Directive name modifiers in 'if' clause are allowed only for OpenMP 4.5 and higher + in OpenMP 4.5 parsing procedure emits error message if ':' is not found after directive name modifier. llvm-svn: 290175
* [ELF] - Treat .openbsd.randomdata as relro sectionGeorge Rimar2016-12-202-3/+6
| | | | | | | | | | | | | | | That was requested by Mark Kettenis in llvm-dev: "It is the intention that .openbsd.randomdata sections are made read-only after initialization. The native (ld.bfd based) OpenBSD toolchain accomplishes this by including .openbsd.randomdata into the PT_GNU_RELRO segment." He suggested code change, I added testcase. Differential revision: https://reviews.llvm.org/D27974 llvm-svn: 290174
* Revert "[OpenCL] Enabling the usage of CLK_NULL_QUEUE as compare operand."Daniel Jasper2016-12-2014-124/+1
| | | | | | | | | | This reverts commit r290171. It triggers a bunch of warnings, because the new enumerator isn't handled in all switches. We want a warning-free build. Replied on the commit with more details. llvm-svn: 290173
* Fix for clang_Cursor_getSpellingNameRange()Kevin Funk2016-12-202-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Fixes spelling name ranges for user-defined string literal operators. Example: constexpr int operator""_toint(unsigned long long val) { return int(val); } Before this patch the spelling name range on consisted of 'operator'. After this patch: 'operator""_toint'. Related to http://reviews.llvm.org/D5041, which fixes the function for other cursor kinds. Reviewers: akyrtzi, craigt, skalinichev, klimek, milianw, bkramer Subscribers: cfe-commits Tags: #clang-c Differential Revision: https://reviews.llvm.org/D18462 llvm-svn: 290172
* [OpenCL] Enabling the usage of CLK_NULL_QUEUE as compare operand.Egor Churaev2016-12-2014-1/+124
| | | | | | | | | | | | Summary: Enabling the compression of CLK_NULL_QUEUE to variable of type queue_t. Reviewers: Anastasia Subscribers: cfe-commits, yaxunl, bader Differential Revision: https://reviews.llvm.org/D27569 llvm-svn: 290171
* Fix build with expensive checks enabledSerge Pavlov2016-12-201-0/+1
| | | | | | | | | Include of llvm/IR/Verifier.h was removed from HexagonCommonGEP.cpp in r289604 as unused. In fact it is required when expensive checks are enabled, because it declared function `verifyFunction`, which is called in conditionally compiled part of the file. llvm-svn: 290170
* Revert r290149: Add the alloc_size attribute to clang.Chandler Carruth2016-12-2016-1079/+205
| | | | | | | | | | | | | | | This commit fails MSan when running test/CodeGen/object-size.c in a confusing way. After some discussion with George, it isn't really clear what is going on here. We can make the MSan failure go away by testing for the invalid bit, but *why* things are invalid isn't clear. And yet, other code in the surrounding area is doing precisely this and testing for invalid. George is going to take a closer look at this to better understand the nature of the failure and recommit it, for now backing it out to clean up MSan builds. llvm-svn: 290169
* Bug 30863 - Step doesn't stop with coditional breakpoint on the next lineBoris Ulasevich2016-12-209-18/+235
| | | | | | | | | Fixed by additional completed plans detection, and applying them on breakpoint condition fail. Thread::GetStopInfo reworked. New test added. Review https://reviews.llvm.org/D26497 Many thanks to Jim llvm-svn: 290168
* Fix build breakage on FreeBSD after rL289878/rL289881Dimitry Andric2016-12-203-3/+5
| | | | | | | | | | | | | | | | | | Summary: After rL289878/rL289881, the build on FreeBSD is broken, because sanitizer_platform_limits_posix.cc attempts to include <utmp.h> and use `struct utmp`, neither of which are supported anymore on FreeBSD. Fix this by adding `&& !SANITIZER_FREEBSD` in a few places, and stop intercepting utmp functions altogether for FreeBSD. Reviewers: kubabrecka, emaste, eugenis, ed Subscribers: ed, llvm-commits Differential Revision: https://reviews.llvm.org/D27902 llvm-svn: 290167
* Add test for DR692.Richard Smith2016-12-201-0/+63
| | | | llvm-svn: 290166
* Remove extraneous space.Rui Ueyama2016-12-201-1/+1
| | | | llvm-svn: 290165
* Remove `Compressed` member from InputSectionData.Rui Ueyama2016-12-203-15/+13
| | | | | | | This value is used only once, and we can compute a value. So we don't need to save it. llvm-svn: 290164
* Change the timeout in CallBoardSystemServiceOpenApplication to Jason Molenda2016-12-201-1/+1
| | | | | | | | 30 seconds to match the old springboard timeout; the launcher should time out before that and we will hopefully get back an informative error message instead of timing out ourselves. llvm-svn: 290163
* [PM] Rework a loop in the CGSCC update logic to be more conservative andChandler Carruth2016-12-201-7/+11
| | | | | | | | | | clear. The current RefSCC can occur in exactly one position so we should just enforce that and leverage the property rather than checking for it anywhere. This addresses review comments made on another patch. llvm-svn: 290162
* [PM] Provide an initial, minimal port of the inliner to the new pass manager.Chandler Carruth2016-12-2014-40/+682
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This doesn't implement *every* feature of the existing inliner, but tries to implement the most important ones for building a functional optimization pipeline and beginning to sort out bugs, regressions, and other problems. Notable, but intentional omissions: - No alloca merging support. Why? Because it isn't clear we want to do this at all. Active discussion and investigation is going on to remove it, so for simplicity I omitted it. - No support for trying to iterate on "internally" devirtualized calls. Why? Because it adds what I suspect is inappropriate coupling for little or no benefit. We will have an outer iteration system that tracks devirtualization including that from function passes and iterates already. We should improve that rather than approximate it here. - Optimization remarks. Why? Purely to make the patch smaller, no other reason at all. The last one I'll probably work on almost immediately. But I wanted to skip it in the initial patch to try to focus the change as much as possible as there is already a lot of code moving around and both of these *could* be skipped without really disrupting the core logic. A summary of the different things happening here: 1) Adding the usual new PM class and rigging. 2) Fixing minor underlying assumptions in the inline cost analysis or inline logic that don't generally hold in the new PM world. 3) Adding the core pass logic which is in essence a loop over the calls in the nodes in the call graph. This is a bit duplicated from the old inliner, but only a handful of lines could realistically be shared. (I tried at first, and it really didn't help anything.) All told, this is only about 100 lines of code, and most of that is the mechanics of wiring up analyses from the new PM world. 4) Updating the LazyCallGraph (in the new PM) based on the *newly inlined* calls and references. This is very minimal because we cannot form cycles. 5) When inlining removes the last use of a function, eagerly nuking the body of the function so that any "one use remaining" inline cost heuristics are immediately refined, and queuing these functions to be completely deleted once inlining is complete and the call graph updated to reflect that they have become dead. 6) After all the inlining for a particular function, updating the LazyCallGraph and the CGSCC pass manager to reflect the function-local simplifications that are done immediately and internally by the inline utilties. These are the exact same fundamental set of CG updates done by arbitrary function passes. 7) Adding a bunch of test cases to specifically target CGSCC and other subtle aspects in the new PM world. Many thanks to the careful review from Easwaran and Sanjoy and others! Differential Revision: https://reviews.llvm.org/D24226 llvm-svn: 290161
* Fix a bug that the glob pattern parser falls in an infinite loop for invalid ↵Rui Ueyama2016-12-202-0/+6
| | | | | | patterns. llvm-svn: 290160
* Fix the spelling of 'bitfield' in diagnostics to be consistently 'bit-field'.Chandler Carruth2016-12-207-20/+20
| | | | | | | | The latter agrees with most existing diagnostics and the C and C++ standards. Differential Revision: https://reviews.llvm.org/D26530 llvm-svn: 290159
* Reapply r289926: attempt to fix windows buildAdrian Prantl2016-12-201-1/+2
| | | | llvm-svn: 290158
* Set Config->ColorDiagnostics early so that all error messages are colored.Rui Ueyama2016-12-203-27/+30
| | | | | | | | | Previously, some errors that were checked before we set to Config->ColorDiagnostics weren't colored. This patch moves the code to set the variable so that such error messages are colored just like other error messages. llvm-svn: 290157
* [Parser] Correct typo after lambda capture initializer is parsed.Akira Hatanaka2016-12-202-0/+17
| | | | | | | | | | | | | | | | This patch fixes an assertion that is triggered when RecordLayoutBuilder tries to compute the size of a field (for capture "name" in the test case) whose type hasn't been deduced. The patch fixes the bug by correcting the typo of the capture initializer after the initializer is parsed and before setting the expression for the annotation token. Fixes PR30566. rdar://problem/23380132 Differential Revision: https://reviews.llvm.org/D25206 llvm-svn: 290156
* Update for LLVM global variable debug info API change.Adrian Prantl2016-12-2014-61/+93
| | | | | | This reapplies r289921. llvm-svn: 290155
* Fix debug info metadata for upstream change in LLVM.Adrian Prantl2016-12-201-1/+1
| | | | llvm-svn: 290154
* [IR] Remove the DIExpression field from DIGlobalVariable.Adrian Prantl2016-12-20191-681/+1060
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements PR31013 by introducing a DIGlobalVariableExpression that holds a pair of DIGlobalVariable and DIExpression. Currently, DIGlobalVariables holds a DIExpression. This is not the best way to model this: (1) The DIGlobalVariable should describe the source level variable, not how to get to its location. (2) It makes it unsafe/hard to update the expressions when we call replaceExpression on the DIGLobalVariable. (3) It makes it impossible to represent a global variable that is in more than one location (e.g., a variable with multiple DW_OP_LLVM_fragment-s). We also moved away from attaching the DIExpression to DILocalVariable for the same reasons. This reapplies r289902 with additional testcase upgrades and a change to the Bitcode record for DIGlobalVariable, that makes upgrading the old format unambiguous also for variables without DIExpressions. <rdar://problem/29250149> https://llvm.org/bugs/show_bug.cgi?id=31013 Differential Revision: https://reviews.llvm.org/D26769 llvm-svn: 290153
* Make this REQUIRES match the other REQUIRES lines that mention requiringChandler Carruth2016-12-201-1/+1
| | | | | | a darwin system. llvm-svn: 290152
* Simplify type of Config->SymbolOrderingFile.Rui Ueyama2016-12-205-29/+20
| | | | | | | | | | | That variable was of type DenseMap<StringRef, unsigned>, but the unsigned numbers needed to be monotonicly increasing numbers because the implementation that used the variable depended on that fact. That was an implementation detail and shouldn't have leaked into Config. This patch simplifies its type to std::vector<StringRef>. llvm-svn: 290151
* Inline a small function.Rui Ueyama2016-12-201-11/+4
| | | | llvm-svn: 290150
* Add the alloc_size attribute to clang.George Burgess IV2016-12-2016-205/+1079
| | | | | | | | | | | | | | | | | | | | This patch does three things: - Gives us the alloc_size attribute in clang, which lets us infer the number of bytes handed back to us by malloc/realloc/calloc/any user functions that act in a similar manner. - Teaches our constexpr evaluator that evaluating some `const` variables is OK sometimes. This is why we have a change in test/SemaCXX/constant-expression-cxx11.cpp and other seemingly unrelated tests. Richard Smith okay'ed this idea some time ago in person. - Uniques some Blocks in CodeGen, which was reviewed separately at D26410. Lack of uniquing only really shows up as a problem when combined with our new eagerness in the face of const. Differential Revision: https://reviews.llvm.org/D14274 llvm-svn: 290149
* Revert "[ObjectYAML] Support for DWARF debug_info section"Chris Bieneman2016-12-2011-851/+8
| | | | | | | | This reverts commit r290147. This commit is breaking a bot (http://lab.llvm.org:8011/builders/clang-atom-d525-fedora-rel/builds/621). I don't have time to investigate at the moment, so I'll revert for now. llvm-svn: 290148
* [ObjectYAML] Support for DWARF debug_info sectionChris Bieneman2016-12-2011-8/+851
| | | | | | This patch adds support for YAML<->DWARF for debug_info sections. llvm-svn: 290147
* Fix completely bogus types for some builtins:Richard Smith2016-12-197-16/+30
| | | | | | | | | | | | | | | | | | | | | * In C++, never create a FunctionNoProtoType for a builtin (fixes C++1z crasher from r289754). * Fix type of __sync_synchronize to be a no-parameter function rather than a varargs function. This matches GCC. * Fix type of vfprintf to match its actual type. We gave it a wrong type due to PR4290 (apparently autoconf generates invalid code and expects compilers to choke it down or it miscompiles the program; the relevant error in clang was downgraded to a warning in r122744 to fix other occurrences of this autoconf brokenness, so we don't need this workaround any more). * Turn off vararg argument checking for __noop, since it's not *really* a varargs function. Alternatively we could add custom type checking for it and synthesize parameter types matching the actual arguments in each call, but that seemed like overkill. llvm-svn: 290146
* Make another test insensitive to the default C++ dialect.Paul Robinson2016-12-191-1/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D27955 llvm-svn: 290145
* Add ARM support to update_llc_test_checks.pyEli Friedman2016-12-192-43/+98
| | | | | | | | | | Just the minimal support to get it working at the moment. Includes checks for test/CodeGen/ARM/vzip.ll as an example. Differential Revision: https://reviews.llvm.org/D27829 llvm-svn: 290144
* [analyzer] Add checker modeling gtest APIs.Devin Coughlin2016-12-196-0/+452
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gtest is a widely-used unit-testing API. It provides macros for unit test assertions: ASSERT_TRUE(p != nullptr); that expand into an if statement that constructs an object representing the result of the assertion and returns when the assertion is false: if (AssertionResult gtest_ar_ = AssertionResult(p == nullptr)) ; else return ...; Unfortunately, the analyzer does not model the effect of the constructor precisely because (1) the copy constructor implementation is missing from the the header (so it can't be inlined) and (2) the boolean-argument constructor is constructed into a temporary (so the analyzer decides not to inline it since it doesn't reliably call temporary destructors right now). This results in false positives because the analyzer does not realize that the the assertion must hold along the non-return path. This commit addresses the false positives by explicitly modeling the effects of the two un-inlined constructors on the AssertionResult state. I've added a new package, "apiModeling", for these kinds of checkers that model APIs but don't emit any diagnostics. I envision all the checkers in this package always being on by default. This addresses the false positives reported in PR30936. Differential Revision: https://reviews.llvm.org/D27773 rdar://problem/22705813 llvm-svn: 290143
* [LV] Sink tripcount query to where it's actually used. NFC.Michael Kuperstein2016-12-191-5/+4
| | | | llvm-svn: 290142
* Don't try to emit nullability fix-its within/around macros.Jordan Rose2016-12-193-22/+48
| | | | | | | | | | | | | | The newly-added notes from r290132 are too noisy even when the fix-it is valid. For the existing warning from r286521, it's probably the right decision 95% of the time to put the change outside the macro if the array is outside the macro and inside otherwise, but I don't want to overthink it right now. Caught by the ASan bot! More rdar://problem/29524992 llvm-svn: 290141
* [analyzer] Add sink after construction of temporary with no-return destructor.Devin Coughlin2016-12-192-0/+50
| | | | | | | | | | | | | | | | | | | The analyzer's CFG currently doesn't have nodes for calls to temporary destructors. This causes the analyzer to explore infeasible paths in which a no-return destructor would have stopped exploration and so results in false positives when no-return destructors are used to implement assertions. To mitigate these false positives, this patch stops generates a sink after evaluating a constructor on a temporary object that has a no-return destructor. This results in a loss of coverage because the time at which the destructor is called may be after the time of construction (especially for lifetime-extended temporaries). This addresses PR15599. rdar://problem/29131566 llvm-svn: 290140
* [ObjectYAML] Support for DWARF Pub SectionsChris Bieneman2016-12-197-0/+470
| | | | | | This patch adds support for YAML<->DWARF round tripping for pub* section data. The patch supports both GNU and non-GNU style entries. llvm-svn: 290139
* [libfuzzer] dump_coverage command line flagMike Aizatsky2016-12-197-0/+28
| | | | | | | | Reviewers: kcc, vitalybuka Differential Revision: https://reviews.llvm.org/D27942 llvm-svn: 290138
* [Axccel] Remove -Wno-missing-braces in buildJason Henline2016-12-193-6/+6
| | | | | | | | | | | | | | | | Summary: I originally added the -Wno-missing-braces flag because I thought it was erroneously flagging std::array initializations. Now I realize the extra braces really are desired for these initializations, so I'm turning the warning flag back on. Reviewers: jlebar Subscribers: mgorny, parallel_libs-commits Differential Revision: https://reviews.llvm.org/D27941 llvm-svn: 290137
* Fix corner cases of setting the section address.Rafael Espindola2016-12-194-26/+140
| | | | | | | | | | | | | | | | This handles all the corner cases if setting a section address: - If the address is too low, we cannot allocate the program headers. - If the load address is lowered, we have to do that before finalize This also shares some code with the linker script since it was already hitting similar cases. This is used by the freebsd boot loader. It is not clear if we need to support this with a non binary output, but it is not as bad as I was expecting. llvm-svn: 290136
* [Format] Remove dead code.Benjamin Kramer2016-12-194-31/+0
| | | | | | No functionality change. llvm-svn: 290135
* [ASTReader] Sort RawComments before mergingBruno Cardoso Lopes2016-12-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | | `RawComments` are sorted by comparing underlying `SourceLocation`'s. This is done by comparing `FileID` and `Offset`; when the `FileID` is the same it means the locations are within the same TU and the `Offset` is used. FileID, from the source code: "A mostly-opaque identifier, where 0 is "invalid", >0 is this module, and <-1 is something loaded from another module.". That said, when de-serializing SourceLocations, FileID's from RawComments loaded from other modules get negative IDs where previously they were positive. This makes imported RawComments unsorted, leading to a wrong merge with other comments from the current TU. Fix that by sorting RawComments properly after de-serialization and before merge. This fixes an assertion in `ASTContext::getRawCommentForDeclNoCache`, which fires only in a debug build of clang. Differential Revision: https://reviews.llvm.org/D27546 rdar://problem/29287314 llvm-svn: 290134
OpenPOWER on IntegriCloud