summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove implementation of getNumberOfIterations from header [NFC]Tobias Grosser2015-04-272-45/+39
| | | | | | | | | | We moved this implementation into the header file to share it between the CLooG and isl code generator. As the CLooG code generator was dropped, the implementation can be folded back into the .cpp file. No functional change intended. llvm-svn: 235860
* Fix double stdout/stderr output from CLI commands in MI mode (MI)Ilia K2015-04-271-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch fixes stdout/stderr output that printed twice for CLI commands: was: ``` (gdb) target create ~/p/hello Current executable set to '~/p/hello' (x86_64). Current executable set to '~/p/hello' (x86_64). ^done (gdb) ``` now: ``` (gdb) target create ~/p/hello Current executable set to '~/p/hello' (x86_64). ^done (gdb) ``` Test Plan: ./dotest.py -v --executable $BUILDDIR/bin/lldb tools/lldb-mi/ Reviewers: abidh Reviewed By: abidh Subscribers: lldb-commits, abidh Differential Revision: http://reviews.llvm.org/D9277 llvm-svn: 235857
* Constfold insertelement to undef when index is out-of-boundsPawel Bylica2015-04-273-12/+48
| | | | | | | | | | | | | | | | | | | Summary: This patch adds constant folding of insertelement instruction to undef value when index operand is constant and is not less than vector size or is undef. InstCombine does not support this case, but I'm happy to add it there also if this change is accepted. Test Plan: Unittests and regression tests for ConstProp pass. Reviewers: majnemer Reviewed By: majnemer Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9287 llvm-svn: 235854
* Add missing libraries to unittest linkPavel Labath2015-04-271-1/+1
| | | | | | | | | | | | | | | | Summary: Currently, linking of the unittests fails on linux because it is missing a bunch of symbols from libedit, curses, etc. This fixes the build by adding the correct dependencies. Test Plan: Linking works, unit tests run. Reviewers: zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9244 llvm-svn: 235853
* Fix register read callback in linux-arm single steppingPavel Labath2015-04-271-21/+33
| | | | | | | | | | | | | | | | | | | | | The previous read callback always read the value of the register what caused problems when the emulator wrote some value into a register and then expected to read the same value back. This CL add a register value cache into the callbacks to return the correct value after a register write also. Test Plan: Stepping over BL/BLX instruction works on android-arm if the instruction set isn't change (other, unrelated patch will come for the case when we move to an other instruction set) Reviewers: omjavaid, sas, clayborg Reviewed By: clayborg Subscribers: labath, tberghammer, rengolin, aemerson, lldb-commits Differential Revision: http://reviews.llvm.org/D9187 From: Tamas Berghammer <tberghammer@google.com> llvm-svn: 235852
* XFAIL two mi tests on gcc to stabilise build botsPavel Labath2015-04-271-0/+2
| | | | llvm-svn: 235851
* [OPENMP] Simplified iteration over clauses, NFC.Alexey Bataev2015-04-274-91/+38
| | | | llvm-svn: 235838
* [X86][SSE] Add v16i8/v32i8 multiplication supportSimon Pilgrim2015-04-273-4/+221
| | | | | | | | | | Patch to allow int8 vectors to be multiplied on the SSE unit instead of being scalarized. The patch sign extends the i8 lanes to i16, uses the SSE2 pmullw multiplication instruction, then packs the lower byte from each result. Differential Revision: http://reviews.llvm.org/D9115 llvm-svn: 235837
* [OPENMP] Codegen for 'taskwait' directive.Alexey Bataev2015-04-274-2/+56
| | | | | | | | Emit the following code for 'taskwait' directive within tied task: call i32 @__kmpc_omp_taskwait(<loc>, i32 <thread_id>); Differential Revision: http://reviews.llvm.org/D9245 llvm-svn: 235836
* [OPENMP] Codegen for 'reduction' clause in 'sections' directive.Alexey Bataev2015-04-272-6/+489
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Emit a code for reduction clause. Next code should be emitted for reductions: static kmp_critical_name lock = { 0 }; void reduce_func(void *lhs[<n>], void *rhs[<n>]) { *(Type0*)lhs[0] = ReductionOperation0(*(Type0*)lhs[0], *(Type0*)rhs[0]); ... *(Type<n>-1*)lhs[<n>-1] = ReductionOperation<n>-1(*(Type<n>-1*)lhs[<n>-1], *(Type<n>-1*)rhs[<n>-1]); } ... void *RedList[<n>] = {&<RHSExprs>[0], ..., &<RHSExprs>[<n>-1]}; switch (__kmpc_reduce{_nowait}(<loc>, <gtid>, <n>, sizeof(RedList), RedList, reduce_func, &<lock>)) { case 1: <LHSExprs>[0] = ReductionOperation0(*<LHSExprs>[0], *<RHSExprs>[0]); ... <LHSExprs>[<n>-1] = ReductionOperation<n>-1(*<LHSExprs>[<n>-1], *<RHSExprs>[<n>-1]); __kmpc_end_reduce{_nowait}(<loc>, <gtid>, &<lock>); break; case 2: Atomic(<LHSExprs>[0] = ReductionOperation0(*<LHSExprs>[0], *<RHSExprs>[0])); ... Atomic(<LHSExprs>[<n>-1] = ReductionOperation<n>-1(*<LHSExprs>[<n>-1], *<RHSExprs>[<n>-1])); break; default:; } Reduction variables are a kind of a private variables, they have private copies, but initial values are chosen in accordance with the reduction operation. If sections directive has only single section, then original shared variables are used instead with barrier at the end of the directive. Differential Revision: http://reviews.llvm.org/D9242 llvm-svn: 235835
* [OPENMP] Codegen for 'lastprivate' clause in 'sections' directive.Alexey Bataev2015-04-272-5/+363
| | | | | | | | | | | | | | | | | | | | | | | | | #pragma omp sections lastprivate(<var>) <BODY>; This construct is translated into something like: <last_iter> = alloca i32 <init for lastprivates>; <last_iter> = 0 ; No initializer for simple variables or a default constructor is called for objects. ; For arrays perform element by element initialization by the call of the default constructor. ... OMP_FOR_START(...,<last_iter>, ..); sets <last_iter> to 1 if this is the last iteration. <BODY> ... OMP_FOR_END if (<last_iter> != 0) { <final copy for lastprivate>; Update original variable with the lastprivate value. } call __kmpc_cancel_barrier() ; an implicit barrier to avoid possible data race. If there is only one section, there is no special code generation, original shared variables are used + barrier is emitted at the end of the directive. Differential Revision: http://reviews.llvm.org/D9240 llvm-svn: 235834
* [OPENMP] Codegen for 'private' clause in 'sections' directive.Alexey Bataev2015-04-272-0/+194
| | | | | | | | | | | | | | | | | | If there are 2 or more sections in a 'section' directive the following code is generated: <default init for privates> @__kmpc_for_static_init_4(); <BODY for sections directive> @__kmpc_for_static_fini() If there is only one section, the following code is generated: if (@__kmpc_single()) { <default init for privates> @__kmpc_end_single(); } Differential Revision: http://reviews.llvm.org/D9239 llvm-svn: 235833
* [OPENMP] Codegen for 'private' clause in 'single' directive.Alexey Bataev2015-04-272-0/+183
| | | | | | | | | | | | Emit the following code for 'single' directive with 'private' clause: if (@__kmpc_single()) { <default init for privates> @__kmpc_end_single(); } Differential Revision: http://reviews.llvm.org/D9238 llvm-svn: 235832
* [MS ABI] Rephrase the mangling of array types in parametersDavid Majnemer2015-04-271-6/+5
| | | | | | Make the canonicalization of array types more consistent. llvm-svn: 235831
* libc++abi: remove unused variableSaleem Abdulrasool2015-04-271-2/+1
| | | | | | | The externC variable was set but unused. This constantly flagged a warning from gcc. Replace it with a comment until such a time that we need it. llvm-svn: 235830
* libc++abi: clear up some -Wqual-cast warningsSaleem Abdulrasool2015-04-272-3/+2
| | | | | | Cleans up cast qualifier warnings identified by GCC 4.9.2. llvm-svn: 235829
* libc++abi: silence some warningsSaleem Abdulrasool2015-04-271-1/+1
| | | | | | | | | Cleans up the -Wundef warning caused by the use of the __LITTLE_ENDIAN__ macro. Instead use `__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__`. `__BYTE_ORDER__` is defined by GCC since 4.2 and by clang. This avoids the undef case where a macro may be undefined. This has previously caught real errors in libunwind. llvm-svn: 235828
* [PerformanceTips] Italics are *word*, not _word_Philip Reames2015-04-261-3/+3
| | | | llvm-svn: 235827
* [PerformanceTips] Provide context on the impact of assume(x)Philip Reames2015-04-262-1/+10
| | | | | | Sean Silva suggested I add something here a while back. Sorry it's taken so long to get back to this. llvm-svn: 235826
* Add two new items to PerformanceTipsPhilip Reames2015-04-261-2/+17
| | | | | | | | 1) Turns out we're not great at recognizing redundant checks when one is a != and the other is an ==. This is a bug, but it's one that matters to frontend authors. 2) Frontends shouldn't use intrinsics unless strictly neccessary. This has been pretty widely proven by this point and is good to document. llvm-svn: 235825
* Make the message associated with a fatal error slightly more helpfulPhilip Reames2015-04-261-2/+10
| | | | | | Looking into 23095, my best guess is that the CodeGen library itself isn't getting linked and initialized properly. To make this slightly more obvious to consumers of LLVM, emit a different error message if we can tell that the registry is empty vs you've simply happened to name a collector which hasn't been registered. llvm-svn: 235824
* Use all available range information for parametersJohannes Doerfert2015-04-266-14/+22
| | | | | | | In the following even full-range information will help to avoid runtime checks for wrapping integers, hence we enable it now. llvm-svn: 235823
* Use the original no-wrap flags for normalized AddRecsJohannes Doerfert2015-04-263-5/+10
| | | | llvm-svn: 235822
* [RewriteStatepointsForGC] Exclude constant values from being considered live ↵Philip Reames2015-04-262-14/+74
| | | | | | | | | | | | at a safepoint There can be various constant pointers in the IR which do not get relocated at a safepoint. One example is the address of a global variable. Another example is a pointer created via inttoptr. Note that the optimizer itself likes to create such inttoptrs when locally propagating constants through dynamically dead code. To deal with this, we need to exclude uses of constants from contributing to the liveness of a safepoint which might reach that use. At some later date, it might be worth exploring what could be done to support the relocation of various special types of "constants", but that's future work. Differential Revision: http://reviews.llvm.org/D9236 llvm-svn: 235821
* Don't Place Entry Safepoints Before the llvm.frameescape() IntrinsicPhilip Reames2015-04-262-0/+36
| | | | | | | | | llvm.frameescape() intrinsic is not a real call. The intrinsic can only exist in the entry block. Inserting a gc.statepoint() before llvm.frameescape() may split the entry block, and push the intrinsic out of the entry block. Patch by: Swaroop.Sridhar@microsoft.com Differential Revision: http://reviews.llvm.org/D8910 llvm-svn: 235820
* Add SBLaunchInfo in include/lldb/API/SBDefines.h and fix spacing in ↵Ilia K2015-04-262-2/+3
| | | | | | scripts/Python/buildSwigPython.py llvm-svn: 235819
* [Sema] Do not permit binding a reference to a compound literalDavid Majnemer2015-04-262-0/+9
| | | | | | | | | We could probably make this work if we cared enough. However, we are far outside any language rules at this point. This fixes PR21834. llvm-svn: 235818
* Clean the CMIDriver (MI)Ilia K2015-04-261-5/+1
| | | | | | | | This patch does the following things: * Use CMICmnStreamStdout::TextToStdout to print (gdb) prompt in CMIDriver::InitClientIDEEclipse * Remove unnecessary inclusions llvm-svn: 235817
* [Sema] Don't allow unverified bitfields in FieldDeclsDavid Majnemer2015-04-262-1/+7
| | | | | | | | VerifyBitField must be called if we are to form a bitfield FieldDecl. We will not verify the bitfield if the decl is known to be malformed in other ways; pretend that we don't have a bitfield if this happens. llvm-svn: 235816
* Correctly handle zero-sized but non-empty base classes in IRGen.John McCall2015-04-262-1/+21
| | | | | | | | | | | | | | | | Fixes rdar://20621065. A more elegant fix would preclude this case by defining the rules such that zero-size classes are always formally empty. I believe the only extensions which create zero-size classes right now are flexible arrays and zero-length arrays; it's not abstractly unreasonable to say that those don't count as members for the purposes of emptiness, just as zero-width bitfields don't count. But that's an ABI-affecting change and requires further discussion; in the meantime, let's not assert / miscompile. llvm-svn: 235815
* [bpf] fix build and remove a compiler warning in Release modeAlexei Starovoitov2015-04-262-1/+3
| | | | | | Patch by Brenden Blanco. llvm-svn: 235814
* R600: Remove / merge redundant testcasesMatt Arsenault2015-04-263-43/+12
| | | | llvm-svn: 235813
* Clean CMICmnLLDBDebuggerHandleEvents::HandleProcessEventStateSuspended (MI)Ilia K2015-04-251-6/+4
| | | | | | | Don't call the lldb::SBProcess::GetRestartedFromEvent twice while handling the CMICmnLLDBDebuggerHandleEvents::HandleProcessEventStateSuspended. llvm-svn: 235812
* Fix CMIUtilThreadActiveObjBase::ThreadIsActive when a thread has died (MI)Ilia K2015-04-252-6/+28
| | | | llvm-svn: 235811
* [x86] instcombine more cases of insertps into a shufflevectorSanjay Patel2015-04-252-19/+69
| | | | | | | | | | | | This is a follow-on to D8833 (insertps optimization when the zero mask is not used). In this patch, we check for the case where the zmask is used, but both input vectors to the insertps intrinsic are the same operand or the zmask overrides the destination lane. This lets us replace the 2nd shuffle input operand with the zero vector. Differential Revision: http://reviews.llvm.org/D9257 llvm-svn: 235810
* add SSE run to check non-AVX codegenSanjay Patel2015-04-251-16/+38
| | | | llvm-svn: 235809
* Disable ↵Ilia K2015-04-251-0/+1
| | | | | | MiGdbSetShowTestCase.test_lldbmi_gdb_set_show_print_char_array_as_string test on Linux llvm-svn: 235808
* Add -gdb-set/-gdb-show aggregate-field-names option (MI)Ilia K2015-04-258-9/+101
| | | | | | | | | | | | | | | | | | Use this option to print/skip field names (default is on): ``` -var-create var1 * complx ^done,name="var1",numchild="3",value="{i = 3, inner = {l = 3}, complex_ptr = 0x[0-9a-f]+}",type="complex_type",thread-id="1",has_more="0" -var-create var2 * complx_array ^done,name="var2",numchild="2",value="{[0] = {i = 4, inner = {l = 4}, complex_ptr = 0x[0-9a-f]+}, [1] = {i = 5, inner = {l = 5}, complex_ptr = 0x[0-9a-f]+}}",type="complex_type [2]",thread-id="1",has_more="0" -gdb-set print aggregate-field-names off ^done -var-create var3 * complx ^done,name="var3",numchild="3",value="{3,{3},0x[0-9a-f]+}",type="complex_type",thread-id="1",has_more="0" -var-create var4 * complx_array ^done,name="var4",numchild="2",value="{{4,{4},0x[0-9a-f]+},{5,{5},0x[0-9a-f]+}}",type="complex_type [2]",thread-id="1",has_more="0" ``` llvm-svn: 235807
* [Sema] Check if a builtin is FunctionPrototype().Davide Italiano2015-04-252-1/+5
| | | | | | | | | | | Don't assume it's always is. This prevents a crash in Sema while trying to merge return type for a builtin w/out function prototype. PR: 23086 Differential Revision: http://reviews.llvm.org/D9235 Reviewed by: rsmith llvm-svn: 235806
* Add -gdb-set/-gdb-show expand-aggregates option (MI)Ilia K2015-04-257-2/+78
| | | | | | | | | | | | | | | | | | Use this option to expand complex types always: ``` -var-create var1 * complx ^done,name="var1",numchild="3",value="{...}",type="complex_type",thread-id="1",has_more="0" -var-create var2 * complx_array ^done,name="var2",numchild="2",value="[2]",type="complex_type [2]",thread-id="1",has_more="0" -gdb-set print expand-aggregates on ^done -var-create var3 * complx ^done,name="var3",numchild="3",value="{i = 3, inner = {l = 3}, complex_ptr = 0x[0-9a-f]+}",type="complex_type",thread-id="1",has_more="0" -var-create var4 * complx_array ^done,name="var4",numchild="2",value="{[0] = {i = 4, inner = {l = 4}, complex_ptr = 0x[0-9a-f]+}, [1] = {i = 5, inner = {l = 5}, complex_ptr = 0x[0-9a-f]+}}",type="complex_type [2]",thread-id="1",has_more="0" ``` llvm-svn: 235805
* Add -gdb-set/-gdb-show print char-array-as-string option (MI)Ilia K2015-04-2511-5/+197
| | | | llvm-svn: 235804
* [ARM] Simplify code. NFC.Benjamin Kramer2015-04-251-15/+2
| | | | llvm-svn: 235803
* [hexagon] Use range-based for loops. No functionality change intended.Benjamin Kramer2015-04-251-69/+45
| | | | llvm-svn: 235802
* [hexagon] Remove setHexLibcallName, it leaks memory.Benjamin Kramer2015-04-252-79/+83
| | | | | | | Just spell out the full names, it's not that much more code. No functional change intended. llvm-svn: 235801
* line endings fixSimon Pilgrim2015-04-251-8/+8
| | | | llvm-svn: 235800
* [Msan] Fix the iconv.cc test to build and pass on FreeBSDViktor Kutuzov2015-04-253-1/+7
| | | | | | Differential Revision: http://reviews.llvm.org/D9252 llvm-svn: 235799
* [asan] Print SHADOW_SCALE and SHADOW_GRANULARITY as decimal values.Daniel Sanders2015-04-252-6/+6
| | | | | | | | | | | | | | | | | | | | | Summary: During the review of http://reviews.llvm.org/D9199 where I had originally changed the debug_mapping.cc test to accept hexadecimal values, we realized that SHADOW_SCALE and SHADOW_GRANULARITY ought to be printed as decimal values. This patch makes that change. This patch also adds a '0x' prefix to the SHADOW_OFFSET to make it clear that it is hexadecimal while the other two are decimal. Reviewers: kcc, timurrrr, samsonov Reviewed By: timurrrr, samsonov Subscribers: samsonov, llvm-commits, sagar Differential Revision: http://reviews.llvm.org/D9224 llvm-svn: 235798
* unwind: clean up warnings from the buildSaleem Abdulrasool2015-04-251-1/+4
| | | | | | | | | | | | Now thta the build is split, clean up some of the warnings in the build: cc1: warning: command line option '-nostdinc++' is valid for C++/ObjC++ but not for C cc1: warning: command line option '-fno-rtti' is valid for C++/ObjC++ but not for C Append the C++ specific flags specifically to the C++ sources. Avoids the spurious warnings due to invalid flags being passed during the compilation of C++ sources. llvm-svn: 235797
* build: make libunwind a proper projectSaleem Abdulrasool2015-04-251-1/+3
| | | | | | This allows the build infrastructure to properly detect and build libunwind. llvm-svn: 235796
* libunwind: add new build logicSaleem Abdulrasool2015-04-253-61/+322
| | | | | | | This replicates most of the build infrastructure from libc++abi ported to libunwind. This allows building libunwind without requiring libc++abi. llvm-svn: 235795
OpenPOWER on IntegriCloud