summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [CGP] Allow cycles during Phi traversal in OptimizaMemoryInstSerguei Katkov2017-07-192-6/+45
| | | | | | | | | | | | | | Allowing cycles in Phi traversal increases the scope of optimize memory instruction in case we are in loop. The added test shows an example of enabling optimization inside a loop. Reviewers: loladiro, spatel, efriedma Reviewed By: efriedma Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35294 llvm-svn: 308419
* Revert r308273 to reinstate part of r308100.Chandler Carruth2017-07-191-5/+5
| | | | | | | | | That part was reverted because the underlying change necessitating it (r308025) was reverted in r308271. Nirav re-landed r308025 again in r308350, so re-landing this fix. llvm-svn: 308418
* [PM/LCG] Follow-up fix to r308088 to handle deletion of libraryChandler Carruth2017-07-194-7/+48
| | | | | | | | | | | | | | | | | | | | | | | functions. In the prior commit, we provide ordering to the LCG between functions and library function definitions that they might begin to call through transformations. But we still would delete these library functions from the call graph if they became dead during inlining. While this immediately crashed, it also exposed a loss of information. We shouldn't remove definitions of library functions that can still usefully participate in the LCG-powered CGSCC optimization process. If new call edges are formed, we want to have definitions to be called. We can still remove these functions if truly dead using global-dce, etc, but removing them during the CGSCC walk is premature. This fixes a crash in the new PM when optimizing some unusual libraries that end up with "internal" lib functions such as the code in the "R" language's libraries. llvm-svn: 308417
* [analyzer] Add annotation attribute to trust retain count implementationDevin Coughlin2017-07-192-5/+86
| | | | | | | | | | | | | | | | | Add support to the retain-count checker for an annotation indicating that a function's implementation should be trusted by the retain count checker. Functions with these attributes will not be inlined and the arguments will be treating as escaping. Adding this annotation avoids spurious diagnostics when the implementation of a reference counting operation is visible but the analyzer can't reason precisely about the ref count. Patch by Malhar Thakkar! Differential Revision: https://reviews.llvm.org/D34937 llvm-svn: 308416
* [SPARC] Add missing variable initialization after r308343.James Y Knight2017-07-191-0/+1
| | | | llvm-svn: 308415
* [CMake] Build runtimes for Fuchsia targetsPetr Hosek2017-07-192-11/+30
| | | | | | | | This relies on the multi-target runtimes build support. Differential Revision: https://reviews.llvm.org/D32817 llvm-svn: 308412
* AMD znver1 Initial Scheduler modelCraig Topper2017-07-1919-353/+2570
| | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds the following 1. Adds a skeleton scheduler model for AMD Znver1. 2. Introduces the znver1 execution units and pipes. 3. Caters the instructions based on the generic scheduler classes. 4. Further additions to the scheduler model with instruction itineraries will be carried out incrementally based on a. Instructions types b. Registers used 5. Since itineraries are not added based on instructions, throughput information are bound to change when incremental changes are added. 6. Scheduler testcases are modified accordingly to suit the new model. Patch by Ganesh Gopalasubramanian. With minor formatting tweaks from me. Reviewers: craig.topper, RKSimon Subscribers: javed.absar, shivaram, ddibyend, vprasad Differential Revision: https://reviews.llvm.org/D35293 llvm-svn: 308411
* test: remove duplicated testSaleem Abdulrasool2017-07-191-7/+0
| | | | | | | | This test is folded into implib-name. Don't bother with the racy test. The use of %T results in left-overs from previous tests which write out the same import library as this test. llvm-svn: 308409
* [llvm-readobj] Install llvm-readelf aliasPetr Hosek2017-07-194-1/+11
| | | | | | | | | | | Install an llvm-readelf symlink to llvm-readobj. When invoked as *readelf*, default to -elf-output-style=GNU. Patch by Roland McGrath Differential Revision: https://reviews.llvm.org/D33869 llvm-svn: 308408
* COFF: improve link conformance for import namesSaleem Abdulrasool2017-07-196-6/+121
| | | | | | | | | | | | | | | | Improve the link conformance for the import name embedded into the import library. This requires the associated change to the LLVM portion for the DEF file parser. The import file generation embeds a different name based on whether the driver is invoked as "link" or "lib". Furthermore, the LIBRARY keyword in the DEF file influences the import name. The behaviour can be summarised according to the following table: | LIBRARY w/ ext | LIBRARY w/o ext | no LIBRARY -----+----------------+---------------------+------------------ LINK | {value} | {value}.{.dll/.exe} | {output name} LIB | {value} | {value}.dll | {output name}.dll llvm-svn: 308407
* Object: preserve more information about DEF fileSaleem Abdulrasool2017-07-192-4/+9
| | | | | | | | | | | | Preserve the actual library name as provided by the user. This is required to properly replicate link's behaviour about the module import name handling. This requires an associated change to lld for updating the tests for the proper behaviour for the import library module name handling in various cases. Associated tests will be part of the lld change. llvm-svn: 308406
* Fix DebugLoc propagation for unreachable LoadInstWeiming Zhao2017-07-194-4/+85
| | | | | | | | | | | | | | Summary: Currently, when GVN creates a load and when InstCombine creates a new store for unreachable Load, the DebugLoc info gets lost. Reviewers: dberlin, davide, aprantl Reviewed By: aprantl Subscribers: davide, llvm-commits Differential Revision: https://reviews.llvm.org/D34639 llvm-svn: 308404
* [Polly][docs][Release Notes] Adding Information about Remarks to Release ↵Tobias Grosser2017-07-192-1/+30
| | | | | | | | | | | | | | | | | | Notes and Documentation Summary: Based off of D35399 Reviewers: pollydev, llvm-commits, bollu, grosser Reviewed By: grosser Tags: #polly Contributed-by: Tarun Ranjendran Differential Revision: https://reviews.llvm.org/D35596 llvm-svn: 308403
* [scan-build-py] Patch to fix "-analyzer-config" optionPetr Hosek2017-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | I noticed that when I use "-analyze-config" option in scan-build-py, it behaves differently from original perl based scan-build. For example, command: $ scan-build -analyzer-config ipa=basic-inlining make Will work without any issues on perl version of scan-build. But on scan-build-py it will throw an error message "error reading 'ipa=basic-inlining'". After debugging, it turns out that the scan-build-py does not put "-analyzer-config" flag in front of the analyzer config flags (in this case is the "ipa=basic-inlining") in the final clang command line. This patch fixes this issue. Patch by Haowei Wu Differential Revision: https://reviews.llvm.org/D34489 llvm-svn: 308401
* Update for LLVM IR metadata changes (DIImportedEntity now needs a DIFile).Adrian Prantl2017-07-1910-21/+58
| | | | | | | | | <rdar://problem/33357889> https://bugs.llvm.org/show_bug.cgi?id=33822 Differential Revision: https://reviews.llvm.org/D35583 llvm-svn: 308399
* Debug Info: Add a file: field to DIImportedEntity.Adrian Prantl2017-07-1925-107/+151
| | | | | | | | | | | | | | | | | | | | | | | DIImportedEntity has a line number, but not a file field. To determine the decl_line/decl_file we combine the line number from the DIImportedEntity with the file from the DIImportedEntity's scope. This does not work correctly when the parent scope is a DINamespace or a DIModule, both of which do not have a source file. This patch adds a file field to DIImportedEntity to unambiguously identify the source location of the using/import declaration. Most testcase updates are mechanical, the interesting one is the removal of the FIXME in test/DebugInfo/Generic/namespace.ll. This fixes PR33822. See https://bugs.llvm.org/show_bug.cgi?id=33822 for more context. <rdar://problem/33357889> https://bugs.llvm.org/show_bug.cgi?id=33822 Differential Revision: https://reviews.llvm.org/D35583 llvm-svn: 308398
* Debug Info: Set the MainFileName when generating -gmodules debug info for PCM.Adrian Prantl2017-07-182-2/+7
| | | | | | | Previously it was uninitialized and thus always defaulted to "<stdin>". This is mostly a cosmetic change that helps making the debug info more readable. llvm-svn: 308397
* [llvm-readobj] Accept (and ignore) --wide (-W) command-line switchPetr Hosek2017-07-182-0/+15
| | | | | | | | | | | | | Accept and ignore --wide/-W. In GNU readelf this switch is necessary to get the output format that's consistent between 32-bit and 64-bit targets. llvm-readobj always produces that output format. Patch by Roland McGrath Differential Revision: https://reviews.llvm.org/D33873 llvm-svn: 308396
* Revert "Add MemoryMappedSection struct for two-level memory map iteration"Francis Ricci2017-07-182-54/+9
| | | | | | | | This reverts commit c8095ce74118dee8544b0f1ffaba8f46aa10215c. Reverted due to some buildbot timeouts, perhaps due to 10.11 issues. llvm-svn: 308395
* Revert "Only scan global sections containing data in LSan on darwin"Francis Ricci2017-07-185-28/+11
| | | | | | This reverts commit 7e46d78d47832f03ce42adcf56417fbfd47cbaad. llvm-svn: 308394
* cmake build needs to run tests AND collect resultsTim Hammerquist2017-07-181-7/+7
| | | | | | | | | | | CMake target "check-lldb" runs the lldb dotest.py suite, but doesn't collect the results in a usable format. In adding the arguments necessary to collect these results, I found some minor bugs in CMake that prevented dotest overrides from being used. This patch fixes them. <rdar://problem/33389717> cmake build needs to run tests AND collect results llvm-svn: 308393
* [llvm-readobj] Accept -S as an alias for --sectionsPetr Hosek2017-07-182-2/+6
| | | | | | | | | | | | | | | In GNU readelf, the short option for --sections is upper-case -S. Note that GNU uses lower-case -s to mean --symbols, while LLVM uses -s to mean --sections and -t to mean --symbols (-t has yet a different meaning in GNU). So command-line uses with -S can now be compatible, but uses with -s or -t are still incompatible. Patch by Roland McGrath Differential Revision: https://reviews.llvm.org/D33872 llvm-svn: 308392
* Make the test more precise.Rafael Espindola2017-07-181-4/+5
| | | | | | The real issue was the missing explicit versions. llvm-svn: 308391
* [Driver] Always use -z rodynamic for FuchsiaPetr Hosek2017-07-183-0/+5
| | | | | | | | Fuchsia uses read-only .dynamic section. Differential Revision: https://reviews.llvm.org/D35582 llvm-svn: 308390
* Add a test for PR33820.Rafael Espindola2017-07-181-0/+13
| | | | | | This would have found the issue. llvm-svn: 308389
* [AArch64] Adjust the feature set for Exynos M2Evandro Menezes2017-07-181-0/+1
| | | | | | Add fusion of AES operations. llvm-svn: 308388
* [asan] Copy arguments passed by value into explicit allocas for ASanVitaly Buka2017-07-182-0/+86
| | | | | | | | | | | | | | | | | | | | | Summary: ASan determines the stack layout from alloca instructions. Since arguments marked as "byval" do not have an explicit alloca instruction, ASan does not produce red zones for them. This commit produces an explicit alloca instruction and copies the byval argument into the allocated memory so that red zones are produced. Submitted on behalf of @morehouse (Matt Morehouse) Reviewers: eugenis, vitalybuka Reviewed By: eugenis Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D34789 llvm-svn: 308387
* test: add COFF test for library extension handlingSaleem Abdulrasool2017-07-182-0/+10
| | | | | | | Ensure that an extension other than .dll, .exe is preserved as per the behaviour of link. llvm-svn: 308386
* Fix REQUIRES line.Rafael Espindola2017-07-181-1/+1
| | | | llvm-svn: 308385
* Object: rename parameter from DLLName to ImportNameSaleem Abdulrasool2017-07-182-17/+17
| | | | | | | | | | When I originally wrote this code, I neglected the fact that the import library may be created for executables. This name is not the name of the DLL, but rather the name for the imported module. It will be embedded into the IAT/ILT reference. Rename it to make it more obvious. NFC. llvm-svn: 308384
* Object: handle extensions properly in def filesSaleem Abdulrasool2017-07-181-3/+3
| | | | | | | | | | | | When given an extension as part of the `library` directive in a def file, the extension is preserved/honoured by link/lib. Behave similarly when parsing the def file. This requires checking if a native extension is provided as a keyword parameter. If no extension is present, append a standard `.dll` or `.exe` extension. This is best tested via lld, and I will add tests there as a follow up. llvm-svn: 308383
* Fix a crash.Rafael Espindola2017-07-182-1/+8
| | | | | | | | | This is PR33821. What we really want to check in here is if the output section was created, not if the command was empty. llvm-svn: 308382
* [CMake] Set library dir to be LLVM's intermediate output dirPetr Hosek2017-07-181-1/+9
| | | | | | | | | This matches the behavior of libc++abi and libc++ and ensures that we get a working toolchain when building libunwind as part of LLVM. Differential Revision: https://reviews.llvm.org/D34375 llvm-svn: 308380
* llvm: add llvm-dlltool support to the archiverMartell Malone2017-07-1818-26/+411
| | | | | | | | | | | | | | | | A PE COFF spec compliant import library generator. Intended to be used with mingw-w64. Supports: PE COFF spec (section 8, Import Library Format) PE COFF spec (Aux Format 3: Weak Externals) Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D29892 This reapplies rL308329, which was reverted in rL308374 llvm-svn: 308379
* [CMake] A few fixups to support building LLDB for iOSChris Bieneman2017-07-182-12/+26
| | | | | | These changes enable proper configuration of LLDB targeting iOS. llvm-svn: 308378
* [CMake] Refactor debugserver build systemChris Bieneman2017-07-186-23/+55
| | | | | | | | | This refactoring changes two significant things about how the debugserver build system works: (1) debugserver will include all appropriate architecture support, so we can now build arm or ppc debugservers (2) debugserver can be built by itself, so you don't have to configure all of LLDB in order to generate debugserver. llvm-svn: 308377
* [CMake] [NFC] Remove out of date and redundant version requirementChris Bieneman2017-07-181-1/+0
| | | | | | Since we set the minimum required version elsewhere to be higher this actually has meaningful good impact. llvm-svn: 308376
* [RuntimeDyld][MachO/ARM] Don't add a redundant relocation entry.Lang Hames2017-07-181-1/+0
| | | | | | We only need to add this entry once for it to be fixed up. llvm-svn: 308375
* Revert r308329: llvm: add llvm-dlltool support to the archiverRui Ueyama2017-07-1817-410/+26
| | | | | | This reverts commit r308329 because it broke buildbots. llvm-svn: 308374
* llvm: fix -Wcast gcc warn error from rL308329Martell Malone2017-07-181-6/+3
| | | | llvm-svn: 308360
* [CMake] Set toolchain tools in cross-target runtimes buildPetr Hosek2017-07-181-0/+1
| | | | | | | | This is needed for runtimes build to work on Darwin. Differential Revision: https://reviews.llvm.org/D35343 llvm-svn: 308359
* [COFF, ARM64] Reserve X18 register by defaultMandeep Singh Grang2017-07-182-1/+3
| | | | | | | | | | | | Reviewers: compnerd, rnk, ruiu, mstorsjo Reviewed By: mstorsjo Subscribers: aemerson, javed.absar, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D35531 llvm-svn: 308358
* Convert attribute 'target' parsing from a 'pair' to a 'struct' to make ↵Erich Keane2017-07-183-13/+24
| | | | | | | | | | | | | | further improvements easier Convert attribute 'target' parsing from a 'pair' to a 'struct' to make further improvements easier The attribute 'target' parse function previously returned a pair. Convert this to a 'pair' in order to add more functionality, and improve usability. Differential Revision: https://reviews.llvm.org/D35574 llvm-svn: 308357
* [Sema] NFC: Move all availability checking code to SemaDeclAttr.cppErik Pilkington2017-07-183-106/+102
| | | | | | Previously, this was awkwardly split up between SemaExpr.cpp. llvm-svn: 308356
* For KMP_PAGE_SIZE, use getpagesize() on Unix, GetSystemInfo() on WindowsDimitry Andric2017-07-181-8/+8
| | | | | | | | | | | | | | | | | | | | | | Summary: The kmp_os.h header is defining the `PAGE_SIZE` macro unconditionally, even while it is only used directly after its definition, for the Windows implementation of the `KMP_GET_PAGE_SIZE()` macro. On at least FreeBSD, but likely all other BSDs too, this macro conflicts with the one defined in system headers, so remove it, since nothing else uses it. Make all Unixes use `getpagesize()` instead, and use `GetSystemInfo()` for the Windows case. Reviewers: jlpeyton, jcownie, emaste, AndreyChurbanov Reviewed By: AndreyChurbanov Subscribers: AndreyChurbanov, hfinkel, zturner Differential Revision: https://reviews.llvm.org/D35072 llvm-svn: 308355
* [Dominators] Improve error checking in deleteEdgeJakub Kuderski2017-07-181-0/+14
| | | | | | | | | | | | | | Summary: This patch improves error detection in deleteEdge. It asserts that the edge doesn't exist in the CFG and that DomTree knew about this edge before. Reviewers: dberlin, grosser, brzycki, sanjoy Reviewed By: dberlin Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35571 llvm-svn: 308354
* Don't call exit() from atexit handlers on DarwinFrancis Ricci2017-07-186-7/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Calling exit() from an atexit handler is undefined behavior. On Linux, it's unavoidable, since we cannot intercept exit (_exit isn't called if a user program uses return instead of exit()), and I haven't seen it cause issues regardless. However, on Darwin, I have a fairly complex internal test that hangs roughly once in every 300 runs after leak reporting finishes, which is resolved with this patch, and is presumably due to the undefined behavior (since the Die() is the only thing that happens after the end of leak reporting). In addition, this is the way TSan works as well, where an atexit handler+Die() is used on Linux, and an _exit() interceptor is used on Darwin. I'm not sure if it's intentionally structured that way in TSan, since TSan sets up the atexit handler and the _exit() interceptor on both platforms, but I have observed that on Darwin, only the _exit() interceptor is used, and on Linux the atexit handler is used. There is some additional related discussion here: https://reviews.llvm.org/D35085 Reviewers: alekseyshl, kubamracek Subscribers: eugenis, vsk, llvm-commits Differential Revision: https://reviews.llvm.org/D35513 llvm-svn: 308353
* [OPENMP] Initial support for 'task_reduction' clause.Alexey Bataev2017-07-1821-60/+929
| | | | | | Parsing/sema analysis of the 'task_reduction' clause. llvm-svn: 308352
* Fix failing taskloop tests by omitting gccJonathan Peyton2017-07-182-0/+4
| | | | | | We do not have GOMP interface support for taskloop yet. llvm-svn: 308351
* [DAG] Improve Aliasing of operations to static allocaNirav Dave2017-07-1824-125/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Re-recommiting after landing DAG extension-crash fix. Recommiting after adding check to avoid miscomputing alias information on addresses of the same base but different subindices. Memory accesses offset from frame indices may alias, e.g., we may merge write from function arguments passed on the stack when they are contiguous. As a result, when checking aliasing, we consider the underlying frame index's offset from the stack pointer. Static allocs are realized as stack objects in SelectionDAG, but its offset is not set until post-DAG causing DAGCombiner's alias check to consider access to static allocas to frequently alias. Modify isAlias to consider access between static allocas and access from other frame objects to be considered aliasing. Many test changes are included here. Most are fixes for tests which indirectly relied on our aliasing ability and needed to be modified to preserve their original intent. The remaining tests have minor improvements due to relaxed ordering. The exception is CodeGen/X86/2011-10-19-widen_vselect.ll which has a minor degradation dispite though the pre-legalized DAG is improved. Reviewers: rnk, mkuper, jonpa, hfinkel, uweigand Reviewed By: rnk Subscribers: sdardis, nemanjai, javed.absar, llvm-commits Differential Revision: https://reviews.llvm.org/D33345 llvm-svn: 308350
OpenPOWER on IntegriCloud