Chandler Carruth [Tue, 26 Nov 2013 22:36:41 +0000 (22:36 +0000)]
[PM] [cleanup] Replace a reserved identifier "_Self" with the injected
class name. I think we're no longer using any compilers with
sufficiently broken ICN for this use case, but I'll watch the bots and
introduce a typedef without a reserved name if any yell at me.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195793
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 26 Nov 2013 22:24:25 +0000 (22:24 +0000)]
PR1860 - We can't save a list of ExtractElement instructions to CSE because some of these instructions
may be removed and optimized in future iterations. Instead we save a list of basic blocks that we need to CSE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195791
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 26 Nov 2013 22:23:27 +0000 (22:23 +0000)]
80-column fixups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195790
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 26 Nov 2013 22:17:37 +0000 (22:17 +0000)]
[AArch64] Add support for NEON scalar floating-point to integer convert
instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195788
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Tue, 26 Nov 2013 22:11:23 +0000 (22:11 +0000)]
LoopVectorizer: Truncate i64 trip counts of i32 phis if necessary
In signed arithmetic we could end up with an i64 trip count for an i32 phi.
Because it is signed arithmetic we know that this is only defined if the i32
does not wrap. It is therefore safe to truncate the i64 trip count to a i32
value.
Fixes PR18049.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195787
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 26 Nov 2013 20:55:11 +0000 (20:55 +0000)]
[PM] [cleanup] Run clang-format over this file. If fixes many
inconsistencies that I'll just need to fix myself as I edit things.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195784
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 26 Nov 2013 20:51:48 +0000 (20:51 +0000)]
[PM] [cleanup] Update doxygen comments to use the new style, add some
doxygen comments, make existing comments doxygen comments etc.
Also, switch commented-out debug helpers to #if-0-ed out debug helpers.
No functionality changed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195783
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Tue, 26 Nov 2013 20:40:34 +0000 (20:40 +0000)]
[OCaml] Embed the flags necessary for linking with libLLVM.so into .cmxa files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195782
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Tue, 26 Nov 2013 20:38:40 +0000 (20:38 +0000)]
Fix a bug related to constant islands for Mips16 and mips16/32 dual mode.
The determination of when we are doing constant pools was being made too
early in the asm printer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195781
91177308-0d34-0410-b5e6-
96231b3b80d8
Diego Novillo [Tue, 26 Nov 2013 20:37:33 +0000 (20:37 +0000)]
Refactor some code in SampleProfile.cpp
I'm adding new functionality in the sample profiler. This will
require more data to be kept around for each function, so I moved
the structure SampleProfile that we keep for each function into
a separate class.
There are no functional changes in this patch. It simply provides
a new home where to place all the new data that I need to propagate
weights through edges.
There are some other name and minor edits throughout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195780
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Tue, 26 Nov 2013 20:31:31 +0000 (20:31 +0000)]
Fix PR18054
- Fix bug in (vsext (vzext x)) -> (vsext x) in SIGN_EXTEND_IN_REG
lowering where we need to check whether x is a vector type (in-reg
type) of i8, i16 or i32; otherwise, that optimization is not valid.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195779
91177308-0d34-0410-b5e6-
96231b3b80d8
Diego Novillo [Tue, 26 Nov 2013 20:11:12 +0000 (20:11 +0000)]
Add PostDominatorTree::getDescendants.
This patch adds the counter-part to DominatorTree::getDescendants.
It also fixes a couple of comments I noticed out of date in the
DominatorTree class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195778
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 26 Nov 2013 19:14:34 +0000 (19:14 +0000)]
DwarfDebug: Include type units in accelerator tables.
Since type units aren't in the CUMap, use the DwarfUnits list to iterate
over units for tasks such as accelerator table building.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195776
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Tue, 26 Nov 2013 18:54:37 +0000 (18:54 +0000)]
Fix spurious return introduced by my earlier patch to DebugInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195775
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 26 Nov 2013 17:29:19 +0000 (17:29 +0000)]
PR18060 - When we RAUW values with ExtractElement instructions in some cases
we generate PHI nodes with multiple entries from the same basic block but
with different values. Enabling CSE on ExtractElement instructions make sure
that all of the RAUWed instructions are the same.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195773
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Tue, 26 Nov 2013 16:47:00 +0000 (16:47 +0000)]
Add return to DIType::Verify
Code scanner ran by Sylvestre Ledru got a no_return bug
in DebugInfo.cpp. Adding the return statements that
should be there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195772
91177308-0d34-0410-b5e6-
96231b3b80d8
Stepan Dyatkovskiy [Tue, 26 Nov 2013 16:11:03 +0000 (16:11 +0000)]
PR17925 bugfix.
Short description.
This issue is about case of treating pointers as integers.
We treat pointers as different if they references different address space.
At the same time, we treat pointers equal to integers (with machine address
width). It was a point of false-positive. Consider next case on 32bit machine:
void foo0(i32 addrespace(1)* %p)
void foo1(i32 addrespace(2)* %p)
void foo2(i32 %p)
foo0 != foo1, while
foo1 == foo2 and foo0 == foo2.
As you can see it breaks transitivity. That means that result depends on order
of how functions are presented in module. Next order causes merging of foo0
and foo1: foo2, foo0, foo1
First foo0 will be merged with foo2, foo0 will be erased. Second foo1 will be
merged with foo2.
Depending on order, things could be merged we don't expect to.
The fix:
Forbid to treat any pointer as integer, except for those, who belong to address space 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195769
91177308-0d34-0410-b5e6-
96231b3b80d8
Timur Iskhodzhanov [Tue, 26 Nov 2013 13:34:55 +0000 (13:34 +0000)]
Rename DwarfException methods so the new names are consistent with DwarfDebug and the style guide
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195763
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 26 Nov 2013 12:45:05 +0000 (12:45 +0000)]
Darwin-ARM: use movw/movt for static relocations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195759
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 26 Nov 2013 12:00:58 +0000 (12:00 +0000)]
[PM] Fix a stale comment after my last refactoring spoted by Joey in
review!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195757
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 26 Nov 2013 11:31:06 +0000 (11:31 +0000)]
[PM] Remove four extraneous 'typename's that Clang (in C++11 mode) is
happy with but GCC complains about. I'm assuming both compilers are
correct and these are optional in C++11 because I'm too tired to read
the standard. ;]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195748
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 26 Nov 2013 11:24:37 +0000 (11:24 +0000)]
[PM] Factor the overwhelming majority of the interface boiler plate out
of the two analysis managers into a CRTP base class that can be shared
and re-used in building any analysis manager. This will in turn simplify
adding yet another analysis manager to the system.
The base class provides all of the interface sugar for the analysis
manager delegating the functionality back through DerivedT methods which
operate on simple pass IDs. It also provides the pass registration,
storage, and lookup system which is common across the various
formulations of analysis managers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195747
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Tue, 26 Nov 2013 10:53:16 +0000 (10:53 +0000)]
[SystemZ] Fix incorrect use of RISBG for a zero-extended right shift
We would wrongly transform the testcase into the equivalent of an AND with 1.
The problem was that, when testing whether the shifted-in bits of the right
shift were significant, we used the width of the final zero-extended result
rather than the width of the shifted value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195731
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnaud A. de Grandmaison [Tue, 26 Nov 2013 10:33:53 +0000 (10:33 +0000)]
CMake : optionaly enable LLVM to be compiled with -std=c++11 (default: off)
In some case, it may be required to build LLVM in C++11 mode, as some the subprojects (like lldb) requires it.
This mimics the autoconf behaviour.
However, given the discussions on the switch to C++11 of the codebase, this behaviour should evolve to default to C++11 with some checks of the compiler capabilities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195727
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 26 Nov 2013 04:19:30 +0000 (04:19 +0000)]
[PM] Split the CallGraph out from the ModulePass which creates the
CallGraph.
This makes the CallGraph a totally generic analysis object that is the
container for the graph data structure and the primary interface for
querying and manipulating it. The pass logic is separated into its own
class. For compatibility reasons, the pass provides wrapper methods for
most of the methods on CallGraph -- they all just forward.
This will allow the new pass manager infrastructure to provide its own
analysis pass that constructs the same CallGraph object and makes it
available. The idea is that in the new pass manager, the analysis pass's
'run' method returns a concrete analysis 'result'. Here, that result is
a 'CallGraph'. The 'run' method will typically do only minimal work,
deferring much of the work into the implementation of the result object
in order to be lazy about computing things, but when (like DomTree)
there is *some* up-front computation, the analysis does it prior to
handing the result back to the querying pass.
I know some of this is fairly ugly. I'm happy to change it around if
folks can suggest a cleaner interim state, but there is going to be some
amount of unavoidable ugliness during the transition period. The good
thing is that this is very limited and will naturally go away when the
old pass infrastructure goes away. It won't hang around to bother us
later.
Next up is the initial new-PM-style call graph analysis. =]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195722
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 26 Nov 2013 03:45:26 +0000 (03:45 +0000)]
[PM] Reformat some code with clang-format as I'm going to be editting as
part of generalizing the call graph infrastructure for the new pass
manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195718
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 26 Nov 2013 03:43:52 +0000 (03:43 +0000)]
[PM] Add a really simple trait to the DOTGraphTraitsPass class templates
that lets the analysis and graph types be separate and the graph
computed from the analysis through some arbitrary user-supplied code.
This will allow a call graph to an independent entity from the pass
which creates it which is necessary for the new pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195717
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Qin [Tue, 26 Nov 2013 03:26:47 +0000 (03:26 +0000)]
Refactored the implementation of AArch64 NEON instruction ZIP, UZP
and TRN.
Fix a bug when mixed use of vget_high_u8() and vuzp_u8().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195716
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 26 Nov 2013 03:22:09 +0000 (03:22 +0000)]
[PM] Re-format this code with clang-format before making substantial
changes to it. No functionality changed.
You may wonder why on earth touching this code is involved in the pass
manager work as indicated by my lovely '[PM]' tag? Let me tell you
a story.
<redacted>
Yea, it's too long of a story. Let us say that there are yaks, many of
them. I am busy shaving them as fast as I can.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195715
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Qin [Tue, 26 Nov 2013 02:33:42 +0000 (02:33 +0000)]
[AArch64]Implement 128 bit register copy with NEON.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195713
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 26 Nov 2013 02:03:25 +0000 (02:03 +0000)]
StackMap: Implement support for DirectMemRefOp.
A Direct stack map location records the address of frame index. This
address is itself the value that the runtime requested. This differs
from IndirectMemRefOp locations, which refer to a stack locations from
which the requested values must be loaded. Direct locations can
directly communicate the address if an alloca, while IndirectMemRefOp
handle register spills.
For example:
entry:
%a = alloca i64...
llvm.experimental.stackmap(i32 <ID>, i32 <shadowBytes>, i64* %a)
Since both the alloca and stackmap intrinsic are in the entry block,
and the intrinsic takes the address of the alloca, the runtime can
assume that LLVM will not substitute alloca with any intervening
value. This must be verified by the runtime by checking that the stack
map's location is a Direct location type. The runtime can then
determine the alloca's relative location on the stack immediately after
compilation, or at any time thereafter. This differs from Register and
Indirect locations, because the runtime can only read the values in
those locations when execution reaches the instruction address of the
stack map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195712
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 26 Nov 2013 02:03:20 +0000 (02:03 +0000)]
whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195711
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 26 Nov 2013 01:27:20 +0000 (01:27 +0000)]
[PM] Make the (really awesome) file comment here available as part of
the Doxygen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195709
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 26 Nov 2013 01:25:07 +0000 (01:25 +0000)]
[PM] Reformat this file with clang-format. Mostly fixes inconsistent
spacing around the '*' in pointer types. Will let me use clang-format on
subsequent changes without introducing any noise. No functionality
changed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195708
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 26 Nov 2013 01:11:02 +0000 (01:11 +0000)]
DebugInfo: Update test case due to dumper improvements in r195698
The dumper was only dumping one pubtypes set and it was /always/ dumping
one pubtypes set even when there were zero sets. Now that the dumper
correctly dumps zero, one, or many sets, we can update this test case to
test for the absolute absence of a set rather than a bogus/accidental
zero-valued set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195706
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 26 Nov 2013 00:54:44 +0000 (00:54 +0000)]
Lift self-copy protection up to the header file and add self-move
protection to the same layer.
This is in line with Howard's advice on how best to handle self-move
assignment as he explained on SO[1]. It also ensures that implementing
swap with move assignment continues to work in the case of self-swap.
[1]: http://stackoverflow.com/questions/
9322174/move-assignment-operator-and-if-this-rhs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195705
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 26 Nov 2013 00:44:36 +0000 (00:44 +0000)]
Fix a self-memcpy which only breaks under Valgrind's memcpy
implementation. Silliness, but it'll be a trivial performance
optimization. This should clear up a failure on the vg_leak bot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195704
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 26 Nov 2013 00:37:27 +0000 (00:37 +0000)]
[PM] Sink a trailing comment to be a doxygen comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195702
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 26 Nov 2013 00:37:23 +0000 (00:37 +0000)]
[PM] Rename the 'Mod' member to the more idiomatic 'M'. No functionality
changed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195701
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 26 Nov 2013 00:35:04 +0000 (00:35 +0000)]
DebugInfo: Remove CompileUnit::constructTypeDIEImpl now that it's just a simple wrapper again.
r195698 moved the type unit checking up into getOrCreateTypeDIE so
remove the redundant check and fold the functions back together again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195700
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 26 Nov 2013 00:29:36 +0000 (00:29 +0000)]
[PM] Clean up a bunch of comments, modernize the doxygen, nuke some
whitespace, and a couple of argument name fixes before I start hacking
on this code. No functionality changed here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195699
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 26 Nov 2013 00:22:37 +0000 (00:22 +0000)]
DebugInfo: Avoid emitting pubtype entries for type DIEs that just indirect to a type unit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195698
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron McInally [Tue, 26 Nov 2013 00:20:43 +0000 (00:20 +0000)]
Add an intrinsic for the SSE2 PAUSE instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195697
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 26 Nov 2013 00:15:27 +0000 (00:15 +0000)]
DebugInfo: Pubtypes: Coelesce pubtype registration with accelerator type registration.
It might be possible to eventually use one data structure, but I haven't
looked at the exact criteria used for accelerator tables and pubtypes to
see if there's good reason for the differences between the two or not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195696
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 25 Nov 2013 22:24:27 +0000 (22:24 +0000)]
Add the test case that I missed when committing r195528. Doh!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195691
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 25 Nov 2013 20:50:03 +0000 (20:50 +0000)]
Do the string comparison in the constructor instead of once per nop.
Thanks to Roman Divacky for the suggestion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195684
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 25 Nov 2013 20:46:18 +0000 (20:46 +0000)]
Use -triple to fix the test on non-ELF hosts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195682
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 25 Nov 2013 20:15:14 +0000 (20:15 +0000)]
Don't use nopl in cpus that don't support it.
Patch by Mikulas Patocka. I added the test. I checked that for cpu names that
gas knows about, it also doesn't generate nopl.
The modified cpus:
i686 - there are i686-class CPUs that don't have nopl: Via c3, Transmeta
Crusoe, Microsoft VirtualBox - see
https://bbs.archlinux.org/viewtopic.php?pid=775414
k6, k6-2, k6-3, winchip-c6, winchip2 - these are 586-class CPUs
via c3 c3-2 - see https://bugs.archlinux.org/task/19733 as a proof that
Via c3 and c3-Nehemiah don't have nopl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195679
91177308-0d34-0410-b5e6-
96231b3b80d8
David Peixotto [Mon, 25 Nov 2013 19:11:13 +0000 (19:11 +0000)]
ARM integrated assembler generates incorrect nop opcode
This patch fixes a bug in the assembler that was causing bad code to
be emitted. When switching modes in an assembly file (e.g. arm to
thumb mode) we would always emit the opcode from the original mode.
Consider this small example:
$ cat align.s
.code 16
foo:
add r0, r0
.align 3
add r0, r0
$ llvm-mc -triple armv7-none-linux align.s -filetype=obj -o t.o
$ llvm-objdump -triple thumbv7 -d t.o
Disassembly of section .text:
foo:
0: 00 44 add r0, r0
2: 00 f0 20 e3 blx #
4195904
6: 00 00 movs r0, r0
8: 00 44 add r0, r0
This shows that we have actually emitted an arm nop (
e320f000)
instead of a thumb nop. Unfortunately, this encodes to a thumb
branch which causes bad things to happen when compiling assembly
code with align directives.
The fix is to notify the ARMAsmBackend when we switch mode. The
MCMachOStreamer was already doing this correctly. This patch makes
the same change for the MCElfStreamer.
There is still a bug in the way nops are emitted for alignment
because the MCAlignment fragment does not store the correct mode.
The ARMAsmBackend will emit nops for the last mode it knew about. In
the example above, we still generate an arm nop if we add a `.code
32` to the end of the file.
PR18019
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195677
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 25 Nov 2013 18:05:22 +0000 (18:05 +0000)]
Unrevert r195599 with testcase fix.
I'm not sure how it was checking for the wrong values...
PR18023.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195670
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 25 Nov 2013 17:04:35 +0000 (17:04 +0000)]
Fix indentation typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195660
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 25 Nov 2013 16:24:52 +0000 (16:24 +0000)]
ARM: remove special cases for Darwin dynamic-no-pic mode.
These are handled almost identically to static mode (and ELF's global address
materialisation), except that a symbol may have "$non_lazy_ptr" appended. This
can be handled by passing appropriate flags along with the instruction instead
of using entirely separate pseudo-instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195655
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 25 Nov 2013 16:06:04 +0000 (16:06 +0000)]
Fix .comm and .lcomm on COFF.
These should not use COMDATs. GNU as uses .bss for .lcomm and section 0 for
.comm.
Given
static int a;
int b;
MSVC puts both in .bss. This patch then puts both .comm and .lcomm on .bss. With
this change we agree with gas on .lcomm, are much closer on .comm and clang-cl
matches msvc on the above example.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195654
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 25 Nov 2013 16:00:32 +0000 (16:00 +0000)]
Refactor to make the .bss, .data and .text sections available for other uses.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195653
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 25 Nov 2013 15:40:24 +0000 (15:40 +0000)]
Make helper function static.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195650
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 25 Nov 2013 14:40:57 +0000 (14:40 +0000)]
ARM: remove unused patterns.
There is no sane way for an LEApcrel (= single ADR) instruction to generate a
global address on any ARM target I know of. Fortunately, no-one was trying to
any more, but there were vestigial patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195644
91177308-0d34-0410-b5e6-
96231b3b80d8
Amara Emerson [Mon, 25 Nov 2013 13:17:15 +0000 (13:17 +0000)]
[ARM] Enable FeatureMP for Cortex-A5 by default.
Patch by Oliver Stannard.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195640
91177308-0d34-0410-b5e6-
96231b3b80d8
Amara Emerson [Mon, 25 Nov 2013 11:24:18 +0000 (11:24 +0000)]
Revert r195599 as it broke the builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195636
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Mon, 25 Nov 2013 11:14:43 +0000 (11:14 +0000)]
Fixed tryFoldToZero() for vector types that need expansion.
Summary:
Moved the requirement for SelectionDAG::getConstant() to return legally
typed nodes slightly earlier. There were two optional DAGCombine passes
that were missed out and were required to produce type-legal DAGs.
Simplified a code-path in tryFoldToZero() to use SelectionDAG::getConstant().
This provides support for both promoted and expanded vector types whereas the
previous code only supported promoted vector types.
Fixes a "Type for zero vector elements is not legal" assertion detected by
an llvm-stress generated test.
Reviewers: resistor
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2251
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195635
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 25 Nov 2013 09:52:59 +0000 (09:52 +0000)]
X86: enable AVX2 under Haswell native compilation
Patch by Adam Strzelecki
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195632
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 25 Nov 2013 05:01:21 +0000 (05:01 +0000)]
Don't look past volatile loads.
A volatile load should block us from trying to coalesce stores.
PR18023
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195599
91177308-0d34-0410-b5e6-
96231b3b80d8
Hao Liu [Mon, 25 Nov 2013 01:53:26 +0000 (01:53 +0000)]
Fixed a bug about disassembling AArch64 post-index load/store single element instructions.
ie. echo "0x00 0x04 0x80 0x0d" | ../bin/llvm-mc -triple=aarch64 -mattr=+neon -disassemble
echo "0x00 0x00 0x80 0x0d" | ../bin/llvm-mc -triple=aarch64 -mattr=+neon -disassemble
will be disassembled into the same instruction st1 {v0b}[0], [x0], x0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195591
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 25 Nov 2013 00:52:46 +0000 (00:52 +0000)]
SparcFrameLowering.cpp: Prune 'DL' [-Wunused-variable]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195590
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 25 Nov 2013 00:43:41 +0000 (00:43 +0000)]
Output a bit more information in the debug printing for MBP. This was
useful when analyzing parts of zlib's behavior here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195588
91177308-0d34-0410-b5e6-
96231b3b80d8
Venkatraman Govindaraju [Sun, 24 Nov 2013 20:23:25 +0000 (20:23 +0000)]
[Sparc] Emit large negative adjustments to SP/FP with sethi+xor instead of sethi+or. This generates correct code for both sparc32 and sparc64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195576
91177308-0d34-0410-b5e6-
96231b3b80d8
Venkatraman Govindaraju [Sun, 24 Nov 2013 20:07:35 +0000 (20:07 +0000)]
[Sparc]: Implement LEA pattern for sparcv9.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195575
91177308-0d34-0410-b5e6-
96231b3b80d8
Venkatraman Govindaraju [Sun, 24 Nov 2013 18:41:49 +0000 (18:41 +0000)]
[SparcV9]: Do not emit .register directives for global registers that are clobbered by calls but not used in the function itself.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195574
91177308-0d34-0410-b5e6-
96231b3b80d8
Venkatraman Govindaraju [Sun, 24 Nov 2013 17:41:41 +0000 (17:41 +0000)]
[SparcV9] Enable custom lowering of DYNAMIC_STACKALLOC in sparc64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195573
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Sun, 24 Nov 2013 06:18:50 +0000 (06:18 +0000)]
Make sure that for C++ emitting LwConstant32 pseudos, that it corresponds
to what is needed for constant islands. The prescan method for Mips16 constant
islands will eventually go away. It is only temporary and should be done
earlier when the instructions are first created or from the DAG. If we keep
it here we need to handle better the situation where constant islands
is called multiple times since don't want to prescan more than once.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195569
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 24 Nov 2013 05:29:35 +0000 (05:29 +0000)]
Default to a better compression algorithm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195567
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Sun, 24 Nov 2013 03:37:56 +0000 (03:37 +0000)]
Update older test cases for latest patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195566
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Sun, 24 Nov 2013 02:53:09 +0000 (02:53 +0000)]
Fix a funny bug I introduced during conversion of ARM constant islands to Mips.
I had to move some code and I moved a declaration forward past it's first use
in the function but by nutty coincidence there was another variable of the same
name and type and with completely unrelated function that was declared globally
in the class so no compilation error ensued.
It required some unusual conditions for it to even matter. Caused test
case casts.c in test-suite to fail during compilation with a duplicate
symbol error. I would have noticed it during final code review for this port.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195565
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Sat, 23 Nov 2013 23:06:20 +0000 (23:06 +0000)]
Put an unused result attribute on SmallSet::empty()
This matches other empty() container functions in LLVM.
No actual usage problems discovered in this instance.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195562
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 23 Nov 2013 01:25:07 +0000 (01:25 +0000)]
[PM] Complete the cross-layer interfaces with a Module-to-Function
proxy. This lets a function pass query a module analysis manager.
However, the interface is const to indicate that only cached results can
be safely queried.
With this, I think the new pass manager is largely functionally complete
for modules and analyses. Still lots to test, and need to generalize to
SCCs and Loops, and need to build an adaptor layer to support the use of
existing Pass objects in the new managers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195538
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 23 Nov 2013 01:25:02 +0000 (01:25 +0000)]
[PM] Rename TestAnalysisPass to TestFunctionAnalysis to clear the way
for a TestModuleAnalysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195537
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sat, 23 Nov 2013 01:17:34 +0000 (01:17 +0000)]
DwarfDebug: Move ownership of CompileUnits into DwarfUnits
This avoids the need for an extra list of SkeletonCUs and associated
cleanup while staging things to be cleaner for further type unit
improvements.
Also hopefully fixes a memory leak introduced in r195166.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195536
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Sat, 23 Nov 2013 01:16:29 +0000 (01:16 +0000)]
Debug Info: update testing cases to specify the debug info version number.
We are going to drop debug info without a version number or with a different
version number, to make sure we don't crash when we see bitcode files with
different debug info metadata format.
Make tests more robust by removing hard-coded metadata numbers in CHECK lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195535
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 23 Nov 2013 00:48:34 +0000 (00:48 +0000)]
Migrate metadata information from scalar to vector instructions during
SLP vectorization. Based on the code in BBVectorizer.
Fixes PR17741.
Patch by Raul Silvera, reviewed by Hal and Nadav. Reformatted by my
driving of clang-format. =]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195528
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 23 Nov 2013 00:38:42 +0000 (00:38 +0000)]
[PM] Add support to the analysis managers to query explicitly for cached
results.
This is the last piece of infrastructure needed to effectively support
querying *up* the analysis layers. The next step will be to introduce
a proxy which provides access to those layers with appropriate use of
const to direct queries to the safe interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195525
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 23 Nov 2013 00:05:29 +0000 (00:05 +0000)]
Refactor DW_AT_ranges handling to use labels for ranges rather than
a non-relocatable number offset.
One fixme to make the ranges as discrete data structures and
have range lists explicitly represented rather than as a list of symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195523
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 23 Nov 2013 00:05:06 +0000 (00:05 +0000)]
Reformat const for readability.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195522
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 22 Nov 2013 23:38:07 +0000 (23:38 +0000)]
[PM] Switch the downward invalidation to be incremental where only the
one function's analyses are invalidated at a time. Also switch the
preservation of the proxy to *fully* preserve the lower (function)
analyses.
Combined, this gets both upward and downward analysis invalidation to
a point I'm happy with:
- A function pass invalidates its function analyses, and its parent's
module analyses.
- A module pass invalidates all of its functions' analyses including the
set of which functions are in the module.
- A function pass can preserve a module analysis pass.
- If all function passes preserve a module analysis pass, that
preservation persists. If any doesn't the module analysis is
invalidated.
- A module pass can opt into managing *all* function analysis
invalidation itself or *none*.
- The conservative default is none, and the proxy takes the maximally
conservative approach that works even if the set of functions has
changed.
- If a module pass opts into managing function analysis invalidation it
has to propagate the invalidation itself, the proxy just does nothing.
The only thing really missing is a way to query for a cached analysis or
nothing at all. With this, function passes can more safely request
a cached module analysis pass without fear of it accidentally running
part way through.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195519
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 22 Nov 2013 23:37:54 +0000 (23:37 +0000)]
[PM] Remove a FIXME comment that was fixed by my recent refactorings:
now the access to the manager is via the proxy that ensures it behaves
correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195518
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 22 Nov 2013 23:07:58 +0000 (23:07 +0000)]
R600/SI: Fixing handling of condition codes
We were ignoring the ordered/onordered bits and also the signed/unsigned
bits of condition codes when lowering the DAG to MachineInstrs.
NOTE: This is a candidate for the 3.4 branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195514
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuchen Wu [Fri, 22 Nov 2013 23:07:45 +0000 (23:07 +0000)]
llvm-cov: Split entry blocks in GCNOProfiling.cpp.
gcov expects every function to contain an entry block that
unconditionally branches into the next block. clang does not implement
basic blocks in this manner, so gcov did not output correct branch info
if the entry block branched to multiple blocks.
This change splits every function's entry block into an empty block and
a block with the rest of the instructions. The instrumentation code will
take care of the rest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195513
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Fri, 22 Nov 2013 22:06:31 +0000 (22:06 +0000)]
Debug Info: move StripDebugInfo from StripSymbols.cpp to DebugInfo.cpp.
We can share the implementation between StripSymbols and dropping debug info
for metadata versions that do not match.
Also update the comments to match the implementation. A follow-on patch will
drop the "Debug Info Version" module flag in StripDebugInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195505
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Fri, 22 Nov 2013 21:49:45 +0000 (21:49 +0000)]
Debug Info: update testing cases to specify the debug info version number.
We are going to drop debug info without a version number or with a different
version number, to make sure we don't crash when we see bitcode files with
different debug info metadata format.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195504
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 22 Nov 2013 19:57:47 +0000 (19:57 +0000)]
X86: Perform integer comparisons at i32 or larger.
Utilizing the 8 and 16 bit comparison instructions, even when an input can
be folded into the comparison instruction itself, is typically not worth it.
There are too many partial register stalls as a result, leading to significant
slowdowns. By always performing comparisons on at least 32-bit
registers, performance of the calculation chain leading to the
comparison improves. Continue to use the smaller comparisons when
minimizing size, as that allows better folding of loads into the
comparison instructions.
rdar://
15386341
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195496
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Fri, 22 Nov 2013 19:41:59 +0000 (19:41 +0000)]
Debug Info: add a constant for debug info version number.
This will be used to output the debug info version number as a module flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195494
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 22 Nov 2013 19:24:39 +0000 (19:24 +0000)]
StructurizeCFG: Fix verification failure with some loops.
If the beginning of the loop was also the entry block
of the function, branches were inserted to the entry block
which isn't allowed. If this occurs, create a new dummy
function entry block that branches to the start of the loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195493
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 22 Nov 2013 19:24:37 +0000 (19:24 +0000)]
StructurizeCFG: Fix inverting a branch on an argument
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195492
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Robinson [Fri, 22 Nov 2013 19:11:24 +0000 (19:11 +0000)]
Teach ISel not to optimize 'optnone' functions (revised).
Improvements over r195317:
- Set/restore EnableFastISel flag instead of just running FastISel within
SelectAllBasicBlocks; the flag is checked in various places, and
FastISel won't run properly if those places don't do the right thing.
- Test looks for normal ISel versus FastISel behavior, and not
something more subtle that doesn't work everywhere.
Based on work by Andrea Di Biagio.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195491
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 22 Nov 2013 19:07:42 +0000 (19:07 +0000)]
DEBUG shouldEvict decisions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195490
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 22 Nov 2013 19:07:38 +0000 (19:07 +0000)]
Minor cleanup. EvictionCost ctor was confusing relative to the other costs floating around in the code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195489
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 22 Nov 2013 19:07:36 +0000 (19:07 +0000)]
patchpoint: factor SD builder code for live vars. Plain stackmap also optimizes Constant values now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195488
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 22 Nov 2013 19:07:33 +0000 (19:07 +0000)]
patchpoint: eliminate hard coded operand indices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195487
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Fri, 22 Nov 2013 18:25:43 +0000 (18:25 +0000)]
VS integration: use the correct registry key after r195379
I changed the registry key in that commit, but forgot to update
the integration files. This change makes them use the same variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195479
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 22 Nov 2013 17:58:12 +0000 (17:58 +0000)]
Add a fixed version of r195470 back.
The fix is simply to use CurI instead of I when handling aliases to
avoid accessing a invalid iterator.
original message:
Convert linkonce* to weak* instead of strong.
Also refactor the logic into a helper function. This is an important improve
on mingw where the linker complains about mixed weak and strong symbols.
Converting to weak ensures that the symbol is not dropped, but keeps in a
comdat, making the linker happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195477
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Fri, 22 Nov 2013 17:56:57 +0000 (17:56 +0000)]
Fix PR18014
- When simplifying the mask generation for BLEND, check whether that mask is
also consumed by other non-BLEND insns. If true, skip that simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195476
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Fri, 22 Nov 2013 17:28:28 +0000 (17:28 +0000)]
[SystemZ] Fix TMHH and TMHL usage for z10 with -O0
I've no idea why I decided to handle TMxx differently from all the other
high/low logic operations, but it was a stupid thing to do. The high
registers aren't available as separate 32-bit registers on z10,
so subreg_h32 can't be used on a GR64 there.
I've normally been testing with z196 and with -O3 and so hadn't noticed
this until now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195473
91177308-0d34-0410-b5e6-
96231b3b80d8