- Aug 12, 2016
-
-
Chris Bieneman authored
Since we don't actually have the autoconf subdirectories anymore, we don't need this reference here. llvm-svn: 278558
-
Kevin Enderby authored
This contains the two missing checks for LC_SEGMENT load command fields. And checks for the Mach-O sections fields that would make them invalid. With the new checks, some of the existing malformed file checks now trips one of these instead of the issue it was having before so those tests were adjusted. llvm-svn: 278557
-
Mike Aizatsky authored
llvm-svn: 278556
-
Mike Aizatsky authored
Differential Revision: https://reviews.llvm.org/D23338 llvm-svn: 278551
-
Tim Shen authored
Summary: It triggers exponential behavior when the DAG has many branches. Reviewers: hfinkel, kbarton Subscribers: iteratee, nemanjai, echristo Differential Revision: https://reviews.llvm.org/D23428 llvm-svn: 278548
-
Benjamin Kramer authored
llvm-svn: 278545
-
Dan Liew authored
The original `ExecuteCommand()` called `system()` from the C library. The C library implementation of this on macOS contains a mutex which serializes calls to `system()`. This prevented the `-jobs=` flag from running copies of the fuzzing binary in parallel which is the opposite of what is intended. To fix this on macOS an alternative implementation of `ExecuteCommand()` is provided that can be used concurrently. This is provided in `FuzzerUtilDarwin.cpp` which is guarded to only compile code on Apple platforms. The existing implementation has been moved to a new file `FuzzerUtilLinux.cpp` which is guarded to only compile code on Linux. This commit includes a simple test to check that LibFuzzer is being executed in parallel when requested. Differential Revision: https://reviews.llvm.org/D22742 llvm-svn: 278544
-
Duncan P. N. Exon Smith authored
Thanks to Mehdi for noticing. llvm-svn: 278542
-
Duncan P. N. Exon Smith authored
The fixup from r278537 was insufficient. Just #ifdef it out for MSVC. llvm-svn: 278539
-
Duncan P. N. Exon Smith authored
The HasGetNext type trait was cluttered with a few things it didn't need. Try to clean it up, hoping to fix windows bots: http://lab.llvm.org:8011/builders/lld-x86_64-win7/builds/38063 I may just have to delete the trait... llvm-svn: 278537
-
David Majnemer authored
llvm-svn: 278536
-
Duncan P. N. Exon Smith authored
No one is using the capability to implement next and prev another way (since lld stopped doing it in r278468). Remove the customization point by moving the API from ilist_nextprev_traits<T> to ilist_node_access. The old traits class is still useful/necessary API as a target for friends of node types that inherit privately from ilist_node. Eventually I plan to either remove it entirely or move the template parameters to the methods. (Note: if there's desire to bring back customization of next/prev pointers in the future (e.g., to pack some bits in there), I think a traits class like this is an awkward way to accomplish it. Instead, we should change ilist<T> to be ilist<ilist_node<T>>, and give an extra template parameter to ilist_node.) llvm-svn: 278532
-
Michael Kuperstein authored
llvm-svn: 278531
-
Pete Cooper authored
This is part of an effort to constify ValueTracking.cpp. This change is to methods which need const Value* instead of Value* to go with the upcoming changes to ValueTracking. llvm-svn: 278528
-
Dehao Chen authored
Summary: The refined propagation algorithm is more accurate and robust. Reviewers: davidxl, dnovillo Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D23224 llvm-svn: 278522
-
Artur Pilipenko authored
Currently X86ISelLowering has a similar transformation for sexts: sext(add_nsw(x, C)) --> add(sext(x), C_sext) In this change I extend this code to handle zexts as well. Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D23359 llvm-svn: 278520
-
Ehsan Amiri authored
Recursive calls to aliasCheck from alias[GEP|Select|PHI] may result in a second call to GetUnderlyingObject for a Value, whose underlying object is already computed. This patch ensures that in this situations, the underlying object is not computed again, and the result of the previous call is resued. https://reviews.llvm.org/D22305 llvm-svn: 278519
-
Artur Pilipenko authored
Teach LVI to gather control dependant constraints from guards. Reviewed By: sanjoy Differential Revision: https://reviews.llvm.org/D23358 llvm-svn: 278518
-
Teresa Johnson authored
Try to appease Windows bots after r278508: http://lab.llvm.org:8011/builders/sanitizer-windows/builds/27250 http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/14776 llvm-svn: 278517
-
Geoff Berry authored
This re-factoring could cause the following slight changes in generated code, though none were observed during testing: - MachineScheduler could decide not to cluster some loads/stores if there are other load/stores with non-pairable opcodes that have the same base register and offset as a pairable set of load/stores. One case of different MachineScheduler pairing did show up in my testing, but it wasn't due to this issue, but due BaseMemOpClusterMutation::clusterNeighboringMemOps() being unstable w.r.t. the order it considers memory operations. See PR28942. - The ImplicitNullChecks optimization could be done for more load/store opcodes. This optimization isn't done for C/C++ code, so it didn't show up in my testing. Reviewers: mcrosier, t.p.northover Subscribers: aemerson, rengolin, mcrosier, llvm-commits Differential Revision: https://reviews.llvm.org/D23365 llvm-svn: 278515
-
Artur Pilipenko authored
Rewrite Visited[Cond] = getValueFromConditionImpl(..., Visited) statement which can lead to a memory corruption since getValueFromConditionImpl changes Visited map and invalidates the iterators. llvm-svn: 278514
-
Duncan P. N. Exon Smith authored
Share code for the (mostly problematic) embedded sentinel traits. - Move the LLVM_NO_SANITIZE("object-size") attribute to ilist_half_embedded_sentinel_traits and ilist_embedded_sentinel_traits (previously it spread throughout the code duplication). - Add an ilist_full_embedded_sentinel_traits which has no UB (but has the downside of storing the complete node). - Replace all the custom sentinel traits in LLVM with a declaration of ilist_sentinel_traits that inherits from one of the embedded sentinel traits classes. There are still custom sentinel traits in other LLVM subprojects. I'll remove those in a follow-up. Nothing at all should be changing here, this is just rearranging code. Note that the final goal here is to remove the sentinel traits altogether, settling on the memory layout of ilist_half_embedded_sentinel_traits without the UB. This intermediate step moves the logic into ilist.h. llvm-svn: 278513
-
Teresa Johnson authored
lto::InputFile::Symbol::getCommonSize should return uint64_t instead of size_t since it is returning the result of DataLayout::getTypeAllocSize which returns uint64_t, and the result of getCommonSize is assigned to a uint64_t variable. On 32-bit builds size_t is unsigned int and there are type errors. This was introduced in r278338. llvm-svn: 278512
-
James Y Knight authored
...and the two followup commits: Revert "[Sparc][Leon] Missed resetting option flags from check-in 278489." Revert "[Sparc][Leon] Errata fixes for various errata in different versions of the Leon variants of the Sparc 32 bit processor." This reverts commit r274856, r278489, and r278492. llvm-svn: 278511
-
Teresa Johnson authored
Summary: Port the NameAnonFunction pass and add a test. Depends on D23439. Reviewers: mehdi_amini Subscribers: llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D23440 llvm-svn: 278509
-
Teresa Johnson authored
Summary: Port the ModuleSummaryAnalysisWrapperPass to the new pass manager. Use it in the ported BitcodeWriterPass (similar to how we use the legacy ModuleSummaryAnalysisWrapperPass in the legacy WriteBitcodePass). Also, pass the -module-summary opt flag through to the new pass manager pipeline and through to the bitcode writer pass, and add a test that uses it. Reviewers: mehdi_amini Subscribers: llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D23439 llvm-svn: 278508
-
Simon Pilgrim authored
llvm-svn: 278502
-
Krzysztof Parzyszek authored
- CALLv3nr PS_call_nr - CALLRv3nr PS_callr_nr - CALLstk PS_call_stk - TCRETURNi PS_tailcall_i - TCRETURNr PS_tailcall_r - JMPret PS_jmpret - JMPrett PS_jmprett - JMPretf PS_jmpretf - JMPrettnew PS_jmprettnew - JMPretfnew PS_jmpretfnew - JMPrettnewpt PS_jmprettnewpt - JMPretfnewpt PS_jmpretfnewpt llvm-svn: 278499
-
Krzysztof Parzyszek authored
llvm-svn: 278498
-
Artur Pilipenko authored
Take range metadata into account for conditions like this: %length = load i32, i32* %length_ptr, !range !{i32 0, i32 2147483647} %cmp = icmp ult i32 %a, %length This is a common pattern for range checks where the length of the array is dynamically loaded. Reviewed By: sanjoy Differential Revision: https://reviews.llvm.org/D23267 llvm-svn: 278496
-
Benjamin Kramer authored
It reads uninitialized memory and crashes randomly. llvm-svn: 278495
-
Simon Pilgrim authored
The PALIGNR target shuffle decode was not taking into account that DecodePALIGNRMask (rather oddly) expects the operands to be in reverse order, nor was it detecting unary patterns, causing combines to combine with the incorrect input. The cgbuiltin, auto upgrade and instruction comments code correctly swap the operands so are not affected. llvm-svn: 278494
-
Artur Pilipenko authored
Currently LVI can only gather value constraints from comparisons like: * icmp <pred> Val, ... * icmp ult (add Val, Offset), ... In fact we can handle any predicate in latter comparisons. Reviewed By: sanjoy Differential Revision: https://reviews.llvm.org/D23357 llvm-svn: 278493
-
Chris Dewhurst authored
llvm-svn: 278492
-
Chris Dewhurst authored
[Sparc][Leon] Errata fixes for various errata in different versions of the Leon variants of the Sparc 32 bit processor. The nature of the errata are listed in the comments preceding the errata fix passes. Relevant unit tests are implemented for each of these. These changes update older versions of these errata fixes with improvements to code and unit tests. Differential Revision: https://reviews.llvm.org/D21960 llvm-svn: 278489
-
Benjamin Kramer authored
Hopefully fixes visibility warnings from GCC. No functionality change. llvm-svn: 278485
-
Haicheng Wu authored
This reverts commit r278463 because it hits the bot. llvm-svn: 278484
-
Gor Nishanov authored
Summary: 1. Make coroutine representation more robust against optimization that may duplicate instruction by introducing coro.id intrinsics that returns a token that will get fed into coro.alloc and coro.begin. Due to coro.id returning a token, it won't get duplicated and can be used as reliable indicator of coroutine identify when a particular coroutine call gets inlined. 2. Move last three arguments of coro.begin into coro.id as they will be shared if coro.begin will get duplicated. 3. doc + test + code updated to support the new intrinsic. Reviewers: mehdi_amini, majnemer Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D23412 llvm-svn: 278481
-
Duncan P. N. Exon Smith authored
Remove all ilist_iterator to pointer casts. There were two reasons for casts: - Checking for an uninitialized (i.e., null) iterator. I added MachineInstrBundleIterator::isValid() to check for that case. - Comparing an iterator against the underlying pointer value while avoiding converting the pointer value to an iterator. This is occasionally necessary in MachineInstrBundleIterator, since there is an assertion in the constructors that the underlying MachineInstr is not bundled (but we don't care about that if we're just checking for pointer equality). To support the latter case, I rewrote the == and != operators for ilist_iterator and MachineInstrBundleIterator. - The implicit constructors now use enable_if to exclude const-iterator => non-const-iterator conversions from overload resolution (previously it was a compiler error on instantiation, now it's SFINAE). - The == and != operators are now global (friends), and are not templated. - MachineInstrBundleIterator has overloads to compare against both const_pointer and const_reference. This avoids the implicit conversions to MachineInstrBundleIterator that assert, instead just checking the address (and I added unit tests to confirm this). Notably, the only remaining uses of ilist_iterator::getNodePtrUnchecked are in ilist.h, and no code outside of ilist*.h directly relies on this UB end-iterator-to-pointer conversion anymore. It's still needed for ilist_*sentinel_traits, but I'll clean that up soon. llvm-svn: 278478
-
David Majnemer authored
No functionality change is intended. llvm-svn: 278477
-