summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* lld-link: Store comdat selection in SectionChunk, reject more invalid ↵Nico Weber2019-01-263-12/+32
| | | | | | | | | | | | | | associated comdats I need the comdat selection for PR40094. To keep the patch for that smaller, I'm adding it here, and as a first application I'm using it to reject associative comdats referring to earlier associative comdats. Depends on D56929; together with that all associative comdats referring to other associative comdats are now rejected. Differential Revision: https://reviews.llvm.org/D56931 llvm-svn: 352254
* Attempt to fix build on Windows with LLVM_ENABLE_PIC=OFFNico Weber2019-01-251-1/+1
| | | | | | | | | | | | | | libclang can be built in shared or static mode. On Windows, with LLVM_ENABLE_PIC=OFF, it was built in neither mode, leading to clients of libclang (c-index-test, c-arcmt-test) failing to link with it set. Since PIC isn't really a thing on Windows, build libclang in shared mode when LLVM_ENABLE_PIC=OFF there. This is also somewhat symmetric with the existing ENABLE_STATIC a few lines down. Differential Revision: https://reviews.llvm.org/D57258 llvm-svn: 352253
* Fixed frontend clang tests in windows read-only containerStella Stamenova2019-01-252-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: When mounting LLVM source into a windows container in read-only mode, certain tests fail. Ideally, we want all these tests to pass so that developers can mount the same source folder into multiple (windows) containers simultaneously, allowing them to build/test the same source code using various different configurations simultaneously. **Fix**: I've found that when attempting to open a file for writing on windows, if you don't have the correct permissions (trying to open a file for writing in a read-only folder), you get [Access is denied](https://support.microsoft.com/en-us/help/2623670/access-denied-or-other-errors-when-you-access-or-work-with-files-and-f). In llvm, we map this error message to a linux based error, see: https://github.com/llvm-mirror/llvm/blob/master/lib/Support/ErrorHandling.cpp This is why we see "Permission denied" in our output as opposed to the expected "No such file or directory", thus causing the tests to fail. I've changed the test locally to instead point to the root drive so that they can successfully bypass the Access is denied error when LLVM is mounted in as a read-only directory. This way, the test operate exactly the same, but we can get around the windows-complications of what error to expect in a read-only directory. Patch By: justice_adams Reviewers: rsmith, zturner, MatzeB, stella.stamenova Reviewed By: stella.stamenova Subscribers: ormris, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D50563 llvm-svn: 352252
* Build LLVM-C.dll by default on windows and enable in release packageHans Wennborg2019-01-252-2/+12
| | | | | | | | | | | | | With the fixes to the building of LLVM-C.dll in D56781 this should now be safe to land. This will greatly simplify dealing with LLVM for people that just want to use the C API on windows. This is a follow up from D35077. Patch by Jakob Bornecrantz! Differential revision: https://reviews.llvm.org/D56774 llvm-svn: 352250
* Simplify LangOpts initalization in ClangExpressionParser [NFC]Raphael Isemann2019-01-251-31/+28
| | | | | | | | | | | | Reviewers: davide Reviewed By: davide Subscribers: shafik, davide, lldb-commits Differential Revision: https://reviews.llvm.org/D57222 llvm-svn: 352249
* [NFC] Test commit : fix typo.Alexey Lapshin2019-01-251-1/+1
| | | | llvm-svn: 352248
* [RISCV] Add target DAG combine for bitcast fabs/fneg on RV32FDAlex Bradbury2019-01-254-42/+61
| | | | | | | | | | | | | DAGCombiner::visitBITCAST will perform: fold (bitconvert (fneg x)) -> (xor (bitconvert x), signbit) fold (bitconvert (fabs x)) -> (and (bitconvert x), (not signbit)) As shown in double-bitmanip-dagcombines.ll, this can be advantageous. But RV32FD doesn't use bitcast directly (as i64 isn't a legal type), and instead uses RISCVISD::SplitF64. This patch adds an equivalent DAG combine for SplitF64. llvm-svn: 352247
* [llvm] Opt-in flag for X86DiscriminateMemOpsMircea Trofin2019-01-256-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently, if an instruction with a memory operand has no debug information, X86DiscriminateMemOps will generate one based on the first line of the enclosing function, or the last seen debug info. This may cause confusion in certain debugging scenarios. The long term approach would be to use the line number '0' in such cases, however, that brings in challenges: the base discriminator value range is limited (4096 values). For the short term, adding an opt-in flag for this feature. See bug 40319 (https://bugs.llvm.org/show_bug.cgi?id=40319) Reviewers: dblaikie, jmorse, gbedwell Reviewed By: dblaikie Subscribers: aprantl, eraman, hiraditya Differential Revision: https://reviews.llvm.org/D57257 llvm-svn: 352246
* [libunwind] Use placement new to avoid dependency C++ libraryPetr Hosek2019-01-251-7/+10
| | | | | | | | | | The rest of libunwind already uses placement new, these are the only places where non-placement new is being used introducing undesirable C++ library dependency. Differential Revision: https://reviews.llvm.org/D57251 llvm-svn: 352245
* [GlobalISel][AArch64][NFC] Fix incorrect comment in selectUnmergeValuesJessica Paquette2019-01-251-1/+1
| | | | | | s/scalar/vector/ llvm-svn: 352243
* Simplify. NFC.Rui Ueyama2019-01-251-4/+2
| | | | llvm-svn: 352242
* Revert rL352238.Alina Sbirlea2019-01-251-2/+2
| | | | llvm-svn: 352241
* [RISCV] Add another potential combine to {double,float}-bitmanip-dagcombines.llAlex Bradbury2019-01-252-1/+103
| | | | | | | | (fcopysign a, (fneg b)) will be expanded to bitwise operations by DAGTypeLegalizer::SoftenFloatRes_FCOPYSIGN if the floating point type isn't legal. Arguably it might be worth doing a combine even if it is legal. llvm-svn: 352240
* [Sema] Improve a -Warray-bounds diagnosticErik Pilkington2019-01-254-8/+41
| | | | | | | | | | | Fix a bug where we would compare array sizes with incompatible element types, and look through explicit casts. rdar://44800168 Differential revision: https://reviews.llvm.org/D57064 llvm-svn: 352239
* [WarnMissedTransforms] Set default to 1.Alina Sbirlea2019-01-251-2/+2
| | | | | | | | | | | | | | Summary: Set default value for retrieved attributes to 1, since the check is against 1. Eliminates the warning noise generated when the attributes are not present. Reviewers: sanjoy Subscribers: jlebar, llvm-commits Differential Revision: https://reviews.llvm.org/D57253 llvm-svn: 352238
* Reapply: [RISCV] Set isAsCheapAsAMove for ADDI, ORI, XORI, LUIAna Pazos2019-01-2512-2142/+1602
| | | | | | This reapplies commit r352010 with RISC-V test fixes. llvm-svn: 352237
* [MBP] Don't move bottom block before header if it can't reduce taken branchesGuozhi Wei2019-01-258-46/+116
| | | | | | | | | | | | | | | | | | If bottom of block BB has only one successor OldTop, in most cases it is profitable to move it before OldTop, except the following case: -->OldTop<- | . | | . | | . | ---Pred | | | BB----- Move BB before OldTop can't reduce the number of taken branches, this patch detects this case and prevent the moving. Differential Revision: https://reviews.llvm.org/D57067 llvm-svn: 352236
* [CMake] Use llvm-tblgen from NATIVE LLVM build when cross-compilingAlex Langford2019-01-251-2/+25
| | | | | | | | | | | | | | Summary: When cross-compiling LLDB, we want to use llvm-tblgen built for the host, not the target. Reviewers: compnerd, sgraenitz Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D57194 llvm-svn: 352235
* Fix XRayTest link on FreeBSD (and likely NetBSD too)Dimitry Andric2019-01-252-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: As reported on llvm-testers, during 8.0.0-rc1 testing I got errors while building of `XRayTest`, during `check-all`: ``` [100%] Generating XRayTest-x86_64-Test /home/dim/llvm/8.0.0/rc1/Phase3/Release/llvmCore-8.0.0-rc1.obj/./lib/libLLVMSupport.a(Signals.cpp.o): In function `llvm::sys::PrintStackTrace(llvm::raw_ostream&)': Signals.cpp:(.text._ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamE+0x24): undefined reference to `backtrace' Signals.cpp:(.text._ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamE+0x254): undefined reference to `llvm::itaniumDemangle(char const*, char*, unsigned long*, int*)' clang-8: error: linker command failed with exit code 1 (use -v to see invocation) gmake[3]: *** [projects/compiler-rt/lib/xray/tests/unit/CMakeFiles/TXRayTest-x86_64-Test.dir/build.make:73: projects/compiler-rt/lib/xray/tests/unit/XRayTest-x86_64-Test] Error 1 gmake[3]: Target 'projects/compiler-rt/lib/xray/tests/unit/CMakeFiles/TXRayTest-x86_64-Test.dir/build' not remade because of errors. gmake[2]: *** [CMakeFiles/Makefile2:33513: projects/compiler-rt/lib/xray/tests/unit/CMakeFiles/TXRayTest-x86_64-Test.dir/all] Error 2 gmake[2]: Target 'CMakeFiles/check-all.dir/all' not remade because of errors. gmake[1]: *** [CMakeFiles/Makefile2:737: CMakeFiles/check-all.dir/rule] Error 2 gmake[1]: Target 'check-all' not remade because of errors. gmake: *** [Makefile:277: check-all] Error 2 [Release Phase3] check-all failed ``` This is because the `backtrace` function requires `-lexecinfo` on BSD platforms. To fix this, detect the `execinfo` library in `cmake/config-ix.cmake`, and add it to the unit test link flags. Additionally, since the code in `sys::PrintStackTrace` makes use of `itaniumDemangle`, also add `-lLLVMDemangle`. (Note that this is more of a general problem with libLLVMSupport, but I'm looking for a quick fix now so it can be merged to the 8.0 branch.) Reviewers: dberris, hans, mgorny, samsonov Reviewed By: dberris Subscribers: krytarowski, delcypher, erik.pilkington, #sanitizers, emaste, llvm-commits Differential Revision: https://reviews.llvm.org/D57181 llvm-svn: 352234
* [CodeGen] Implement isTriviallyRecursive with StmtVisitor instead of ↵Reid Kleckner2019-01-251-19/+21
| | | | | | | | | | | | | | | | | | | RecursiveASTVisitor This code doesn't need to traverse types, lambdas, template arguments, etc to detect trivial recursion. We can do a basic statement traversal instead. This reduces the time spent compiling CodeGenModule.cpp, the object file size (mostly reduced debug info), and the final executable size by a small amount. I measured the exe mostly to check how much of the overhead is from debug info, object file section headers, etc, vs actual code. metric | before | after | diff time (s) | 47.4 | 38.5 | -8.9 obj (kb) | 12888 | 12012 | -876 exe (kb) | 86072 | 85996 | -76 llvm-svn: 352232
* [clang-tidy] fix unit tests for dropped _Float16 support in X86Jonas Toth2019-01-253-47/+51
| | | | | | | | | | | | | | | | Summary: Because _Float16 was disabled for X86 targets the unit-tests started failing. Extract the pieces for _Float16 and run theses tests under AArch64. Reviewers: aaron.ballman, erichkeane, lebedev.ri Reviewed By: erichkeane Subscribers: javed.absar, xazax.hun, kristof.beyls, cfe-commits Differential Revision: https://reviews.llvm.org/D57249 llvm-svn: 352231
* [X86] Combine masked store and truncate into masked truncating stores.Craig Topper2019-01-254-164/+127
| | | | | | | | | | We also need to combine to masked truncating with saturation stores, but I'm leaving that for a future patch. This does regress some tests that used truncate wtih saturation followed by a masked store. Those now use a truncating store and use min/max to saturate. Differential Revision: https://reviews.llvm.org/D57218 llvm-svn: 352230
* Remove F16 literal support based on Float16 support.Erich Keane2019-01-252-4/+23
| | | | | | | | | Float16 support was disabled recently on many platforms, however that commit still allowed literals of Float16 type to work. This commit removes those based on the same logic as Float16 disable. Change-Id: I72243048ae2db3dc47bd3d699843e3edf9c395ea llvm-svn: 352229
* [HotColdSplit] Introduce a cost model to control splitting behaviorVedant Kumar2019-01-2511-129/+216
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main goal of the model is to avoid *increasing* function size, as that would eradicate any memory locality benefits from splitting. This happens when: - There are too many inputs or outputs to the cold region. Argument materialization and reloads of outputs have a cost. - The cold region has too many distinct exit blocks, causing a large switch to be formed in the caller. - The code size cost of the split code is less than the cost of a set-up call. A secondary goal is to prevent excessive overall binary size growth. With the cost model in place, I experimented to find a splitting threshold that works well in practice. To make warm & cold code easily separable for analysis purposes, I moved split functions to a "cold" section. I experimented with thresholds between [0, 4] and set the default to the threshold which minimized geomean __text size. Experiment data from building LNT+externals for X86 (N = 639 programs, all sizes in bytes): | Configuration | __text geom size | __cold geom size | TEXT geom size | | **-Os** | 1736.3 | 0, n=0 | 10961.6 | | -Os, thresh=0 | 1740.53 | 124.482, n=134 | 11014 | | -Os, thresh=1 | 1734.79 | 57.8781, n=90 | 10978.6 | | -Os, thresh=2 | ** 1733.85 ** | 65.6604, n=61 | 10977.6 | | -Os, thresh=3 | 1733.85 | 65.3071, n=61 | 10977.6 | | -Os, thresh=4 | 1735.08 | 67.5156, n=54 | 10965.7 | | **-Oz** | 1554.4 | 0, n=0 | 10153 | | -Oz, thresh=2 | ** 1552.2 ** | 65.633, n=61 | 10176 | | **-O3** | 2563.37 | 0, n=0 | 13105.4 | | -O3, thresh=2 | ** 2559.49 ** | 71.1072, n=61 | 13162.4 | Picking thresh=2 reduces the geomean __text section size by 0.14% at -Os, -Oz, and -O3 and causes ~0.2% growth in the TEXT segment. Note that TEXT size is page-aligned, whereas section sizes are byte-aligned. Experiment data from building LNT+externals for ARM64 (N = 558 programs, all sizes in bytes): | Configuration | __text geom size | __cold geom size | TEXT geom size | | **-Os** | 1763.96 | 0, n=0 | 42934.9 | | -Os, thresh=2 | ** 1760.9 ** | 76.6755, n=61 | 42934.9 | Picking thresh=2 reduces the geomean __text section size by 0.17% at -Os and causes no growth in the TEXT segment. Measurements were done with D57082 (r352080) applied. Differential Revision: https://reviews.llvm.org/D57125 llvm-svn: 352228
* [MC] Teach the MachO object writer about N_FUNC_COLDVedant Kumar2019-01-2512-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | N_FUNC_COLD is a new MachO symbol attribute. It's a hint to the linker to order a symbol towards the end of its section, to improve locality. Example: ``` void a1() {} __attribute__((cold)) void a2() {} void a3() {} int main() { a1(); a2(); a3(); return 0; } ``` A linker that supports N_FUNC_COLD will order _a2 to the end of the text section. From `nm -njU` output, we see: ``` _a1 _a3 _main _a2 ``` Differential Revision: https://reviews.llvm.org/D57190 llvm-svn: 352227
* ResolveBreakpointSite: fix outdated warning messageTatyana Krasnukha2019-01-251-4/+2
| | | | | | | Currently if a breakpoint site is already present, its ID will be returned, not the LLDB_INVALID_BREAK_ID. On the other hand, Process::CreateBreakpointSite may have another reasons to return LLDB_INVALID_BREAK_ID. llvm-svn: 352226
* Temporairly disable readability-uppercase-literal-suffix tests that depend ↵Roman Lebedev2019-01-252-0/+4
| | | | | | on _Float16, to get bots back to green llvm-svn: 352224
* [opt-viewer] Add javascript to expand/hide full message for multiline remarks.Florian Hahn2019-01-258-29/+170
| | | | | | | | | | | | | | | | | | | | | | | This patch adds support for displaying remarks with multiple lines. For such remarks, it creates a hidden div containing the message's lines except the first one in a <pre> tag. It also prepends a link (with '+' as text) to the regular remark line. This link can be used to show/hide the div containing the full remark. In combination with D57159, this allows for better displaying of multiline remarks in the html pages generated by opt-viewer. The Javascript is very simple and should be supported by any recent major browser. Reviewers: hfinkel, anemet, thegameg, serge-sans-paille Reviewed By: anemet Differential Revision: https://reviews.llvm.org/D57167 llvm-svn: 352223
* Fix incorrect indent from r352221Erich Keane2019-01-251-2/+2
| | | | | Change-Id: I0a7b1443eb6912ef7bea1a4cf2f696fc01726557 llvm-svn: 352222
* Disable _Float16 for non ARM/SPIR TargetsErich Keane2019-01-2512-49/+84
| | | | | | | | | | | | | | As Discussed here: http://lists.llvm.org/pipermail/llvm-dev/2019-January/129543.html There are problems exposing the _Float16 type on architectures that haven't defined the ABI/ISel for the type yet, so we're temporarily disabling the type and making it opt-in. Differential Revision: https://reviews.llvm.org/D57188 Change-Id: I5db7366dedf1deb9485adb8948b1deb7e612a736 llvm-svn: 352221
* [scudo] Delay allocations in the RSS check testKostya Kortchinsky2019-01-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Summary: D57116 fails on the armv7 bots, which is I assume due to the timing of the RSS check on the platform. While I don't have a platform to test that change on, I assume this would do. The test could be made more reliable by either delaying more the allocations, or allocating more large-chunks, but both those options have a somewhat non negligible impact (more memory used, longer test). Hence me trying to keep the additional sleeping/allocating to a minimum. Reviewers: eugenis, yroux Reviewed By: yroux Subscribers: javed.absar, kristof.beyls, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D57241 llvm-svn: 352220
* Allow 'static' storage specifier on an out-of-line member function templateErich Keane2019-01-253-1/+19
| | | | | | | | | | | | | | | | | | | | | | declaration in MSVCCompat mode Microsoft compiler permits the use of 'static' storage specifier outside of a class definition if it's on an out-of-line member function template declaration. This patch allows 'static' storage specifier on an out-of-line member function template declaration with a warning in Clang (To be compatible with Microsoft). Intel C/C++ compiler allows the 'static' keyword with a warning in Microsoft mode. GCC allows this with -fpermissive. Patch By: Manna Differential Revision: https://reviews.llvm.org/D56473 Change-Id: I97b2d9e9d57cecbcd545d17e2523142a85ca2702 llvm-svn: 352219
* [x86] simplify logic in lowerShuffleWithUndefHalf(); NFCISanjay Patel2019-01-251-7/+9
| | | | | | | | | | | This seems unnecessarily complicated because we gave names to opposite polarity bools and have code comments that don't really line up with the logic. Step 1: remove UndefUpper and assert that it is the opposite of UndefLower after the initial early exit. llvm-svn: 352217
* [DiagnosticInfo] Add support for preserving newlines in remark arguments.Florian Hahn2019-01-251-1/+23
| | | | | | | | | | | | | | | | | | | | This patch adds a new type StringBlockVal which can be used to emit a YAML block scalar, which preserves newlines in a multiline string. It also updates MappingTraits<DiagnosticInfoOptimizationBase::Argument> to use it for argument values with more than a single newline. This is helpful for remarks that want to display more in-depth information in a more structured way. Reviewers: thegameg, anemet Reviewed By: anemet Subscribers: hfinkel, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D57159 llvm-svn: 352216
* [TEST][COMMIT] - fix comment typo in AsmPrinter/DwarfDebug.cpp - NFCTom Weaver2019-01-251-1/+1
| | | | llvm-svn: 352214
* [TblGen][NFC] Fix documentation formattingJaved Absar2019-01-251-7/+3
| | | | llvm-svn: 352212
* [RISCV][NFC] s/f32/f64 in double-arith.llAlex Bradbury2019-01-251-11/+11
| | | | | | | The intrinsic names erroneously used the .f32 variant. As the return and argument types were still double the intrinsics calls worked properly. llvm-svn: 352211
* [X86] Simplify X86ISD::ADD/SUB if we don't use the result flagSimon Pilgrim2019-01-254-15/+23
| | | | | | | | | | | | Simplify to the generic ISD::ADD/SUB if we don't make use of the result flag. This mainly helps with ADDCARRY/SUBBORROW intrinsics which get expanded to X86ISD::ADD/SUB but could be simplified further. Noticed in some of the test cases in PR31754 Differential Revision: https://reviews.llvm.org/D57234 llvm-svn: 352210
* [x86] narrow a shuffle that doesn't use or set any high elementsSanjay Patel2019-01-2520-1344/+1406
| | | | | | | | | | | | | | | This isn't the final fix for our reduction/horizontal codegen, but it takes care of a lot of the problems. After we narrow the shuffle, existing combines for insert/extract and binops kick in, and we end up with cheaper 128-bit ops. The avg and mul reduction tests show an existing shuffle lowering hole for AVX2/AVX512. I think in its most minimal form this is: https://bugs.llvm.org/show_bug.cgi?id=40434 ...but we might need multiple fixes to get it right. Differential Revision: https://reviews.llvm.org/D57156 llvm-svn: 352209
* Revert r351954 "Add a value_type to ArrayRef."Clement Courbet2019-01-252-9/+0
| | | | | | This breaks arm self-hosted buildbots. llvm-svn: 352206
* [clangd] NFC: fix clang-tidy warnings.Haojian Wu2019-01-2511-34/+35
| | | | | | | Most are about llvm code style violation (found via readability-identifier-naming check). llvm-svn: 352205
* [JSON] Work around excess-precision issue when comparing T_Integer numbers.Sam McCall2019-01-252-0/+7
| | | | | | | | | | Reviewers: bkramer Subscribers: kristina, llvm-commits Differential Revision: https://reviews.llvm.org/D57237 llvm-svn: 352204
* [NFC][Clang] Add driver tests for sb and predresDiogo N. Sampaio2019-01-252-0/+25
| | | | | | | | | | Add tests that arguments for enabling/disabling sb and predres are correctly being or not passed by the driver. Differential Revision: https://reviews.llvm.org/D57060 llvm-svn: 352203
* gn build: Merge r352149Nico Weber2019-01-253-2/+1
| | | | llvm-svn: 352202
* gn build: Revert r352200, commit message was wrongNico Weber2019-01-253-1/+2
| | | | llvm-svn: 352201
* gn build: Merge r352148Nico Weber2019-01-253-2/+1
| | | | llvm-svn: 352200
* [RISCV] Add tests to demonstrate bitcasted fneg/fabs dagcombinesAlex Bradbury2019-01-253-25/+162
| | | | | | | | | This target-independent code won't trigger for cases such as RV32FD where custom SelectionDAG nodes are generated. These new tests demonstrate such cases. Additionally, float-arith.ll was updated so that fneg.s, fsgnjn.s, and fabs.s selection patterns are actually exercised. llvm-svn: 352199
* Fix line endings and trim trailing whitespace. NFCI.Simon Pilgrim2019-01-251-2/+2
| | | | llvm-svn: 352198
* gitignore: ignore clangd index files.Haojian Wu2019-01-251-0/+2
| | | | | | | | | | Reviewers: kadircet Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, llvm-commits Differential Revision: https://reviews.llvm.org/D57227 llvm-svn: 352197
* [X86] Add addcarry/subborrow combine testsSimon Pilgrim2019-01-251-0/+74
| | | | | | Show failure to simplify cases with zero op/flags llvm-svn: 352196
OpenPOWER on IntegriCloud