summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Revert [scudo] Enabling MIPS support for ScudoSagar Thakur2017-04-242-2/+2
| | | | | | This patch broke the buildbot clang-cmake-mips. Investigating the issue. llvm-svn: 301173
* [LLDB][MIPS] Move it into HandleLLVMOptions.cmake.Nitesh Jain2017-04-241-6/+0
| | | | | | | The revison https://reviews.llvm.org/D32125 will fixed the off_t for GNU specific 32 bit platform. This fixed the difference in definition of off_t in LLDB and LLVM Subscribers: jaydeep, bhushan, lldb-commits, slthakur, llvm-commits, krytarowski, emaste, zturner llvm-svn: 301172
* [LLVM][MIPS] Fix different definition of off_t in LLDB and LLVM.Nitesh Jain2017-04-241-0/+7
| | | | | | | | | | Reviewers: beanz Subscribers: jaydeep, bhushan, lldb-commits, slthakur, llvm-commits, krytarowski, emaste Differential Revision: https://reviews.llvm.org/D32125 llvm-svn: 301171
* [DWARF] - Take relocations in account when extracting ranges from .debug_rangesGeorge Rimar2017-04-2410-38/+118
| | | | | | | | | | | | | | | I found this when investigated "Bug 32319 - .gdb_index is broken/incomplete" for LLD. When we have object file with .debug_ranges section it may be filled with zeroes. Relocations are exist in file to relocate this zeroes into real values later, but until that a pair of zeroes is treated as terminator. And DWARF parser thinks there is no ranges at all when I am trying to collect address ranges for building .gdb_index. Solution implemented in this patch is to take relocations in account when parsing ranges. Differential revision: https://reviews.llvm.org/D32228 llvm-svn: 301170
* Add more arguments to SocketAddress::GetAddressInfoPavel Labath2017-04-243-27/+26
| | | | | | | | | | | | | | | | | | | Summary: the reason for this is two-fold: - getaddrinfo without the extra arguments will return the same (network-level) address multiple times, once for each supported transport protocol, which is not what is usually intended (it certainly wasn't in D31823) - it enables us to rewrite the getaddrinfo member function in terms of the static GetAddressInfo function. Reviewers: beanz, tberghammer Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D32357 llvm-svn: 301168
* [clang-tidy] New check: modernize-replace-random-shuffle.Mads Ravn2017-04-248-0/+246
| | | | | | | | | | | | | | | | | | | | | | This check will find occurrences of ``std::random_shuffle`` and replace it with ``std::shuffle``. In C++17 ``std::random_shuffle`` will no longer be available and thus we need to replace it. Example of case that it fixes ``` std::vector<int> v; // First example std::random_shuffle(vec.begin(), vec.end()); ``` Reviewers: hokein, aaron.ballman, alexfh, malcolm.parsons, mclow.lists Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D30158 llvm-svn: 301167
* [ARM] GlobalISel: Legalize s8 and s16 G_(S|U)DIVDiana Picus2017-04-244-4/+258
| | | | | | | | | | | | | | We have to widen the operands to 32 bits and then we can either use hardware division if it is available or lower to a libcall otherwise. At the moment it is not enough to set the Legalizer action to WidenScalar, since for libcalls it won't know what to do (it won't be able to find what size to widen to, because it will find Libcall and not Legal for 32 bits). To hack around this limitation, we request Custom lowering, and as part of that we widen first and then we run another legalizeInstrStep on the widened DIV. llvm-svn: 301166
* [Arch64AsmParser] better diagnostic for isbSjoerd Meijer2017-04-242-7/+17
| | | | | | | | | | | Instruction isb takes as an operand either 'sy' or an immediate value. This improves the diagnostic when the string is not 'sy' and adds a test case for this which was missing. This also adds tests to check invalid inputs for dsb and dmb. Differential Revision: https://reviews.llvm.org/D32227 llvm-svn: 301165
* [ARM] GlobalISel: Support G_(S|U)DIV for s32Diana Picus2017-04-247-0/+244
| | | | | | | | | Add support for both targets with hardware division and without. For hardware division we have to add support throughout the pipeline (legalizer, reg bank select, instruction select). For targets without hardware division, we only need to mark it as a libcall. llvm-svn: 301164
* [GlobalISel] Legalize G_(S|U)DIV libcallsDiana Picus2017-04-241-12/+30
| | | | | | | | | | Treat them the same as the other binary operations that we have so far, but on integers rather than floating point types. Extract the common code into a helper. This will be used in the ARM backend. llvm-svn: 301163
* [ARM] GlobalISel: Select G_CONSTANT with CImm operandsDiana Picus2017-04-243-3/+44
| | | | | | | | | | | | | | When selecting a G_CONSTANT to a MOVi, we need the value to be an Imm operand. We used to just leave the G_CONSTANT operand unchanged, which works in some cases (such as the GEP offsets that we create when referring to stack slots). However, in many other places the G_CONSTANTs are created with CImm operands. This patch makes sure to handle those as well, and to error out gracefully if in the end we don't end up with an Imm operand. Thanks to Oliver Stannard for reporting this issue. llvm-svn: 301162
* [XRay][tools] Fixup for pedantic and permissive errors/warningsDean Michael Berris2017-04-242-3/+3
| | | | | | | | Remove extraneous semicolons and fully qualify the Trace type. Follow-up to D29320. llvm-svn: 301161
* [XRay] A tool for Comparing xray function call graphsDean Michael Berris2017-04-2411-132/+1087
| | | | | | | | | | | | | | | | | | | | | | Summary: This is a tool for comparing the function graphs produced by the llvm-xray graph too. It takes the form of a new subcommand of the llvm-xray tool 'graph-diff'. This initial version of the patch is very rough, but it is close to feature complete. Depends on D29363 Reviewers: dblaikie, dberris Reviewed By: dberris Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D29320 llvm-svn: 301160
* [APInt] Make behavior of ashr by BitWidth consistent between single and ↵Craig Topper2017-04-242-2/+4
| | | | | | | | multi word. Previously single word would always return 0 regardless of the original sign. Multi word would return all 0s or all 1s based on the original sign. Now single word takes into account the sign as well. llvm-svn: 301159
* [scudo] Enabling MIPS support for ScudoSagar Thakur2017-04-242-2/+2
| | | | | | | | | Adding MIPS 32-bit and 64-bit support for Scudo. Reviewed by cryptoad Differential: D31803 llvm-svn: 301158
* Revert "Refactor DynamicLibrary so searching for a symbol will have a ↵Frederich Munch2017-04-2411-573/+277
| | | | | | | | | | defined order.” The changes are causing the i686-mingw32 build to fail. This reverts commit r301153, and the changes for a separate warning on i686-mingw32 in r301155 and r301156. llvm-svn: 301157
* Fix warning converting from boolean to pointer introduced in r301153.Frederich Munch2017-04-242-2/+2
| | | | | | This reverts commit r301155, which was incorrect. llvm-svn: 301156
* Fix warning converting from void* to boolean introduced in r301153.Frederich Munch2017-04-241-1/+1
| | | | llvm-svn: 301155
* Revert "[SCEV] Enable SCEV verification by default in EXPENSIVE_CHECKS builds"Sanjoy Das2017-04-242-11/+4
| | | | | | | This reverts commit r301150. It breaks CodeGen/Hexagon/hwloop-wrap2.ll, reverting while I investigate. llvm-svn: 301154
* Refactor DynamicLibrary so searching for a symbol will have a defined order andFrederich Munch2017-04-2411-277/+573
| | | | | | | | | | | | | | | | | | | | | | | | | | | libraries are properly unloaded when llvm_shutdown is called. Summary: This was mostly affecting usage of the JIT, where storing the library handles in a set made iteration unordered/undefined. This lead to disagreement between the JIT and native code as to what the address and implementation of particularly on Windows with stdlib functions: JIT: putenv_s("TEST", "VALUE") // called msvcrt.dll, putenv_s JIT: getenv("TEST") -> "VALUE" // called msvcrt.dll, getenv Native: getenv("TEST") -> NULL // called ucrt.dll, getenv Also fixed is the issue of DynamicLibrary::getPermanentLibrary(0,0) on Windows not giving priority to the process' symbols as it did on Unix. Reviewers: chapuni, v.g.vassilev, lhames Reviewed By: lhames Subscribers: danalbert, srhines, mgorny, vsk, llvm-commits Differential Revision: https://reviews.llvm.org/D30107 llvm-svn: 301153
* [Orc] Fix a warning by removing an unused lambda capture.Lang Hames2017-04-241-1/+1
| | | | llvm-svn: 301152
* Fix unused variables / fields warnings in release buildsSanjoy Das2017-04-241-0/+6
| | | | llvm-svn: 301151
* [SCEV] Enable SCEV verification by default in EXPENSIVE_CHECKS buildsSanjoy Das2017-04-242-4/+11
| | | | llvm-svn: 301150
* [SCEV] Fix exponential time complexity by cachingSanjoy Das2017-04-243-19/+161
| | | | llvm-svn: 301149
* [PartialInine]: add triaging optionsXinliang David Li2017-04-232-0/+97
| | | | | | | There are more bugs (runtime failures) triggered when partial inlining is turned on. Add options to help triaging problems. llvm-svn: 301148
* [Orc] Use recursive mutexes for Error serialization.Lang Hames2017-04-231-28/+39
| | | | | | | Errors can be nested, so we need recursive locking for serialization / deserialization. llvm-svn: 301147
* [SCEV] Move towards a verifier without false positivesSanjoy Das2017-04-231-68/+59
| | | | | | | | | | | | | | | This change reboots SCEV's current (off by default) verification logic to avoid false failures. Instead of stringifying trip counts, it maps old and new trip counts to the same ScalarEvolution "universe" and asks ScalarEvolution to compute the difference between them. If the difference comes out to be a non-zero constant, then (barring some corner cases) we *know* we messed up. I've not yet enabled this by default since it hits an exponential time issue in SCEV, but once I fix that, I'll flip it on by default in EXPENSIVE_CHECKS builds. llvm-svn: 301146
* [X86][AVX] Add scheduling latency/throughput tests for some AVX1 instructionsSimon Pilgrim2017-04-231-0/+731
| | | | | | More instructions will be added in future commits llvm-svn: 301145
* [InstCombine] add/move folds for [not]-xorSanjay Patel2017-04-232-76/+101
| | | | | | | | | | | | We handled all of the commuted variants for plain xor already, although they were scattered around and sometimes folded less efficiently using distributive laws. We had no folds for not-xor. Handling all of these patterns consistently is part of trying to reinstate: https://reviews.llvm.org/rL300977 llvm-svn: 301144
* [PartialInlining] Add optimization remark supportXinliang David Li2017-04-231-4/+20
| | | | | | Differential Revision: http://reviews.llvm.org/D32387 llvm-svn: 301143
* [X86][SSE] Add scheduler class support for SSE42 (PCMPGT) instructionsSimon Pilgrim2017-04-232-12/+16
| | | | llvm-svn: 301142
* [X86][SSE] Add scheduling latency/throughput tests for (most) SSE42 instructionsSimon Pilgrim2017-04-231-0/+477
| | | | llvm-svn: 301141
* [InstCombine] add tests for not-xor and remove redundant tests; NFCSanjay Patel2017-04-232-55/+147
| | | | llvm-svn: 301140
* [JumpThread] We want to fold (not thread) when all predecessor go to single ↵Xin Tong2017-04-232-0/+165
| | | | | | | | | | | | | | | | | | | | | BB's successor. Summary: In case all predecessor go to a single successor of current BB. We want to fold (not thread). I failed to update the phi nodes properly in the last patch https://reviews.llvm.org/rL300657. Phi nodes values are per predecessor in LLVM. Reviewers: sanjoy Reviewed By: sanjoy Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32400 llvm-svn: 301139
* Fix typo in comment.Nick Lewycky2017-04-231-1/+1
| | | | llvm-svn: 301138
* [X86][SSE] Add scheduling latency/throughput tests for (most) SSE41 instructionsSimon Pilgrim2017-04-231-0/+1938
| | | | llvm-svn: 301137
* [X86][SSE] Add missing scheduling latency/throughput test for PINSRWSimon Pilgrim2017-04-231-0/+46
| | | | llvm-svn: 301136
* Correct grammar. NFCXin Tong2017-04-231-1/+1
| | | | llvm-svn: 301135
* [APInt] Make clearUnusedBits branch free.Craig Topper2017-04-231-7/+2
| | | | | | | | This makes the WordBits calculation calculate a value between 1 and 64 for the number of bits in the last word. Previously if the BitWidth was a multiple of 64 bits the WordBits value was 0 and we had to bail out early to avoid an undefined shift. Now with a value of 64 we no longer have an undefined shift issue. This shows a 15-16k reduction in the size of the opt binary on my local x86-64 build. llvm-svn: 301134
* [APInt] In sext single word case, use SignExtend64 and let the APInt ↵Craig Topper2017-04-232-5/+22
| | | | | | | | constructor mask off any excess bits. The current code is trying to be clever with shifts to avoid needing to clear unused bits. But it looks like the compiler is unable to optimize out the unused bit handling in the APInt constructor. Given this its better to just use SignExtend64 and have more readable code. llvm-svn: 301133
* Add missing acquire_load to call_once overload.Justin Lebar2017-04-231-1/+1
| | | | | | | | | | | | Summary: Seemed to have been overlooked in D24028. This bug was found and brought to my attention by Paul Wankadia. Reviewers: kubamracek, EricWF, dvyukov Differential Revision: https://reviews.llvm.org/D32402 llvm-svn: 301132
* [InstCombine] add tests for or-to-xor; NFCSanjay Patel2017-04-231-0/+76
| | | | llvm-svn: 301131
* clang-rename: fix formattingMiklos Vajna2017-04-233-7/+5
| | | | | | As detected by clang-format. llvm-svn: 301130
* [InstCombine] add pattern matches for commuted variants of xor-to-xorSanjay Patel2017-04-232-45/+58
| | | | | | | | | There's probably some better way to write this that eliminates the code duplication without hurting readability, but at least this eliminates the logic holes and is hopefully slightly more efficient than creating new instructions. llvm-svn: 301129
* [InstCombine] add tests for xor-to-xor; NFCSanjay Patel2017-04-231-0/+215
| | | | | | Besides missing 2 commuted patterns, the way we handle these folds is inefficient. llvm-svn: 301128
* [X86][SSE] Add scheduling latency/throughput tests for SSSE3 instructionsSimon Pilgrim2017-04-231-0/+754
| | | | llvm-svn: 301127
* [X86][SSE] Add scheduling latency/throughput tests for SSE3 instructionsSimon Pilgrim2017-04-231-0/+455
| | | | llvm-svn: 301126
* [InstCombine] add tests for add-to-xor commuted variants; NFCSanjay Patel2017-04-231-5/+47
| | | | | | | 1 out of the 4 tests commuted the operands, so there's an asymmetry somewhere under this in how we handle these transforms. llvm-svn: 301125
* Revert "[APInt] Fix a few places that use APInt::getRawData to operate ↵Renato Golin2017-04-2314-46/+38
| | | | | | | | | | | | | | | | within the normal API." This reverts commit r301105, 4, 3 and 1, as a follow up of the previous revert, which broke even more bots. For reference: Revert "[APInt] Use operator<<= where possible. NFC" Revert "[APInt] Use operator<<= instead of shl where possible. NFC" Revert "[APInt] Use ashInPlace where possible." PR32754. llvm-svn: 301111
* Revert "[APInt] Add ashrInPlace method and implement ashr using it. Also fix ↵Renato Golin2017-04-234-77/+77
| | | | | | | | | | a bug in the shift by BitWidth handling." This reverts commit r301094, as it broke all ARM self-hosting bots. PR32754. llvm-svn: 301110
OpenPOWER on IntegriCloud