James Y Knight [Wed, 27 Jan 2016 01:04:51 +0000 (01:04 +0000)]
Revert "Change of UserLabelPrefix default value from "_" to """
This reverts commit r258504.
This commit breaks (at least) sparc-rtems -- the OS (RTEMS) used to
override UserLabelPrefix to "", despite the arch (SPARC) having set it
to "_". Now, the OS doesn't override anymore, but the arch sets it to
"_", resulting in the wrong value. I expect this probably breaks other
OSes that overrode to "" before, as well. (Clearly we have some missing
test cases, here...)
llvm-svn: 258894
Eric Fiselier [Wed, 27 Jan 2016 00:49:20 +0000 (00:49 +0000)]
Fix broken commit r258888. I missed adding two pointer conversions
llvm-svn: 258893
Hans Wennborg [Wed, 27 Jan 2016 00:19:05 +0000 (00:19 +0000)]
test-release.sh: Ignore LC_CTYPE in sed invocation on Darwin
Here, sed is used to prepare object files for comparison via cmp. On my Darwin
15.4.0 machine, LC_CTYPE is set to UTF-8 (by default, I believe). Under these
circumstances, anything sed is made to read will be treated as UTF-8, prompting
it to signal an error if it is not, like so:
% sed s/a/b/ <(head -n1 /dev/random) >/dev/null; echo $?
sed: RE error: illegal byte sequence
1
%
To make sed work as expected, I need to set LC_CTYPE to C:
% env LC_CTYPE=C sed s/a/b/ <(head -n1 /dev/random) >/dev/null; echo $?
0
%
Without this change, sed will exit with an error for every single file that it
compares between phase 2 and phase 3, thereby making it look as if the
differences were far larger than they are.
Patch by Elias Pipping!
Differential Revision: http://reviews.llvm.org/D16548
llvm-svn: 258891
Xinliang David Li [Wed, 27 Jan 2016 00:14:15 +0000 (00:14 +0000)]
Sync up with master file
llvm-svn: 258890
Xinliang David Li [Wed, 27 Jan 2016 00:13:39 +0000 (00:13 +0000)]
[PGO] Make header portable for C /NFC
llvm-svn: 258889
Eric Fiselier [Wed, 27 Jan 2016 00:11:54 +0000 (00:11 +0000)]
[libcxx] Fix undefined behavior in forward_list
Summary:
This patch is similar to the <list> fix but it has a few differences. This patch doesn't use a `__link_pointer` typedef because we don't need to change the linked list pointers because `forward_list` never stores a `__forward_begin_node` in the linked list itself.
The issue with `forward_list` is that the iterators store pointers to `__forward_list_node` and not `__forward_begin_node`. This is incorrect because `before_begin()` and `cbefore_begin()` return iterators that point to a `__forward_begin_node`. This means we incorrectly downcast the `__forward_begin_node` pointer to a `__node_pointer`. This downcast itself is sometimes UB but it cannot be safely removed until ABI v2. The more common cause of UB is when we deference the downcast pointer. (for example `__ptr_->__next_`). This can be fixed without an ABI break by upcasting `__ptr_` before accessing it.
The fix is as follows:
1. Introduce a `__iter_node_pointer` typedef that works similar to `__link_pointer` in the last patch. In ABI v2 it is always a typedef for `__begin_node_pointer`.
2. Change the `__before_begin()` method to return the correct pointer type (`__begin_node_pointer`),
Previously it incorrectly downcasted the `__forward_begin_node` to a `__node_pointer` so it could be used to constructor the iterator types.
3. Change `__forward_list_iterator` and `__forward_list_const_iterator` in the following way:
1. Change `__node_pointer __ptr_;` member to have the `__iter_node_pointer` type instead.
2. Add additional private constructors that accept `__begin_node_pointer` in addition to `__node_pointer` and then correctly cast them to the stored `__iter_node_pointer` type.
3. Add `__get_begin()` and `__get_node_unchecked()` accessor methods that correctly cast `__ptr_` to the expected pointer type. `__get_begin()` is always safe to use and should be
preferred. `__get_node_unchecked()` can only be used on a deferencible iterator.
4. Replace direct access to `__forward_list_iterator::__ptr_` with the safe accessor methods.
Reviewers: mclow.lists, EricWF
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D15836
llvm-svn: 258888
Devin Coughlin [Tue, 26 Jan 2016 23:58:48 +0000 (23:58 +0000)]
[analyzer] Body farm: Look for property ivar in shadowing readwrite property.
After r251874, readonly properties that are shadowed by a readwrite property
in a class extension no longer have an instance variable, which caused the body
farm to not synthesize getters. Now, if a readonly property does not have an
instance variable look for a shadowing property and try to get the instance
variable from there.
rdar://problem/
24060091
llvm-svn: 258886
Justin Lebar [Tue, 26 Jan 2016 23:51:06 +0000 (23:51 +0000)]
Disable all standard lib functions for NVVM.
Summary:
NVVM doesn't have a standard library, as currently implemented, so this
just isn't going to work. I'd like to revisit this, since it's hiding
opportunities for optimization, but correctness comes first.
Thank you to hfinkel for pointing me in the right direction here.
Reviewers: tra
Subscribers: echristo, jhen, llvm-commits, hfinkel
Differential Revision: http://reviews.llvm.org/D16604
llvm-svn: 258884
Kevin Enderby [Tue, 26 Jan 2016 23:43:37 +0000 (23:43 +0000)]
Fix identify_magic() to check that a file that starts with MH_MAGIC is
at least as big as the mach header to be identified as a Mach-O file and
make sure smaller files are not identified as a Mach-O files but as
unknown files. Also fix identify_magic() so it looks at all 4 bytes of
the filetype field when determining the type of the Mach-O file.
Then fix the macho-invalid-header test case to check that it is an
unknown file and make sure it does not get the error for
object_error::parse_failed. And also update the unit tests.
llvm-svn: 258883
Philip Reames [Tue, 26 Jan 2016 23:43:16 +0000 (23:43 +0000)]
[GVN] Split AvailableValueInBlock into two parts [NFC]
AvailableValue is the part that represents the potential rematerialization. AvailableValueInBlock is simply a pair of an AvailableValue and a BB which we might materialize it in.
This is motivated by http://reviews.llvm.org/D16608. The intent is that we'll have a single function which handles the local case which both local and non-local will use to identify available values. Once that's done, the local case can rematerialize at the use site and the non-local case can do the SSA construction as it does currently.
llvm-svn: 258882
Evgeniy Stepanov [Tue, 26 Jan 2016 23:42:41 +0000 (23:42 +0000)]
[cfi] Exclude __cfi_slowpath_diag from the non-diag rtl.
Calls to __cfi_slowpath_diag are only emitted when building with
diagnostics, and linking the diag rtl.
llvm-svn: 258881
Artem Belevich [Tue, 26 Jan 2016 23:37:29 +0000 (23:37 +0000)]
[CUDA] Implemented device-side support functions in <cmath>.
CUDA expects math functions in std:: namespace to work on device side.
In order to make it work with clang without allowing device-side code
generation for functions w/o appropriate target attributes, this patch
provides device-side implementations for <cmath> functions. Most of
them call global-scope math functions provided by CUDA headers. In few
cases we use clang builtins.
Tested out-of tree by compiling and running thrust's unit_tests.
https://github.com/thrust/thrust/tree/master/testing
Differential Revision: http://reviews.llvm.org/D16593
llvm-svn: 258880
Evgeniy Stepanov [Tue, 26 Jan 2016 23:36:28 +0000 (23:36 +0000)]
[cfi] Better handling of wild target address.
This change enables diagnostics when the target address for a CFI
check is out of bounds of any known library, or even not in the
limits of the address space. This happens when casting pointers to
uninitialized memory.
Ubsan code does not yet handle some of these situations correctly,
so it is still possible to see a segmentation fault instead of a
proper diagnostic message once in a while.
llvm-svn: 258879
Sanjoy Das [Tue, 26 Jan 2016 23:26:25 +0000 (23:26 +0000)]
[docs] Fix a typo
llvm-svn: 258878
David Majnemer [Tue, 26 Jan 2016 23:14:47 +0000 (23:14 +0000)]
[WinEH] Annotate calls to __RTtypeid with a funclet bundle
Clang's CodeGen has several paths which end up invoking or calling a
function. The one that we used for calls to __RTtypeid did not
appropriately annotate the call with a funclet bundle.
This fixes PR26329.
llvm-svn: 258877
Xinliang David Li [Tue, 26 Jan 2016 23:13:00 +0000 (23:13 +0000)]
[PGO] allow pgo name collector to disable compression (for testing)/NFC
llvm-svn: 258876
Reid Kleckner [Tue, 26 Jan 2016 23:01:21 +0000 (23:01 +0000)]
[llvm-tblgen] Stop emitting the intrinsic name matching code
The AMDGPU backend was the last user of the old StringMatcher
recognition code. Move it over to the new lookupLLVMIntrinsicName
funciton, which is now improved to handle all of the interesting edge
cases exposed by AMDGPU intrinsic names.
llvm-svn: 258875
Mike Aizatsky [Tue, 26 Jan 2016 22:53:52 +0000 (22:53 +0000)]
[sanitizers] execve & waitpid on mac.
llvm-svn: 258874
Chris Bieneman [Tue, 26 Jan 2016 22:53:12 +0000 (22:53 +0000)]
Fixing the documentation builds
I broke the documentation builds when I deleted the MakefileGuide as part of the autoconf removal. At some point I'll need to do a more in-depth pass updating the documentation to remove references to the old build system.
llvm-svn: 258873
Derek Schuff [Tue, 26 Jan 2016 22:47:43 +0000 (22:47 +0000)]
[WebAssembly] Omit no-op adds for non-mem uses of FrameIndex
Differential Revision: http://reviews.llvm.org/D16554
llvm-svn: 258872
Reid Kleckner [Tue, 26 Jan 2016 22:33:19 +0000 (22:33 +0000)]
Handle more edge cases in intrinsic name binary search
I tried to make the AMDGPU intrinsic info table use this instead of
another StringMatcher, and some issues arose.
llvm-svn: 258871
Eugene Zelenko [Tue, 26 Jan 2016 22:32:24 +0000 (22:32 +0000)]
Fix Clang-tidy modernize-use-override warning in unittests/clang-tidy/IncludeInserterTest.cpp; other minor fixes.
Differential revision: http://reviews.llvm.org/D16566
llvm-svn: 258870
Simon Pilgrim [Tue, 26 Jan 2016 22:19:22 +0000 (22:19 +0000)]
[X86][SSE] Added 8i8 to 8i64 sext/zext tests
llvm-svn: 258868
Sanjay Patel [Tue, 26 Jan 2016 22:08:58 +0000 (22:08 +0000)]
[x86] make the subtarget member a const reference, not a pointer ; NFCI
It's passed in as a reference; it's not optional; it's not a pointer.
llvm-svn: 258867
Jonathan Peyton [Tue, 26 Jan 2016 21:45:21 +0000 (21:45 +0000)]
[OMPT]: Fix the order of implicit_task_end_events
For implcit barriers in simple parallel for loops, the order of the OMPT events
was wrong. The barrier_{begin,end} events came after the implcit_task_end
event for the implcit barrier at the end of the parallel region. This is wrong
because the implicit task executes the barrier before ending. This patch fixes
the order of the event: It will be triggerd now just before
__kmp_pop_current_task_from_thread() is called.
Patch by Tim Cramer
Differential Revision: http://reviews.llvm.org/D16347
llvm-svn: 258866
Simon Pilgrim [Tue, 26 Jan 2016 21:39:25 +0000 (21:39 +0000)]
[X86] Add support for zeroed shuffle elements to getShuffleScalarElt
Enable handling of SM_SentinelZero shuffle elements to getShuffleScalarElt. Improves VZEXT_LOAD matches in EltsFromConsecutiveLoads.
llvm-svn: 258865
Chris Bieneman [Tue, 26 Jan 2016 21:31:36 +0000 (21:31 +0000)]
Remove autoconf support
Summary:
This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html
"Now I am become Death, the destroyer of worlds."
-J. Robert Oppenheimer
Reviewers: chandlerc, grosbach, bob.wilson, echristo
Subscribers: cfe-commits, klimek
Differential Revision: http://reviews.llvm.org/D16475
llvm-svn: 258864
Chris Bieneman [Tue, 26 Jan 2016 21:31:12 +0000 (21:31 +0000)]
Remove autoconf support for building runtime libraries.
Summary:
This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html
"I am the punishment of God... If [autoconf] had not committed great sins, God would not have sent a punishment like me upon [it]."
-Genghis Khan
Reviewers: chandlerc, grosbach, bob.wilson, zaks.anna, kubabrecka, samsonov, echristo
Subscribers: iains, llvm-commits
Differential Revision: http://reviews.llvm.org/D16473
llvm-svn: 258863
Chris Bieneman [Tue, 26 Jan 2016 21:30:40 +0000 (21:30 +0000)]
Remove autoconf support
Summary:
This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html
"This is the way [autoconf] ends
Not with a bang but a whimper."
-T.S. Eliot
Reviewers: chandlerc, grosbach, bob.wilson, echristo
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D16472
llvm-svn: 258862
Chris Bieneman [Tue, 26 Jan 2016 21:29:08 +0000 (21:29 +0000)]
Remove autoconf support
Summary:
This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html
"I felt a great disturbance in the [build system], as if millions of [makefiles] suddenly cried out in terror and were suddenly silenced. I fear something [amazing] has happened."
- Obi Wan Kenobi
Reviewers: chandlerc, grosbach, bob.wilson, tstellarAMD, echristo, whitequark
Subscribers: chfast, simoncook, emaste, jholewinski, tberghammer, jfb, danalbert, srhines, arsenm, dschuff, jyknight, dsanders, joker.eph, llvm-commits
Differential Revision: http://reviews.llvm.org/D16471
llvm-svn: 258861
Derek Schuff [Tue, 26 Jan 2016 21:08:27 +0000 (21:08 +0000)]
[WebAssembly] Remove check for FrameIndex operands in WebAssemblyPeephole
This pass runs after FrameIndex elimination, so it should never see FI
operands. NFC
llvm-svn: 258860
Evgeniy Stepanov [Tue, 26 Jan 2016 21:06:26 +0000 (21:06 +0000)]
[cfi] Hide runtime implementation in a namespace.
Move all internal stuff into namespace __cfi.
Remove the double underscore prefix from anything that's now inside
the namespace.
llvm-svn: 258859
Sanjay Patel [Tue, 26 Jan 2016 21:05:00 +0000 (21:05 +0000)]
[x86] add materializeVectorConstant() helper function; NFC
LowerBUILD_VECTOR is still over 300 lines long, but it's a start...
llvm-svn: 258858
Evgeniy Stepanov [Tue, 26 Jan 2016 20:53:09 +0000 (20:53 +0000)]
[cfi] Support for dlopen and dlclose.
Add dlopen/dlclose interceptors to update CFI shadow for loaded/unloaded libraries.
llvm-svn: 258857
Hemant Kulkarni [Tue, 26 Jan 2016 20:38:15 +0000 (20:38 +0000)]
Fix comparison warning (r258845)
llvm-svn: 258856
Eric Fiselier [Tue, 26 Jan 2016 20:31:01 +0000 (20:31 +0000)]
Remove dead code missed in r258852.
llvm-svn: 258855
Hemant Kulkarni [Tue, 26 Jan 2016 20:28:15 +0000 (20:28 +0000)]
Fixes build break introduced by r258845
llvm-svn: 258854
JF Bastien [Tue, 26 Jan 2016 20:24:51 +0000 (20:24 +0000)]
WebAssembly NFC: update error message
I forgot to update this one in my previous patch.
llvm-svn: 258853
Eric Fiselier [Tue, 26 Jan 2016 20:24:30 +0000 (20:24 +0000)]
Fix PR26103 - Error calling is_convertible with incomplete type. Patch from Michael Daniels.
llvm-svn: 258852
JF Bastien [Tue, 26 Jan 2016 20:22:42 +0000 (20:22 +0000)]
WebAssembly: don't optimize memcpy/memmove/memcpy to frame index
r258781 optimized memcpy/memmove/memcpy so the intrinsic call can return its first argument, but missed the frame index case. Teach it to ignore that case so C code doesn't assert out in these cases.
llvm-svn: 258851
Yunzhong Gao [Tue, 26 Jan 2016 20:15:02 +0000 (20:15 +0000)]
Do not define GXX_RTTI macro for C.
This is same as GCC behavior (tested with GCC 4.8.2).
Differential Revision: http://reviews.llvm.org/D16365
llvm-svn: 258850
Mike Aizatsky [Tue, 26 Jan 2016 20:10:01 +0000 (20:10 +0000)]
[sanitizers] extracted process management functions
Differential Revision: http://reviews.llvm.org/D16546
llvm-svn: 258849
Cong Hou [Tue, 26 Jan 2016 20:09:38 +0000 (20:09 +0000)]
Add a missing test case for r258847.
llvm-svn: 258848
Cong Hou [Tue, 26 Jan 2016 20:08:01 +0000 (20:08 +0000)]
Allow X86::COND_NE_OR_P and X86::COND_NP_OR_E to be reversed.
Currently, AnalyzeBranch() fails non-equality comparison between floating points
on X86 (see https://llvm.org/bugs/show_bug.cgi?id=23875). This is because this
function can modify the branch by reversing the conditional jump and removing
unconditional jump if there is a proper fall-through. However, in the case of
non-equality comparison between floating points, this can turn the branch
"unanalyzable". Consider the following case:
jne.BB1
jp.BB1
jmp.BB2
.BB1:
...
.BB2:
...
AnalyzeBranch() will reverse "jp .BB1" to "jnp .BB2" and then "jmp .BB2" will be
removed:
jne.BB1
jnp.BB2
.BB1:
...
.BB2:
...
However, AnalyzeBranch() cannot analyze this branch anymore as there are two
conditional jumps with different targets. This may disable some optimizations
like block-placement: in this case the fall-through behavior is enforced even if
the fall-through block is very cold, which is suboptimal.
Actually this optimization is also done in block-placement pass, which means we
can remove this optimization from AnalyzeBranch(). However, currently
X86::COND_NE_OR_P and X86::COND_NP_OR_E are not reversible: there is no defined
negation conditions for them.
In order to reverse them, this patch defines two new CondCode X86::COND_E_AND_NP
and X86::COND_P_AND_NE. It also defines how to synthesize instructions for them.
Here only the second conditional jump is reversed. This is valid as we only need
them to do this "unconditional jump removal" optimization.
Differential Revision: http://reviews.llvm.org/D11393
llvm-svn: 258847
Davide Italiano [Tue, 26 Jan 2016 19:57:42 +0000 (19:57 +0000)]
[llvm-nm] Roll several conditions into a single if. NFCI.
llvm-svn: 258846
Hemant Kulkarni [Tue, 26 Jan 2016 19:46:39 +0000 (19:46 +0000)]
[llvm-readobj] Add -elf-section-groups option
Adds a way to inspect SHT_GROUP sections in ELF objects.
Displays signature, member sections of these sections.
Differential revision: http://reviews.llvm.org/D16555
llvm-svn: 258845
Jonathan Peyton [Tue, 26 Jan 2016 19:44:31 +0000 (19:44 +0000)]
Bypass Perl modules in build system
This change fixes the bug: https://llvm.org/bugs/show_bug.cgi?id=25975
by bypassing the perl module files which try to deduce system information.
These perl modules files don't offer useful information and are from the
original build system. They can be removed after this change.
llvm-svn: 258843
Chad Rosier [Tue, 26 Jan 2016 19:33:57 +0000 (19:33 +0000)]
[ScheduleDAGInstrs] Simplify logic to improve readability. NFC.
The call to isInvariantLoad() already returns false for non-load instructions.
llvm-svn: 258841
David Majnemer [Tue, 26 Jan 2016 19:30:26 +0000 (19:30 +0000)]
[MS ABI] Allow a member pointers' converted type to change
Member pointers in the MS ABI are tricky for a variety of reasons.
The size of a member pointer is indeterminate until the program reaches
a point where the representation is required to be known. However,
*pointers* to member pointers may exist without knowing the pointee
type's representation. In these cases, we synthesize an opaque LLVM
type for the pointee type.
However, we can be in a situation where the underlying member pointer's
representation became known mid-way through the program. To account for
this, we attempted to manicure CodeGen's type-cache so that we can
replace the opaque member pointer type with the real deal while leaving
the pointer types unperturbed. This, unfortunately, is a problematic
approach to take as we will violate CodeGen's invariants.
These violations are mostly harmless but let's do the right thing
instead: invalidate the type-cache if a member pointer's LLVM
representation changes.
This fixes PR26313.
llvm-svn: 258839
Sanjay Patel [Tue, 26 Jan 2016 19:30:14 +0000 (19:30 +0000)]
tidy up; NFC
llvm-svn: 258838
Davide Italiano [Tue, 26 Jan 2016 19:28:51 +0000 (19:28 +0000)]
[llvm-nm] Simplify. No functional changes intended.
llvm-svn: 258837
Eugene Zelenko [Tue, 26 Jan 2016 19:01:06 +0000 (19:01 +0000)]
Fix Clang-tidy modernize-use-nullptr warnings; other minor fixes.
Differential revision: http://reviews.llvm.org/D16567
llvm-svn: 258836
Jonathan Coe [Tue, 26 Jan 2016 18:55:55 +0000 (18:55 +0000)]
Test commit. Fix typo in comment.
llvm-svn: 258835
Manman Ren [Tue, 26 Jan 2016 18:52:43 +0000 (18:52 +0000)]
Class Property: parse property attribute (class).
This is the third patch in a series of patches to support class properties
in addition to instance properties in objective-c.
rdar://
23891898
llvm-svn: 258834
Sanjay Patel [Tue, 26 Jan 2016 18:49:36 +0000 (18:49 +0000)]
[x86] simplify getOnesVector() ; NFCI
Let DAG.getConstant() handle the splatting; there's no need
to repeat that logic here.
llvm-svn: 258833
Arpith Chacko Jacob [Tue, 26 Jan 2016 18:48:41 +0000 (18:48 +0000)]
[OpenMP] Parsing + sema for target parallel directive.
Summary:
This patch adds parsing + sema for the target parallel directive and its clauses along with testcases.
Reviewers: ABataev
Differential Revision: http://reviews.llvm.org/D16553
Rebased to current trunk and updated test cases.
llvm-svn: 258832
Eugene Zelenko [Tue, 26 Jan 2016 18:48:36 +0000 (18:48 +0000)]
Fix Clang-tidy modernize-use-nullptr and modernize-use-override warnings; other minor fixes.
Differential revision: reviews.llvm.org/D16568
llvm-svn: 258831
Aditya Nandakumar [Tue, 26 Jan 2016 18:42:36 +0000 (18:42 +0000)]
Reassociate: Reprocess RedoInsts after each inst
Previously the RedoInsts was processed at the end of the block.
However it was possible that it left behind some instructions that
were not canonicalized.
This should guarantee that any previous instruction in the basic
block is canonicalized before we process a new instruction.
llvm-svn: 258830
Eugene Zelenko [Tue, 26 Jan 2016 18:27:37 +0000 (18:27 +0000)]
Fix Clang-tidy modernize-use-nullptr warnings in include/lld/Core/range.h; other minor fixes.
Differential revision: http://reviews.llvm.org/D16565
llvm-svn: 258829
Sanjay Patel [Tue, 26 Jan 2016 18:22:50 +0000 (18:22 +0000)]
[x86, AVX] tighten checks
llvm-svn: 258828
Benjamin Kramer [Tue, 26 Jan 2016 18:21:38 +0000 (18:21 +0000)]
Update wasm target for r258819.
llvm-svn: 258827
Kevin Enderby [Tue, 26 Jan 2016 18:20:49 +0000 (18:20 +0000)]
Update the comments for the macho-invalid-zero-ncmds test and fix
llvm-objdump when printing the Mach Header to print the unknown
cputype and cpusubtype fields as decimal instead of not printing
them at all. And change the test to check for that.
llvm-svn: 258826
Sanjay Patel [Tue, 26 Jan 2016 18:14:37 +0000 (18:14 +0000)]
fix formatting; NFC
llvm-svn: 258825
Manman Ren [Tue, 26 Jan 2016 18:05:23 +0000 (18:05 +0000)]
Use instance_properties instead of properties. NFC.
All current properties are instance properties.
This is the second patch in a series of patches to support class properties
in addition to instance properties in objective-c.
rdar://
23891898
llvm-svn: 258824
Justin Lebar [Tue, 26 Jan 2016 17:47:20 +0000 (17:47 +0000)]
[CUDA] Add -fcuda-allow-variadic-functions.
Summary:
Turns out the variadic function checking added in r258643 was too strict
for some existing users; give them an escape valve. When
-fcuda-allow-variadic-functions is passed, the front-end makes no
attempt to disallow C-style variadic functions. Calls to va_arg are
still not allowed.
Reviewers: tra
Subscribers: cfe-commits, jhen, echristo, bkramer
Differential Revision: http://reviews.llvm.org/D16559
llvm-svn: 258822
Saleem Abdulrasool [Tue, 26 Jan 2016 17:43:48 +0000 (17:43 +0000)]
Revert r258546.
Seems that the patch was rebased on top of another change which obsoleted the
change but wasnt caught.
Thanks to nbjoerg for pointing this out!
llvm-svn: 258821
Sanjay Patel [Tue, 26 Jan 2016 17:06:13 +0000 (17:06 +0000)]
don't repeat names in documentation comments; NFC
llvm-svn: 258820
Benjamin Kramer [Tue, 26 Jan 2016 16:45:00 +0000 (16:45 +0000)]
Update for LLVM change
llvm-svn: 258819
Benjamin Kramer [Tue, 26 Jan 2016 16:44:37 +0000 (16:44 +0000)]
Reflect the MC/MCDisassembler split on the include/ level.
No functional change, just moving code around.
llvm-svn: 258818
Arpith Chacko Jacob [Tue, 26 Jan 2016 16:37:23 +0000 (16:37 +0000)]
[OpenMP] Parsing + sema for defaultmap clause.
Summary:
This patch adds parsing + sema for the defaultmap clause associated with the target directive (among others).
Reviewers: ABataev
Differential Revision: http://reviews.llvm.org/D16527
llvm-svn: 258817
Sanjay Patel [Tue, 26 Jan 2016 16:17:24 +0000 (16:17 +0000)]
[LibCallSimplifier] fold memset(malloc(x), 0, x) --> calloc(1, x)
This is a step towards solving PR25892:
https://llvm.org/bugs/show_bug.cgi?id=25892
It won't handle the reported case. As noted by the 'TODO' comments in the patch,
we need to relax the hasOneUse() constraint and also match patterns that include
memset_chk() and the llvm.memset() intrinsic in addition to memset().
Differential Revision: http://reviews.llvm.org/D16337
llvm-svn: 258816
Chad Rosier [Tue, 26 Jan 2016 16:16:53 +0000 (16:16 +0000)]
Revert "[Driver] Make sure -fno-math-builtin option is being passed by the driver."
This reverts commit r258814.
llvm-svn: 258815
Chad Rosier [Tue, 26 Jan 2016 15:52:05 +0000 (15:52 +0000)]
[Driver] Make sure -fno-math-builtin option is being passed by the driver.
Support for the -fno-math-builtin option was added in r186899. The codegen side
is being tested in test/CodeGen/nomathbuiltin.c. The missing part was just
passing the option through the driver.
PR26317
llvm-svn: 258814
Chad Rosier [Tue, 26 Jan 2016 15:46:29 +0000 (15:46 +0000)]
[Driver] Update FIXME comment now that PR4941 has been addressed.
The actual fix should be addressed by someone who can test on Darwin.
llvm-svn: 258813
Matthew Simpson [Tue, 26 Jan 2016 15:45:49 +0000 (15:45 +0000)]
Revert "Reapply commit r258404 with fix"
This commit exposes a crash in computeKnownBits on the Chromium buildbots.
Reverting to investigate.
Reference: https://llvm.org/bugs/show_bug.cgi?id=26307
llvm-svn: 258812
Igor Laevsky [Tue, 26 Jan 2016 15:09:42 +0000 (15:09 +0000)]
Re-submit r256008 "Improve DWARFDebugFrame::parse to also handle __eh_frame."
Originally this change was causing failures on windows buildbots.
But those problems were fixed in r258806.
llvm-svn: 258811
Dan Gohman [Tue, 26 Jan 2016 14:55:17 +0000 (14:55 +0000)]
[WebAssembly] Fix a typo in a comment.
llvm-svn: 258810
Michael Kruse [Tue, 26 Jan 2016 13:33:27 +0000 (13:33 +0000)]
Unique phi write accesses
Ensure that there is at most one phi write access per PHINode and
ScopStmt. In particular, this would be possible for non-affine
subregions with multiple exiting blocks. We replace multiple MAY_WRITE
accesses by one MUST_WRITE access. The written value is constructed
using a PHINode of all exiting blocks. The interpretation of the PHI
WRITE's "accessed value" changed from the incoming value to the PHI like
for PHI READs since there is no unique incoming value.
Because region simplification shuffles around PHI nodes -- particularly
with exit node PHIs -- the PHINodes at analysis time does not always
exist anymore in the code generation pass. We instead remember the
incoming block/value pair in the MemoryAccess.
Differential Revision: http://reviews.llvm.org/D15681
llvm-svn: 258809
Michael Kruse [Tue, 26 Jan 2016 13:33:15 +0000 (13:33 +0000)]
Unique value read accesses
Keep at most one value read MemoryAccess per value and statement;
multiple generated loads do not have any additional effect. As one such
MemoryAccess can cater multiple uses within the statement, the
AccessInstruction property is not unique any more and set to nullptr.
Differential Revision: http://reviews.llvm.org/D15510
llvm-svn: 258808
Michael Kruse [Tue, 26 Jan 2016 13:33:10 +0000 (13:33 +0000)]
Unique value write accesses
Ensure there is at most one write access per definition of an
llvm::Value. Keep track of already created value write access by using
a (dense) map.
Replace addValueWriteAccess by ensureValueStore which can be uses more
liberally without worrying to add redundant accesses. It will be used,
e.g. in a logical correspondant for value reads -- ensureValueReload --
to ensure that the expected definition has been written when loading it.
Differential Revision: http://reviews.llvm.org/D15483
llvm-svn: 258807
Igor Laevsky [Tue, 26 Jan 2016 13:31:11 +0000 (13:31 +0000)]
[DebugInfo] Fix DWARFDebugFrame instruction operand ordering
We can't rely on the evalution order of function arguments.
Differential Revision: http://reviews.llvm.org/D16509
llvm-svn: 258806
Alexey Bataev [Tue, 26 Jan 2016 12:20:39 +0000 (12:20 +0000)]
[OPENMP 4.5] Allow arrays in 'reduction' clause.
OpenMP 4.5, alogn with array sections, allows to use variables of array type in reductions.
llvm-svn: 258804
Johannes Doerfert [Tue, 26 Jan 2016 11:03:25 +0000 (11:03 +0000)]
[FIX] Domain generation error due to loops in non-affine regions
llvm-svn: 258803
Johannes Doerfert [Tue, 26 Jan 2016 11:01:41 +0000 (11:01 +0000)]
[FIX] Build correct domain for non-affine region SCoPs
llvm-svn: 258802
Alexander Kornienko [Tue, 26 Jan 2016 10:56:27 +0000 (10:56 +0000)]
Fix crashing on user-defined conversion.
Summary: Fix the assertion failure for the user-defined conversion method. e.g.: operator bool()
Reviewers: alexfh, aaron.ballman
Subscribers: aaron.ballman, cfe-commits
Patch by Cong Liu!
Differential Revision: http://reviews.llvm.org/D16536
llvm-svn: 258801
Ewan Crawford [Tue, 26 Jan 2016 10:41:08 +0000 (10:41 +0000)]
[RenderScript] Provide option to specify a single allocation to print
Patch replaces the 'renderscript allocation list' command flag --refresh, with a new option --id <ID>.
This new option only prints the details of a single allocation with a given id, rather than printing all the allocations.
Functionality from the removed '--refresh' flag will be moved into its own command in a subsequent commit.
llvm-svn: 258800
Tobias Grosser [Tue, 26 Jan 2016 10:01:35 +0000 (10:01 +0000)]
BlockGenerators: Replace getNewScalarValue with getNewValue
Both functions implement the same functionality, with the difference that
getNewScalarValue assumes that globals and out-of-scop scalars can be directly
reused without loading them from their corresponding stack slot. This is correct
for sequential code generation, but causes issues with outlining code e.g. for
OpenMP code generation. getNewValue handles such cases correctly.
Hence, we can replace getNewScalarValue with getNewValue. This is not only more
future proof, but also eliminates a bunch of code.
The only functionality that was available in getNewScalarValue that is lost
is the on-demand creation of scalar values. However, this is not necessary any
more as scalars are always loaded at the beginning of each basic block and will
consequently always be available when scalar stores are generated. As this was
not the case in older versions of Polly, it seems the on-demand loading is just
some older code that has not yet been removed.
Finally, generateScalarLoads also generated loads for values that are loop
invariant, available in GlobalMap and which are preferred over the ones loaded
in generateScalarLoads. Hence, we can just skip the code generation of such
scalar values, avoiding the generation of dead code.
Differential Revision: http://reviews.llvm.org/D16522
llvm-svn: 258799
Simon Pilgrim [Tue, 26 Jan 2016 09:30:08 +0000 (09:30 +0000)]
[X86][SSE] Add zero element and general 64-bit VZEXT_LOAD support to EltsFromConsecutiveLoads
This patch adds support for trailing zero elements to VZEXT_LOAD loads (and checks that no zero elts occur within the consecutive load).
It also generalizes the 64-bit VZEXT_LOAD load matching to work for loads other than 2x32-bit loads.
After this patch it will also be easier to add support for other basic load patterns like 32-bit VZEXT_LOAD loads, PMOVZX and subvector load insertion.
Differential Revision: http://reviews.llvm.org/D16217
llvm-svn: 258798
Ismail Donmez [Tue, 26 Jan 2016 08:24:57 +0000 (08:24 +0000)]
Fix compilations with msvc's /Zc:strictStrings
llvm-svn: 258797
Rui Ueyama [Tue, 26 Jan 2016 07:17:29 +0000 (07:17 +0000)]
Simplify. NFC.
llvm-svn: 258796
Rui Ueyama [Tue, 26 Jan 2016 07:17:27 +0000 (07:17 +0000)]
Simplify. NFC.
llvm-svn: 258795
Matt Arsenault [Tue, 26 Jan 2016 06:37:54 +0000 (06:37 +0000)]
AMDGPU: Add amdgcn cube builtins
llvm-svn: 258794
Craig Topper [Tue, 26 Jan 2016 06:10:15 +0000 (06:10 +0000)]
[X86] Mark LDS/LES as not being allowed in 64-bit mode.
Their opcodes are used as part of the VEX prefix in 64-bit mode. Clearly the disassembler implicitly decoded them as AVX instructions in 64-bit mode, but I think the AsmParser would have encoded them.
llvm-svn: 258793
Rui Ueyama [Tue, 26 Jan 2016 04:58:58 +0000 (04:58 +0000)]
Simplify. NFC.
This new code should be logically equivalent to the previous code.
llvm-svn: 258792
Enrico Granata [Tue, 26 Jan 2016 04:53:10 +0000 (04:53 +0000)]
Reverting r258759 as it is breaking the OSX build
llvm-svn: 258791
Matt Arsenault [Tue, 26 Jan 2016 04:49:24 +0000 (04:49 +0000)]
AMDGPU: Move AMDGPU intrinsics only used by R600
llvm-svn: 258790
Matt Arsenault [Tue, 26 Jan 2016 04:49:22 +0000 (04:49 +0000)]
AMDGPU: Tidy minor td file issues
Make comments and indentation more consistent.
Rearrange a few things to be in a more consistent order,
such as organizing subtarget features from those describing
an actual device property, and those used as options.
llvm-svn: 258789
Matt Arsenault [Tue, 26 Jan 2016 04:43:48 +0000 (04:43 +0000)]
AMDGPU: Make v32i8/v64i8 illegal types
Old intrinsics were forcing these, but they have now all
been removed. This fixes large i8 vector operations generally
being broken.
llvm-svn: 258788
Matt Arsenault [Tue, 26 Jan 2016 04:38:08 +0000 (04:38 +0000)]
AMDGPU: Remove old sample intrinsics
I did my best to try to update all the uses in tests that
just happened to use the old ones to the newer intrinsics.
I'm not sure I got all of the immediate operand conversions
correct, since the value seems to have been ignored by the
old pattern but I don't think it really matters.
llvm-svn: 258787
Matt Arsenault [Tue, 26 Jan 2016 04:29:56 +0000 (04:29 +0000)]
AMDGPU: Add new amdgcn intrinsics for cube instructions
More cleanup to try to get all intrinsics using the correct
amdgcn prefix that are as close to the instruction as possible.
llvm-svn: 258786