summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [SelectionDAG} Use KnownBits::isUnknown and hasConflict. NFCCraig Topper2017-10-071-8/+8
| | | | llvm-svn: 315154
* [X86] Add X86ISD::CMOV to computeKnownBitsForTargetNode and ↵Craig Topper2017-10-073-5/+22
| | | | | | | | | | | | | | | | ComputeNumSignBitsForTargetNode. Summary: Implementations based on ISD::SELECT. Reviewers: RKSimon, spatel Reviewed By: RKSimon Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38663 llvm-svn: 315153
* [InstSimplify] add tests to show we can do better at folding poison; NFCSanjay Patel2017-10-071-0/+58
| | | | llvm-svn: 315152
* [TableGen] Avoid repeated find calls in CodeGenDAGPatterns getters. NFCI.Simon Pilgrim2017-10-071-14/+21
| | | | | | | | The assertion tests were using count() instead of testing the find result, resulting in double the number of searches in debug/assert builds. Instead, call find once (like the release builds do) and assert the result against end(). llvm-svn: 315151
* [X86][SSE] Improve shuffling combining with horizontal operationsSimon Pilgrim2017-10-073-170/+80
| | | | | | | | | | Recognise cases when we can merge the shuffles with their horizontal (HADD/HSUB/PACK) instruction inputs. Replaces an older implementation which performed some of this during lowering, expanding an existing target shuffle combine stage instead. Differential Revision: https://reviews.llvm.org/D38506 llvm-svn: 315150
* Fix signed/unsigned warningSimon Pilgrim2017-10-071-1/+1
| | | | llvm-svn: 315149
* [TableGen] Avoid unnecessary std::string creationsSimon Pilgrim2017-10-072-13/+13
| | | | | | | | Avoid unnecessary std::string creations in the TreePredicateFn getters and in CodeGenDAGPatterns::getSDNodeNamed Differential Revision: https://reviews.llvm.org/D38624 llvm-svn: 315148
* Delete empy directoryJeroen Ketema2017-10-070-0/+0
| | | | llvm-svn: 315147
* [X86] Update an outdated comment about SjLjMartin Storsjo2017-10-071-6/+2
| | | | | | | | | The SjLj intrinsics in the X86 backend are intended for use with SjLj exception handling as well, since SVN r271244. Differential Revision: https://reviews.llvm.org/D38532 llvm-svn: 315146
* [X86] Correct result type for the flag result of RDSEED and RDRAND nodes. ↵Craig Topper2017-10-071-2/+2
| | | | | | | | Correct the CC type for the CMOV used with RDSEED/RDRAND. The flag result was MVT::Glue, but should be MVT::i32. The CC type was MVT::i8, but should be MVT::i32. llvm-svn: 315145
* Use list(APPEND) instead of append()Vedant Kumar2017-10-071-1/+1
| | | | | | | | | append() seems to be available with the version of cmake I'm using, but not on the bots: http://green.lab.llvm.org/green//job/clang-stage1-configure-RA/39354 llvm-svn: 315144
* [ubsan] Add a static runtime on DarwinVedant Kumar2017-10-076-0/+43
| | | | | | | | As a follow-up to r315142, this makes it possible to use ubsan with a static runtime on Darwin. I've also added a new StandaloneStatic testing configuration so the new setup can be tested. llvm-svn: 315143
* [Driver] Fix -static-libsan / -shared-libsan on DarwinVedant Kumar2017-10-073-2/+11
| | | | | | | Don't ignore these flags on Darwin. The old behavior of using the dynamic runtime when neither flag is passed is preserved. llvm-svn: 315142
* Inline small function. NFC.Rafael Espindola2017-10-073-19/+3
| | | | llvm-svn: 315141
* Remove OutputSection::updateAlignment.Rui Ueyama2017-10-075-10/+8
| | | | | | I feel it is easier to understand without this function. llvm-svn: 315140
* Clarify code by adding a comment.Rui Ueyama2017-10-071-4/+7
| | | | llvm-svn: 315139
* Merge addInputSec with OutputSection::addSection.Rui Ueyama2017-10-073-66/+51
| | | | | | | | | | Previously, when we added an input section to an output section, we called `OutputSectionFactory::addInputSec`. This isn't a good design because, a factory class is intended to create a new object and return it, but in this use case, it will never create a new object. This patch fixes the design flaw. llvm-svn: 315138
* Return early. NFC.Rui Ueyama2017-10-071-10/+11
| | | | llvm-svn: 315137
* [MachineOutliner] Disable outlining from LinkOnceODRs by defaultJessica Paquette2017-10-079-25/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Say you have two identical linkonceodr functions, one in M1 and one in M2. Say that the outliner outlines A,B,C from one function, and D,E,F from another function (where letters are instructions). Now those functions are not identical, and cannot be deduped. Locally to M1 and M2, these outlining choices would be good-- to the whole program, however, this might not be true! To mitigate this, this commit makes it so that the outliner sees linkonceodr functions as unsafe to outline from. It also adds a flag, -enable-linkonceodr-outlining, which allows the user to specify that they want to outline from such functions when they know what they're doing. Changing this handles most code size regressions in the test suite caused by competing with linker dedupe. It also doesn't have a huge impact on the code size improvements from the outliner. There are 6 tests that regress > 5% from outlining WITH linkonceodrs to outlining WITHOUT linkonceodrs. Overall, most tests either improve or are not impacted. Not outlined vs outlined without linkonceodrs: https://hastebin.com/raw/qeguxavuda Not outlined vs outlined with linkonceodrs: https://hastebin.com/raw/edepoqoqic Outlined with linkonceodrs vs outlined without linkonceodrs: https://hastebin.com/raw/awiqifiheb Numbers generated using compare.py with -m size.__text. Tests run for AArch64 with -Oz -mllvm -enable-machine-outliner -mno-red-zone. llvm-svn: 315136
* Remove the input file specification from theJason Molenda2017-10-071-1/+0
| | | | | | | | | | "Prepare Swig Bindings" shell script phase; it wasn't the actual input file and could lead to incorrect dependency analysis by the build system. <rdar://problem/34751196> llvm-svn: 315135
* Remove unused parameters.Rui Ueyama2017-10-073-11/+7
| | | | llvm-svn: 315133
* [asan] Disable wcslen test on 32-bit Android.Evgeniy Stepanov2017-10-071-2/+4
| | | | llvm-svn: 315132
* Use error() instead of warn() to report undefined symbols.Rui Ueyama2017-10-065-14/+30
| | | | | | | | | | | | | | I believe the reason why we used warn() instead of error() to report undefined symbols is because the older implementation of error() exitted immediately. Here, we want to find as many undefined symbols as we can, so I chose to use warn() instead of error(). Now error() does not exit immediately, so it doesn't make sense to keep them as warnings. Differential Revision: https://reviews.llvm.org/D38652 llvm-svn: 315131
* [InstCombine] use correct type when propagating constant condition in ↵Sanjay Patel2017-10-062-2/+19
| | | | | | simplifyDivRemOfSelectWithZeroOp (PR34856) llvm-svn: 315130
* Do not mutate Script->Opt.Commands from a leaf helper function.Rui Ueyama2017-10-064-28/+38
| | | | | | | | Factory::addInputSec added an output section to Script->Opt.Commands, but that is too subtle. This patch makes it explicit so that it is easy to see when a new element is added to Script->Opt.Commands. llvm-svn: 315129
* [llvm-rc] Fix some endianness errors.Zachary Turner2017-10-061-11/+13
| | | | llvm-svn: 315128
* [InstCombine] rename SimplifyDivRemOfSelect to be clearer, add comments, ↵Sanjay Patel2017-10-062-20/+20
| | | | | | | | | simplify code; NFCI There's at least one bug here - this code can fail with vector types (PR34856). It's also being called for FREM; I'm still trying to understand how that is valid. llvm-svn: 315127
* Driver: hoist the `wchar_t` handling to the driverSaleem Abdulrasool2017-10-0628-81/+226
| | | | | | | | | | | | | | | | Move the logic for determining the `wchar_t` type information into the driver. Rather than passing the single bit of information of `-fshort-wchar` indicate to the frontend the desired type of `wchar_t` through a new `-cc1` option of `-fwchar-type` and indicate the signedness through `-f{,no-}signed-wchar`. This replicates the current logic which was spread throughout Basic into the `RenderCharacterOptions`. Most of the changes to the tests are to ensure that the frontend uses the correct type. Add a new test set under `test/Driver/wchar_t.c` to ensure that we calculate the proper types for the various cases. llvm-svn: 315126
* Simplify LinkerScript::addOrphanSections. NFCI.Rui Ueyama2017-10-061-14/+17
| | | | | | | | | | | | This patch moves a std::find to a new function. It also removes the following piece of code. I believe it should be fine because all tests still pass. unsigned Index = std::distance(Opt.Commands.begin(), I); assert(Sec->SectionIndex == INT_MAX || Sec->SectionIndex == Index); Sec->SectionIndex = Index; llvm-svn: 315125
* Split addSection into two small functions. NFCI.Rui Ueyama2017-10-064-17/+29
| | | | | | | | | addSection function was hard to read because it behaves differently depending on its arguments but what exactly it does is not clear. Now it should be better. Still, it is not clear (not what but) why it does what it does, but I'll take a look at it later. llvm-svn: 315124
* Specify the input & output results of the "Prepare Swig Bindings"Jason Molenda2017-10-061-0/+2
| | | | | | | shell script phase to aid build systems. <rdar://problem/34751196> llvm-svn: 315123
* [AVX512] Fix TERNLOG when folding broadcastCameron McInally2017-10-062-8/+8
| | | | | | | | | Patch to fix ternlog instructions with a folded broadcast. The broadcast decorator, e.g. {1toX}, was missing. Differential Revision: https://reviews.llvm.org/D38649 llvm-svn: 315122
* [dwarfdump] Verify that unit type matches root DIEJonas Devlieghere2017-10-068-17/+88
| | | | | | | | | | | | | This patch adds two new verifiers: - It checks that the root DIE of a CU is actually a valid unit DIE. (based on its tag) - For DWARF5 which contains a unit type int he CU header, it checks that this matches the type of the unit DIE. Differential revision: https://reviews.llvm.org/D38453 llvm-svn: 315121
* [CMake] Add LLDB_INCLUDE_TESTS variableChris Bieneman2017-10-061-3/+8
| | | | | | This behaves like the other *_INCLUDE_TESTS variables in CMake and is tied to LLVM_INCLUDE_TESTS so that if you're building in-tree and not building the LLVM tests, you also won't build the LLDB tests. llvm-svn: 315120
* Reland r315114, "ELF: Export preempted symbols even if there is a dynamic ↵Peter Collingbourne2017-10-063-14/+13
| | | | | | | | | list." which was reverted in r315116. I hadn't synced past the change that changed the default hash style to --hash-style=both, so my test had the symbols in the wrong order. llvm-svn: 315119
* [llvm-rc] Implement escape sequences in .rc files.Zachary Turner2017-10-064-5/+389
| | | | | | | | | | | | | | | | | | | | | This allows the escape sequences (\a, \n, \r, \t, \\, \x[0-9a-f]*, \[0-7]*, "") to appear in .rc scripts. These are parsed and output in the same way as it's done in original MS implementation. The way these sequences are processed depends on the type of the resource it resides in, and on whether the user declared the string to be "wide" or "narrow". I tried to maintain the maximum compatibility with the original tool (and fail in some erroneous situations that are accepted by .rc). However, there are some (extremely rare) cases where Microsoft tool outputs nonsense. I found it infeasible to detect such casses. Patch by Marek Sokolowski Differential Revision: https://reviews.llvm.org/D38426 llvm-svn: 315118
* [llvm-rc] Serialize user-defined resources to .res files.Zachary Turner2017-10-067-1/+119
| | | | | | | | | | | | | | | | This allows rc to serialize user-defined resources, as documented at: msdn.microsoft.com/en-us/library/windows/desktop/aa381054.aspx Escape sequences are yet unavailable, and are to be added in one of child patches. Patch by: Marek Sokolowski Differential Revision: https://reviews.llvm.org/D38423 llvm-svn: 315117
* Revert r315114, "ELF: Export preempted symbols even if there is a dynamic list."Peter Collingbourne2017-10-063-11/+12
| | | | | | | For some reason the symbols get emitted in the wrong order on one of the buildbots: http://bb9.pgr.jp/#builders/15/builds/180 llvm-svn: 315116
* Make a few member varaibles/functions private.Rui Ueyama2017-10-061-6/+9
| | | | llvm-svn: 315115
* ELF: Export preempted symbols even if there is a dynamic list.Peter Collingbourne2017-10-063-12/+11
| | | | | | | | | | | | Dynamic lists in an executable are additive, not restrictive, so we must continue to export preempted symbols even with a dynamic list. This fixes sanitizer interception of libc symbols (and should also fix symbol preemption by users of sanitizers). Differential Revision: https://reviews.llvm.org/D38647 llvm-svn: 315114
* Inline a small function.Rui Ueyama2017-10-061-8/+3
| | | | llvm-svn: 315113
* [llvm-rc] Serialize STRINGTABLE statements to .res file.Zachary Turner2017-10-068-9/+378
| | | | | | | | | | | | | | | This allows llvm-rc to serialize STRINGTABLE resources. These are output in an unusual way: we locate them at the end of the file, and strings are merged into bundles of max 16 strings, depending on their IDs, language, and characteristics. Ref: msdn.microsoft.com/en-us/library/windows/desktop/aa381050.aspx Patch by: Marek Sokolowski Differential Revision: https://reviews.llvm.org/D38420 llvm-svn: 315112
* Revert "For dllexport class templates, export specializations of member ↵Reid Kleckner2017-10-062-23/+0
| | | | | | | | functions (PR34849)" This reverts r315025, it caused http://crbug.com/772461 llvm-svn: 315111
* [llvm-rc] Serialize VERSIONINFO resources to .res files.Zachary Turner2017-10-0615-45/+469
| | | | | | | | | | | This is now able to dump VERSIONINFO resources. Ref: msdn.microsoft.com/en-us/library/windows/desktop/aa381058.aspx Differential Revision: https://reviews.llvm.org/D38410 Patch by: Marek Sokolowski llvm-svn: 315110
* [llvm-rc] Serialize CURSOR and ICON resources to .resZachary Turner2017-10-0611-4/+672
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is part 6 of llvm-rc serialization. This adds ability to output cursors and icons as resources. Unfortunately, we can't just copy .cur or .ico files to output - as each file might contain multiple images, each of them needs to be unpacked and stored as a separate resource. This forces us to parse cursor and icon contents. (Fortunately, these formats are pretty similar and can be processed by mostly common code). As test files are binary, here is a short explanation of .cur and .ico files stored: cursor.cur, cursor-8.cur, cursor-32.cur are sample correct cursor files, differing in their bit depth. icon-old.ico, icon-new.ico are sample correct icon files; icon-png.ico is a sample correct icon file in PNG format (instead of usual BMP); cursor-eof.cur is an incorrect cursor file - this is cursor.cur with some of its final bytes removed. cursor-bad-offset.cur is an incorrect cursor file - image header states that image data begins at offset 0xFFFFFFFF. Sample correct cursors and icons were created by Nico Weber. Patch by Marek Sokolowski Differential Revision: https://reviews.llvm.org/D37878 llvm-svn: 315109
* Revert "Roll forward r314928"Reid Kleckner2017-10-068-708/+0
| | | | | | | | | | | | | | | | | | | | This appears to be miscompiling Clang, as shown on two Windows bootstrap bots: http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/builds/7611 http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/6870 Nothing else is in the blame list. Both emit errors on this valid code in the Windows ucrt headers: C:\...\ucrt\malloc.h:95:32: error: invalid operands to binary expression ('char *' and 'int') _Ptr = (char*)_Ptr + _ALLOCA_S_MARKER_SIZE; ~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~ I am attempting to reproduce this now. This reverts r315044 llvm-svn: 315108
* [MS] Raise the default value of _MSC_VER to 1911, which is VS 2017Reid Kleckner2017-10-062-3/+7
| | | | | | | | | | | | | | | | Summary: This raises our default past 1900, which controls whether char16_t is a builtin type or not. Implements PR34243 Reviewers: hans Subscribers: STL_MSFT, rsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D38646 llvm-svn: 315107
* Factor out default_(a|ub)sanitizer_opts in lit.Evgeniy Stepanov2017-10-063-31/+22
| | | | | | | | | | Reviewers: vitalybuka Subscribers: srhines, llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D38644 llvm-svn: 315106
* [sanitizer] Test ubsan and cfi on android.Evgeniy Stepanov2017-10-0610-9/+16
| | | | | | | | | | | | | | | Summary: Enable check-cfi and check-ubsan on Android. Check-ubsan includes standalone and ubsan+asan, but not tsan or msan. Cross-dso cfi tests are disabled for now. Reviewers: vitalybuka, pcc Subscribers: srhines, kubamracek, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D38608 llvm-svn: 315105
* [llvm-rc] Add optional serialization support for DIALOG(EX) resources.Zachary Turner2017-10-0613-28/+597
| | | | | | | | | | | | | | | | | | This is part 5 of llvm-rc serialization support. This allows DIALOG and DIALOGEX to serialize if dialog-specific optional statements are provided. These are (as of now): CAPTION, FONT, and STYLE. Notably, FONT statement can take more than two arguments when describing DIALOGEX resources (as in msdn.microsoft.com/en-us/library/windows/desktop/aa381013.aspx). I made some changes to the parser to reflect this fact. Patch by Marek Sokolowski Differential Revision: https://reviews.llvm.org/D37864 llvm-svn: 315104
OpenPOWER on IntegriCloud