OSDN Git Service
Tom Stellard [Tue, 2 Dec 2014 22:00:07 +0000 (22:00 +0000)]
R600/SI: Emit amd_kernel_code_t header for AMDGPU environment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223160
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 2 Dec 2014 21:57:15 +0000 (21:57 +0000)]
Make sure that the TargetOptions operator== is checking the
full contents of the class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223159
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 2 Dec 2014 21:36:24 +0000 (21:36 +0000)]
[AArch64][Stackmaps] Optimize stackmap shadows on AArch64.
Reduce the number of nops emitted for stackmap shadows on AArch64 by counting
non-stackmap instructions up to the next branch target towards the requested
shadow.
<rdar://problem/
14959522>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223156
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 2 Dec 2014 21:28:53 +0000 (21:28 +0000)]
R600/SI: Move more information into SIProgramInfo struct
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223154
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 2 Dec 2014 21:09:01 +0000 (21:09 +0000)]
Add bindings for the rest of the MCJIT options that we previously
had support for. We're still missing a binding for an MCJIT
memory manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223153
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 2 Dec 2014 21:02:20 +0000 (21:02 +0000)]
R600: Cleanup some tests and add missing testcases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223151
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Tue, 2 Dec 2014 21:01:48 +0000 (21:01 +0000)]
Restructure some assertion checking based on post commit feedback by Aaron and Tom.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223150
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Tue, 2 Dec 2014 20:40:27 +0000 (20:40 +0000)]
[mips] Fix passing of small structures for big-endian O32.
Summary:
Like N32/N64, they must be passed in the upper bits of the register.
The new code could be merged with the existing if-statements but I've
refrained from doing this since it will make porting the O32 implementation
to tablegen harder later.
Reviewers: vmedic
Reviewed By: vmedic
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6463
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223148
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Tue, 2 Dec 2014 20:03:22 +0000 (20:03 +0000)]
Introduce CPUStringIsValid() into MCSubtargetInfo and use it for ARM .cpu parsing.
Previously .cpu directive in ARM assembler didnt switch to the new CPU and
therefore acted as a nop. This implemented real action for .cpu and eg.
allows to assembler FreeBSD kernel with -integrated-as.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223147
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 2 Dec 2014 19:45:05 +0000 (19:45 +0000)]
R600/SI: Refactor AMDGPUAsmPrinter::EmitProgramInfoSI()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223144
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Tue, 2 Dec 2014 19:37:00 +0000 (19:37 +0000)]
[Statepoints 4/4] Statepoint infrastructure for garbage collection: Documentation
This is the fourth and final patch in the statepoint series. It contains the documentation for the statepoint intrinsics and their usage.
There's definitely still room to improve the documentation here, but I wanted to get this landed so it was available for others. There will likely be a series of small cleanup changes over the next few weeks as we work to clarify and revise the documentation. If you have comments or questions, please feel free to discuss them either in this commit thread, the original review thread, or on llvmdev. Comments are more than welcome.
Reviewed by: atrick, ributzka
Differential Revision: http://reviews.llvm.org/D5683
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223143
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Tue, 2 Dec 2014 19:28:57 +0000 (19:28 +0000)]
Appease a build bot complaining about an unused variable that's used in an assertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223142
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 2 Dec 2014 18:59:08 +0000 (18:59 +0000)]
cmake: Remove MAXPATHLEN define as autoconf does not provide it
Presumably it was added to the CMake system when MAXPATHLEN was still
used by code built for Windows. Currently only lib/Support/Path.inc uses
MAXPATHLEN, and it should be available on all Unices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223139
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 2 Dec 2014 18:58:38 +0000 (18:58 +0000)]
Remove '#undef const' from config.h.cmake to sync with autoconf
This define was removed from config.h.in when Rafael removed our use of
libtool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223138
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Tue, 2 Dec 2014 18:50:36 +0000 (18:50 +0000)]
[Statepoints 3/4] Statepoint infrastructure for garbage collection: SelectionDAGBuilder
This is the third patch in a small series. It contains the CodeGen support for lowering the gc.statepoint intrinsic sequences (223078) to the STATEPOINT pseudo machine instruction (223085). The change also includes the set of helper routines and classes for working with gc.statepoints, gc.relocates, and gc.results since the lowering code uses them.
With this change, gc.statepoints should be functionally complete. The documentation will follow in the fourth change, and there will likely be some cleanup changes, but interested parties can start experimenting now.
I'm not particularly happy with the amount of code or complexity involved with the lowering step, but at least it's fairly well isolated. The statepoint lowering code is split into it's own files and anyone not working on the statepoint support itself should be able to ignore it.
During the lowering process, we currently spill aggressively to stack. This is not entirely ideal (and we have plans to do better), but it's functional, relatively straight forward, and matches closely the implementations of the patchpoint intrinsics. Most of the complexity comes from trying to keep relocated copies of values in the same stack slots across statepoints. Doing so avoids the insertion of pointless load and store instructions to reshuffle the stack. The current implementation isn't as effective as I'd like, but it is functional and 'good enough' for many common use cases.
In the long term, I'd like to figure out how to integrate the statepoint lowering with the register allocator. In principal, we shouldn't need to eagerly spill at all. The register allocator should do any spilling required and the statepoint should simply record that fact. Depending on how challenging that turns out to be, we may invest in a smarter global stack slot assignment mechanism as a stop gap measure.
Reviewed by: atrick, ributzka
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223137
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Tue, 2 Dec 2014 18:31:53 +0000 (18:31 +0000)]
[SwitchLowering] Handle destinations on multiple phi instructions
Follow up from r222926. Also handle multiple destinations from merged
cases on multiple and subsequent phi instructions.
rdar://problem/
19106978
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223135
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Tue, 2 Dec 2014 18:09:51 +0000 (18:09 +0000)]
[MachineCSE] Clear kill-flag on registers imp-def'd by the CSE'd instruction.
Go through implicit defs of CSMI and MI, and clear the kill flags on
their uses in all the instructions between CSMI and MI.
We might have made some of the kill flags redundant, consider:
subs ... %NZCV<imp-def> <- CSMI
csinc ... %NZCV<imp-use,kill> <- this kill flag isn't valid anymore
subs ... %NZCV<imp-def> <- MI, to be eliminated
csinc ... %NZCV<imp-use,kill>
Since we eliminated MI, and reused a register imp-def'd by CSMI
(here %NZCV), that register, if it was killed before MI, should have
that kill flag removed, because it's lifetime was extended.
Also, add an exhaustive testcase for the motivating example.
Reviewed by: Juergen Ributzka <juergen@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223133
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Tue, 2 Dec 2014 18:06:10 +0000 (18:06 +0000)]
Remove unneccessary code introduced with 223101.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223132
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 2 Dec 2014 17:41:43 +0000 (17:41 +0000)]
R600/SI: Set correct number of user sgprs for HSA runtime
We don't support scratch buffers yet with HSA.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223130
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Tue, 2 Dec 2014 17:35:26 +0000 (17:35 +0000)]
[OCaml] Add Llvm.mdnull.
Patch by Gideon Smeding <gideon.smeding@3ds.com>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223129
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 2 Dec 2014 17:25:27 +0000 (17:25 +0000)]
fix typo in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223127
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 2 Dec 2014 17:15:22 +0000 (17:15 +0000)]
AArch64: make register block rules apply to vector types too.
The blocking code originated in ARM, which is more aggressive about casting
types to a canonical representative before doing anything else, so I missed out
most vector HFAs and broke the ABI. This should fix it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223126
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 2 Dec 2014 17:05:41 +0000 (17:05 +0000)]
R600/SI: Set the ATC bit on all resource descriptors for the HSA runtime
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223125
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 2 Dec 2014 16:45:47 +0000 (16:45 +0000)]
Triple: Add AMDHSA operating system type
This operating system type represents the AMD HSA runtime,
and will be required by the R600 backend in order to generate
correct code for this runtime.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223124
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Tue, 2 Dec 2014 14:22:34 +0000 (14:22 +0000)]
[LICM] Avoind store sinking if no preheader is available
Load instructions are inserted into loop preheaders when sinking stores
and later removed if not used by the SSA updater. Avoid sinking if the
loop has no preheader and avoid crashes. This fixes one more side effect
of not handling indirectbr instructions properly on LoopSimplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223119
91177308-0d34-0410-b5e6-
96231b3b80d8
Asiri Rathnayake [Tue, 2 Dec 2014 12:09:55 +0000 (12:09 +0000)]
Remove unused function.
Removing an unused function which is causing one of the build bots to fail.
This was introduced in the commit r223113. A proper cleanup of the so_imm
tblgen defintion (made redundant by the mod_imm definition) needs to happen
soon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223115
91177308-0d34-0410-b5e6-
96231b3b80d8
Asiri Rathnayake [Tue, 2 Dec 2014 10:53:20 +0000 (10:53 +0000)]
Add support for ARM modified-immediate assembly syntax.
Certain ARM instructions accept 32-bit immediate operands encoded as a 8-bit
integer value (0-255) and a 4-bit rotation (0-30, even). Current ARM assembly
syntax support in LLVM allows the decoded (32-bit) immediate to be specified
as a single immediate operand for such instructions:
mov r0, #
4278190080
The ARMARM defines an extended assembly syntax allowing the encoding to be made
more explicit, as in:
mov r0, #255, #8 ; (same 32-bit value as above)
The behaviour of the two instructions can be different w.r.t flags, which is
documented under "Modified immediate constants" in ARMARM. This patch enables
support for this extended syntax at the MC layer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223113
91177308-0d34-0410-b5e6-
96231b3b80d8
Will Newton [Tue, 2 Dec 2014 09:49:09 +0000 (09:49 +0000)]
Add ARM relocations to ELFYAML
Tested with check-all with no regressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223112
91177308-0d34-0410-b5e6-
96231b3b80d8
Charlie Turner [Tue, 2 Dec 2014 08:22:29 +0000 (08:22 +0000)]
Emit Tag_ABI_FP_denormal correctly in fast-math mode.
The default ARM floating-point mode does not support IEEE 754 mode exactly. Of
relevance to this patch is that input denormals are flushed to zero. The way in
which they're flushed to zero depends on the architecture,
* For VFPv2, it is implementation defined as to whether the sign of zero is
preserved.
* For VFPv3 and above, the sign of zero is always preserved when a denormal
is flushed to zero.
When FP support has been disabled, the strategy taken by this patch is to
assume the software support will mirror the behaviour of the hardware support
for the target *if it existed*. That is, for architectures which can only have
VFPv2, it is assumed the software will flush to positive zero. For later
architectures it is assumed the software will flush to zero preserving sign.
Change-Id: Icc5928633ba222a4ba3ca8c0df44a440445865fd
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223110
91177308-0d34-0410-b5e6-
96231b3b80d8
Sonam Kumari [Tue, 2 Dec 2014 05:29:47 +0000 (05:29 +0000)]
[signext.ll] Removal Of Duplicate Test Cases
Removed the duplicate test case existing in signext.ll file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223109
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 2 Dec 2014 01:09:56 +0000 (01:09 +0000)]
Fix variable used only in assertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223101
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 2 Dec 2014 00:52:01 +0000 (00:52 +0000)]
Fix several bugs in r221220's new program finding code.
In both the Unix and Windows variants, std::getenv was called and the
result passed directly to a function accepting a StringRef. This isn't
OK because it might return a null pointer and that causes the StringRef
constructor to assert (and generally produces crash-prone code if
asserts are disabled). Fix this by independently testing the result as
non-null prior to splitting things.
This in turn uncovered another bug in the Unix variant where it would
infinitely recurse if PATH="", or after this fix if PATH isn't set.
There is no need to recurse at all. Slightly re-arrange the code to make
it clear that we can just fixup the Paths argument based on the
environment if we find anything.
I don't know of a particularly useful way to test these routines in
LLVM. I'll commit a test to Clang that ensures that its driver correctly
handles various settings of PATH. However, I have no idea how to
correctly write a Windows test for the PATHEXT change. Any Windows
developers who could provide such a test, please have at. =D
Many thanks to Nick Lewycky and others for helping debug this. =/ It was
quite nasty for us to track down.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223099
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Mon, 1 Dec 2014 23:38:06 +0000 (23:38 +0000)]
Simplify pointer comparisons involving memory allocation functions
System memory allocation functions, which are identified at the IR level by the
noalias attribute on the return value, must return a pointer into a memory region
disjoint from any other memory accessible to the caller. We can use this
property to simplify pointer comparisons between allocated memory and local
stack addresses and the addresses of global variables. Neither the stack nor
global variables can overlap with the region used by the memory allocator.
Fixes PR21556.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223093
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Mon, 1 Dec 2014 23:27:45 +0000 (23:27 +0000)]
Try to fix a bot failure due to a variable used only in an assert.
Specifically, bot lld-x86_64-darwin13. Resulting from change 223085.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223092
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Mon, 1 Dec 2014 22:52:56 +0000 (22:52 +0000)]
[Statepoints 2/4] Statepoint infrastructure for garbage collection: MI & x86-64 Backend
This is the second patch in a small series. This patch contains the MachineInstruction and x86-64 backend pieces required to lower Statepoints. It does not include the code to actually generate the STATEPOINT machine instruction and as a result, the entire patch is currently dead code. I will be submitting the SelectionDAG parts within the next 24-48 hours. Since those pieces are by far the most complicated, I wanted to minimize the size of that patch. That patch will include the tests which exercise the functionality in this patch. The entire series can be seen as one combined whole in http://reviews.llvm.org/D5683.
The STATEPOINT psuedo node is generated after all gc values are explicitly spilled to stack slots. The purpose of this node is to wrap an actual call instruction while recording the spill locations of the meta arguments used for garbage collection and other purposes. The STATEPOINT is modeled as modifing all of those locations to prevent backend optimizations from forwarding the value from before the STATEPOINT to after the STATEPOINT. (Doing so would break relocation semantics for collectors which wish to relocate roots.)
The implementation of STATEPOINT is closely modeled on PATCHPOINT. Eventually, much of the code in this patch will be removed. The long term plan is to merge the functionality provided by statepoints and patchpoints. Merging their implementations in the backend is likely to be a good starting point.
Reviewed by: atrick, ributzka
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223085
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Mon, 1 Dec 2014 21:18:12 +0000 (21:18 +0000)]
[Statepoints 1/4] Statepoint infrastructure for garbage collection: IR Intrinsics
The statepoint intrinsics are intended to enable precise root tracking through the compiler as to support garbage collectors of all types. The addition of the statepoint intrinsics to LLVM should have no impact on the compilation of any program which does not contain them. There are no side tables created, no extra metadata, and no inhibited optimizations.
A statepoint works by transforming a call site (or safepoint poll site) into an explicit relocation operation. It is the frontend's responsibility (or eventually the safepoint insertion pass we've developed, but that's not part of this patch series) to ensure that any live pointer to a GC object is correctly added to the statepoint and explicitly relocated. The relocated value is just a normal SSA value (as seen by the optimizer), so merges of relocated and unrelocated values are just normal phis. The explicit relocation operation, the fact the statepoint is assumed to clobber all memory, and the optimizers standard semantics ensure that the relocations flow through IR optimizations correctly.
This is the first patch in a small series. This patch contains only the IR parts; the documentation and backend support will be following separately. The entire series can be seen as one combined whole in http://reviews.llvm.org/D5683.
Reviewed by: atrick, ributzka
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223078
91177308-0d34-0410-b5e6-
96231b3b80d8
Jingyue Wu [Mon, 1 Dec 2014 21:16:17 +0000 (21:16 +0000)]
[NVPTX] Do not emit .weak symbols for NVPTX
Summary:
".weak" symbols cannot be consumed by ptxas (PR21685). This patch makes the
weak directive in MCAsmPrinter customizable, and disables emitting ".weak"
symbols for NVPTX.
Test Plan: weak-linkage.ll
Reviewers: jholewinski
Reviewed By: jholewinski
Subscribers: majnemer, jholewinski, llvm-commits
Differential Revision: http://reviews.llvm.org/D6455
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223077
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 1 Dec 2014 21:04:44 +0000 (21:04 +0000)]
Parse 'ghccc' in .ll files as the GHC convention (cc 10)
Previously we just used "cc 10" in the .ll files, but that isn't very
human readable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223076
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Mon, 1 Dec 2014 20:59:00 +0000 (20:59 +0000)]
[AArch64] Don't combine "select (setcc i1 LHS, RHS), vL, vR".
r208210 introduced an optimization that improves the vector select
codegen by doing the setcc on vectors directly.
This is a problem they the setcc operands are i1s, because the
optimization would create vectors of i1, which aren't legal.
Part of PR21549.
Differential Revision: http://reviews.llvm.org/D6308
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223075
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Mon, 1 Dec 2014 20:52:32 +0000 (20:52 +0000)]
[AArch64] Fix v2i8->i16 bitcast legalization.
r213378 improved f16 bitcasts, so that they go directly through subregs,
instead of through the stack. That code now causes an assertion failure
for bitcasts from other 16-bits types (most importantly v2i8).
Correct that by doing the custom lowering for i16 bitcasts only when the
input is an f16.
Part of PR21549.
Differential Revision: http://reviews.llvm.org/D6307
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223074
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Mon, 1 Dec 2014 19:50:39 +0000 (19:50 +0000)]
[OCaml] Move Llvm.clone_module to its own Llvm_transform_utils module.
This way most code won't link this (substantially large) library,
if compiled statically with LLVM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223072
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Mon, 1 Dec 2014 19:50:23 +0000 (19:50 +0000)]
[OCaml] [cmake] Add CMake buildsystem for OCaml.
Closes PR15325.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223071
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 1 Dec 2014 19:17:46 +0000 (19:17 +0000)]
Use a continue to reduce indentation and clang-format. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223067
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 1 Dec 2014 19:08:07 +0000 (19:08 +0000)]
Use a range loop. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223066
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Mon, 1 Dec 2014 18:46:43 +0000 (18:46 +0000)]
Use C++ typed enums instead of 'unsigned char' for MCInst Kind. NFC.
This makes it much easier to see the value of operands in the debugger.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223060
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Mon, 1 Dec 2014 18:43:53 +0000 (18:43 +0000)]
[MachineVerifier] Accept a MBB with a single landing pad successor.
The MachineVerifier used to check that there was always exactly one
unconditional branch to a non-landingpad (normal) successor.
If that normal successor to an invoke BB is unreachable, it seems
reasonable to only have one successor, the landing pad.
On targets other than AArch64 (and on AArch64 with a different testcase),
the branch folder turns the branch to the landing pad into a fallthrough.
The MachineVerifier, which relies on AnalyzeBranch, is unable to check
the condition, and doesn't complain. However, it does in this specific
testcase, where the branch to the landing pad remained.
Make the MachineVerifier accept it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223059
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 1 Dec 2014 18:42:18 +0000 (18:42 +0000)]
Drop SrcStructTypesSet. It is redundant.
At the only point in the code it is used, we haven't added any of the src types
to DstStructTypesSet yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223057
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 1 Dec 2014 17:46:39 +0000 (17:46 +0000)]
ARM: lower tail calls correctly when using GHC calling convention.
Patch by Ben Gamari.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223055
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 1 Dec 2014 17:36:43 +0000 (17:36 +0000)]
Revert r223049, r223050 and r223051 while investigating test failures.
I didn't foresee affecting the Clang test suite :/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223054
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 1 Dec 2014 17:08:38 +0000 (17:08 +0000)]
SimplifyCFG: Omit range checks for switch lookup tables when default is unreachable
They would get optimized away later, but we might as well not emit them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223051
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 1 Dec 2014 17:08:35 +0000 (17:08 +0000)]
SimplifyCFG: don't remove unreachable default switch destinations
An unreachable default destination can be exploited by other optimizations, and
SDag lowering is now prepared to handle them efficiently.
For example, branches to the unreachable destination will be optimized away,
such as in the case of range checks for switch lookup tables.
On 64-bit Linux, this reduces the size of a clang bootstrap by 80 kB (and
Chromium by 30 kB).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223050
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 1 Dec 2014 17:08:32 +0000 (17:08 +0000)]
SelectionDAG switch lowering: Replace unreachable default with most popular case.
This can significantly reduce the size of the switch, allowing for more
efficient lowering.
I also worked with the idea of exploiting unreachable defaults by
omitting the range check for jump tables, but always ended up with a
non-neglible binary size increase. It might be worth looking into some more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223049
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 1 Dec 2014 16:32:20 +0000 (16:32 +0000)]
Partial revert of r222986.
The explicit set of destination types is not fully redundant when lazy loading
since the TypeFinder will not find types used only in function bodies.
This keeps the logic to drop the name of mapped types since it still helps
with avoiding further renaming.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223043
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 1 Dec 2014 15:52:46 +0000 (15:52 +0000)]
R600/SI: Various instruction format bit test cleanups
- Fix missing SALU format bits
- Remove unused isSALUInstr
- Add isVALU
- Switch isDS to use a bit like the others
- Move SIInstrInfo::is* functions to header
- Reorder so they are approximately sorted by type (SALU, VALU, memory)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223038
91177308-0d34-0410-b5e6-
96231b3b80d8
Vladimir Medic [Mon, 1 Dec 2014 11:12:04 +0000 (11:12 +0000)]
The andi16, addiusp and jraddiusp micromips instructions were missing dedicated decoder methods in MipsDisassembler.cpp to properly decode immediate operands. These methods are added together with corresponding tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223006
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Mon, 1 Dec 2014 09:53:51 +0000 (09:53 +0000)]
[msan] Add compile-time checks for missing origins.
This change makes MemorySanitizer instrumentation a bit more strict
about instructions that have no origin id assigned to them.
This would have caught the bug that was fixed in r222918.
No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222997
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Mon, 1 Dec 2014 09:42:32 +0000 (09:42 +0000)]
[PowerPC] Fix unwind info with dynamic stack realignment
Summary:
PowerPC DWARF unwind info defined CFA as SP + offset even in a function
where the stack had been dynamically realigned. This clearly doesn't
work because the offset from SP to CFA is not a constant. Fix it by
defining CFA as BP instead.
This was causing the AddressSanitizer null_deref test to fail 50% of
the time, depending on whether SP happened to be 32-byte aligned on
entry to a particular function or not.
Reviewers: willschm, uweigand, hfinkel
Reviewed By: hfinkel
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6410
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222996
91177308-0d34-0410-b5e6-
96231b3b80d8
Sonam Kumari [Mon, 1 Dec 2014 09:27:46 +0000 (09:27 +0000)]
Removed extra whitespace. (Testing commit access). NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222994
91177308-0d34-0410-b5e6-
96231b3b80d8
Charlie Turner [Mon, 1 Dec 2014 08:50:27 +0000 (08:50 +0000)]
Add post-decode checking of HVC instruction.
Add checkDecodedInstruction for post-decode checking of instructions, to catch
the corner cases like HVC that don't fit into the general pattern. Needed to
check for an invalid condition field in instruction encoding despite HVC not
taking a predicate.
Patch by Matthew Wahab.
Change-Id: I48e28de981d7a9e43569594da3c45fb478b4f795
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222992
91177308-0d34-0410-b5e6-
96231b3b80d8
Yury Gribov [Mon, 1 Dec 2014 08:47:58 +0000 (08:47 +0000)]
[asan] Change dynamic alloca instrumentation to only consider allocas that are dominating all exits from function.
Reviewed in http://reviews.llvm.org/D6412
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222991
91177308-0d34-0410-b5e6-
96231b3b80d8
Charlie Turner [Mon, 1 Dec 2014 08:39:19 +0000 (08:39 +0000)]
Add Thumb HVC and ERET virtualisation extension instructions.
Patch by Matthew Wahab.
Change-Id: I131f71c1150d5fa797066a18e09d526c19bf9016
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222990
91177308-0d34-0410-b5e6-
96231b3b80d8
Charlie Turner [Mon, 1 Dec 2014 08:33:28 +0000 (08:33 +0000)]
Add ARM ERET and HVC virtualisation extension instructions.
Patch by Matthew Wahab.
Change-Id: Iad75f078fbaa4ecc7d7a4820ad9b3930679cbbbb
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222989
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Mon, 1 Dec 2014 06:14:52 +0000 (06:14 +0000)]
Fix capitalization. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222988
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Mon, 1 Dec 2014 04:27:03 +0000 (04:27 +0000)]
[stack protector] Set edge weights for newly created basic blocks.
This commit fixes a bug in stack protector pass where edge weights were not set
when new basic blocks were added to lists of successor basic blocks.
Differential Revision: http://reviews.llvm.org/D5766
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222987
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 1 Dec 2014 04:15:59 +0000 (04:15 +0000)]
Change how we keep track of which types are in the dest module.
Instead of keeping an explicit set, just drop the names of types we choose
to map to some other type.
This has the advantage that the name of the unused will not cause the context
to rename types on module read.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222986
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 1 Dec 2014 03:20:57 +0000 (03:20 +0000)]
Add a test showing what the linker IdentifiedStructTypes is for.
Without this it could just be deleted and all tests would pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222985
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 1 Dec 2014 02:55:24 +0000 (02:55 +0000)]
Relax an assert a bit to avoid a crash on unreachable code.
Patch by Duncan Exon Smith with a small tweak by me.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222984
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sun, 30 Nov 2014 10:15:56 +0000 (10:15 +0000)]
[PowerPC] Add asm support for cache-inhibited ld/st instructions
Add assembler support for the fixed-point cache-inhibited load/store
instructions. These are hypervisor-level only, so don't get too excited ;)
Fixes PR21650.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222976
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 30 Nov 2014 01:20:17 +0000 (01:20 +0000)]
Revert r222957 "Replace std::map<K, V*> with std::map<K, V> to handle ownership and deletion of the values."
Upon further review I think the MultiClass is being copied into the map instead of being moved due to the copy constructor on the nested Record type. This ultimately got exposed when the vector in DefPrototype vector was changed to hold unique_ptrs in another commit. This caused gcc 4.7 to fail due to the use of the copy constructor on unique_ptr with the error pointing back to one of the insert calls from this commit. Not sure why clang was able to build.
This reverts commit
710cdf729f84b428bf41aa8d32dbdb35fff79fde.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222971
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Sun, 30 Nov 2014 00:43:50 +0000 (00:43 +0000)]
Revert r222965 "Make MultiClass::DefPrototypes own their Records to fix memory leaks."
The bots started failing with the error below. I suspect this revision was the cause.
FAILED: /home/bb/bin/g++47 -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wno-comment -std=c++11 -ffunction-sections -fdata-sections -O3 -DNDEBUG -Ilib/TableGen -I/home/bb/cmake-llvm-x86_64-linux/llvm-project/llvm/lib/TableGen -Iinclude -I/home/bb/cmake-llvm-x86_64-linux/llvm-project/llvm/include -fno-exceptions -fno-rtti -MMD -MT lib/TableGen/CMakeFiles/LLVMTableGen.dir/TGParser.cpp.o -MF "lib/TableGen/CMakeFiles/LLVMTableGen.dir/TGParser.cpp.o.d" -o lib/TableGen/CMakeFiles/LLVMTableGen.dir/TGParser.cpp.o -c /home/bb/cmake-llvm-x86_64-linux/llvm-project/llvm/lib/TableGen/TGParser.cpp
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_tempbuf.h:62:0,
from /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_algo.h:64,
from /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/algorithm:63,
from /home/bb/cmake-llvm-x86_64-linux/llvm-project/llvm/include/llvm/ADT/StringRef.h:13,
from /home/bb/cmake-llvm-x86_64-linux/llvm-project/llvm/lib/TableGen/TGLexer.h:17,
from /home/bb/cmake-llvm-x86_64-linux/llvm-project/llvm/lib/TableGen/TGParser.h:17,
from /home/bb/cmake-llvm-x86_64-linux/llvm-project/llvm/lib/TableGen/TGParser.cpp:14:
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_construct.h: In instantiation of 'void std::_Construct(_T1*, _Args&& ...) [with _T1 = std::unique_ptr<llvm::Record>; _Args = {const std::unique_ptr<llvm::Record, std::default_delete<llvm::Record> >&}]':
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_uninitialized.h:77:3: required from 'static _ForwardIterator std::__uninitialized_copy<_TrivialValueTypes>::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator<const std::unique_ptr<llvm::Record>*, std::vector<std::unique_ptr<llvm::Record> > >; _ForwardIterator = std::unique_ptr<llvm::Record>*; bool _TrivialValueTypes = false]'
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_uninitialized.h:119:41: required from '_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator<const std::unique_ptr<llvm::Record>*, std::vector<std::unique_ptr<llvm::Record> > >; _ForwardIterator = std::unique_ptr<llvm::Record>*]'
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_uninitialized.h:260:63: required from '_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp>&) [with _InputIterator = __gnu_cxx::__normal_iterator<const std::unique_ptr<llvm::Record>*, std::vector<std::unique_ptr<llvm::Record> > >; _ForwardIterator = std::unique_ptr<llvm::Record>*; _Tp = std::unique_ptr<llvm::Record>]'
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_vector.h:310:9: required from 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = std::unique_ptr<llvm::Record>; _Alloc = std::allocator<std::unique_ptr<llvm::Record> >]'
/home/bb/cmake-llvm-x86_64-linux/llvm-project/llvm/include/llvm/TableGen/Record.h:1664:8: required from 'constexpr std::pair<_T1, _T2>::pair(_U1&&, _U2&&) [with _U1 = std::basic_string<char>&; _U2 = llvm::MultiClass; <template-parameter-2-3> = void; _T1 = std::basic_string<char>; _T2 = llvm::MultiClass]'
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_pair.h:273:72: required from 'constexpr std::pair<typename std::__decay_and_strip<_T1>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&) [with _T1 = std::basic_string<char>&; _T2 = llvm::MultiClass; typename std::__decay_and_strip<_T2>::__type = llvm::MultiClass; typename std::__decay_and_strip<_T1>::__type = std::basic_string<char>]'
/home/bb/cmake-llvm-x86_64-linux/llvm-project/llvm/lib/TableGen/TGParser.cpp:2295:78: required from here
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_construct.h:77:7: error: use of deleted function 'std::unique_ptr<_Tp, _Dp>::unique_ptr(const std::unique_ptr<_Tp, _Dp>&) [with _Tp = llvm::Record; _Dp = std::default_delete<llvm::Record>]'
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/memory:86:0,
from /home/bb/cmake-llvm-x86_64-linux/llvm-project/llvm/include/llvm/ADT/STLExtras.h:25,
from /home/bb/cmake-llvm-x86_64-linux/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:14,
from /home/bb/cmake-llvm-x86_64-linux/llvm-project/llvm/include/llvm/Support/SourceMgr.h:19,
from /home/bb/cmake-llvm-x86_64-linux/llvm-project/llvm/lib/TableGen/TGParser.h:19,
from /home/bb/cmake-llvm-x86_64-linux/llvm-project/llvm/lib/TableGen/TGParser.cpp:14:
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/unique_ptr.h:262:7: error: declared here
ninja: build stopped: subcommand failed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222970
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Sun, 30 Nov 2014 00:31:49 +0000 (00:31 +0000)]
Qualify one more make_unique call.
The previous patch had effect, but missed this one. It seems MSVC
gets ADL-confused by the calls where the first argument is a function call?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222968
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Sun, 30 Nov 2014 00:24:43 +0000 (00:24 +0000)]
Speculatively qualify some llvm::make_unique calls trying to please MSVC
It was failing with this kind of error:
C:\b\build\slave\CrWinClang\build\src\third_party\llvm\lib\TableGen\TGParser.cpp(1243) : error C2668: 'llvm::make_unique' : ambiguous call to overloaded function
C:\b\build\slave\CrWinClang\build\src\third_party\llvm\include\llvm/ADT/STLExtras.h(408): could be 'std::unique_ptr<llvm::Record,std::default_delete<_Ty>> llvm::make_unique<llvm::Record,std::string,llvm::SMLoc&,llvm::RecordKeeper&,bool>(std::string &&,llvm::SMLoc &,llvm::RecordKeeper &,bool &&)'
with
[
_Ty=llvm::Record
]
C:\b\depot_tools\win_toolchain\vs2013_files\win8sdk\bin\..\..\VC\include\memory(1637): or 'std::unique_ptr<llvm::Record,std::default_delete<_Ty>> std::make_unique<llvm::Record,std::string,llvm::SMLoc&,llvm::RecordKeeper&,bool>(std::string &&,llvm::SMLoc &,llvm::RecordKeeper &,bool &&)' [found using argument-dependent lookup]
with
[
_Ty=llvm::Record
]
while trying to match the argument list '(std::string, llvm::SMLoc, llvm::RecordKeeper, bool)'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222967
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 30 Nov 2014 00:24:32 +0000 (00:24 +0000)]
Use an unsigned type because there seems to be no reason for it to be signed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222966
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 30 Nov 2014 00:19:28 +0000 (00:19 +0000)]
Make MultiClass::DefPrototypes own their Records to fix memory leaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222965
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Sat, 29 Nov 2014 21:24:12 +0000 (21:24 +0000)]
Switch lowering: reformat some for loops etc. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222962
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Sat, 29 Nov 2014 21:17:05 +0000 (21:17 +0000)]
Switch lowering: Fix broken 'Figure out which block is next' code
This doesn't seem to have worked in a long time, but other optimizations
would clean it up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222961
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 29 Nov 2014 19:18:21 +0000 (19:18 +0000)]
Target triple OS detection tidyup. NFC
Use Triple::isOS*() helpers where possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222960
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sat, 29 Nov 2014 18:13:42 +0000 (18:13 +0000)]
Remove some unnecessary vector::reserve/assign calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222959
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sat, 29 Nov 2014 18:13:39 +0000 (18:13 +0000)]
Remove indirection of vector<T*> in favor of deque<T>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222958
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 29 Nov 2014 18:12:59 +0000 (18:12 +0000)]
Replace std::map<K, V*> with std::map<K, V> to handle ownership and deletion of the values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222957
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 29 Nov 2014 16:05:27 +0000 (16:05 +0000)]
Remove 'else' after 'return'. Fix formatting of a 'switch' statement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222955
91177308-0d34-0410-b5e6-
96231b3b80d8
Jozef Kolek [Sat, 29 Nov 2014 13:29:24 +0000 (13:29 +0000)]
[mips][microMIPS] Implement NOP aliases
This patch implements microMIPS 16-bit (MOVE16 $0, $0) and
32-bit (SLL $0, $0, 0) NOP aliases.
http://reviews.llvm.org/D6440
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222953
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sat, 29 Nov 2014 07:04:51 +0000 (07:04 +0000)]
Use deque<T> rather than vector<T*> since it provides the same invalidation semantics (at least when removal is not needed) without the extra indirection/ownership complexity
Order matters for this container, it seems (using a forward_list and
replacing the original push_backs with emplace_fronts caused test
failures). I didn't look too deeply into why.
(& in retrospect, I might go back & change some of the forward_lists I
introduced to deques anyway - since most don't require removal, deque is
a more memory-friendly data structure (moderate locality while not
invalidating pointers))
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222950
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sat, 29 Nov 2014 07:04:49 +0000 (07:04 +0000)]
Constify some things in preparation for CodeGenSubRegIndex to be stored by value in their container, removing the indirection
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222949
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 29 Nov 2014 05:52:51 +0000 (05:52 +0000)]
Make RecordKeeper::addClass/addDef take unique_ptrs instead of creating one internally.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222948
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 29 Nov 2014 05:31:10 +0000 (05:31 +0000)]
Use unique_ptr to remove some explicit deletes on some error case returns. At least one spot of weird ownership passing that needs some future cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222947
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 29 Nov 2014 03:17:43 +0000 (03:17 +0000)]
DebugIR: Remove empty directories from SVN
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222946
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 29 Nov 2014 03:15:47 +0000 (03:15 +0000)]
DebugIR: Delete -debug-ir
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222945
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sat, 29 Nov 2014 00:10:26 +0000 (00:10 +0000)]
Support: remove some variable names
If built with -Wunused-variable, clang objects to the declarations due to the
unused variable; drop the names. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222944
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 28 Nov 2014 23:00:22 +0000 (23:00 +0000)]
Revert "Simplify some more ownership using forward_list<T> rather than vector<unique_ptr<T>>"
This reverts commit r222935 and its follow-up r222938 ("Push unique_ptr
a bit further through some APIs and simplify some cleanup"), since it
causes bot failures (at least on Darwin):
http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental/1391/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222943
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 28 Nov 2014 22:51:38 +0000 (22:51 +0000)]
R600/SI: Fix assertion on sign extend of 3 vectors
This was trying to create an MVT with 3x vectors which
created an invalid EVT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222942
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 28 Nov 2014 22:15:06 +0000 (22:15 +0000)]
Reapply "Use std::map<K, V> rather than std::map<K, std::unique_ptr<V>>""
Just avoid using std::map::emplace since it's not implemented in
libstdc++ 4.7.
Reapplies r222937, reverted in r222939.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222940
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 28 Nov 2014 22:01:06 +0000 (22:01 +0000)]
Revert "Use std::map<K, V> rather than std::map<K, std::unique_ptr<V>>"
Seems libstdc++ on some buildbots is lacking std::map::emplace, which is
weird... reverting while I look into it.
This reverts commit r222937.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222939
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 28 Nov 2014 21:59:58 +0000 (21:59 +0000)]
Push unique_ptr a bit further through some APIs and simplify some cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222938
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 28 Nov 2014 21:37:54 +0000 (21:37 +0000)]
Use std::map<K, V> rather than std::map<K, std::unique_ptr<V>>
Pointers and references to map elements are never invalidated (except on
removal, which isn't used here) so there's no need for the indirection
unless there's polymorphism at work.
A little const correctness had to be fixed, since the indirection
allowed some benign const violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222937
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 28 Nov 2014 21:29:14 +0000 (21:29 +0000)]
Revert "Masked Vector Load and Store Intrinsics."
This reverts commit r222632 (and follow-up r222636), which caused a host
of LNT failures on an internal bot. I'll respond to the commit on the
list with a reproduction of one of the failures.
Conflicts:
lib/Target/X86/X86TargetTransformInfo.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222936
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 28 Nov 2014 21:20:24 +0000 (21:20 +0000)]
Simplify some more ownership using forward_list<T> rather than vector<unique_ptr<T>>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222935
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 28 Nov 2014 21:20:22 +0000 (21:20 +0000)]
Forgotten formatting from previous commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222934
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 28 Nov 2014 20:35:57 +0000 (20:35 +0000)]
Simplify ownership by using forward_list<T> rather than vector<unique_ptr<T>>
Since the elements were not polymorphic, the unique_ptr was only used to
avoid pointer invalidation on container resizes - might as well skip the
indirection and use a container with suitable invalidation semantics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222931
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 28 Nov 2014 20:30:39 +0000 (20:30 +0000)]
Fix a few memory leaks in CodeGenRegBank.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222930
91177308-0d34-0410-b5e6-
96231b3b80d8