summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fold two cast plus a cast in a loop into a variable.Nicolas Lesser2018-08-031-5/+5
| | | | | | This avoids to recast `Record` multiple times. llvm-svn: 338801
* Append new attributes to the end of an AttributeList.Michael Kruse2018-08-0335-207/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recommit of r335084 after revert in r335516. ... instead of prepending it at the beginning (the original behavior since implemented in r122535 2010-12-23). This builds up an AttributeList in the the order in which the attributes appear in the source. The reverse order caused nodes for attributes in the AST (e.g. LoopHint) to be in the reverse order, and therefore printed in the wrong order in -ast-dump. Some TODO comments mention this. The order was explicitly reversed for enable_if attribute overload resolution and name mangling, which is not necessary anymore with this patch. The change unfortunately has some secondary effect, especially on diagnostic output. In the simplest cases, the CHECK lines or expected diagnostic were changed to the the new output. If the kind of error/warning changed, the attributes' order was changed instead. This unfortunately causes some 'previous occurrence here' hints to be textually after the main marker. This typically happens when attributes are merged, but are incompatible to each other. Interchanging the role of the the main and note SourceLocation will also cause the case where two different declaration's attributes (in contrast to multiple attributes of the same declaration) are merged to be reverse. There is no easy fix because sometimes previous attributes are merged into a new declaration's attribute list, sometimes new attributes are added to a previous declaration's attribute list. Since 'previous occurrence here' pointing to locations after the main marker is not rare, I left the markers as-is; it is only relevant when the attributes are declared in the same declaration anyway. Differential Revision: https://reviews.llvm.org/D48100 llvm-svn: 338800
* [X86] Autogenerate complete checks. NFCCraig Topper2018-08-031-18/+128
| | | | llvm-svn: 338799
* [modules] Defer merging deduced return types.Richard Smith2018-08-035-20/+78
| | | | | | | | | | | We can't read a deduced return type until we are sure that the types referred to by it are not in the middle of being loaded. So defer all reading of such deduced return types until the end of the recursive deserialization step. Also, when we load a function type that has a deduced return type, update all other redeclarations of the function to have that deduced return type. llvm-svn: 338798
* Update the changes to the array tests (that I committed yesterday) to use ↵Marshall Clow2018-08-031-55/+8
| | | | | | the test_comparison routines that I committed last week. NFC. llvm-svn: 338797
* [clang-doc] Fix unique_ptr error on botsJulie Hockett2018-08-031-11/+9
| | | | | | | | | Explicitly return the base unique_ptr type, as some of the older compilers on the bots don't support full C++11. Differential Revision: https://reviews.llvm.org/D50208 llvm-svn: 338796
* [X86] Prevent promotion of i16 add/sub/and/or/xor to i32 if we can fold an ↵Craig Topper2018-08-034-78/+64
| | | | | | | | atomic load and atomic store. This makes them consistent with i8/i32/i64. Which still seems to be more aggressive on folding than icc, gcc, or MSVC. llvm-svn: 338795
* [LICM] Remove unneccessary safety check to increase sinking effectivenessPhilip Reames2018-08-032-10/+3
| | | | | | | | | | | | This one requires a bit of explaination. It's not every day you simply delete code to implement an optimization. :) The transform in question is sinking an instruction from a loop to the uses in loop exiting blocks. We know (from LCSSA) that all of the uses outside the loop must be phi nodes, and after predecessor splitting, we know all phi users must have a single operand. Since the use must be strictly dominated by the def, we know from the definition of dominance/ssa that the exit block must execute along a (non-strict) subset of paths which reach the def. As a result, duplicating a potentially faulting instruction can not *introduce* a fault that didn't previously exist in the program. The full story is that this patch builds on "rL338671: [LICM] Factor out fault legality from canHoistOrSinkInst [NFC]" which pulled this logic out of a common helper routine. As best I can tell, this check was originally added to the helper function for hoisting legality, later an incorrect fastpath for loads/calls was added, and then the bug was fixed by duplicating the fault safety check in the hoist path. This left the redundant check in the common code to pessimize sinking for no reason. I split it out in an NFC, and am not removing the unneccessary check. I wanted there to be something easy to revert in case I missed something. Reviewed by: Anna Thomas (in person) llvm-svn: 338794
* objdump: Better handling of Mach-O universal binariesDave Lee2018-08-035-153/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: With Mach-O, there is a flag requirement discrepancy between working with universal binaries and thin binaries. Many flags that don't require the `-macho` flag (for example `-private-headers` and `-disassemble`) fail to work on universal binaries unless `-macho` is given. When this happens, the error message is unhelpful, stating: The file was not recognized as a valid object file. Which can lead to confusion. This change allows generic flags to be used on universal binaries with and without the `-macho` flag. This means flags that can be used for thin files can be used consistently with fat files too. To do this, the universal binary support within `ParseInputMachO()` is extracted into a new function. This new function is called directly from `DumpInput()` when the input binary is universal. Additionally the `-arch` flag validation in `ParseInputMachO()` was extracted to be reused. Reviewers: compnerd Reviewed By: compnerd Subscribers: keith, llvm-commits Differential Revision: https://reviews.llvm.org/D48702 llvm-svn: 338792
* [GlobalMerge] Allow merging globals with explicit section markings.Eli Friedman2018-08-022-15/+38
| | | | | | | | | | | | | | | At least on ELF, it's impossible to tell from the object file whether two globals with the same section marking were merged: the merged global uses "private" linkage to hide its symbol, and the aliases look like regular symbols. I can't think of any other reason to disallow it. (Of course, we can only merge globals in the same section.) The weird alignment handling matches AsmPrinter; our alignment handling for global variables should probably be refactored. Differential Revision: https://reviews.llvm.org/D49822 llvm-svn: 338791
* [AMDGPU] Minor change to d16 buffer load implementationTim Renouf2018-08-022-18/+8
| | | | | | | | | | | | | Summary: By not reconstructing the operand list of the SDNode, this change makes it easier to add the forthcoming new tbuffer and buffer intrinsics. Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D49995 Change-Id: I0cb79ef0801532645d7dd954a6d7355139db7b38 llvm-svn: 338784
* [AMDGPU] Reworked SIFixWWMLivenessTim Renouf2018-08-023-89/+451
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: I encountered some problems with SIFixWWMLiveness when WWM is in a loop: 1. It sometimes gave invalid MIR where there is some control flow path to the new implicit use of a register on EXIT_WWM that does not pass through any def. 2. There were lots of false positives of registers that needed to have an implicit use added to EXIT_WWM. 3. Adding an implicit use to EXIT_WWM (and adding an implicit def just before the WWM code, which I tried in order to fix (1)) caused lots of the values to be spilled and reloaded unnecessarily. This commit is a rework of SIFixWWMLiveness, with the following changes: 1. Instead of considering any register with a def that can reach the WWM code and a def that can be reached from the WWM code, it now considers three specific cases that need to be handled. 2. A register that needs liveness over WWM to be synthesized now has it done by adding itself as an implicit use to defs other than the dominant one. Also added the following fixmes: FIXME: We should detect whether a register in one of the above categories is already live at the WWM code before deciding to add the implicit uses to synthesize its liveness. FIXME: I believe this whole scheme may be flawed due to the possibility of the register allocator doing live interval splitting. Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D46756 Change-Id: Ie7fba0ede0378849181df3f1a9a7a39ed1a94a94 llvm-svn: 338783
* [X86] Allow 'atomic_store (neg/not atomic_load)' to isel to a RMW instruction.Craig Topper2018-08-023-32/+27
| | | | | | There was a FIXMe in the td file about a type inference issue that was easy to fix. llvm-svn: 338782
* [X86] Add NEG and NOT test cases to atomic_mi.ll in preparation for fixing ↵Craig Topper2018-08-021-10/+274
| | | | | | the FIXME in X86InstrCompiler.td to make these work for atomic load/store. llvm-svn: 338781
* [analyzer] Detect pointers escaped after ReturnStmt execution in MallocChecker.Reka Kovacs2018-08-023-3/+67
| | | | | | | | | | Objects local to a function are destroyed right after the statement returning (part of) them is executed in the analyzer. This patch enables MallocChecker to warn in these cases. Differential Revision: https://reviews.llvm.org/D49361 llvm-svn: 338780
* [AMDGPU] Avoid using divergent value in mubuf addr64 descriptorTim Renouf2018-08-027-77/+197
| | | | | | | | | | | | | Summary: This fixes a problem where a load from global+idx generated incorrect code on <=gfx7 when the index is divergent. Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D47383 Change-Id: Ib4d177d6254b1dd3f8ec0203fdddec94bd8bc5ed llvm-svn: 338779
* [MS Demangler] Fix some tests that are no longer broken.Zachary Turner2018-08-021-24/+77
| | | | | | | These were fixed with earlier patches, but had not yet been re-enabled. llvm-svn: 338778
* [analyzer] Obtain a ReturnStmt from a CFGAutomaticObjDtor.Reka Kovacs2018-08-023-1/+58
| | | | | | | | | | | The CoreEngine only gives us a ReturnStmt if the last element in the CFGBlock is a CFGStmt, otherwise the ReturnStmt is nullptr. This patch adds support for the case when the last element is a CFGAutomaticObjDtor, by returning its TriggerStmt as a ReturnStmt. Differential Revision: https://reviews.llvm.org/D49811 llvm-svn: 338777
* [libFuzzer] Initial implementation of weighted mutation leveraging during ↵Max Moroz2018-08-027-29/+83
| | | | | | | | | | | | | | | | | | | | | runtime. Summary: Added functions that calculate stats while fuzz targets are running and give mutations weight based on how much new coverage they provide, and choose better performing mutations more often. Patch by Kodé Williams (@kodewilliams). Reviewers: Dor1s, metzman, morehouse Reviewed By: Dor1s, morehouse Subscribers: delcypher, kcc, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D49621 llvm-svn: 338776
* [analyzer] Add a safety check to InnerPointerChecker.Reka Kovacs2018-08-021-2/+5
| | | | | | Do not crash if the CXXRecordDecl of an object is not available. llvm-svn: 338775
* [Hexagon] Simplify CFG after atomic expansionKrzysztof Parzyszek2018-08-0279-706/+583
| | | | | | | | | | This will remove suboptimal branching from the generated ll/sc loops. The extra simplification pass affects a lot of testcases, which have been modified to accommodate this change: either by modifying the test to become immune to the CFG simplification, or (less preferablt) by adding option -hexagon-initial-cfg-clenaup=0. llvm-svn: 338774
* [lldb] Remove unused variable.David L. Jones2018-08-021-1/+0
| | | | | | The use of this variable was removed in r338734. It now causes unused variable warnings. llvm-svn: 338772
* [WebAssembly] Support for atomic.wait / atomic.wake builtinsHeejin Ahn2018-08-023-0/+43
| | | | | | | | | | | | | | Summary: Add support for atomic.wait / atomic.wake builtins based on the Wasm thread proposal. Reviewers: dschuff Subscribers: sbc100, jgravelle-google, sunfish, cfe-commits Differential Revision: https://reviews.llvm.org/D49396 llvm-svn: 338771
* [WebAssembly] Support for atomic.wait / atomic.wake instructionsHeejin Ahn2018-08-027-0/+467
| | | | | | | | | | | | | | Summary: This adds support for atomic.wait / atomic.wake instructions in the wasm thread proposal. Reviewers: dschuff Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D49395 llvm-svn: 338770
* [lldbsuite, windows] Mark tests as XFAIL on Windows or skip themStella Stamenova2018-08-028-2/+24
| | | | | | | | | | | | | | Summary: 1) Several tests that are flakey on windows fail the run even if they are marked as expected to be flakey. This is because they fail frequently enough that even a retry won't help 2) Skip several tests on Windows that will occasionally hang rather than failing or exiting. This is causing the entire test suite to hang Reviewers: asmith, labath, zturner Reviewed By: zturner Differential Revision: https://reviews.llvm.org/D50198 llvm-svn: 338769
* [Unittests] Fix returning string in SolveQuadraticEquationWrapKrzysztof Parzyszek2018-08-021-3/+3
| | | | | | | Returning a Twine caused runtime failures. Convert it to std::string before retuning. llvm-svn: 338768
* Set IsUsedInRegularObj in a consistent manor between COFF, ELF and wasm. NFCSam Clegg2018-08-024-64/+47
| | | | | | Differential Revision: https://reviews.llvm.org/D49147 llvm-svn: 338767
* Fix assertion failure when emitting code for a merged lambda.Richard Smith2018-08-022-3/+14
| | | | llvm-svn: 338766
* [X86] Autogenerate complete checks. NFCCraig Topper2018-08-021-304/+1228
| | | | llvm-svn: 338765
* [ORC] Add a re-exports fallback definition generator.Lang Hames2018-08-023-0/+57
| | | | | | | | An instance of ReexportsFallbackDefinitionGenerator can be attached to a VSO (via setFallbackDefinitionGenerator) to re-export symbols on demandy from a backing VSO. llvm-svn: 338764
* Reland "[clang-doc] Refactoring mapper to map by scope"Julie Hockett2018-08-0236-1632/+4152
| | | | | | | | | | | | | | | Relanding with a minor change to prevent an assertion on release bots. The result of this adjusted mapper pass is that all Function and Enum infos are absorbed into the info of their enclosing scope (i.e. the class or namespace in which they are defined). Namespace and Record infos are passed along to the final output, but the second pass creates a reference to each in its parent scope. As a result, the top-level final outputs are Namespaces and Records. Differential Revision: https://reviews.llvm.org/D48341 llvm-svn: 338763
* [Support] Add an enable bit to our DebugCountersGeorge Burgess IV2018-08-022-5/+25
| | | | | | | | | | | | | | | | | r337748 made us start incrementing DebugCounters all of the time. This makes tsan unhappy in multithreaded environments. Since it doesn't make much sense to use DebugCounters with multiple threads, this patch makes us only count anything if the user passed a -debug-counter option or if some other piece of code explicitly asks for it (e.g. the pass in D50031). The amount of global state here makes writing a unittest for this behavior somewhat awkward. So, no test is provided. Differential Revision: https://reviews.llvm.org/D50150 llvm-svn: 338762
* Unbreak build after r338758: specify lambda return type explicitlyKrzysztof Parzyszek2018-08-021-1/+1
| | | | llvm-svn: 338760
* [DebugInfo/DWARF] Remove redundant iterator type. NFCPaul Robinson2018-08-023-45/+51
| | | | llvm-svn: 338759
* [SCEV] Properly solve quadratic equationsKrzysztof Parzyszek2018-08-027-106/+1086
| | | | | | Differential Revision: https://reviews.llvm.org/D48283 llvm-svn: 338758
* [OpenMP] Fix doacross testing for gccJonathan Peyton2018-08-023-1/+70
| | | | | | | | | | This patch adds a test using the doacross clauses in OpenMP and removes gcc from testing kmp_doacross_check.c which is only testing the kmp rather than the gomp interface. Differential Revision: https://reviews.llvm.org/D50014 llvm-svn: 338757
* [analyzer] Fix tests.George Karpenkov2018-08-022-2/+4
| | | | llvm-svn: 338756
* [Support] [NFC] change comment about retries in createUniqueEntityBob Haarman2018-08-021-2/+4
| | | | | | Rewording as requested on D50126 after the change was pushed. llvm-svn: 338755
* AMDGPU: Fix missing declaration of queue ptr builtinMatt Arsenault2018-08-022-0/+8
| | | | llvm-svn: 338754
* [analyzer] Forward arguments in registerChecker to avoid accidental copiesGeorge Karpenkov2018-08-021-2/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D50108 llvm-svn: 338753
* [NFC] clang-format cleanup of a couple files in llvm-objcopy.Puyan Lotfi2018-08-022-3/+3
| | | | llvm-svn: 338752
* CMake: Remove LLVM_DYLIB_SYMBOL_VERSIONINGTom Stellard2018-08-022-6/+0
| | | | | | | | | | | | | | | | Summary: This option is no longer needed since r300496 added symbol versioning by default Reviewers: sylvestre.ledru, beanz, mgorny Reviewed By: mgorny Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D49835 llvm-svn: 338751
* [LLD] Update split stack support to handle more generic prologues. Improve ↵Jordan Rupprecht2018-08-026-48/+66
| | | | | | | | | | error handling. Add test file for better code-coverage. Update tests to be more complete. Submitting patch on behalf of saugustine. Differential Revision: https://reviews.llvm.org/D49926 llvm-svn: 338750
* Work around more GCC miscompiles exposed by r338464.Martin Storsjo2018-08-021-1/+5
| | | | | | | | | This is the same fix as in r338478, for another occurrance of the same pattern from r338464. See gcc.gnu.org/PR86769 for details of the bug. llvm-svn: 338749
* Revert "[clang-doc] Refactoring mapper to map by scope"Julie Hockett2018-08-0236-4149/+1629
| | | | | | This reverts commit r338738 as it's breaking the bots. llvm-svn: 338748
* [itanium demangler] Support dot suffixes on block invocation functionsErik Pilkington2018-08-023-0/+6
| | | | | | rdar://32378759 llvm-svn: 338747
* Fix CMake build.Zachary Turner2018-08-021-0/+2
| | | | | | | Some new files were committed to the repository but not added to the CMakeLists.txt, so this patch fixes the build. llvm-svn: 338746
* [Support] fix TempFile infinite loop and permission denied errorsBob Haarman2018-08-022-35/+73
| | | | | | | | | | | | | | | | | | | | Summary: On Windows, TempFile::create() was prone to failing with permission denied errors when a process created many tempfiles without providing a model large enough to accommodate them. There was also a problem with createUniqueEntity getting into an infinite loop when all names permitted by the model are in use. This change fixes both of these problems and adds a unit test for them. Reviewers: pcc, rnk, zturner Reviewed By: zturner Subscribers: inglorion, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D50126 llvm-svn: 338745
* [WebAssembly] Ensure bitcasts that would result in invalid wasm are removed ↵Sam Clegg2018-08-025-61/+150
| | | | | | | | | | | | by FixFunctionBitcasts Rather than allowing invalid bitcasts to be lowered to wasm call instructions that won't validate, generate wrappers that contain unreachable thereby delaying the error until runtime. Differential Revision: https://reviews.llvm.org/D49517 llvm-svn: 338744
* __c11_atomic_load's _Atomic can be constJF Bastien2018-08-023-5/+6
| | | | | | | | | | | | | | | | | | | | | Summary: C++11 onwards specs the non-member functions atomic_load and atomic_load_explicit as taking the atomic<T> by const (potentially volatile) pointer. C11, in its infinite wisdom, decided to drop the const, and C17 will fix this with DR459 (the current draft forgot to fix B.16, but that’s not the normative part). clang’s lib/Headers/stdatomic.h implements these as #define to the __c11_* equivalent, which are builtins with custom typecheck. Fix the typecheck. D47613 takes care of the libc++ side. Discussion: http://lists.llvm.org/pipermail/cfe-dev/2018-May/058129.html <rdar://problem/27426936> Reviewers: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D47618 llvm-svn: 338743
OpenPOWER on IntegriCloud