James Y Knight [Fri, 9 Oct 2015 20:10:14 +0000 (20:10 +0000)]
Fix assert in X86 backend.
When running combine on an extract_vector_elt, it wants to look through
a bitcast to check if the argument to the bitcast was itself an
extract_vector_elt with particular operands.
However, it called getOperand() on the argument to the bitcast *before*
checking that the opcode was EXTRACT_VECTOR_ELT, assert-failing if there
were zero operands for the actual opcode.
Fix, and add trivial test.
llvm-svn: 249891
Richard Smith [Fri, 9 Oct 2015 19:57:37 +0000 (19:57 +0000)]
Split <wctype.h> out of <cwctype>.
llvm-svn: 249890
Richard Smith [Fri, 9 Oct 2015 19:56:37 +0000 (19:56 +0000)]
Split <wchar.h> out of <cwchar>.
llvm-svn: 249889
Chris Bieneman [Fri, 9 Oct 2015 19:53:54 +0000 (19:53 +0000)]
[CMake] Hand tuning the exclude lists for libclang_rt.10.4.a
llvm-svn: 249888
Chad Rosier [Fri, 9 Oct 2015 19:48:48 +0000 (19:48 +0000)]
Revert "Simplify code. NFC."
This reverts commit r248610.
llvm-svn: 249887
Zachary Turner [Fri, 9 Oct 2015 19:45:41 +0000 (19:45 +0000)]
Port native Python-API to 3.x
With this change, liblldb is 95% of the way towards being able
to work under both Python 2.x and Python 3.x. This should
introduce no functional change for Python 2.x, but for Python
3.x there are some important changes. Primarily, these are:
1) PyString doesn't exist in Python 3. Everything is a PyUnicode.
To account for this, PythonString now stores a PyBytes instead
of a PyString. In Python 2, this is equivalent to a PyUnicode,
and in Python 3, we do a conversion from PyUnicode to PyBytes
and store the PyBytes.
2) PyInt doesn't exist in Python 3. Everything is a PyLong. To
account for this, PythonInteger stores a PyLong instead of a
PyInt. In Python 2.x, this requires doing a conversion to
PyLong when creating a PythonInteger from a PyInt. In 3.x,
there is no PyInt anyway, so we can assume everything is a
PyLong.
3) PyFile_FromFile doesn't exist in Python 3. Instead there is a
PyFile_FromFd. This is not addressed in this patch because it
will require quite a large change to plumb fd's all the way
through the system into the ScriptInterpreter. This is the only
remaining piece of the puzzle to get LLDB supporting Python 3.x.
Being able to run the test suite is not addressed in this patch.
After the extension module can compile and you can enter an embedded
3.x interpreter, the test suite will be addressed in a followup.
llvm-svn: 249886
Zachary Turner [Fri, 9 Oct 2015 19:45:26 +0000 (19:45 +0000)]
Have CMake translate LLDB_PYTHON_HOME to forward slashes.
Using backslashes causes the compiler to interpret them as
escape sequences.
llvm-svn: 249885
Duncan P. N. Exon Smith [Fri, 9 Oct 2015 19:40:45 +0000 (19:40 +0000)]
CodeGen: Continue removing ilist iterator implicit conversions
llvm-svn: 249884
Duncan P. N. Exon Smith [Fri, 9 Oct 2015 19:36:12 +0000 (19:36 +0000)]
CodeGen: Remove implicit iterator conversions from MBB.cpp
Remove implicit ilist iterator conversions from MachineBasicBlock.cpp.
I've also added an overload of `splice()` that takes a pointer, since
it's a natural API. This is similar to the overloads I added for
`remove()` and `erase()` in r249867.
llvm-svn: 249883
Rui Ueyama [Fri, 9 Oct 2015 19:34:55 +0000 (19:34 +0000)]
ELF2: Reduce code repetition.
llvm-svn: 249882
Rafael Espindola [Fri, 9 Oct 2015 19:25:07 +0000 (19:25 +0000)]
Add support for comdats.
The implementation is a direct translation to c++ of the rules in the ELF spec.
llvm-svn: 249881
Duncan P. N. Exon Smith [Fri, 9 Oct 2015 19:23:20 +0000 (19:23 +0000)]
CodeGen: Avoid ilist iterator implicit conversions in a few more places, NFC
llvm-svn: 249880
Duncan P. N. Exon Smith [Fri, 9 Oct 2015 19:13:58 +0000 (19:13 +0000)]
CodeGen: Remove more ilist iterator implicit conversions, NFC
llvm-svn: 249879
Duncan P. N. Exon Smith [Fri, 9 Oct 2015 19:07:41 +0000 (19:07 +0000)]
CodeGen: Use range-based for in IntrinsicLowering::AddPrototypes, NFC
This happens to avoid a host of implicit ilist iterator conversions.
llvm-svn: 249877
Duncan P. N. Exon Smith [Fri, 9 Oct 2015 18:57:47 +0000 (18:57 +0000)]
CodeGen: Use range-based for in GlobalMerge, NFC
llvm-svn: 249876
Duncan P. N. Exon Smith [Fri, 9 Oct 2015 18:44:40 +0000 (18:44 +0000)]
CodeGen: Remove a few more ilist iterator implicit conversions, NFC
llvm-svn: 249875
Owen Anderson [Fri, 9 Oct 2015 18:40:20 +0000 (18:40 +0000)]
Teach LoopUnswitch not to perform non-trivial unswitching on loops containing convergent operations.
Doing so could cause the post-unswitching convergent ops to be
control-dependent on the unswitch condition where they were not before.
This check could be refined to allow unswitching where the convergent
operation was already control-dependent on the unswitch condition.
llvm-svn: 249874
Owen Anderson [Fri, 9 Oct 2015 18:40:15 +0000 (18:40 +0000)]
Add iterator ranges for blocks in a Loop.
llvm-svn: 249873
Eric Christopher [Fri, 9 Oct 2015 18:39:59 +0000 (18:39 +0000)]
Fix whitespace, 80-column violations, embedded tabs for the
TargetInfo class.
llvm-svn: 249872
Eric Christopher [Fri, 9 Oct 2015 18:39:55 +0000 (18:39 +0000)]
constify the feature vector going into initFeatureMap as it shouldn't
change the set of features.
llvm-svn: 249871
Chris Bieneman [Fri, 9 Oct 2015 18:38:34 +0000 (18:38 +0000)]
[CMake] [Darwin] [builtins] Need to special case the naming of the OS X cc_kext builtin library.
llvm-svn: 249870
Duncan P. N. Exon Smith [Fri, 9 Oct 2015 18:35:09 +0000 (18:35 +0000)]
CodeGen: Remove implicit iterator conversions from SlotIndexes.h, NFC
Be explicit about changes between pointers and iterators, as with other
recent commits. This transitively removes implicit ilist iterator
conversions from about 20 source files in CodeGen.
llvm-svn: 249869
Chris Bieneman [Fri, 9 Oct 2015 18:32:34 +0000 (18:32 +0000)]
[CMake] [darwin] [builitins] Don't build x86_64h into the 10.4 builtins library
There is no haswell support in 10.4, so we don't need a 10.4 builtin library.
llvm-svn: 249868
Duncan P. N. Exon Smith [Fri, 9 Oct 2015 18:23:49 +0000 (18:23 +0000)]
CodeGen: Remove implicit conversions from Analysis and BranchFolding
Remove a few more implicit ilist iterator conversions, this time from
Analysis.cpp and BranchFolding.cpp.
I added a few overloads for `remove()` and `erase()`, which quite
naturally take pointers as well as iterators as parameters. This will
reduce the churn at least in the short term, but I don't really have a
problem with these existing for longer.
llvm-svn: 249867
David Blaikie [Fri, 9 Oct 2015 18:22:18 +0000 (18:22 +0000)]
Remove some unused variables in -Asserts builds
llvm-svn: 249866
Owen Anderson [Fri, 9 Oct 2015 18:06:13 +0000 (18:06 +0000)]
Refine the definition of convergent to only disallow the addition of new control dependencies.
This covers the common case of operations that cannot be sunk.
Operations that cannot be hoisted should already be handled properly via
the safe-to-speculate rules and mechanisms.
llvm-svn: 249865
Sean Callanan [Fri, 9 Oct 2015 18:01:10 +0000 (18:01 +0000)]
Don't blindly use C for eLanguageTypeUnknown when getting a scratch TypeSystem.
Instead check what languages are supported for expressions; use C if available,
but otherwise pick one of the supported languages.
This can be overridden using the target settings.
<rdar://problem/
22290878>
llvm-svn: 249864
Sanjay Patel [Fri, 9 Oct 2015 18:01:03 +0000 (18:01 +0000)]
fix typos; NFC
llvm-svn: 249863
Chris Bieneman [Fri, 9 Oct 2015 17:55:21 +0000 (17:55 +0000)]
[CMake] If LLVM_DYLIB_EXPORT_ALL is On don't generate an export list at all, just export the world.
This should resolve Bug 24157 - CMake built shared library does not export all public symbols
llvm-svn: 249862
Diego Novillo [Fri, 9 Oct 2015 17:54:24 +0000 (17:54 +0000)]
Add inline stack streaming to binary sample profiles.
With this patch we can now read and write inline stacks in sample
profiles to the binary encoded profiles.
In a subsequent patch, I will add a string table to the binary encoding.
Right now function names are emitted as strings every time we find them.
This is too bloated and will produce large files in applications with
lots of inlining.
llvm-svn: 249861
Bruce Mitchener [Fri, 9 Oct 2015 17:51:19 +0000 (17:51 +0000)]
[debugserver,cmake] Add DEPENDS to custom commands.
Summary:
Add dependencies to the custom commands so that they get
re-executed as needed.
Reviewers: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D13580
llvm-svn: 249860
Dan Gohman [Fri, 9 Oct 2015 17:50:00 +0000 (17:50 +0000)]
[WebAssembly] Rename floating-point operators to match their spec names.
llvm-svn: 249859
Chris Bieneman [Fri, 9 Oct 2015 17:45:44 +0000 (17:45 +0000)]
[CMake] Fixing LTO library path passed into bootstrap builds.
This just fixes a small error in constructing the path to the LTO library.
llvm-svn: 249858
Jonathan Peyton [Fri, 9 Oct 2015 17:42:52 +0000 (17:42 +0000)]
[OMPT] Reduce overhead of OMPT
* Avoid computing state needed only by OMPT unless the ompt_enabled flag is set.
* Properly handle a corner case in OMPT where team == NULL.
Patch by John Mellor-Crummey
Differential Revision: http://reviews.llvm.org/D13502
llvm-svn: 249857
Artur Pilipenko [Fri, 9 Oct 2015 17:41:29 +0000 (17:41 +0000)]
Add verification for align, dereferenceable, dereferenceable_or_null load metadata
Reviewed By: reames
Differential Revision: http://reviews.llvm.org/D13428
llvm-svn: 249856
Jonathan Peyton [Fri, 9 Oct 2015 17:38:05 +0000 (17:38 +0000)]
[OMPT] Initialize task fields only if needed
Because __kmp_task_init_ompt is called for every initial task in each thread
and always generated task ids, this was a big performance issue on bigger
systems even without any tool attached. After changing the initialization
interface to ompt_tool, we can now rely on already knowing whether a tool is
attached and OMPT is enabled at this point.
Patch by Jonas Hahnfeld
Differential Revision: http://reviews.llvm.org/D13494
llvm-svn: 249855
Keno Fischer [Fri, 9 Oct 2015 17:24:54 +0000 (17:24 +0000)]
Clear SectionSymbols in MCContext::Reset
This was just forgotten when SectionSymbols was introduced and could cause
corruption if the MCContext was reused after Reset.
Reviewers: rafael
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D13547
llvm-svn: 249854
Johannes Doerfert [Fri, 9 Oct 2015 17:12:26 +0000 (17:12 +0000)]
Consolidate invariant loads
If a (assumed) invariant location is loaded multiple times we
generated a parameter for each location. However, this caused compile
time problems for several benchmarks (e.g., 445_gobmk in SPEC2006 and
BT in the NAS benchmarks). Additionally, the code we generate is
suboptimal as we preload the same location multiple times and perform
the same checks on all the parameters that refere to the same value.
With this patch we consolidate the invariant loads in three steps:
1) During SCoP initialization required invariant loads are put in
equivalence classes based on their pointer operand. One
representing load is used to generate a parameter for the whole
class, thus we never generate multiple parameters for the same
location.
2) During the SCoP simplification we remove invariant memory
accesses that are in the same equivalence class. While doing so
we build the union of all execution domains as it is only
important that the location is at least accessed once.
3) During code generation we only preload one element of each
equivalence class with the unified execution domain. All others
are mapped to that preloaded value.
Differential Revision: http://reviews.llvm.org/D13338
llvm-svn: 249853
Duncan P. N. Exon Smith [Fri, 9 Oct 2015 16:54:54 +0000 (16:54 +0000)]
AArch64: Make getNextNode() cleanup in r249764 more clear
After r249764, if you didn't see the full context, it looked like
`std::next(I)` would get the same result as
`++MachineBasicBlock::iterator(I)`. However, `I` is a `MachineInstr*`
(not a `MachineBasicBlock::iterator`).
Use the `getIterator()` helper I added later (r249782) to make this code
more clear.
llvm-svn: 249852
Duncan P. N. Exon Smith [Fri, 9 Oct 2015 16:54:49 +0000 (16:54 +0000)]
CodeGen: Start removing implicit conversions to/from list iterators, NFC
Start removing implicit conversions to/from list iterators in CodeGen,
ala r249782 for IR. A lot more to go after this.
llvm-svn: 249851
Duncan P. N. Exon Smith [Fri, 9 Oct 2015 16:51:23 +0000 (16:51 +0000)]
Revert "Support: Partially revert r249782 to unbreak clang build"
This reverts commit r249783, fully reinstating r249782. I've fixed the
bug in clang: it was a non-const iterator that dereferenced to const
(but had an implicit conversion to non-const).
llvm-svn: 249850
Duncan P. N. Exon Smith [Fri, 9 Oct 2015 16:50:55 +0000 (16:50 +0000)]
Analysis: Make CFG::graph_iterator dereference to non-const
Since the original commit in r145858, we've had `CFG::graph_iterator`
and `CFG::const_graph_iterator`, and both have derefenced to a
`const`-ified `value_type`. The former has an implicit conversion to
non-`const`, which is how this worked at all until r249782 started using
the dereference operator (partially reverted in r249783).
This fixes the non-const iterator to be non-const (sometimes
const-iterators are intentional, but with a separate const-ified class
(and a non-const implicit conversion leak) that's not likely to be the
case here).
llvm-svn: 249849
Dehao Chen [Fri, 9 Oct 2015 16:50:16 +0000 (16:50 +0000)]
Make HeaderLineno a local variable.
http://reviews.llvm.org/D13576
As we are using hierarchical profile, there is no need to keep HeaderLineno a member variable. This is because each level of the inline stack will have its own header lineno. One should use the head lineno of its own inline stack level instead of the actual symbol.
llvm-svn: 249848
Reid Kleckner [Fri, 9 Oct 2015 16:49:56 +0000 (16:49 +0000)]
Fix pdb.test when python is not on PATH
llvm-svn: 249847
Reid Kleckner [Fri, 9 Oct 2015 16:48:52 +0000 (16:48 +0000)]
Fix VFS GCC unittest on Windows
llvm-svn: 249846
Kevin Enderby [Fri, 9 Oct 2015 16:48:44 +0000 (16:48 +0000)]
Fixed two bugs in llvm-objdump’s printing of Objective-C meta data
from malformed Mach-O files that caused crashes. The first because the
offset in a dyld bind table entry was out of range. The second because their
was no image info section and the routine printing it did not have the
need check to see the section did not exist.
rdar://
22983603
llvm-svn: 249845
Chris Bieneman [Fri, 9 Oct 2015 16:47:43 +0000 (16:47 +0000)]
[CMake] [Darwin] [Builtins] Fixing a typo that was keeping the OS X 10.4 builtins library from being built properly.
llvm-svn: 249844
Rafael Espindola [Fri, 9 Oct 2015 16:15:57 +0000 (16:15 +0000)]
Don't silently ignore an error.
Found by inspection.
llvm-svn: 249843
Rui Ueyama [Fri, 9 Oct 2015 16:03:53 +0000 (16:03 +0000)]
ELF2: Call OutputSection::finalize() from createSections.
Previously, we did this in assignAddresses(), but finalization was
not part of assigning addresses, so this is a better place.
llvm-svn: 249842
Artur Pilipenko [Fri, 9 Oct 2015 15:58:26 +0000 (15:58 +0000)]
ValueTracking: use getAlignment in isAligned
Reviewed By: reames
Differential Revision: http://reviews.llvm.org/D13517
llvm-svn: 249841
Bruce Mitchener [Fri, 9 Oct 2015 15:37:10 +0000 (15:37 +0000)]
Remove long-forgotten plugin virtuals.
Summary:
EnablePluginLogging, GetPluginCommandHelp and ExecutePluginCommand aren't
implemented or used anywhere, so remove them from the Hexagon and POSIX
Dynamic Loaders as well as the FreeBSD process.
Reviewers: clayborg, labath, emaste
Subscribers: lldb-commits, emaste
Differential Revision: http://reviews.llvm.org/D13581
llvm-svn: 249840
Rui Ueyama [Fri, 9 Oct 2015 15:31:49 +0000 (15:31 +0000)]
ELF2: Emit a PT_PHDR header as the first entry of the program header.
PT_PHDR entry points to the program header itself.
llvm-svn: 249839
Mohit K. Bhakkad [Fri, 9 Oct 2015 15:13:20 +0000 (15:13 +0000)]
[LLDB] Fix display of value of a vector variables in watchpoint operations
Reviewers: clayborg, zturner.
Subscribers: jaydeep, bhushan, sagar, nitesh.jain, brucem,lldb-commits.
Differential Revision: http://reviews.llvm.org/D13202
llvm-svn: 249838
Mohit K. Bhakkad [Fri, 9 Oct 2015 15:05:45 +0000 (15:05 +0000)]
[LLDB][MIPS] fix watchpoint searched on client side for same masked variables
Reviewers: clayborg, jingham.
Subscribers: jaydeep, bhushan, sagar, nitesh.jain, brucem,lldb-commits.
Differential Revision: http://reviews.llvm.org/D13548
llvm-svn: 249837
Frederic Riss [Fri, 9 Oct 2015 15:04:05 +0000 (15:04 +0000)]
[dsymutil] Prevent warning
llvm-svn: 249836
Rafael Espindola [Fri, 9 Oct 2015 14:25:49 +0000 (14:25 +0000)]
Revert "[ELF2] - Implemented rel[a].plt sections"
This reverts commit r249816.
It broke building llvm with lld:
$ ./bin/FileCheck
./bin/FileCheck: error while loading shared libraries: unexpected PLT reloc type 0x06
I think the only thing that is wrong with this patch is that it is too soon.
The plt we create (and its relocs) don't support lazy loading, so they have
to be relocated as ordinary dynamic relocations.
llvm-svn: 249835
Jun Bum Lim [Fri, 9 Oct 2015 14:11:25 +0000 (14:11 +0000)]
Improve ISel across lane float min/max reduction
In vectorized float min/max reduction code, the final "reduce" step
is sub-optimal. In AArch64, this change wll combine :
svn0 = vector_shuffle t0, undef<2,3,u,u>
fmin = fminnum t0,svn0
svn1 = vector_shuffle fmin, undef<1,u,u,u>
cc = setcc fmin, svn1, ole
n0 = extract_vector_elt cc, #0
n1 = extract_vector_elt fmin, #0
n2 = extract_vector_elt fmin, #1
result = select n0, n1,n2
into :
result = llvm.aarch64.neon.fminnmv t0
This change extends r247575.
llvm-svn: 249834
Aaron Ballman [Fri, 9 Oct 2015 13:53:24 +0000 (13:53 +0000)]
Amending r249721 to properly handle pathological attribute-related names like __ and ____.
Patch by Adrian Zgorzalek!
llvm-svn: 249833
Benjamin Kramer [Fri, 9 Oct 2015 13:28:13 +0000 (13:28 +0000)]
[VFS] Rename RedirectingFS internals to avoid collisions with public clang classes
Hopefully fixes the MSVC build. NFC intended.
llvm-svn: 249832
Benjamin Kramer [Fri, 9 Oct 2015 13:03:25 +0000 (13:03 +0000)]
[VFS] Wire up driver VFS through tooling.
Sadly I don't currently have a way to tests this as the driver is always
initialized with the default triple and finding system headers is system
specific.
llvm-svn: 249831
Benjamin Kramer [Fri, 9 Oct 2015 13:03:22 +0000 (13:03 +0000)]
[VFS] Just normalize away .. and . in paths for in-memory file systems.
This simplifies the code and gets us support for .. for free.
llvm-svn: 249830
Benjamin Kramer [Fri, 9 Oct 2015 13:03:18 +0000 (13:03 +0000)]
[VFS] Wire up multilib toolchain code to the VFS.
This lets a VFSified driver actually validate the GCC paths.
llvm-svn: 249829
Pavel Labath [Fri, 9 Oct 2015 12:48:17 +0000 (12:48 +0000)]
dotest.py: Fail if we detect multiple tests with the same name
Summary:
Log files produced by dotest have names derived from the test name, and this produces errors in
case we have multiple tests with the same name. Additionally, it's good if the test name explains
what the test is testing (which it clearly doesn't do well if there are multiple tests with
identical names). This commit makes the presence of such tests a hard error.
Reviewers: tberghammer, zturner
Subscribers: iancottrell, lldb-commits
Differential Revision: http://reviews.llvm.org/D13588
llvm-svn: 249828
Tamas Berghammer [Fri, 9 Oct 2015 12:43:08 +0000 (12:43 +0000)]
Fix a crash, an UB and add some assert to dwo symbol file handling
llvm-svn: 249827
Tamas Berghammer [Fri, 9 Oct 2015 12:06:10 +0000 (12:06 +0000)]
Fix the windows build after r249747
llvm-svn: 249826
Tamas Berghammer [Fri, 9 Oct 2015 12:06:07 +0000 (12:06 +0000)]
Fix the way dwo tests are skipped on darwin
We want to skip these tests when the target platform is darwin, not
when the host because they have to be enabled in case of darwin ->
android
llvm-svn: 249825
Jonas Paulsson [Fri, 9 Oct 2015 11:27:44 +0000 (11:27 +0000)]
[SystemZ] Remove unused code in SystemZElimCompare.cpp
The Reference IndirectDef and IndirectUse members were unused and therefore
removed.
llvm-svn: 249824
Pavel Labath [Fri, 9 Oct 2015 11:15:50 +0000 (11:15 +0000)]
Rename one of the TestGoASTContexts
llvm-svn: 249823
Nemanja Ivanovic [Fri, 9 Oct 2015 11:12:18 +0000 (11:12 +0000)]
Vector element extraction without stack operations on Power 8
This patch corresponds to review:
http://reviews.llvm.org/D12032
This patch builds onto the patch that provided scalar to vector conversions
without stack operations (D11471).
Included in this patch:
- Vector element extraction for all vector types with constant element number
- Vector element extraction for v16i8 and v8i16 with variable element number
- Removal of some unnecessary COPY_TO_REGCLASS operations that ended up
unnecessarily moving things around between registers
Not included in this patch (will be in upcoming patch):
- Vector element extraction for v4i32, v4f32, v2i64 and v2f64 with
variable element number
- Vector element insertion for variable/constant element number
Testing is provided for all extractions. The extractions that are not
implemented yet are just placeholders.
llvm-svn: 249822
Tamas Berghammer [Fri, 9 Oct 2015 11:01:56 +0000 (11:01 +0000)]
Fix regression caused by r249769
* Change TestSettings to test qith go instead of pascal as ToT pascal
support isn't complete
* Fix crash inside PluginManager
llvm-svn: 249821
Andrea Di Biagio [Fri, 9 Oct 2015 10:53:41 +0000 (10:53 +0000)]
[MemCpyOpt] Fix wrong merging adjacent nontemporal stores into memset calls.
Pass MemCpyOpt doesn't check if a store instruction is nontemporal.
As a consequence, adjacent nontemporal stores are always merged into a
memset call.
Example:
;;;
define void @foo(<4 x float>* nocapture %p) {
entry:
store <4 x float> zeroinitializer, <4 x float>* %p, align 16, !nontemporal !0
%p1 = getelementptr inbounds <4 x float>, <4 x float>* %dst, i64 1
store <4 x float> zeroinitializer, <4 x float>* %p1, align 16, !nontemporal !0
ret void
}
!0 = !{i32 1}
;;;
In this example, the two nontemporal stores are combined to a memset of zero
which does not preserve the nontemporal hint. Later on the backend (tested on a
x86-64 corei7) expands that memset call into a sequence of two normal 16-byte
aligned vector stores.
opt -memcpyopt example.ll -S -o - | llc -mcpu=corei7 -o -
Before:
xorps %xmm0, %xmm0
movaps %xmm0, 16(%rdi)
movaps %xmm0, (%rdi)
With this patch, we no longer merge nontemporal stores into calls to memset.
In this example, llc correctly expands the two stores into two movntps:
xorps %xmm0, %xmm0
movntps %xmm0, 16(%rdi)
movntps %xmm0, (%rdi)
In theory, we could extend the usage of !nontemporal metadata to memcpy/memset
calls. However a change like that would only have the effect of forcing the
backend to expand !nontemporal memsets back to sequences of store instructions.
A memset library call would not have exactly the same semantic of a builtin
!nontemporal memset call. So, SelectionDAG will have to conservatively expand
it back to a sequence of !nontemporal stores (effectively undoing the merging).
Differential Revision: http://reviews.llvm.org/D13519
llvm-svn: 249820
Pavel Labath [Fri, 9 Oct 2015 10:09:36 +0000 (10:09 +0000)]
Fix disabling of dwo tests
without this, dwo tests would be run even if they were meant to be disabled.
llvm-svn: 249819
Igor Kudrin [Fri, 9 Oct 2015 09:58:39 +0000 (09:58 +0000)]
[ELF2] Check for TLS mismatch in symbol resolution.
The linker should generate an error if a TLS symbol is resolved
for a non-TLS reference and vice versa.
The patch addresses PR24244 (https://llvm.org/bugs/show_bug.cgi?id=24244)
Differential Revision: http://reviews.llvm.org/D13550
llvm-svn: 249817
George Rimar [Fri, 9 Oct 2015 09:58:08 +0000 (09:58 +0000)]
[ELF2] - Implemented rel[a].plt sections
.rela.plt contains list of elements in the PLT, which are liable to the relocation during the dynamic linking.
Differential Revision: http://reviews.llvm.org/D13569
llvm-svn: 249816
Benjamin Kramer [Fri, 9 Oct 2015 09:54:37 +0000 (09:54 +0000)]
[VFS] Port tooling to use the in-memory file system.
This means file remappings can now be managed by ClangTool (or a
ToolInvocation user) instead of by ToolInvocation itself. The
ToolInvocation remapping is still in place so users can migrate.
Differential Revision: http://reviews.llvm.org/D13474
llvm-svn: 249815
Arnaud A. de Grandmaison [Fri, 9 Oct 2015 09:23:01 +0000 (09:23 +0000)]
[EarlyCSE] Address post commit review for r249523.
llvm-svn: 249814
Jonas Paulsson [Fri, 9 Oct 2015 07:19:20 +0000 (07:19 +0000)]
[SystemZ] Remove superfluous braces in SystemZShortenInst.cpp
llvm-svn: 249812
Jonas Paulsson [Fri, 9 Oct 2015 07:19:16 +0000 (07:19 +0000)]
[SystemZ] Minor bugfixes.
LLCH, LLHH and CLIH had the wrong register classes for the def-operand.
Tie operands if changing opcode to an instruction with tied ops.
Comment typo fix.
These fixes were needed in order to make regression test case
SystemZ/asm-18.ll pass with -verify-machineinstrs (not used by
default).
Reviewed by Ulrich Weigand.
llvm-svn: 249811
Jonas Paulsson [Fri, 9 Oct 2015 07:19:12 +0000 (07:19 +0000)]
[SystemZ] Bugfix in SystemZAsmParser.cpp.
Let parseRegister() allow RegFP Group if expecting RegV Group, since the
%f register prefix yields the FP group even while used with vector instructions.
Reviewed by Ulrich Weigand.
llvm-svn: 249810
Mohit K. Bhakkad [Fri, 9 Oct 2015 06:34:52 +0000 (06:34 +0000)]
Addressing warning due to rL249651
llvm-svn: 249809
Kostya Serebryany [Fri, 9 Oct 2015 04:03:14 +0000 (04:03 +0000)]
[libFuzzer] don't print large artifacts to stderr
llvm-svn: 249808
Kostya Serebryany [Fri, 9 Oct 2015 03:57:59 +0000 (03:57 +0000)]
[libFuzzer] add -artifact_prefix flag
llvm-svn: 249807
Bruce Mitchener [Fri, 9 Oct 2015 03:40:55 +0000 (03:40 +0000)]
Fix handling of LLDB_VERS_GENERATED_FILE.
Summary:
This is Darwin only.
The symbol defined by ${LLDB_VERS_GENERATED_FILE} is used by
source/lldb.cpp, so anything that uses lldb.cpp (which is in
lldbBase) should also have the generated symbol. This means
that the entire process can be centralized within source/CMakeLists.txt
where lldbBase is constructed.
Additionally, the custom command should have dependencies on the
project file as well as the generation script so that if either
changes, the version file is correctly re-generated and everything
is re-linked appropriately.
* cmake/LLDBDependencies.cmake: Remove everything related to
the generated version file from here.
* source/CMakeLists.txt: On Darwin, add the generated version
file to the sources that make up lldbBase. Also, create a
custom target and make lldbBase depend on it to re-generate
the generated file as needed.
* source/API/CMakeLists.txt: Don't need to build the generated
version file here or use it to control linking against swig_wrapper.
* tools/lldb-server/CMakeLists.txt: Likewise.
Reviewers: dawn, sas, clayborg, zturner
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D13552
llvm-svn: 249806
Saleem Abdulrasool [Fri, 9 Oct 2015 03:19:03 +0000 (03:19 +0000)]
ARM: tweak WoA frame lowering
Accept r11 when targeting Windows on ARM rather than just low registers.
Because we are in a thumb-2 only mode, this may be slightly more expensive in
code size, but results in better code for the environment since it spills the
frame register, which is generally desired for fast stack walking as per the
ABI.
llvm-svn: 249804
Rui Ueyama [Fri, 9 Oct 2015 02:46:28 +0000 (02:46 +0000)]
ELF2: Sort. NFC.
llvm-svn: 249803
Sanjoy Das [Fri, 9 Oct 2015 02:44:45 +0000 (02:44 +0000)]
[SCEV] Call `StrengthenNoWrapFlags` after `GroupByComplexity`; NFCI
The current implementation of `StrengthenNoWrapFlags` is agnostic to the
order of `Ops`, so this commit should not change anything semantic. An
upcoming change will make `StrengthenNoWrapFlags` sensitive to the order
of `Ops`.
llvm-svn: 249802
Vedant Kumar [Fri, 9 Oct 2015 01:47:26 +0000 (01:47 +0000)]
[Sema] Add "Ty" suffix to QualType variables for clarity (NFC)
llvm-svn: 249801
Richard Smith [Fri, 9 Oct 2015 01:41:45 +0000 (01:41 +0000)]
Split <stdlib.h> out of <cstdlib>.
llvm-svn: 249800
Reid Kleckner [Fri, 9 Oct 2015 01:33:15 +0000 (01:33 +0000)]
Remove the XFAIL for the C++ EH test
It works on Windows now.
llvm-svn: 249799
Richard Smith [Fri, 9 Oct 2015 01:29:09 +0000 (01:29 +0000)]
Split <stdio.h> out of <cstdio>.
As with <stddef.h>, skip our custom header if __need_FILE or __need___FILE is defined.
llvm-svn: 249798
Reid Kleckner [Fri, 9 Oct 2015 01:18:27 +0000 (01:18 +0000)]
Re-enable the coff-dwarf test on Windows
Apparently system-windows was only a clang lit suite feature.
llvm-svn: 249797
Reid Kleckner [Fri, 9 Oct 2015 01:13:17 +0000 (01:13 +0000)]
Revert "Revert "Revert r248959, "[WinEH] Emit int3 after noreturn calls on Win64"""
This reverts commit r249794.
Apparently my checkouts are full of unexpected surprises today.
llvm-svn: 249796
Reid Kleckner [Fri, 9 Oct 2015 01:11:40 +0000 (01:11 +0000)]
Fix coff-dwarf test for non-Windows platforms that cannot demangle MS C++ names
llvm-svn: 249795
Reid Kleckner [Fri, 9 Oct 2015 01:11:37 +0000 (01:11 +0000)]
Revert "Revert r248959, "[WinEH] Emit int3 after noreturn calls on Win64""
This reverts commit r249032.
TODO write commit msg
llvm-svn: 249794
Rui Ueyama [Fri, 9 Oct 2015 00:50:05 +0000 (00:50 +0000)]
Simplify expressions. NFC.
llvm-svn: 249793
Joseph Tremoulet [Fri, 9 Oct 2015 00:46:08 +0000 (00:46 +0000)]
[WinEH] Fix cleanup state numbering
Summary:
- Recurse from cleanupendpads to their cleanuppads, to make sure the
cleanuppad is visited if it has a cleanupendpad but no cleanupret.
- Check for and avoid double-processing cleanuppads, to allow for them to
have multiple cleanuprets (plus cleanupendpads).
- Update Cxx state numbering to visit toplevel cleanupendpads and to
recurse from cleanupendpads to their preds, to ensure we number any
funclets in inlined cleanups. SEH state numbering already did this.
Reviewers: rnk
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D13374
llvm-svn: 249792
Rui Ueyama [Fri, 9 Oct 2015 00:42:06 +0000 (00:42 +0000)]
Remove getters/setters that don't provide much abstraction.
llvm-svn: 249791
Eric Christopher [Fri, 9 Oct 2015 00:35:30 +0000 (00:35 +0000)]
Fix a few typos in the required feature set for some of the x86
builtins:
avx512vd -> avx512vl
rdrand -> rdrnd
avx512ff -> avx512f
no functional change.
llvm-svn: 249790
Rui Ueyama [Fri, 9 Oct 2015 00:33:44 +0000 (00:33 +0000)]
Define --output= as an alias to -o.
llvm-svn: 249789
Richard Smith [Fri, 9 Oct 2015 00:26:50 +0000 (00:26 +0000)]
PR25118: move system_header pragma before uses of include_next to avoid extension warnings for people finding libc++ headers via -I paths.
llvm-svn: 249788