summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Work around a bug in the C++ expression parser.Jim Ingham2017-10-051-47/+47
| | | | | | | | | | | | When the expression parser does name resolution for local variables in C++ closures it doesn't give the local name priority over other global symbols of the same name. heap.py uses "info" which is a fairly common name, and so the commands in it fail. This is a workaround, just use lldb_info not info. <rdar://problem/34026140> llvm-svn: 314959
* Another silly little thing you can do with Python commands.Jim Ingham2017-10-051-0/+24
| | | | | | | | | Sometimes you want to step along and print a local each time as you go. You can do that with stop hooks, but that's a little heavy-weight. This is a sketch of a command that steps and then does "frame variable" on all its arguments. llvm-svn: 314958
* Add testcase for r314956:Richard Smith2017-10-051-0/+43
| | | | | PR33924: Merge block-scope anonymous declarations if there are multiple definitions of the enclosing function. llvm-svn: 314957
* PR33924: Merge block-scope anonymous declarations if there are multiple ↵Richard Smith2017-10-052-2/+3
| | | | | | definitions of the enclosing function. llvm-svn: 314956
* Remove PendingBody mechanism for function and ObjC method deserialization.Richard Smith2017-10-053-77/+76
| | | | | | | | | | | | In its place, track on the canonical function declaration whether there is a declaration with a body (and if so, which one). This brings function definition handling in line with what we do in all other contexts, and is necessary to allow us to merge declarations within multiple definitions of the same function (eg, PR33924). No functionality change intended. llvm-svn: 314955
* Refactor duplicated code.Rafael Espindola2017-10-052-5/+5
| | | | | | | Since VisibleToRegularObj is weaker than LinkerRedefined, this should have no functionality change. llvm-svn: 314954
* [X86] Fix some Clang-tidy modernize-use-using and Include What You Use ↵Eugene Zelenko2017-10-059-132/+239
| | | | | | warnings; other minor fixes (NFC). llvm-svn: 314953
* AMDGPU: Add comment about clampsMatt Arsenault2017-10-051-0/+2
| | | | llvm-svn: 314952
* AMDGPU: Do not fold clamp instructions when sources are differentMatt Arsenault2017-10-052-0/+23
| | | | | | Patch by hakzsam (Samuel Pitoiset) llvm-svn: 314951
* [libc++] Move cache variable definition. NFCShoaib Meenai2017-10-041-1/+1
| | | | | | Move it to where the other ABI cache variables/options are defined. llvm-svn: 314950
* [libc++] Allow users to explicitly specify ABIShoaib Meenai2017-10-043-5/+19
| | | | | | | | | | libc++'s current heuristic for detecting Itanium vs. Microsoft ABI falls short in some cases. For example, it will detect windows-itanium targets as using the Microsoft ABI, since they set `_MSC_VER` (for compatibility with Microsoft headers). Leave the current heuristic in place by default but also allow users to explicitly specify the ABI if need be. llvm-svn: 314949
* [sanitizer] Move cxx-abi library earlier in link flags.Evgeniy Stepanov2017-10-043-9/+3
| | | | | | | | | | | | | | | | | | | | Summary: This change moves cxx-abi library in asan/ubsan/dd link command line ahead of other libraries, such as pthread/rt/dl/c/gcc. Given that cxx-abi may be the full libstdc++/libc++, it makes sense for it to be ahead of libc and libgcc, at least. The real motivation is Android, where in the arm32 NDK toolchain libstdc++.a is actually a linker script that tries to sneak LLVM's libunwind ahead of libgcc's. Wrong library order breaks unwinding. Reviewers: srhines, danalbert Subscribers: aemerson, kubamracek, mgorny, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D38520 llvm-svn: 314948
* Fix accidental assignment inside test assertsEric Fiselier2017-10-042-2/+2
| | | | llvm-svn: 314947
* [libc++] Add site config option for ABI macrosShoaib Meenai2017-10-044-1/+23
| | | | | | | | | | | | | | | | | Some ABI macros affect headers, so it's nice to have a site config option for them. Add a LIBCXX_ABI_DEFINES cmake macro to allow specifying a list of ABI macros to define in the site config. The primary design constraint (as discussed with Eric on IRC a while back) was to not have to repeat the ABI macro names in cmake, which only leaves a free-form cmake list as an option. A somewhat unfortunate consequence is that we can't verify that the ABI macros being defined actually exist, though we can at least perform some basic sanity checking, since all the ABI macros begin with _LIBCPP_ABI_. Differential Revision: https://reviews.llvm.org/D36719 llvm-svn: 314946
* [InstCombine] Improve support for ashr in foldICmpAndShiftCraig Topper2017-10-042-9/+56
| | | | | | | | We can support ashr similar to lshr, if we know that none of the shifted in bits are used. In that case SimplifyDemandedBits would normally convert it to lshr. But that conversion doesn't happen if the shift has additional users. Differential Revision: https://reviews.llvm.org/D38521 llvm-svn: 314945
* AMDGPU: Fix not accounting for instruction size in bundlesMatt Arsenault2017-10-043-1/+68
| | | | | | | These were counted as 0. Fixes branch limit exceeded errors in some large programs. llvm-svn: 314944
* AMDGPU: Correctly set EI_OSABI based on the osKonstantin Zhuravlyov2017-10-046-10/+70
| | | | | | Differential Revision: https://reviews.llvm.org/D38555 llvm-svn: 314943
* clang-format file.Adrian Prantl2017-10-041-30/+27
| | | | llvm-svn: 314942
* delete commented out code.Adrian Prantl2017-10-041-2/+0
| | | | llvm-svn: 314941
* Initial cut at infastructure for fuzzing support for OSS-fuzzMarshall Clow2017-10-048-0/+483
| | | | llvm-svn: 314940
* Fix 'section' warning behavior with tentatively-defined valuesErich Keane2017-10-042-1/+10
| | | | | | | | | As reported on cfe-commits, r314262 resulted in tentatively-defined variables not being excluded for the warning. Patch By: Elizabeth Andrews llvm-svn: 314939
* Do not call Loop::getName on possibly dead loopsSanjoy Das2017-10-042-10/+12
| | | | | | This fixes PR34832. llvm-svn: 314938
* [MachineBlockPlacement] Make sure PreferredLoopExit is cleared everytime new ↵Xin Tong2017-10-041-0/+10
| | | | | | | | | | | | | | loop is processed Summary: Rotate on exit that actually exits the current loop. Reviewers: davidxl, danielcdh, iteratee, chandlerc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38563 llvm-svn: 314937
* Fix a -Wparentheses warning. NFC.Hans Wennborg2017-10-041-1/+1
| | | | llvm-svn: 314936
* Convert an APInt to int64_t properly in TTI::getGEPCost().Justin Lebar2017-10-042-2/+5
| | | | | | | | | | | | | | | | | Summary: If the pointer width is 32 bits and the calculated GEP offset is negative, we call APInt::getLimitedValue(), which does a *zero*-extension of the offset. That's wrong -- we should do an sext. Fixes a bug introduced in rL314362 and found by Evgeny Astigeevich. Reviewers: efriedma Subscribers: sanjoy, javed.absar, llvm-commits, eastig Differential Revision: https://reviews.llvm.org/D38557 llvm-svn: 314935
* [LoopDeletion] Move deleteDeadLoop to to LoopUtils. NFCMarcello Maggioni2017-10-043-134/+138
| | | | llvm-svn: 314934
* Revert "Revert r314810: Use sched_getaffinity instead of ↵Rafael Espindola2017-10-041-2/+2
| | | | | | | | | | std::thread::hardware_concurrency." This reverts commit r314924. The required llvm patch was recommitted. llvm-svn: 314933
* [OpenCL] Clean up and add missing fields for block structYaxun Liu2017-10-047-128/+276
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently block is translated to a structure equivalent to struct Block { void *isa; int flags; int reserved; void *invoke; void *descriptor; }; Except invoke, which is the pointer to the block invoke function, all other fields are useless for OpenCL, which clutter the IR and also waste memory since the block struct is passed to the block invoke function as argument. On the other hand, the size and alignment of the block struct is not stored in the struct, which causes difficulty to implement __enqueue_kernel as library function, since the library function needs to know the size and alignment of the argument which needs to be passed to the kernel. This patch removes the useless fields from the block struct and adds size and align fields. The equivalent block struct will become struct Block { int size; int align; generic void *invoke; /* custom fields */ }; It also changes the pointer to the invoke function to be a generic pointer since the address space of a function may not be private on certain targets. Differential Revision: https://reviews.llvm.org/D37822 llvm-svn: 314932
* Bring r314809 back.Rafael Espindola2017-10-048-8/+40
| | | | | | | | | | | | | | | | | | | | | But now include a check for CPU_COUNT so we still build on 10 year old versions of glibc. Original message: Use sched_getaffinity instead of std::thread::hardware_concurrency. The issue with std::thread::hardware_concurrency is that it forwards to libc and some implementations (like glibc) don't take thread affinity into consideration. With this change a llvm program that can execute in only 2 cores will use 2 threads, even if the machine has 32 cores. This makes benchmarking a lot easier, but should also help if someone doesn't want to use all cores for compilation for example. llvm-svn: 314931
* [SimplifyCFG] put the optional assumption cache pointer in the options ↵Sanjay Patel2017-10-046-59/+54
| | | | | | | | | | | | struct; NFCI This is a follow-up to https://reviews.llvm.org/D38138. I fixed the capitalization of some functions because we're changing those lines anyway and that helped verify that we weren't accidentally dropping any options by using default param values. llvm-svn: 314930
* LLDB cmake fix: define LLDB_CONFIGURATION_xxx based on the build typeLeonard Mosescu2017-10-042-9/+7
| | | | | | | | | | Neither LLDB_CONFIGURATION_DEBUG nor LLDB_CONFIGURATION_RELEASE were ever set in the CMake LLDB project. Also cleaned up a questionable #ifdef in SharingPtr.h, removing all the references to LLDB_CONFIGURATION_BUILD_AND_INTEGRATION in the process. Differential Revision: https://reviews.llvm.org/D38552 llvm-svn: 314929
* Recommit r314561 after fixing msan build failureXinliang David Li2017-10-046-0/+536
| | | | | | | (trial 2) Incoming val defined by terminator instruction which also requires bitcasts can not be handled. llvm-svn: 314928
* [TargetTransformInfo] Check if function pointer is valid before calling ↵Guozhi Wei2017-10-042-1/+7
| | | | | | | | | | isLoweredToCall Function isLoweredToCall can only accept non-null function pointer, but a function pointer can be null for indirect function call. So check it before calling isLoweredToCall from getInstructionLatency. Differential Revision: https://reviews.llvm.org/D38204 llvm-svn: 314927
* [Hexagon] Move getHexagonTargetFeatures to Hexagon.cpp (NFC)Sumanth Gundapaneni2017-10-043-16/+21
| | | | | | Differential Revision: https://reviews.llvm.org/D38548 llvm-svn: 314926
* Add vstore_half helpers for ptxJeroen Ketema2017-10-044-0/+38
| | | | | Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 314925
* Revert r314810: Use sched_getaffinity instead of ↵Rui Ueyama2017-10-041-2/+2
| | | | | | | | std::thread::hardware_concurrency. This reverts commit r314810 because r314809 was reverted. llvm-svn: 314924
* Recommit : Use the basic cost if a GEP is not used as addressing modeJun Bum Lim2017-10-0410-10/+139
| | | | | | | | | | | | | | Recommitting r314517 with the fix for handling ConstantExpr. Original commit message: Currently, getGEPCost() returns TCC_FREE whenever a GEP is a legal addressing mode in the target. However, since it doesn't check its actual users, it will return FREE even in cases where the GEP cannot be folded away as a part of actual addressing mode. For example, if an user of the GEP is a call instruction taking the GEP as a parameter, then the GEP may not be folded in isel. llvm-svn: 314923
* Revert D38481 due to missing cmake check for CPU_COUNTDaniel Neilson2017-10-048-35/+8
| | | | | | | | | | | | | Summary: This reverts D38481. The change breaks systems with older versions of glibc. It injects a use of CPU_COUNT() from sched.h without checking to ensure that the function exists first. Reviewers: Subscribers: llvm-svn: 314922
* [X86][AVX] Improve (i8 bitcast (v8i1 x)) handling for v8i64/v8f64 512-bit ↵Simon Pilgrim2017-10-042-20/+11
| | | | | | | | vector compare results. AVX1/AVX2 targets were missing a chance to use vmovmskps for v8f32/v8i32 results for bool vector bitcasts llvm-svn: 314921
* [Hexagon] Add a member Subtarget to HexagonInstrInfo, NFCKrzysztof Parzyszek2017-10-042-51/+25
| | | | llvm-svn: 314920
* Revert r314886 "[X86] Improvement in CodeGen instruction selection for LEAs ↵Hans Wennborg2017-10-0420-639/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (re-applying post required revision changes.)" It broke the Chromium / SQLite build; see PR34830. > Summary: > 1/ Operand folding during complex pattern matching for LEAs has been > extended, such that it promotes Scale to accommodate similar operand > appearing in the DAG. > e.g. > T1 = A + B > T2 = T1 + 10 > T3 = T2 + A > For above DAG rooted at T3, X86AddressMode will no look like > Base = B , Index = A , Scale = 2 , Disp = 10 > > 2/ During OptimizeLEAPass down the pipeline factorization is now performed over LEAs > so that if there is an opportunity then complex LEAs (having 3 operands) > could be factored out. > e.g. > leal 1(%rax,%rcx,1), %rdx > leal 1(%rax,%rcx,2), %rcx > will be factored as following > leal 1(%rax,%rcx,1), %rdx > leal (%rdx,%rcx) , %edx > > 3/ Aggressive operand folding for AM based selection for LEAs is sensitive to loops, > thus avoiding creation of any complex LEAs within a loop. > > Reviewers: lsaba, RKSimon, craig.topper, qcolombet, jmolloy > > Reviewed By: lsaba > > Subscribers: jmolloy, spatel, igorb, llvm-commits > > Differential Revision: https://reviews.llvm.org/D35014 llvm-svn: 314919
* [llvm-objcopy] Fix major layout bugs in llvm-objcopyJake Ehrlich2017-10-043-20/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | Somehow a few massive errors slipped though the cracks of testing. 1. The code in Segment::finalize was left over from the old layout algorithm. In certain situations this would cause very strange issues with segment layout. For instance in the shift-segments.test case it would cause the second segment to have the same offset as the first. 2. In debugging this I discovered another issue. Namely section alignment was not being computed based on Section->Align but instead Section->Offset which is bizarre and makes no sense. I have no clue how it worked in the first place. This issue is also fixed 3. Fixing #2 exposed a bug where things were not being written past the end of the file that technically should have been. This was because in certain cases (like overlapping-segments) the end of the file wouldn't always be bumped if the offset could be chosen relative to an existing segment that already had it's offset chosen. For fully nested segments this is fine but for overlapping segments this leaves the end of the file short. So I changed how the offset is bumped when looping though segments. Differential Revision: https://reviews.llvm.org/D38436 llvm-svn: 314918
* [Dominators] Take fast path when applying <=1 updatesJakub Kuderski2017-10-042-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch teaches `DT.applyUpdates` to take the fast when applying zero or just one update and makes it not run the internal batch updater machinery. With this patch, it should no longer make sense to have a special check in user's code that checks the update sequence size before applying them, e.g. ``` if (!MyUpdates.empty()) DT.applyUpdates(MyUpdates); ``` or ``` if (MyUpdates.size() == 1) if (...) DT.insertEdge(...) else DT.deleteEdge(...) ``` Reviewers: dberlin, brzycki, davide, grosser, sanjoy Reviewed By: dberlin, davide Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38541 llvm-svn: 314917
* [X86][SSE] Add support for lowering v8i16 binary shuffles to PACKSS/PACKUSSimon Pilgrim2017-10-046-167/+96
| | | | | | Missed in D38472 llvm-svn: 314916
* [test] Fix append_path in the empty caseFrancis Ricci2017-10-041-3/+7
| | | | | | | | | | | | | | | | Summary: normpath() was being called on an empty string and appended to the environment variable in the case where the environment variable was unset. This led to ":." being appended to the path, since normpath() of an empty string is '.', presumably to represent cwd. Reviewers: zturner, sqlbyme, modocache Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38542 llvm-svn: 314915
* [X86] Redefine MOVSS/MOVSD instructions to take VR128 regclass as input ↵Craig Topper2017-10-0416-679/+635
| | | | | | | | | | | | | | instead of FR32/FR64 This patch redefines the MOVSS/MOVSD instructions to take VR128 as its second input. This allows the MOVSS/SD->BLEND commute to work without requiring a COPY to be inserted. This should fix PR33079 Overall this looks to be an improvement in the generated code. I haven't checked the EXPENSIVE_CHECKS build but I'll do that and update with results. Differential Revision: https://reviews.llvm.org/D38449 llvm-svn: 314914
* [clang-tidy] Emit note for variable declaration that are later deletedJonas Toth2017-10-042-4/+16
| | | | | | | | | | This patch introduces a note for variable declaration that are later deleted. Adds FIXME notes for possible automatic type-rewriting positions as well. Reviewed by aaron.ballman Differential: https://reviews.llvm.org/D38411 llvm-svn: 314913
* "[ARM] Mark flaky test MachineBranchProb.ll unsupported again for ARM/AArch64"Balaram Makam2017-10-041-0/+3
| | | | | | | | r314857 changed the CFG that resulted in the flaky test MachineBranchProb.ll to fail the bots again. Marking it as unsupported for ARM/AArch64 again until we find the cause. llvm-svn: 314912
* bpf: fix an insn encoding issue for neg insnYonghong Song2017-10-043-5/+3
| | | | | Signed-off-by: Yonghong Song <yhs@fb.com> llvm-svn: 314911
* [analyzer] Fix autodetection of binding types.Artem Dergachev2017-10-044-9/+43
| | | | | | | | | | | | | | | | | | | | | | | In ProgramState::getSVal(Location, Type) API which dereferences a pointer value, when the optional Type parameter is not supplied and the Location is not typed, type should have been guessed on a best-effort basis by inspecting the Location more deeply. However, this never worked; the auto-detected type was instead a pointer type to the correct type. Fixed the issue and added various test cases to demonstrate which parts of the analyzer were affected (uninitialized pointer argument checker, C++ trivial copy modeling, Google test API modeling checker). Additionally, autodetected void types are automatically replaced with char, in order to simplify checker APIs. Which means that if the location is a void pointer, getSVal() would read the first byte through this pointer and return its symbolic value. Fixes pr34305. Differential Revision: https://reviews.llvm.org/D38358 llvm-svn: 314910
OpenPOWER on IntegriCloud