summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [test] Fix a typo in a test comment. NFC.Martin Storsjo2017-11-281-1/+1
| | | | llvm-svn: 319145
* [WebAssembly] Handle errors better in fast-isel.Dan Gohman2017-11-282-12/+94
| | | | | | | | | Fast-isel routines need to bail out in the case that fast-isel fails on the operands. This fixes https://bugs.llvm.org/show_bug.cgi?id=35064 llvm-svn: 319144
* [X86] Remove some unused pattern fragments from td file. NFCCraig Topper2017-11-281-10/+0
| | | | llvm-svn: 319143
* [DAGCombine] Disable finding better chains for stores at O0Simon Dardis2017-11-285-61/+687
| | | | | | | | | | | | | | | | | | | | | | | | | | | Unoptimized IR can have linear sequences of stores to an array, where the initial GEP for the first store is formed from the pointer to the array, and the GEP for each store after the first is formed from the previous GEP with some offset in an inductive fashion. The (large) resulting DAG when analyzed by DAGCombine undergoes an excessive number of combines as each store node is examined every time its' offset node is combined with any child of the offset. One of the transformations is findBetterNeighborChains which assists MergeConsecutiveStores. The former relies on repeated chain walking to do its' work, however MergeConsecutiveStores is disabled at O0 which makes the transformation redundant. Any optimization level other than O0 would invoke InstCombine which would resolve the chain of GEPs into flat base + offset GEP for each store which does not exhibit the repeated examination of each store to the array. Disabling this optimization fixes an excessive compile time issue (30~ minutes for the test case provided) at O0. Reviewers: niravd, craig.topper, t.p.northover Differential Revision: https://reviews.llvm.org/D40193 llvm-svn: 319142
* MachineVerifier: Improve register operand checksMatthias Braun2017-11-281-78/+81
| | | | | | | | | | | | This fixes cases where we wouldn't perform various register operand checks just because we didn't happen to have a definition in the MCInstrDesc. This changes the code to only skip the tests that actually depend on the MCInstrDesc definition. This makes the machine verifier spot the problem from https://llvm.org/PR33071 after the pass that actually caused it. llvm-svn: 319141
* MachineVerifier: Improve PHI operand checkingMatthias Braun2017-11-281-28/+54
| | | | | | | | | | | | Additional checks for phi operands: - first operand should be a virtual register def. It should not be tied, implicit, internalread, earlyclobber or a read. - The other operands should be register/mbb operands next to each other - The register operands should not be implicit, internalread, earlyclobber, debug or tied. - We can perform most of the PHI checks even for unreachable blocks. llvm-svn: 319140
* lit: Bring back -Dtool=xxx feature lost in r313928Matthias Braun2017-11-281-3/+8
| | | | llvm-svn: 319139
* Factor out common code to Common/Strings.cpp.Rui Ueyama2017-11-2812-52/+65
| | | | | | Differential Revision: https://reviews.llvm.org/D40530 llvm-svn: 319138
* Use FILE_FLAG_DELETE_ON_CLOSE for TempFile on windows.Rafael Espindola2017-11-283-8/+81
| | | | | | We won't see the temp file no more. llvm-svn: 319137
* [X86] Make zero extend from v16i1/v8i1 to v16i8/v8i16/v16i16 not scalarize ↵Craig Topper2017-11-282-650/+38
| | | | | | under AVX512. llvm-svn: 319136
* [X86] Add command line without AVX512BW/AVX512VL to ↵Craig Topper2017-11-281-201/+845
| | | | | | bitcast-int-to-vector-bool-zext.ll. llvm-svn: 319135
* Move code. NFC.Rafael Espindola2017-11-281-83/+85
| | | | | | | This moves the TempFile implementation so that it can use system specific code. llvm-svn: 319134
* Reland r319090, "COFF: Do not create SectionChunks for discarded comdat ↵Peter Collingbourne2017-11-2811-164/+242
| | | | | | | | | | | | | | sections." with a fix for debug sections. If /debug was not specified, readSection will return a null pointer for debug sections. If the debug section is associative with another section, we need to make sure that the section returned from readSection is not a null pointer before adding it as an associative section. Differential Revision: https://reviews.llvm.org/D40533 llvm-svn: 319133
* Remove some duplicated code in UUID.cppStephane Sezer2017-11-281-8/+1
| | | | | | | | | | | | | | Summary: Formatting needs to be done only once. Ran check-lldb and nothing changes. Reviewers: clayborg, davide Reviewed By: clayborg, davide Subscribers: zturner, davide, lldb-commits Differential Revision: https://reviews.llvm.org/D40519 llvm-svn: 319132
* This reverts commit r319096 and r319097.Rafael Espindola2017-11-284-185/+34
| | | | | | | | | Revert "[SROA] Propagate !range metadata when moving loads." Revert "[Mem2Reg] Clang-format unformatted parts of this file. NFCI." Davide says they broke a bot. llvm-svn: 319131
* ARM: Fix PR32578Matthias Braun2017-11-282-1/+28
| | | | | | | | | | https://llvm.org/PR32578 I simplified and converted the reproducer into a lit test. Patch by Vedant Kumar! llvm-svn: 319130
* [WebAssembly] Add options for using the nontrapping-fptoint feature.Dan Gohman2017-11-283-2/+17
| | | | | | | This adds ways to control use of WebAssembly's new nontrapping-fptoint feature. llvm-svn: 319129
* [WebAssembly] Fix trapping behavior in fptosi/fptoui.Dan Gohman2017-11-2810-28/+399
| | | | | | | | | | | | This adds code to protect WebAssembly's `trunc_s` family of opcodes from values outside their domain. Even though such conversions have full undefined behavior in C/C++, LLVM IR's `fptosi` and `fptoui` do not, and only return undef. This also implements the proposed non-trapping float-to-int conversion feature and uses that instead when available. llvm-svn: 319128
* Store the real binding of shared symbols.Rafael Espindola2017-11-283-13/+13
| | | | | | | | | | | | | | | | Currently we mark every shared symbol as STB_WEAK. That is a hack to make it easy to decide when a .so is needed or not because of a reference to a given symbol. That hack leaks when we create copy relocations as shown by the update to relocation-copy-alias.s. This patch stores the original binding when we first read a shared symbol. We still have to update the binding to weak if we see a weak undef, but I find the logic easier to read where it is now. llvm-svn: 319127
* SROA: Avoid creating a fragment expression that covers the entire variable.Adrian Prantl2017-11-282-4/+123
| | | | | | | | Fixes PR35416. https://bugs.llvm.org/show_bug.cgi?id=35416 llvm-svn: 319126
* Move getVariableSize from Verifier.cpp into DIVariable::getSize() (NFC)Adrian Prantl2017-11-283-26/+28
| | | | llvm-svn: 319125
* [X86] Remove unnecessary fp<->int setOperationAction lines from a hasVLX ↵Craig Topper2017-11-281-7/+0
| | | | | | | | block. NFCI These lines all exist identically either under SSE2, AVX2 or AVX512. Given that VLX implies all of those, these aren't providing anything new. llvm-svn: 319124
* Insert padding before the __cxa_exception header to ensure the thrownAkira Hatanaka2017-11-282-26/+36
| | | | | | | | | | | | | | | | | | | | object is sufficiently aligned. r303175 annotated field unwindHeader of __cxa_exception with attribute 'aligned' to ensure the thrown object following the __cxa_exception header was sufficiently aligned. This caused changes in the field offsets of __cxa_exception relative to the start of the thrown object, which was an ABI breaking change for some clients. Instead of annotating field unwindHeader, this commit inserts extra space before the header. This ensures the thrown object following the header is sufficiently aligned without changing the field offsets, thus avoiding any ABI breakages. rdar://problem/25364625 rdar://problem/35556163 llvm-svn: 319123
* [X86] Remove duplicate calls to setOperationAction. NFCICraig Topper2017-11-281-2/+0
| | | | | | These same calls exist a few lines down. llvm-svn: 319122
* Add an F_Delete flag.Rafael Espindola2017-11-282-1/+7
| | | | | | For now this only changes the handle Access. llvm-svn: 319121
* [DAGCombiner] Don't combine aext(setcc) if the setcc is already using the ↵Craig Topper2017-11-272-1782/+1081
| | | | | | | | | | target's preferred result type. With AVX512 vXi1 types are legal so we shouldn't be extending them. This change is similar to existing code in the zext(setcc) combine. llvm-svn: 319120
* [DAGCombiner] Use EVT::changeVectorElementTypeToInteger() instead of ↵Craig Topper2017-11-271-4/+1
| | | | | | implementing manually. llvm-svn: 319119
* Add OpenFlags to the create(Unique|Temporary)File interfaces.Rafael Espindola2017-11-272-36/+44
| | | | | | | This will allow a future F_Delete flag to be specified when we want the file to be automatically deleted on close. llvm-svn: 319117
* [clang-cl] Alias /Wall to -WeverythingReid Kleckner2017-11-272-2/+4
| | | | | | | cl interprets this option to mean enable every supported warning, which is what Clang's -Weverything flag does. llvm-svn: 319116
* [msan] Avoid shadowing a variable in common interceptors.Evgeniy Stepanov2017-11-271-16/+15
| | | | | | | | | "offset" declared in a macro may shadow a variable with the same name in the caller which is used in a macro argument. We are quite lucky that it does not actually happen, but rename the variable anyway to be on the safe side. llvm-svn: 319115
* [TSan] Do not run cond_cancel.c test on ppc64.Matt Morehouse2017-11-271-1/+1
| | | | | | | After r319004, the expected failure on ppc64 manifests as an infinite loop. llvm-svn: 319114
* Rename `Symtab` private memory to avoid confusion with global `Symtab`Sam Clegg2017-11-276-17/+17
| | | | | | | | | | | This is also consistent with SymVector that exists in COFF port and soon to be added to the wasm port. Split off as part of https://reviews.llvm.org/D40371 Differential Revision: https://reviews.llvm.org/D40525 llvm-svn: 319113
* Fix typo in test nameSam Clegg2017-11-271-1/+1
| | | | llvm-svn: 319112
* Add an option to misc-move-const-arg to not diagnose on trivially copyable ↵Aaron Ballman2017-11-275-1/+184
| | | | | | | | types. Patch by Oleg Smolsky llvm-svn: 319111
* [X86] Teach getSetCCResultType to handle more than just SimpleVTs when ↵Craig Topper2017-11-272-1022/+69
| | | | | | | | looking at larger than 512-bit vectors. Which VTs are considered simple is determined by the superset of the legal types of all targets in LLVM. If we're looking at VTs that are going to be split down to 512-bits we should allow any VT not just simple ones since the simple list changes over time as new targets are added. llvm-svn: 319110
* [CMake] Pass LLVM_HOST_TRIPLE to external projectsPetr Hosek2017-11-271-0/+1
| | | | | | | | | LLVM runtimes rely on LLVM_HOST_TRIPLE being set in their builds and tests so make sure it's being passed down. Differential Revision: https://reviews.llvm.org/D40515 llvm-svn: 319109
* Consistent use of <internal> when displaying internal symbol namesSam Clegg2017-11-276-13/+9
| | | | | | Differential Revision: https://reviews.llvm.org/D40510 llvm-svn: 319108
* [CMake][runtimes] Support monorepo layout with runtimes buildPetr Hosek2017-11-271-19/+46
| | | | | | | | | | We introduce a new variable LLVM_ENABLE_RUNTIMES which works similarly to LLVM_ENABLE_PROJECTS and allows specifying runtimes that will be enabled in the runtimes build. Differential Revision: https://reviews.llvm.org/D40233 llvm-svn: 319107
* Fix problems with r'890 when building on machines where sizeof(size_t) != ↵Marshall Clow2017-11-273-9/+16
| | | | | | sizeof(unsigned long long) and C++03 llvm-svn: 319106
* [cmake] Pass -Wl,-z,nodelete on Linux to prevent unloadingMichal Gorny2017-11-272-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | Prevent unloading shared libraries on Linux when dlclose() is called. This is necessary since command-line option parsing API relies on registering the global option instances in the option parser instance which can be loaded in a different shared library. Given that we can't reliably remove those options when a library is unloaded, the parser ends up containing dangling references. Since glibc has relatively complex library unloading rules, some of the LLVM libraries can be unloaded while others (including the Support library) stay loaded causing quite a mayhem. To reliably prevent that, just forbid unloading all libraries -- it's a very bad idea anyway. While the issue arguably happens only with BUILD_SHARED_LIBS, it may affect any library reusing llvm::cl interface. Based on patch provided Ross Hayward on https://bugs.gentoo.org/617154. Previously hit by Fedora back in Feb 2016: https://lists.freedesktop.org/archives/mesa-dev/2016-February/107242.html Differential Revision: https://reviews.llvm.org/D40459 llvm-svn: 319105
* Fixed the ability to recursively get an attribute value from a DWARFDie.Greg Clayton2017-11-272-12/+16
| | | | | | | | The previous implementation would only look 1 DW_AT_specification or DW_AT_abstract_origin deep. This means DWARFDie::getName() would fail in certain cases. I ran into such a case while creating a tool that used the LLVM DWARF parser to generate a symbolication format so I have seen this in the wild. Differential Revision: https://reviews.llvm.org/D40156 llvm-svn: 319104
* [X86] Remove lines that set v8f32 FP_ROUND/FP_EXTEND to Legal under AVX512. NFCICraig Topper2017-11-271-2/+0
| | | | | | We don't do this for narrow vectors under AVX or SSE features. We also don't set them to Expand like we do for many vectors op. Nor does TargetLoweringBase.cpp. This leads me to believe these default to Legal. llvm-svn: 319103
* [WebAssemby] Enable "-mthread-model single" by default, for now.Dan Gohman2017-11-272-0/+9
| | | | | | | | | | | | | The WebAssembly standard does not yet have threads, and while it's in the process of being standardized, it'll take some time for it to make it through and be available in all popular implementations. With increasing numbers of people using the LLVM wasm backend through LLVM directly rather than through Emscripten, it's increasingly important to have friendly defaults. See also https://bugs.llvm.org/show_bug.cgi?id=35411 llvm-svn: 319101
* Revert r319090, "COFF: Do not create SectionChunks for discarded comdat ↵Peter Collingbourne2017-11-2710-238/+164
| | | | | | | | | sections." Caused test failures in check-cfi on Windows. http://lab.llvm.org:8011/builders/sanitizer-windows/builds/20284 llvm-svn: 319100
* [scudo] Workaround for uninitialized Bionic globalsKostya Kortchinsky2017-11-271-1/+11
| | | | | | | | | | | | | | | | | | | Summary: Bionic doesn't initialize its globals early enough. This causes issues when trying to access them from a preinit_array (b/25751302) or from another constructor called before the libc one (b/68046352). __progname is initialized after the other globals, so we can check its value to know if calling `getauxval` is safe. Reviewers: alekseyshl Reviewed By: alekseyshl Subscribers: srhines, llvm-commits Differential Revision: https://reviews.llvm.org/D40504 llvm-svn: 319099
* add new check to find OSSpinlock usageYan Zhang2017-11-278-0/+113
| | | | | | | | | | | | | | | | | | | | Summary: This check finds the use of methods related to OSSpinlock in Objective-C code, which should be deprecated due to livelock issues. The following method call will be detected: - OSSpinlockLock() - OSSpinlockTry() - OSSpinlockUnlcok() Reviewers: hokein, benhamilton Reviewed By: benhamilton Subscribers: klimek, cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D40325 llvm-svn: 319098
* [Mem2Reg] Clang-format unformatted parts of this file. NFCI.Davide Italiano2017-11-271-28/+23
| | | | llvm-svn: 319097
* [SROA] Propagate !range metadata when moving loads.Davide Italiano2017-11-274-32/+188
| | | | | | | | | | | | | This tries to propagate !range metadata to a pre-existing load when a load is optimized out. This is done instead of adding an assume because converting loads to and from assumes creates a lot of IR. Patch by Ariel Ben-Yehuda. Differential Revision: https://reviews.llvm.org/D37216 llvm-svn: 319096
* Mark UUID::GetByteSize() constStephane Sezer2017-11-272-2/+2
| | | | | | | | | | | | | | | | Summary: This method doesn't modify anything in the object it's called on so we can mark it const to make it usable in a const context. Reviewers: clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D40517 llvm-svn: 319095
* [PartiallyInlineLibCalls][x86] add TTI hook to allow sqrt inlining to depend ↵Sanjay Patel2017-11-279-25/+58
| | | | | | | | | | | on arg rather than result This should fix PR31455: https://bugs.llvm.org/show_bug.cgi?id=31455 Differential Revision: https://reviews.llvm.org/D28314 llvm-svn: 319094
OpenPOWER on IntegriCloud