Tim Northover [Wed, 16 Apr 2014 11:52:40 +0000 (11:52 +0000)]
ARM64: use the integrated assembler on ELF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206378
91177308-0d34-0410-b5e6-
96231b3b80d8
Matheus Almeida [Wed, 16 Apr 2014 11:46:59 +0000 (11:46 +0000)]
[mips] Emit '.set nomicromips' before a function's entry label
if not in micromips mode.
The test (elf_st_other.ll) was renamed as the name and description didn't
make sense as the test wasn't checking any symbol table entry.
Differential Revision: http://reviews.llvm.org/D3346
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206377
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Wed, 16 Apr 2014 11:15:57 +0000 (11:15 +0000)]
Fixing a compile error in debug versions of MSVC. It seems that the range-based for loop is confused by the DEBUG macro expansion unless a compound statement is used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206376
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 16 Apr 2014 11:14:28 +0000 (11:14 +0000)]
[LCG] Stop playing fast and loose with reference members and assignment.
It doesn't work. I'm still cleaning up all the places where I blindly
followed this pattern. There are more to come in this code too.
As a benefit, this lets the default copy and move operations Just Work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206375
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 16 Apr 2014 10:48:27 +0000 (10:48 +0000)]
[Allocator] Make BumpPtrAllocator movable and move assignable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206372
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 16 Apr 2014 10:23:37 +0000 (10:23 +0000)]
[mips] Correct callee saved list for the N32 ABI and enable test
Summary: Depends on D3339
Reviewers: matheusalmeida, vmedic
Reviewed By: matheusalmeida
Differential Revision: http://reviews.llvm.org/D3340
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206371
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 16 Apr 2014 09:59:46 +0000 (09:59 +0000)]
[mips] Add calling convention tests covering O32, N32, and N64.
Summary:
I had difficulty finding tests for the N32 and N64 ABI so I've added a
collection of calling convention tests based on the document MIPS ABIs
Described (MD00305), the MIPSpro N32 Handbook, and the SYSV ABI. Where the
documents/implementations disagree, I've used GCC to resolve the conflict.
A few interesting details:
* For N32, LLVM uses 64-bit pointers when saving $ra despite pointers being
32-bit. I've yet to find a supporting statement in the ABI documentation but
the current behaviour matches GCC.
* For O32, the non-variable portion of a varargs argument list is also subject
to the rule that floating-point is passed via GPR's (on N32/N64 only the
variable portion is subject to this rule). This agrees with GCC's behaviour
and the SYSV ABI but contradicts part of the MIPSpro N32 Handbook which talks about O32's behaviour.
* The N32 implementation has the wrong callee-saved register list.
(I already have a fix for this but will commit it as a follow-up).
I've left RUN-TODO lines in for O32 on MIPS64. I don't plan to support this case
for now but we should revisit it.
Reviewers: matheusalmeida, vmedic
Reviewed By: matheusalmeida
Differential Revision: http://reviews.llvm.org/D3339
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206370
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 16 Apr 2014 09:21:29 +0000 (09:21 +0000)]
[Allocator] Nuke to useless functions. The implicit ones are sufficient
here (obviously).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206369
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 16 Apr 2014 09:13:44 +0000 (09:13 +0000)]
ARM64: explicitly ask for Apple NEON syntax so test passes on Linux
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206368
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 16 Apr 2014 09:03:25 +0000 (09:03 +0000)]
ARM64: mark x7 as used when an i128 gets shunted onto the stack.
The second half of a split i128 was ending up in x7, which is not a good thing.
This is another part of PR19432.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206366
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 16 Apr 2014 09:03:09 +0000 (09:03 +0000)]
DAGCombiner: don't optimise non-existant litpool load
This particular DAG combine is designed to kick in when both ConstantFPs will
end up being loaded via a litpool, however those nodes have a semi-legal
status, dictated by isFPImmLegal so in some cases there wouldn't have been a
litpool in the first place. Don't try to be clever in those circumstances.
Picked up while merging some AArch64 tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206365
91177308-0d34-0410-b5e6-
96231b3b80d8
Timur Iskhodzhanov [Wed, 16 Apr 2014 08:30:32 +0000 (08:30 +0000)]
Simplify a static_assert so VS2013 can build it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206363
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Wed, 16 Apr 2014 06:22:53 +0000 (06:22 +0000)]
COFF: fix an off by one error
Adjust the tests to validate the number of auxiliary entries used to store the
filename.
Thanks to majnemer's sharp eye for catching the missing - 1 in the round up
calculation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206359
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 16 Apr 2014 06:10:51 +0000 (06:10 +0000)]
Convert SelectionDAG::getVTList to use ArrayRef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206357
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 16 Apr 2014 04:21:27 +0000 (04:21 +0000)]
[C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206356
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Wed, 16 Apr 2014 04:15:32 +0000 (04:15 +0000)]
COFF: add support for .file symbols
Add support for emitting .file records. This is mostly a quality of
implementation change (more complete support for COFF file emission) that was
noticed while working on COFF file emission for Windows on ARM.
A .file record is emitted as a symbol with storage class FILE (103) and the name
".file". A series of auxiliary format 4 records follow which contain the file
name. The filename is stored as an ANSI string and is padded with NULL if the
length is not a multiple of COFF::SymbolSize (18).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206355
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Wed, 16 Apr 2014 04:15:29 +0000 (04:15 +0000)]
tools: fix invalid printing, buffer overrun in llvm-readobj
All auxiliary records are consumed when accessing a File record.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206354
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Wed, 16 Apr 2014 04:15:25 +0000 (04:15 +0000)]
Target: whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206353
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 16 Apr 2014 01:41:34 +0000 (01:41 +0000)]
R600: Extend r600 sign_extend_inreg tests for EG
Patch by: Jan Vesely <jan.vesely@rutgers.edu>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206349
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 16 Apr 2014 01:41:30 +0000 (01:41 +0000)]
R600: Expand sign extension of vectors.
Setting vector types to expand will result in scalarization on pre SI hw,
as those gpus don't have vector shifts either.
Expand also i32 vectors, this helps llvm make the correct decision
about scalarizing the vector ops.
v2: move setOperation() calls to R600ISelLowering.cpp.
cleanup the SI code to make it obvious that this patch does is nop for SI
Patch by: Jan Vesely <jan.vesely@rutgers.edu>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206348
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 16 Apr 2014 00:42:46 +0000 (00:42 +0000)]
[ARM64,C++11] Tidy up branch relaxation a bit w/ c++11.
No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206344
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 16 Apr 2014 00:42:43 +0000 (00:42 +0000)]
ARM64: Nuke some dead code.
Missed in previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206343
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 15 Apr 2014 22:57:02 +0000 (22:57 +0000)]
[ARM64,C++11] Clean up the ARM64 LOH collection pass.
Range'ify a bunch of loops, mainly. As a result, we have a variety
of objects via reference rather than by pointer, so propogate that
through the various helper functions where it makes sense.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206337
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 15 Apr 2014 22:40:47 +0000 (22:40 +0000)]
R600/SI: Print code size along with used registers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206336
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 15 Apr 2014 22:32:49 +0000 (22:32 +0000)]
R600/SI: Print more immediates in hex format
Print in decimal for inline immediates, and hex otherwise. Use hex
always for offsets in addressing offsets.
This approximately matches what the shader compiler does.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206335
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 15 Apr 2014 22:32:42 +0000 (22:32 +0000)]
R600/SI: Cleanup parsing of register names.
Try to figure out the class and number of subregisters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206334
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 15 Apr 2014 22:29:32 +0000 (22:29 +0000)]
Make this test not match its own filename, when being run from a path that includes the string 'add'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206331
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 15 Apr 2014 22:28:39 +0000 (22:28 +0000)]
R600/SI: Fix loads of i1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206330
91177308-0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Tue, 15 Apr 2014 22:09:36 +0000 (22:09 +0000)]
RegionInfo: Do not access a value that was just moved away
This fixes a regression introduced in r206310.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206328
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 15 Apr 2014 21:51:14 +0000 (21:51 +0000)]
[Allocator] Fold the two templated overloads into a single one with
a default argument. The allocator interface we're modeling doesn't
distinguish between array and non-array allocation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206327
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 15 Apr 2014 21:36:02 +0000 (21:36 +0000)]
[Allocator] Remove a really problematic overload. This is very confusing
because there is another (size_t, size_t) overload of Allocator, and the
only distinguishing factor is that one is a tempalte and the other
isn't. There was only one usage of this and that one was easily
converted to carry the alignment constraint in the type itself.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206325
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 15 Apr 2014 21:30:06 +0000 (21:30 +0000)]
Make FastISel::SelectInstruction return before target specific fast-isel code
handles Intrinsic::trap if TargetOptions::TrapFuncName is set.
This fixes a bug in which the trap function was not taken into consideration
when a program was compiled without optimization (at -O0).
<rdar://problem/
16291933>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206323
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Tue, 15 Apr 2014 19:30:48 +0000 (19:30 +0000)]
[X86] Improve the lowering of packed shifts by constant build_vector.
This patch teaches the backend how to efficiently lower logical and
arithmetic packed shifts on both SSE and AVX/AVX2 machines.
When possible, instead of scalarizing a vector shift, the backend should try
to expand the shift into a sequence of two packed shifts by immedate count
followed by a MOVSS/MOVSD.
Example
(v4i32 (srl A, (build_vector < X, Y, Y, Y>)))
Can be rewritten as:
(v4i32 (MOVSS (srl A, <Y,Y,Y,Y>), (srl A, <X,X,X,X>)))
[with X and Y ConstantInt]
The advantage is that the two new shifts from the example would be lowered into
X86ISD::VSRLI nodes. This is always cheaper than scalarizing the vector into
four scalar shifts plus four pairs of vector insert/extract.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206316
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Tue, 15 Apr 2014 19:08:46 +0000 (19:08 +0000)]
[ARM64] Set default CPU to generic instead of cyclone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206313
91177308-0d34-0410-b5e6-
96231b3b80d8
Robert Lougher [Tue, 15 Apr 2014 18:34:24 +0000 (18:34 +0000)]
Revert r191049/r191059 as it can produce wrong code (see PR17975).
It has already been reverted on the 3.4 branch in r196521.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206311
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 15 Apr 2014 18:32:43 +0000 (18:32 +0000)]
Use unique_ptr to manage ownership of child Regions within llvm::Region
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206310
91177308-0d34-0410-b5e6-
96231b3b80d8
Julien Lerouge [Tue, 15 Apr 2014 18:06:46 +0000 (18:06 +0000)]
Add lifetime markers for allocas created to hold byval arguments, make them
appear in the InlineFunctionInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206308
91177308-0d34-0410-b5e6-
96231b3b80d8
Julien Lerouge [Tue, 15 Apr 2014 18:01:54 +0000 (18:01 +0000)]
Split byval argument initialization so the memcpy(s) are injected at the
beginning of the first new block after inlining.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206307
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 15 Apr 2014 17:48:15 +0000 (17:48 +0000)]
LTO: Add more loop simplification passes to LTO
Similar to r202051, add missing loop simplification passes to the LTO
optimization pipeline.
Patch by Rafael Espindola.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206306
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 15 Apr 2014 17:28:26 +0000 (17:28 +0000)]
verify-di: Add back braces for MSVC compatability
Fixup after r206300.
<rdar://problem/
15500563>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206305
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 15 Apr 2014 16:27:38 +0000 (16:27 +0000)]
verify-di: Implement DebugInfoVerifier
Implement DebugInfoVerifier, which steals verification relying on
DebugInfoFinder from Verifier.
- Adds LegacyDebugInfoVerifierPassPass, a ModulePass which wraps
DebugInfoVerifier. Uses -verify-di command-line flag.
- Change verifyModule() to invoke DebugInfoVerifier as well as
Verifier.
- Add a call to createDebugInfoVerifierPass() wherever there was a
call to createVerifierPass().
This implementation as a module pass should sidestep efficiency issues,
allowing us to turn debug info verification back on.
<rdar://problem/
15500563>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206300
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 15 Apr 2014 16:27:32 +0000 (16:27 +0000)]
verify-di: split out VerifierSupport
Split out assertion and output helpers from Verifier in preparation for
writing the DebugInfoVerifier.
<rdar://problem/
15500563>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206299
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 15 Apr 2014 15:17:14 +0000 (15:17 +0000)]
Use unique_ptr to manage PassInfo instances in the PassRegistry
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206297
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 15 Apr 2014 14:13:21 +0000 (14:13 +0000)]
MipsAsmParser.cpp: Fix vg_leak in MipsOperand::CreateMem(). Mem.Base is managed by k_Memory itself.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206293
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 15 Apr 2014 14:06:27 +0000 (14:06 +0000)]
MipsAsmParser::ParseRegister(): Be responsible to delete an Operand on a temporary Operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206292
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 15 Apr 2014 14:00:29 +0000 (14:00 +0000)]
AArch64/ARM64: enable more AArch64 tests on ARM64.
No code changes for this bunch, just some test rejigs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206291
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 15 Apr 2014 14:00:19 +0000 (14:00 +0000)]
AArch64/ARM64: add missing pattern for extending load.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206290
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 15 Apr 2014 14:00:15 +0000 (14:00 +0000)]
AArch64/ARM64: only mangle MOVZ/MOVN during encoding when needed
Sometimes we need emit the bits that would actually be a MOVN when producing a
relocated MOVZ instruction (don't ask). But not always, a check which ARM64 got
wrong until now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206289
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 15 Apr 2014 14:00:11 +0000 (14:00 +0000)]
AArch64/ARM64: add support for large code-model jump tables.
I've left the MachO CodeGen as it is, there's a reasonable chance it should use
the GOT like ConstPools, but I'm not certain.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206288
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 15 Apr 2014 14:00:06 +0000 (14:00 +0000)]
AArch64/ARM64: add patterns for various commutations of FNMADD.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206287
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 15 Apr 2014 14:00:03 +0000 (14:00 +0000)]
AArch64/ARM64: add half as a storage type on ARM64.
This brings it into line with the AArch64 behaviour and should open the way for
certain OpenCL features.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206286
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 15 Apr 2014 13:59:57 +0000 (13:59 +0000)]
AArch64/ARM64: copy patterns for fixed-point conversions
Code is mostly copied directly across, with a slight extension of the
ISelDAGToDAG function so that it can cope with the floating-point constants
being behind a litpool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206285
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 15 Apr 2014 13:59:53 +0000 (13:59 +0000)]
ARM64: add constraints to various FastISel operations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206284
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 15 Apr 2014 13:59:49 +0000 (13:59 +0000)]
FastISel: constrain the RegClass of operands when emitting instructions.
ARM64 suffered multiple -verify-machineinstr failures (principally over the
xsp/xzr issue) because FastISel was completely ignoring which subset of the
general-purpose registers each instruction required.
More fixes are coming in ARM64 specific FastISel, but this should cover the
generic problems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206283
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 15 Apr 2014 13:59:44 +0000 (13:59 +0000)]
AArch64/ARM64: add more arm64 lines to AArch64 regression tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206282
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 15 Apr 2014 13:59:40 +0000 (13:59 +0000)]
AArch64/ARM64: add dp tests from AArch64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206281
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 15 Apr 2014 13:22:11 +0000 (13:22 +0000)]
ARM64AsmParser.cpp: Fix vg_leak in MC/ARM64/fp-encoding.s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206279
91177308-0d34-0410-b5e6-
96231b3b80d8
Stepan Dyatkovskiy [Tue, 15 Apr 2014 11:43:09 +0000 (11:43 +0000)]
Optional hash symbol feature support for ARM64
http://reviews.llvm.org/D3328
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206276
91177308-0d34-0410-b5e6-
96231b3b80d8
Vladimir Medic [Tue, 15 Apr 2014 10:14:49 +0000 (10:14 +0000)]
Current definition of subtract with immediate instruction aliases uses CodeGenOnly defined instructions and post matcher expansion methods to emit real instructions add with immediate. However, they can directly alias add with immediate instruction and remove unnecessary definitions and code in MipsAsmParser.cpp. This patch makes no change in functionality, just removes unnecessary definitions and code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206272
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 15 Apr 2014 10:12:47 +0000 (10:12 +0000)]
vect.omp.persistence.ll REQUIRES asserts due to -debug-only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206271
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 15 Apr 2014 09:44:09 +0000 (09:44 +0000)]
[Allocator] Finally, finish nuking the redundant code that led me here
by removing the MallocSlabAllocator entirely and just using
MallocAllocator directly. This makes all off these allocators expose and
utilize the same core interface.
The only ugly part of this is that it exposes the fact that the JIT
allocator has no real handling of alignment, any more than the malloc
allocator does. =/ It would be nice to fix both of these to support
alignments, and then to leverage that in the BumpPtrAllocator to do less
over allocation in order to manually align pointers. But, that's another
patch for another day. This patch has no functional impact, it just
removes the somewhat meaningless wrapper around MallocAllocator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206267
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Bataev [Tue, 15 Apr 2014 09:37:30 +0000 (09:37 +0000)]
D3348 - [BUG] "Rotate Loop" pass kills "llvm.vectorizer.enable" metadata
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206266
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 15 Apr 2014 08:59:52 +0000 (08:59 +0000)]
[Allocator] Pass the size to the deallocation function. This, on some
allocation libraries, may allow more efficient allocation and
deallocation. It at least makes the interface implementable by the JIT
memory manager.
However, this highlights problematic overloading between the void* and
the T* deallocation functions. I'm looking into a better way to do this,
but as it happens, it comes up rarely in the codebase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206265
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 15 Apr 2014 08:28:23 +0000 (08:28 +0000)]
X86JITInfo: [x86] Rework r206240, X86CompilationCallback_SSE() should be called for SSE-enabled code generator, even if LLVM is not built with -msse.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206261
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 15 Apr 2014 08:14:48 +0000 (08:14 +0000)]
[Allocator] Fix r206256 which got the enabling case backwards on these
overloads. This doesn't matter *that* much yet, but it will in
a subsequent patch. I had tested the original pattern, but not my
attempt to pacify MSVC. This at least appears to work. Still fixing the
rest of the fallout in the final patch that uses these overloads, but it
will follow shortly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206259
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 15 Apr 2014 08:10:46 +0000 (08:10 +0000)]
Fix broken build of llvm using clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206257
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 15 Apr 2014 08:02:29 +0000 (08:02 +0000)]
[Allocator] MSVC apparantly has broken SFINAE context handling of
'sizeof(T)' for T == void and produces a hard error. I cannot fathom why
this is OK. Oh well. switch to an explicit test for being the
(potentially qualified) void type, which is the only specific case I was
worried about. Hopefully this survives the libstdc++ build bots which
have limited type traits implementations...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206256
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 15 Apr 2014 07:22:52 +0000 (07:22 +0000)]
Break PseudoSourceValue out of the Value hierarchy. It is now the root of its own tree containing FixedStackPseudoSourceValue (which you can use isa/dyn_cast on) and MipsCallEntry (which you can't). Anything that needs to use either a PseudoSourceValue* and Value* is strongly encouraged to use a MachinePointerInfo instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206255
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 15 Apr 2014 07:20:03 +0000 (07:20 +0000)]
[C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206254
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 15 Apr 2014 07:08:40 +0000 (07:08 +0000)]
Add a DenseMapInfo specialization for PointerUnion. In tree user to land shortly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206253
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 15 Apr 2014 06:32:26 +0000 (06:32 +0000)]
[C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206252
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 15 Apr 2014 06:29:04 +0000 (06:29 +0000)]
[Allocator] Constrain the Deallocate templated overloads to only apply
to types which we can compute the size of. The comparison with zero
isn't actually interesting here, it's mostly about putting sizeof into
a sfinae context.
This is particular important for Deallocate as otherwise the void*
overload can quickly become ambiguous.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206251
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 15 Apr 2014 06:17:44 +0000 (06:17 +0000)]
Use unique_ptr to manage TypePromotionActions owned by TypePromotionTransaction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206250
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 15 Apr 2014 06:07:26 +0000 (06:07 +0000)]
Use unique_ptr to manage ownership of GCFunctionInfos in GCStrategy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206249
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 15 Apr 2014 05:53:26 +0000 (05:53 +0000)]
Use unique_ptr for the result of Registry entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206248
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 15 Apr 2014 05:34:49 +0000 (05:34 +0000)]
Use unique_ptr to manage ownership of GCStrategy objects in GCMetadata
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206246
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 15 Apr 2014 05:25:03 +0000 (05:25 +0000)]
Use unique_ptr for section/segment ownership in WinCOFFObjectWriter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206245
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 15 Apr 2014 05:15:19 +0000 (05:15 +0000)]
Use unique_ptr to own MCFunctions within MCModule.
MCModule's ctor had to be moved out of line so the definition of
MCFunction was available. (ctor requires the dtor of members (in case
the ctor throws) which required access to the dtor of MCFunction)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206244
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 15 Apr 2014 04:59:12 +0000 (04:59 +0000)]
[C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206243
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 15 Apr 2014 04:56:29 +0000 (04:56 +0000)]
Use std::unique_ptr to manage MCBasicBlocks in MCFunction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206242
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 15 Apr 2014 04:40:56 +0000 (04:40 +0000)]
[MC] Require an MCContext when constructing an MCDisassembler.
This patch re-introduces the MCContext member that was removed from
MCDisassembler in r206063, and requires that an MCContext be passed in at
MCDisassembler construction time. (Previously the MCContext member had been
initialized in an ad-hoc fashion after construction). The MCCContext member
can be used by MCDisassembler sub-classes to construct constant or
target-specific MCExprs.
This patch updates disassemblers for in-tree targets, and provides the
MCRegisterInfo instance that some disassemblers were using through the
MCContext (previously those backends were constructing their own
MCRegisterInfo instances).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206241
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 15 Apr 2014 04:12:21 +0000 (04:12 +0000)]
X86JITInfo: [x86] Use X86CompilationCallback_SSE() along;
*not* Subtarget->hasSSE1()
*but* __SSE__, the flag that LLVM libraries are compiled
The callback calls internal LLVM JIT libraries. It may be built with -msse (or above).
FIXME: JIT may use "host" instead of "generic" by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206240
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 15 Apr 2014 02:14:09 +0000 (02:14 +0000)]
[ARM64,C++11]: Range'ify the dead-register-definition pass.
Range-based for loops. No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206239
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 15 Apr 2014 02:14:06 +0000 (02:14 +0000)]
Add iterator_range for MachineInstr defs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206238
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Tue, 15 Apr 2014 01:17:45 +0000 (01:17 +0000)]
[MC] Emit an error if cfi_startproc is used before a symbol is defined.
Currently, we bind those directives with the last symbol, so if none
has been defined, this would lead to a crash of the compiler.
<rdar://problem/
15939159>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206236
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Tue, 15 Apr 2014 01:15:32 +0000 (01:15 +0000)]
[Register Coalescer] Add a test case for 206060.
<rdar://problem/
16582185>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206235
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 15 Apr 2014 00:47:47 +0000 (00:47 +0000)]
[Allocator] Add Deallocate support to the AllocatorBase CRTP class,
along with templated overloads much like we have for Allocate. These
will facilitate switching the Deallocate interface of all the Allocator
classes to accept the size by pre-filling it from the type size where we
can do so. I plan to convert several uses to the template variants in
subsequent patches prior to adding the Size parameter.
No functionality changed, WIP.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206230
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Tue, 15 Apr 2014 00:28:39 +0000 (00:28 +0000)]
[ARM64][MC] Set the default CPU string to generic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206228
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 15 Apr 2014 00:22:53 +0000 (00:22 +0000)]
[Allocator] Hack around the fact that GCC can't compile the
static_assert added in r206225. I'm looking into a proper fix, but
wanted the bots back.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206226
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 15 Apr 2014 00:19:41 +0000 (00:19 +0000)]
[Allocator] Factor the Allocate template overloads into a base class
rather than defining them (differently!) in both allocators. This also
serves as a basis for documenting and even enforcing some of the
LLVM-style "allocator" concept methods which must exist with various
signatures.
I plan on extending and changing the signatures of these to further
simplify our allocator model in subsequent commits, so I wanted to
factor things as best as I could first. Notably, I'm working to add the
'Size' to the deallocation method of all allocators. This has several
implications not the least of which are faster deallocation times on
certain allocation libraries (tcmalloc). It also will allow the JIT
allocator to fully model the existing allocation interfaces and allow
sanitizer poisoning of deallocated regions. The list of advantages goes
on. =] But by factoring things first I'll be able to make this easier by
first introducing template helpers for the deallocation path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206225
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 14 Apr 2014 22:45:02 +0000 (22:45 +0000)]
Use std::unique_ptr for DIE children
Got bored, removed some manual memory management.
Pushed references (rather than pointers) through a few APIs rather than
replacing *x with x.get().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206222
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 14 Apr 2014 22:23:30 +0000 (22:23 +0000)]
X86: Nuke one more CPU autodetect blurb.
Missed one in r206094. This brings MC and TargetMachine back into sync.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206220
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 14 Apr 2014 22:23:06 +0000 (22:23 +0000)]
Change argument order and add explanatory comment to r206130
Changes requested in code review by Eric Christopher of r206130.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206219
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 14 Apr 2014 22:21:22 +0000 (22:21 +0000)]
Use FrameSetup on frame instructions for the Mips port.
I can't seem to get a testcase to show a difference here, but it's
part of the unconditional-br.ll line table weirdness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206218
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 14 Apr 2014 21:58:19 +0000 (21:58 +0000)]
[CMake] Reformat, if(MSVC)...else()...endif()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206215
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 14 Apr 2014 21:50:37 +0000 (21:50 +0000)]
Revert "Revert r206045, "Fix shift by constants for vector.""
Fix cases where the Value itself is used, and not the constant value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206214
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Mon, 14 Apr 2014 21:25:53 +0000 (21:25 +0000)]
[ARM64][MC] Set the default CPU to cyclone when initilizating the MC layer.
This matches that ARM64Subtarget does for now.
This is related to <rdar://problem/
16573920>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206211
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Mon, 14 Apr 2014 21:16:04 +0000 (21:16 +0000)]
Re-apply r206096 after investigating the gdb buildbot failure.
Thanks to dblaikie for updating the testcase!
Debug info: (bugfix) C++ C/Dtors can be compiled to multiple functions,
therefore, their declaration cannot have one DW_AT_linkage_name.
The specific instances however can and should have that attribute.
This patch reorders the code in DwarfUnit::getOrCreateSubprogramDIE()
to emit linkage names for C/Dtors.
rdar://problem/
16362674.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206210
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 14 Apr 2014 21:12:15 +0000 (21:12 +0000)]
[cleanup] Run clang-format over most of YAMLParser.h to fix a bunch of
small formatting inconsistencies with the rest of LLVM and even this
file. I looked at all the changes and they seemed like just better
formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206209
91177308-0d34-0410-b5e6-
96231b3b80d8
Louis Gerbarg [Mon, 14 Apr 2014 21:05:05 +0000 (21:05 +0000)]
Fix for codegen bug that could cause illegal cmn instruction generation
In rare cases the dead definition elimination pass code can cause illegal cmn
instructions when it replaces dead registers on instructions that use
unmaterialized frame indexes. This patch disables the dead definition
optimization for instructions which include frame index operands.
rdar://
16438284
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206208
91177308-0d34-0410-b5e6-
96231b3b80d8