summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [InstCombine] Add test cases for (X & (Y | ~X)) -> (X & Y) where the not is ↵Craig Topper2017-07-152-0/+319
| | | | | | | | an inverted compare. NFC Do the same for (X | (Y & ~X)) -> (X | Y) llvm-svn: 308104
* [InstCombine] Move 4 test cases from a test that didn't use FileCheck and ↵Craig Topper2017-07-152-34/+48
| | | | | | merge them into a existing test file. NFC llvm-svn: 308103
* [InstCombine] add tests for (1 << x) & 1 --> zext(x == 0) ; NFCSanjay Patel2017-07-151-0/+72
| | | | | | | | | This fold hit the trifecta: 1. It was untested. 2. It oversteps (multiuse is not checked, so increases instruction count). 3. It is incomplete (doesn't work for vectors). llvm-svn: 308102
* [cxx_status] Fix typos.Richard Smith2017-07-151-2/+2
| | | | llvm-svn: 308101
* [wasm] Update two tests for r308025 which causes scheduling changes dueChandler Carruth2017-07-152-10/+9
| | | | | | to the newly improved AA information. llvm-svn: 308100
* [cxx_status] Add approved Toronto WG21 motions.Richard Smith2017-07-151-10/+71
| | | | llvm-svn: 308099
* [InstCombine] allow (0 - x) & 1 --> x & 1 for vectorsSanjay Patel2017-07-152-8/+6
| | | | llvm-svn: 308098
* Update issues moved in TorontoMarshall Clow2017-07-151-1/+5
| | | | llvm-svn: 308097
* [InstCombine] remove dead code/tests; NFCISanjay Patel2017-07-152-65/+0
| | | | | | | These patterns and tests were added to InstSimplify with: https://reviews.llvm.org/rL303004 llvm-svn: 308096
* Revert r308078 (and subsequent tweak in r308079) which introduces a testChandler Carruth2017-07-154-100/+4
| | | | | | | | | that appears to exhibit non-determinism and is flaking on the bots pretty consistently. r308078: [ThinLTO] Ensure we always select the same function copy to import r308079: Require asserts in new test that uses debug flag llvm-svn: 308095
* [LoopInterchange] Add some optimization remarks.Florian Hahn2017-07-152-9/+330
| | | | | | | | | | | | Reviewers: anemet, karthikthecool, blitz.opensource Reviewed By: anemet Subscribers: mzolotukhin, llvm-commits Differential Revision: https://reviews.llvm.org/D35122 llvm-svn: 308094
* [Polly] Translate Scop::DomainMap to islppTobias Grosser2017-07-152-83/+65
| | | | | | | | | | | | | | Reviewers: grosser, Meinersbur, bollu Subscribers: pollydev Tags: #polly Contributed-by: Nandini Singhal <cs15mtech01004@iith.ac.in> Differential Revision: https://reviews.llvm.org/D35453 llvm-svn: 308093
* Use ARC parsing rules for ns_returns_retained in MRC so that code canJohn McCall2017-07-159-47/+107
| | | | | | | | be shared without warnings. Build AttributedTypes to leave breadcrumbs for tools like the static analyzer. Warn about attempting to use the attribute with incompatible return types. llvm-svn: 308092
* [Bash-autocompletion] Fixed a bug on bashYuka Takahashi2017-07-151-4/+7
| | | | | | | | Summary: Maybe I mismerged when merging previous commits by hand. Differential Revision: https://reviews.llvm.org/D35448 llvm-svn: 308091
* [docs] AliasAnalysis: clarify that PartialAlias doesn't enforceNuno Lopes2017-07-151-1/+2
| | | | | | | | | objects to start at the same address As discussed on the ML, there's consensus that this is what the implementations do and it seems sensible. llvm-svn: 308090
* [Polly] Use Isl c++ for InvalidDomainMapTobias Grosser2017-07-153-65/+50
| | | | | | | | | | | | | | Reviewers: grosser, Meinersbur, bollu Subscribers: maxf, pollydev Tags: #polly Contributed-by: Nandini Singhal <cs15mtech01004@iith.ac.in> Differential Revision: https://reviews.llvm.org/D35308 llvm-svn: 308089
* [PM/LCG] Teach the LazyCallGraph to maintain reference edges from everyChandler Carruth2017-07-157-33/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | function to every defined function known to LLVM as a library function. LLVM can introduce calls to these functions either by replacing other library calls or by recognizing patterns (such as memset_pattern or vector math patterns) and replacing those with calls. When these library functions are actually defined in the module, we need to have reference edges to them initially so that we visit them during the CGSCC walk in the right order and can effectively rebuild the call graph afterward. This was discovered when building code with Fortify enabled as that is a common case of both inline definitions of library calls and simplifications of code into calling them. This can in extreme cases of LTO-ing with libc introduce *many* more reference edges. I discussed a bunch of different options with folks but all of them are unsatisfying. They either make the graph operations substantially more complex even when there are *no* defined libfuncs, or they introduce some other complexity into the callgraph. So this patch goes with the simplest possible solution of actual synthetic reference edges. If this proves to be a memory problem, I'm happy to implement one of the clever techniques to save memory here. llvm-svn: 308088
* [mips] Handle the `long-calls` feature flags in the MIPS backendSimon Atanasyan2017-07-154-0/+79
| | | | | | | | | | If the `long-calls` feature flags is enabled, disable use of the `jal` instruction. Instead of that call a function by by first loading its address into a register, and then using the contents of that register. Differential revision: https://reviews.llvm.org/D35168 llvm-svn: 308087
* SystemZCodeGen: Update libdeps. r308024 introduced LoopDataPrefetchPass.NAKAMURA Takumi2017-07-151-1/+1
| | | | llvm-svn: 308086
* ClangApplyReplacementsTests: Add clangBasic in libdeps.NAKAMURA Takumi2017-07-151-0/+1
| | | | | | r308015 introduced clangBasic to instantiate Diagnostics &c, llvm-svn: 308085
* clang/test/FixIt/format.m: Tweak for i686, where ssize_t is int. (r308067)NAKAMURA Takumi2017-07-151-2/+2
| | | | llvm-svn: 308084
* bpf: fix a compilation bug due to unused variable for release buildYonghong Song2017-07-151-2/+1
| | | | | Signed-off-by: Yonghong Song <yhs@fb.com> llvm-svn: 308083
* AMDGPU: Return correct type during argument loweringMatt Arsenault2017-07-154-0/+74
| | | | | | | | | | | | | | | | | | | The type needs to be casted back to the original argument type. Fixes an assert that for some reason is only run when using -debug. Includes an additional combine to avoid test regressions from having conversions mixed with multiple Assert[SZ]ext nodes. On subtargets where i16 is legal, this was producing an i32 register with an i16 AssertZExt, truncated to i16 with another i8 AssertZExt. t2: i32,ch = CopyFromReg t0, Register:i32 %vreg0 t3: i16 = truncate t2 t5: i16 = AssertZext t3, ValueType:ch:i8 t6: i8 = truncate t5 t7: i32 = zero_extend t6 llvm-svn: 308082
* [SLPVectorizer] Add an extra parameter to tryScheduleBundle function, NFCI.Dinar Temirbulatov2017-07-151-6/+6
| | | | llvm-svn: 308081
* bpf: generate better lowering code for certain select/setcc instructionsYonghong Song2017-07-154-28/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, for code like below, === inner_map = bpf_map_lookup_elem(outer_map, &port_key); if (!inner_map) { inner_map = &fallback_map; } === the compiler generates (pseudo) code like the below: === I1: r1 = bpf_map_lookup_elem(outer_map, &port_key); I2: r2 = 0 I3: if (r1 == r2) I4: r6 = &fallback_map I5: ... === During kernel verification process, After I1, r1 holds a state map_ptr_or_null. If I3 condition is not taken (path [I1, I2, I3, I5]), supposedly r1 should become map_ptr. Unfortunately, kernel does not recognize this pattern and r1 remains map_ptr_or_null at insn I5. This will cause verificaiton failure later on. Kernel, however, is able to recognize pattern "if (r1 == 0)" properly and give a map_ptr state to r1 in the above case. LLVM here generates suboptimal code which causes kernel verification failure. This patch fixes the issue by changing BPF insn pattern matching and lowering to generate proper codes if the righthand parameter of the above condition is a constant. A test case is also added. Signed-off-by: Yonghong Song <yhs@fb.com> llvm-svn: 308080
* Require asserts in new test that uses debug flagTeresa Johnson2017-07-151-0/+3
| | | | | | This should fix bot failures from r308078. llvm-svn: 308079
* [ThinLTO] Ensure we always select the same function copy to importTeresa Johnson2017-07-154-4/+97
| | | | | | | | | | | | | | | | | | | Summary: Check if the first eligible callee is under the instruction threshold. Checking this on the first eligible callee ensures that we don't end up selecting different callees to import when we invoke this routine with different thresholds due to reaching the callee via paths that are shallower or hotter (when there are multiple copies, i.e. with weak or linkonce linkage). We don't want to leave the decision of which copy to import up to the backend. Reviewers: mehdi_amini Subscribers: inglorion, fhahn, llvm-commits Differential Revision: https://reviews.llvm.org/D35436 llvm-svn: 308078
* [ODRHash] Revert r307743 which reverted r307720Richard Trieu2017-07-154-52/+167
| | | | | | | Reapply r307720 to allow processing of constructors and destructors. Reuse the diagnostics for CXXMethodDecl for them. llvm-svn: 308077
* [TTI] Refine the cost of EXT in getUserCost()Haicheng Wu2017-07-1510-19/+657
| | | | | | | | | | | Now, getUserCost() only checks the src and dst types of EXT to decide it is free or not. This change first checks the types, then calls isExtFreeImpl(), and check if EXT can form ExtLoad at last. Currently, only AArch64 has customized implementation of isExtFreeImpl() to check if EXT can be folded into its use. Differential Revision: https://reviews.llvm.org/D34458 llvm-svn: 308076
* [libFuzzer] remove stale codeKostya Serebryany2017-07-152-9/+4
| | | | llvm-svn: 308075
* [Dominators] Fix reachable visitation and reenable a unit testJakub Kuderski2017-07-152-2/+28
| | | | | | | | This fixes a minor bug in insertion to a reachable node that caused DominatorTree.InsertDeleteExhaustive flakiness. The patch also adds a new testcase for this exact failure. llvm-svn: 308074
* [clang] Fix format test Alexander Shaposhnikov2017-07-151-3/+3
| | | | | | | | | This diff makes the test FixIt/format.m more robust. The issue was caught by the build bot clang-cmake-thumbv7-a15. Test plan: make check-all llvm-svn: 308073
* [compiler-rt] [CMake] Build compiler-rt with no optimizations if the flag ↵George Karpenkov2017-07-151-3/+9
| | | | | | | | says so Differential Revision: https://reviews.llvm.org/D35400 llvm-svn: 308072
* Try to fix modules buildMatthias Braun2017-07-151-0/+1
| | | | | | | | | | | | Module builds somehow report an ambiguity between clang::Diagnostic and clang::Tooling::Diagnostic. It seems as if one of the additional headers brought in by the module brings the clang namespace to the toplevel. I could not find out the reason for that, so for now I go with the simple fix to bring the build back to green. rdar://33321397 llvm-svn: 308071
* [Dominators] Temporarily disable a flaky unit testJakub Kuderski2017-07-141-1/+1
| | | | | | | | The DominatorTree.InsertDeleteExhaustive uses a RNG with a constant seed to generate different sequences of updates. The test fails on some buildbots and this patch disables it for now. llvm-svn: 308070
* [libFuzzer] Allow non-fuzzer args after -ignore_remaining_args=1Justin Bogner2017-07-147-13/+72
| | | | | | | | | | | With this change, libFuzzer will ignore any arguments after a sigil argument, but it will preserve these arguments at the end of the command line when launching subprocesses. Using this, its possible to handle positional and single-dash arguments to the program under test by discarding everything up to -ignore_remaining_args=1 in LLVMFuzzerInitialize. llvm-svn: 308069
* Add missing space to commentAdrian Prantl2017-07-141-4/+4
| | | | llvm-svn: 308068
* [clang] Fix handling of "%zd" format specifierAlexander Shaposhnikov2017-07-142-3/+15
| | | | | | | | | | | | | This diff addresses FIXME in lib/Analysis/PrintfFormatString.cpp and makes PrintfSpecifier::getArgType return the correct type. In particular, this change enables Clang to emit a warning on incorrect using of "%zd"/"%zn" format specifiers. Differential revision: https://reviews.llvm.org/D35427 Test plan: make check-all llvm-svn: 308067
* Avoid using OutputSections::Sections.Rafael Espindola2017-07-141-6/+10
| | | | | | This code runs after clearOutputSections. llvm-svn: 308066
* [Dominators] Remove an extra semicolon and add a missing include.Jakub Kuderski2017-07-141-1/+2
| | | | llvm-svn: 308065
* [Sanitizers] ASan and LSan allocator set errno on failure.Alex Shlyapnikov2017-07-143-18/+57
| | | | | | | | | | | | | | | | | | | Summary: Set proper errno code on alloction failures and change some implementations to satisfy their man-specified requirements: LSan: valloc and memalign ASan: pvalloc, memalign and posix_memalign Changing both allocators in one patch since LSan depends on ASan allocator in some configurations. Reviewers: vitalybuka Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D35440 llvm-svn: 308064
* [Sanitizers] LSan allocator set errno on failure.Alex Shlyapnikov2017-07-142-11/+33
| | | | | | | Set proper errno code on alloction failures and change valloc and memalign implementations to satisfy their man-specified requirements. llvm-svn: 308063
* [Dominators] Implement incremental deletionsJakub Kuderski2017-07-145-11/+396
| | | | | | | | | | | | | | | | | Summary: This patch implements incremental edge deletions. It also makes DominatorTreeBase store a pointer to the parent function. The parent function is needed to perform full rebuilts during some deletions, but it is also used to verify that inserted and deleted edges come from the same function. Reviewers: dberlin, davide, grosser, sanjoy, brzycki Reviewed By: dberlin Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35342 llvm-svn: 308062
* [libFuzzer] fix stats during mergeKostya Serebryany2017-07-141-1/+0
| | | | llvm-svn: 308061
* [AArch64] Avoid selecting XZR inline ASM memory operandYi Kong2017-07-143-5/+22
| | | | | | | | | | | | | Restricting register class to PointerRegClass for memory operands. Also fix the PointerRegClass for AArch64 from GPR64 to GPR64sp, since XZR cannot hold a memory pointer while SP is. Fixes PR33134. Differential Revision: https://reviews.llvm.org/D34999 llvm-svn: 308060
* [AArch64][Falkor] Avoid HW prefetcher tag collisions (step 1)Geoff Berry2017-07-1410-6/+299
| | | | | | | | | | | | | | | | | | | | Summary: This patch is the first step in reducing HW prefetcher instruction tag collisions in inner loops for Falkor. It adds a pass that annotates IR loads with metadata to indicate that they are known to be strided loads, and adds a target lowering hook that translates this metadata to a target-specific MachineMemOperand flag. A follow on change will use this MachineMemOperand flag to re-write instructions to reduce tag collisions. Reviewers: mcrosier, t.p.northover Subscribers: aemerson, rengolin, mgorny, javed.absar, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D34963 llvm-svn: 308059
* [Dominators] Add a missing includeJakub Kuderski2017-07-141-0/+1
| | | | llvm-svn: 308058
* Pass OutputSectionCommand to getOSThunkSec. NFC.Rafael Espindola2017-07-142-5/+5
| | | | llvm-svn: 308057
* Pass OutputSectionCommand to forEachExecInputSection's callback.Rafael Espindola2017-07-142-7/+7
| | | | | | NFC, just makes the OutputSectionCommand available. llvm-svn: 308056
* [AMDGPU] Throw away more dead code. NFCI.Davide Italiano2017-07-141-16/+0
| | | | llvm-svn: 308055
OpenPOWER on IntegriCloud