platform/upstream/llvm.git
9 years ago[CodeGen] Let MachineVerifierPass own its banner string
Matthias Braun [Thu, 11 Dec 2014 19:41:51 +0000 (19:41 +0000)]
[CodeGen] Let MachineVerifierPass own its banner string

llvm-svn: 224041

9 years agoAST: Incomplete types might be zero sized
David Majnemer [Thu, 11 Dec 2014 19:36:24 +0000 (19:36 +0000)]
AST: Incomplete types might be zero sized

Comparing the address of an object with an incomplete type might return
true with a 'distinct' object if the former has a size of zero.
However, such an object should compare unequal with null.

llvm-svn: 224040

9 years agoWhen checking for nonnull parameter attributes, also check the ParmVarDecl since...
Aaron Ballman [Thu, 11 Dec 2014 19:35:42 +0000 (19:35 +0000)]
When checking for nonnull parameter attributes, also check the ParmVarDecl since the attribute may reside there, instead of just on the FunctionDecl. Fixes PR21668.

llvm-svn: 224039

9 years agoRemoved the assertion that we can find any named
Sean Callanan [Thu, 11 Dec 2014 19:33:57 +0000 (19:33 +0000)]
Removed the assertion that we can find any named
Objective-C type in the runtime.  This is not actually
true, it's entirely possible to say

@class DoesntExist;

@interface DoesExist {
  DoesntExist *whyyyyy;
}
@end

and this code will not only compile but also run.  So
this assertion will fire in situations users might
encounter.

I left the assertion enabled in debug mode, because we
could still catch a case we're not aware of (i.e., a
class that we *ought* to have found but where somehow
we mis-parsed the name).

<rdar://problem/19151914>

llvm-svn: 224038

9 years agoAdd an XFAIL for Newlib's missing uchar.h
Jonathan Roelofs [Thu, 11 Dec 2014 19:11:39 +0000 (19:11 +0000)]
Add an XFAIL for Newlib's missing uchar.h

llvm-svn: 224037

9 years ago[Hexagon] Renaming classes in preparation for replacement.
Colin LeMahieu [Thu, 11 Dec 2014 19:01:28 +0000 (19:01 +0000)]
[Hexagon] Renaming classes in preparation for replacement.

llvm-svn: 224036

9 years agoARM: convert isTargetIOS checks to isTargetDarwin.
Tim Northover [Thu, 11 Dec 2014 18:49:37 +0000 (18:49 +0000)]
ARM: convert isTargetIOS checks to isTargetDarwin.

The distinction is mostly useful in the front-end. By the time we get here,
there are very few situations where we actually want different behaviour for
Darwin and IOS (in fact Darwin mostly just exists in a few tests). So this
should reduce any surprising weirdness for anyone using it.

No functional change on anything anyone actually cares about.

llvm-svn: 224035

9 years ago[Sanitizer] Don't modify mmap_limit_mb flag in runtime.
Alexey Samsonov [Thu, 11 Dec 2014 18:45:24 +0000 (18:45 +0000)]
[Sanitizer] Don't modify mmap_limit_mb flag in runtime.

Instead, rely on the fact that RAW_CHECK doesn't call mmap(),
and we'll be able to print an error message and kill a program.

llvm-svn: 224034

9 years ago[PowerPC] Implement BuildSDIVPow2, lower i64 pow2 sdiv using sradi
Hal Finkel [Thu, 11 Dec 2014 18:37:52 +0000 (18:37 +0000)]
[PowerPC] Implement BuildSDIVPow2, lower i64 pow2 sdiv using sradi

PPCISelDAGToDAG contained existing code to lower i32 sdiv by a power-of-2 using
srawi/addze, but did not implement the i64 case. DAGCombine now contains a
callback specifically designed for this purpose (BuildSDIVPow2), and part of
the logic has been moved to an implementation of that callback. Doing this
lowering using BuildSDIVPow2 likely does not matter, compared to handling
everything in PPCISelDAGToDAG, for the positive divisor case, but the negative
divisor case, which generates an additional negation, can potentially benefit
from additional folding from DAGCombine. Now, both the i32 and the i64 cases
have been implemented.

Fixes PR20732.

llvm-svn: 224033

9 years agoMark a bunch of long running tests as 'REQUIRES: long_tests'
Jonathan Roelofs [Thu, 11 Dec 2014 18:35:36 +0000 (18:35 +0000)]
Mark a bunch of long running tests as 'REQUIRES: long_tests'

This lets us skip them as UNSUPPORTED on slow systems like QEMU

llvm-svn: 224032

9 years ago[Sanitizer] Fix report_path functionality:
Alexey Samsonov [Thu, 11 Dec 2014 18:30:25 +0000 (18:30 +0000)]
[Sanitizer] Fix report_path functionality:

Summary:
  - Make sure mmap() is never called inside RawWrite function.
  - Wrap a bunch of standalone globals in a ReportFile object.
  - Make sure accesses to these globals are thread-safe.
  - Fix report_path functionality on Windows, where
    __sanitizer_set_report_path() would break program.

I've started this yak shaving in order to make
"CommonFlags::mmap_limit_mb" immutable. Currently we drop this flag
to zero before printing an error message.

Test Plan: regression test suite

Reviewers: kcc, glider

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6595

llvm-svn: 224031

9 years ago[Tsan] Fix the signal_recursive.cc test to pass on systems with high loads
Viktor Kutuzov [Thu, 11 Dec 2014 17:42:29 +0000 (17:42 +0000)]
[Tsan] Fix the signal_recursive.cc test to pass on systems with high loads
Differential Revision: http://reviews.llvm.org/D6504

llvm-svn: 224030

9 years agoRemove dead code. NFC.
Rafael Espindola [Thu, 11 Dec 2014 17:17:26 +0000 (17:17 +0000)]
Remove dead code. NFC.

llvm-svn: 224029

9 years ago[AVX512] Add support for 512b variable bit shift intrinsics.
Cameron McInally [Thu, 11 Dec 2014 17:13:05 +0000 (17:13 +0000)]
[AVX512] Add support for 512b variable bit shift intrinsics.

llvm-svn: 224028

9 years ago[Hexagon] Ading i64 <- i32, i32 sextw pattern.
Colin LeMahieu [Thu, 11 Dec 2014 17:08:21 +0000 (17:08 +0000)]
[Hexagon] Ading i64 <- i32, i32 sextw pattern.

llvm-svn: 224027

9 years ago[Hexagon] Adding encoding information for sign extend word instruction.
Colin LeMahieu [Thu, 11 Dec 2014 16:43:06 +0000 (16:43 +0000)]
[Hexagon] Adding encoding information for sign extend word instruction.

llvm-svn: 224026

9 years agoOnly seek once before writing the member offsets.
Rafael Espindola [Thu, 11 Dec 2014 16:34:00 +0000 (16:34 +0000)]
Only seek once before writing the member offsets.

This cuts down the number on system calls done by a static llvm-ar producing
lib/libclangSema.a from 9164 to 442.

llvm-svn: 224025

9 years agoMark some more fenv tests as UNSUPPORTED by newlib
Jonathan Roelofs [Thu, 11 Dec 2014 16:17:26 +0000 (16:17 +0000)]
Mark some more fenv tests as UNSUPPORTED by newlib

llvm-svn: 224024

9 years agotsan: fix Go build
Dmitry Vyukov [Thu, 11 Dec 2014 16:12:45 +0000 (16:12 +0000)]
tsan: fix Go build

GetRSS is used in Go build.

llvm-svn: 224023

9 years agotsan: don't subtract one from fake PCs
Dmitry Vyukov [Thu, 11 Dec 2014 16:12:16 +0000 (16:12 +0000)]
tsan: don't subtract one from fake PCs

These are fake and not actual PCs, more like function IDs.
Pass them to external symbolizer untouched.

llvm-svn: 224022

9 years agoAdd an XFAIL for Newlib's missing fenv.h
Jonathan Roelofs [Thu, 11 Dec 2014 15:37:22 +0000 (15:37 +0000)]
Add an XFAIL for Newlib's missing fenv.h

llvm-svn: 224021

9 years agollvm-ar: close input files early.
Rafael Espindola [Thu, 11 Dec 2014 15:16:14 +0000 (15:16 +0000)]
llvm-ar: close input files early.

We already have them mapped into memory, so we can just close the file.

llvm-svn: 224020

9 years agoAVX-512: Added all forms of COMPRESS instruction
Elena Demikhovsky [Thu, 11 Dec 2014 15:02:24 +0000 (15:02 +0000)]
AVX-512: Added all forms of COMPRESS instruction
+ intrinsics + tests

llvm-svn: 224019

9 years agoFix check-asan on Windows by putting lib/clang/... onto PATH (PR21880)
Timur Iskhodzhanov [Thu, 11 Dec 2014 14:04:57 +0000 (14:04 +0000)]
Fix check-asan on Windows by putting lib/clang/... onto PATH (PR21880)

llvm-svn: 224018

9 years ago[mips][microMIPS] Implement CodeGen support for LI16 instruction.
Jozef Kolek [Thu, 11 Dec 2014 13:56:23 +0000 (13:56 +0000)]
[mips][microMIPS] Implement CodeGen support for LI16 instruction.

Differential Revision: http://reviews.llvm.org/D5840

llvm-svn: 224017

9 years agoInstSimplify: Remove usesless %a parameter from tests
David Majnemer [Thu, 11 Dec 2014 12:56:17 +0000 (12:56 +0000)]
InstSimplify: Remove usesless %a parameter from tests

No functional change intended.

llvm-svn: 224016

9 years agoThe inliner needs to fix up debug information for llvm.dbg.declare, not only for...
Michael Kuperstein [Thu, 11 Dec 2014 12:41:10 +0000 (12:41 +0000)]
The inliner needs to fix up debug information for llvm.dbg.declare, not only for llvm.dbg.value.

Patch by Amjad Aboud

Differential Revision: http://reviews.llvm.org/D6525

llvm-svn: 224015

9 years agoELF/AArch64: Add a test for R_AARCH64_ABS32
Will Newton [Thu, 11 Dec 2014 12:37:35 +0000 (12:37 +0000)]
ELF/AArch64: Add a test for R_AARCH64_ABS32

llvm-svn: 224014

9 years agoELF/AArch64: Add a test for R_AARCH64_ABS64
Will Newton [Thu, 11 Dec 2014 12:36:58 +0000 (12:36 +0000)]
ELF/AArch64: Add a test for R_AARCH64_ABS64

llvm-svn: 224013

9 years agoEmit warning if define or undef reserved identifier or keyword.
Serge Pavlov [Thu, 11 Dec 2014 12:18:08 +0000 (12:18 +0000)]
Emit warning if define or undef reserved identifier or keyword.

Recommit of r223114, reverted in r223120.

llvm-svn: 224012

9 years agoAdd newline missing in r224010.
Michael Kuperstein [Thu, 11 Dec 2014 11:30:20 +0000 (11:30 +0000)]
Add newline missing in r224010.

llvm-svn: 224011

9 years ago[X86] When converting movs to pushes, don't assume MOVmi operand is an actual immediate
Michael Kuperstein [Thu, 11 Dec 2014 11:26:16 +0000 (11:26 +0000)]
[X86] When converting movs to pushes, don't assume MOVmi operand is an actual immediate

This should fix PR21878.

llvm-svn: 224010

9 years agoBugfix in InlineSpiller::traceSiblingValue().
Patrik Hagglund [Thu, 11 Dec 2014 10:40:17 +0000 (10:40 +0000)]
Bugfix in InlineSpiller::traceSiblingValue().

Properly determine whether or not a phi was added by splitting.
Check against the current VNInfo of OrigLI instead of against the
OrigVNI argument.

Patch provided by Jonas Paulsson. Reviewed by Quentin Colombet.

llvm-svn: 224009

9 years agoAVX-512: Fixed a bug in lowering setcc for MVT::i1 type
Elena Demikhovsky [Thu, 11 Dec 2014 10:21:12 +0000 (10:21 +0000)]
AVX-512: Fixed a bug in lowering setcc for MVT::i1 type

llvm-svn: 224008

9 years agotest commit (spelling correction)
Kumar Sukhani [Thu, 11 Dec 2014 08:33:36 +0000 (08:33 +0000)]
test commit (spelling correction)

llvm-svn: 224007

9 years agoRefactor creation of overflow result tuples in InstCombineCalls.
Erik Eckstein [Thu, 11 Dec 2014 08:02:30 +0000 (08:02 +0000)]
Refactor creation of overflow result tuples in InstCombineCalls.

Extract the creation of overflow result tuples in a separate function. NFC.

llvm-svn: 224006

9 years agoUse range-based for loops. NFC
Craig Topper [Thu, 11 Dec 2014 07:04:54 +0000 (07:04 +0000)]
Use range-based for loops. NFC

llvm-svn: 224005

9 years agoJust use the Module unique_ptr object directly in many places instead of separate...
Craig Topper [Thu, 11 Dec 2014 07:04:52 +0000 (07:04 +0000)]
Just use the Module unique_ptr object directly in many places instead of separate pointer that's kept in sync with it.

llvm-svn: 224004

9 years agoUse unique_ptr to remove an explicit delete. Change return type to pass the unique_pt...
Craig Topper [Thu, 11 Dec 2014 07:04:46 +0000 (07:04 +0000)]
Use unique_ptr to remove an explicit delete. Change return type to pass the unique_ptr to caller.

llvm-svn: 224003

9 years agoIR: Canonicalize metadata formatting, NFC
Duncan P. N. Exon Smith [Thu, 11 Dec 2014 06:32:29 +0000 (06:32 +0000)]
IR: Canonicalize metadata formatting, NFC

Canonicalize formatting of metadata to make it easier to upgrade via
scripts -- in particular, one line per metadata definition makes it more
`sed`-able.

This is preparation for changing the assembly syntax for metadata [1].

[1]: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20141208/248449.html

llvm-svn: 224002

9 years ago[ELF] Remove duplicate constructor code.
Rui Ueyama [Thu, 11 Dec 2014 06:22:45 +0000 (06:22 +0000)]
[ELF] Remove duplicate constructor code.

This piece of code was copied multiple times to each archs.

llvm-svn: 224001

9 years agoReverting commit 223981, because the test that I added (incorrect-variable-debugloc1...
Ekaterina Romanova [Thu, 11 Dec 2014 06:22:35 +0000 (06:22 +0000)]
Reverting commit 223981, because the test that I added (incorrect-variable-debugloc1.ll) failed for llvm-ppc64.

The test is failing for llvm-ppc64 because for this platform the location list is not being generated at all (most likely because of the bug in PPC code optimization or generation). I will file a bug agains PPC compiler, but meanwhile, until PPC bug is fixed, I will have to revert my change.

llvm-svn: 224000

9 years agoMS ABI: Fix mangling of unsigned int template params
Will Wilson [Thu, 11 Dec 2014 05:47:10 +0000 (05:47 +0000)]
MS ABI: Fix mangling of unsigned int template params

llvm-svn: 223999

9 years agoMake MultiClass::DefPrototypes own their Records to fix memory leaks.
Craig Topper [Thu, 11 Dec 2014 05:25:33 +0000 (05:25 +0000)]
Make MultiClass::DefPrototypes own their Records to fix memory leaks.

llvm-svn: 223998

9 years agoReplace std::map<K, V*> with std::map<K, std::unique_ptr<V>> to handle ownership...
Craig Topper [Thu, 11 Dec 2014 05:25:30 +0000 (05:25 +0000)]
Replace std::map<K, V*> with std::map<K, std::unique_ptr<V>> to handle ownership and deletion of the values.

Ideally we would store the MultiClasses by value directly in the maps, but I had some trouble with that before and this at least fixes the leak.

llvm-svn: 223997

9 years ago[X86] Add back AVX2 VR256 PMOVX patterns.
Ahmed Bougacha [Thu, 11 Dec 2014 04:32:17 +0000 (04:32 +0000)]
[X86] Add back AVX2 VR256 PMOVX patterns.

We can't reach those from zext, but other parts of the backend (the shuffle
lowering) generate 256-bit VZEXT nodes.

Fixes PR21876.

llvm-svn: 223996

9 years agoFix LLVMContext to match what MDKind names that the LL parser permits. Fixes PR21799!
Nick Lewycky [Thu, 11 Dec 2014 02:10:28 +0000 (02:10 +0000)]
Fix LLVMContext to match what MDKind names that the LL parser permits. Fixes PR21799!

llvm-svn: 223995

9 years agoGCStrategy should not own GCFunctionInfo
Philip Reames [Thu, 11 Dec 2014 01:47:23 +0000 (01:47 +0000)]
GCStrategy should not own GCFunctionInfo

This change moves the ownership and access of GCFunctionInfo (the object which describes the safepoints associated with a safepoint under GCRoot) to GCModuleInfo. Previously, this was owned by GCStrategy which was in turned owned by GCModuleInfo. This made GCStrategy module specific which is 'surprising' given it's name and other purposes.

There's a few more changes needed, but we're getting towards the point we can reuse GCStrategy for gc.statepoint as well.

p.s. The style of this code ends up being a mess. I was trying to move code around without otherwise changing much. Once I get the ownership structure rearranged, I will go through and fixup spacing, naming, comments etc.

Differential Revision: http://reviews.llvm.org/D6587

llvm-svn: 223994

9 years agoIR: Add 'invalid-' to test names for invalid assembly
Duncan P. N. Exon Smith [Thu, 11 Dec 2014 01:34:46 +0000 (01:34 +0000)]
IR: Add 'invalid-' to test names for invalid assembly

Take the opportunity to sort these by `metadata`.

llvm-svn: 223993

9 years agoParse: Concatenated string literals should be verified in inline asm
David Majnemer [Thu, 11 Dec 2014 01:00:48 +0000 (01:00 +0000)]
Parse: Concatenated string literals should be verified in inline asm

While we would correctly handle asm("foo") and reject asm(L"bar"), we
weren't careful to handle cases where an ascii literal could be
concatenated with a wide literal.

This fixes PR21822.

llvm-svn: 223992

9 years agoLiveInterval: Use range based for loops for subregister ranges.
Matthias Braun [Thu, 11 Dec 2014 00:59:06 +0000 (00:59 +0000)]
LiveInterval: Use range based for loops for subregister ranges.

llvm-svn: 223991

9 years agoTry again at sorting entries in CODE_OWNERS
Justin Bogner [Thu, 11 Dec 2014 00:52:59 +0000 (00:52 +0000)]
Try again at sorting entries in CODE_OWNERS

I apparently fail at the alphabet, E is not after G, and G isn't even
close to C. Sorry for the noise.

llvm-svn: 223990

9 years agoFix some incorrectly sorted entries in CODE_OWNERS
Justin Bogner [Thu, 11 Dec 2014 00:41:15 +0000 (00:41 +0000)]
Fix some incorrectly sorted entries in CODE_OWNERS

llvm-svn: 223989

9 years agoAdd code owners for profiling and coverage
Justin Bogner [Thu, 11 Dec 2014 00:37:25 +0000 (00:37 +0000)]
Add code owners for profiling and coverage

llvm-svn: 223988

9 years agoRevert r223578, perf data collection depends on the old symbol name.
Paul Robinson [Wed, 10 Dec 2014 23:49:03 +0000 (23:49 +0000)]
Revert r223578, perf data collection depends on the old symbol name.

llvm-svn: 223987

9 years agoARM: correctly expand LDR-lit based globals.
Tim Northover [Wed, 10 Dec 2014 23:40:50 +0000 (23:40 +0000)]
ARM: correctly expand LDR-lit based globals.

Quite a major error here: the expansions for the Pseudos with and without
folded load were mixed up. Fortunately it only affects ARM-mode, when not using
movw/movt, on Darwin. I'm guessing no-one actually uses that combination.

llvm-svn: 223986

9 years agoDiagnose attributes 'optnone' and 'minsize' on the same declaration.
Paul Robinson [Wed, 10 Dec 2014 23:34:36 +0000 (23:34 +0000)]
Diagnose attributes 'optnone' and 'minsize' on the same declaration.

Eventually we'll diagnose them on different declarations, but let's
get this part out of the way first.

llvm-svn: 223985

9 years agoRevert r223980 as it had wrong commit message.
Paul Robinson [Wed, 10 Dec 2014 23:32:57 +0000 (23:32 +0000)]
Revert r223980 as it had wrong commit message.

llvm-svn: 223984

9 years agoDisable the remaining ProcessIO test on Windows.
Zachary Turner [Wed, 10 Dec 2014 23:25:28 +0000 (23:25 +0000)]
Disable the remaining ProcessIO test on Windows.

This still relies on PutSTDIN, just indirectly.  So it was hanging
due to not being able to get stdin from the test.

llvm-svn: 223983

9 years agoFix some test failures for Windows.
Zachary Turner [Wed, 10 Dec 2014 23:25:10 +0000 (23:25 +0000)]
Fix some test failures for Windows.

llvm-svn: 223982

9 years agoA fix for PR21176.
Ekaterina Romanova [Wed, 10 Dec 2014 23:19:56 +0000 (23:19 +0000)]
A fix for PR21176.

DW_OP_const <const> doesn't describe a constant value, but a value at a constant address.
The proper way to describe a constant value is DW_OP_constu <const>, DW_OP_stack_value.

Added DW_OP_stack_value to the stack.

-This line, and those below, will be ignored--

M    lib/CodeGen/AsmPrinter/DwarfDebug.cpp
A    test/DebugInfo/incorrect-variable-debugloc1.ll

llvm-svn: 223981

9 years agoRename a couple of preprocessor symbols to be more descriptive. NFC.
Paul Robinson [Wed, 10 Dec 2014 23:12:37 +0000 (23:12 +0000)]
Rename a couple of preprocessor symbols to be more descriptive. NFC.
Review feedback from recent changes to GetSVN.cmake.

llvm-svn: 223980

9 years agoForgot to commit this change with r223975
David Majnemer [Wed, 10 Dec 2014 23:08:43 +0000 (23:08 +0000)]
Forgot to commit this change with r223975

llvm-svn: 223979

9 years agoLiveInterval: Use more range based for loops for value numbers and segments.
Matthias Braun [Wed, 10 Dec 2014 23:07:54 +0000 (23:07 +0000)]
LiveInterval: Use more range based for loops for value numbers and segments.

llvm-svn: 223978

9 years agoAdd a FIXME for unifying ARM target abi handling.
Eric Christopher [Wed, 10 Dec 2014 22:58:34 +0000 (22:58 +0000)]
Add a FIXME for unifying ARM target abi handling.

llvm-svn: 223977

9 years agoRevert the default changing behavior part of r216662 until we
Eric Christopher [Wed, 10 Dec 2014 22:58:32 +0000 (22:58 +0000)]
Revert the default changing behavior part of r216662 until we
can change the backend to be the same default. Leave the
modified/new testcases with the exception of the default behavior
since it increases our testing footprint.

llvm-svn: 223976

9 years agoAST: Properly calculate the linkage of a IndirectFieldDecl
David Majnemer [Wed, 10 Dec 2014 22:58:14 +0000 (22:58 +0000)]
AST: Properly calculate the linkage of a IndirectFieldDecl

getLVForNamespaceScopeDecl believed that it wasn't possible for it to
ever see an IndirectFieldDecl.  However, this can occur when determining
whether or not something is a redeclaration of a member of an anonymous
static union.

This fixes PR21858.

llvm-svn: 223975

9 years agoFix PR21694. r219517 added a use of SCEV divide in HowFarToZero computation. This...
Mark Heffernan [Wed, 10 Dec 2014 22:53:52 +0000 (22:53 +0000)]
Fix PR21694. r219517 added a use of SCEV divide in HowFarToZero computation.  This divide can produce incorrect results as we are using an unsigned divide for what should be a modular divide.  This change reverts back to a more conservative computation using trailing zeros.

llvm-svn: 223974

9 years agoFix a bunch of [-Werror,-Winconsistent-missing-override] warnings.
Eric Christopher [Wed, 10 Dec 2014 22:29:58 +0000 (22:29 +0000)]
Fix a bunch of [-Werror,-Winconsistent-missing-override] warnings.

llvm-svn: 223973

9 years agoSilence -Winconsistent-missing-override warnings.
Eric Christopher [Wed, 10 Dec 2014 22:24:56 +0000 (22:24 +0000)]
Silence -Winconsistent-missing-override warnings.

llvm-svn: 223972

9 years ago[Hexagon] Adding combine ri/ir instructions.
Colin LeMahieu [Wed, 10 Dec 2014 22:23:07 +0000 (22:23 +0000)]
[Hexagon] Adding combine ri/ir instructions.

llvm-svn: 223971

9 years agoConstantFold: Clean up X * undef code
David Majnemer [Wed, 10 Dec 2014 21:58:17 +0000 (21:58 +0000)]
ConstantFold: Clean up X * undef code

No functional change intended.

llvm-svn: 223970

9 years agoConstantFold, InstSimplify: undef >>a x can be either -1 or 0, choose 0
David Majnemer [Wed, 10 Dec 2014 21:58:15 +0000 (21:58 +0000)]
ConstantFold, InstSimplify: undef >>a x can be either -1 or 0, choose 0

Zero is usually a nicer constant to have than -1.

llvm-svn: 223969

9 years agoConstantFold: an undef shift amount results in undef
David Majnemer [Wed, 10 Dec 2014 21:38:05 +0000 (21:38 +0000)]
ConstantFold: an undef shift amount results in undef

X shifted by undef results in undef because the undef value can
represent values greater than the width of the operands.

llvm-svn: 223968

9 years ago[Hexagon] Adding encodings for JR class instructions. Updating complier usages.
Colin LeMahieu [Wed, 10 Dec 2014 21:24:10 +0000 (21:24 +0000)]
[Hexagon] Adding encodings for JR class instructions.  Updating complier usages.

llvm-svn: 223967

9 years agoFixed an 80-column violation.
Sean Callanan [Wed, 10 Dec 2014 21:22:20 +0000 (21:22 +0000)]
Fixed an 80-column violation.

Thanks to Nico Weber for spotting this.

llvm-svn: 223966

9 years agoDo not run dead code elimination by default
Tobias Grosser [Wed, 10 Dec 2014 21:12:23 +0000 (21:12 +0000)]
Do not run dead code elimination by default

The dead code elimination is a pass that looks very promising, but needs some
more compile-time tuning before enabling it by default seems sensible.

llvm-svn: 223965

9 years agoMove three methods only used by MCJIT to MCJIT.
Rafael Espindola [Wed, 10 Dec 2014 20:46:55 +0000 (20:46 +0000)]
Move three methods only used by MCJIT to MCJIT.

These methods are only used by MCJIT and are very specific to it. In fact, they
are also fairly specific to the fact that we have a dynamic linker of
relocatable objects.

llvm-svn: 223964

9 years ago[ELF] Allow target to adjust a symbol's value for using in a dynamic tag
Simon Atanasyan [Wed, 10 Dec 2014 20:09:12 +0000 (20:09 +0000)]
[ELF] Allow target to adjust a symbol's value for using in a dynamic tag

Some targets like microMIPS and ARM Thumb use the last bit of a symbol's
value to mark 'compressed' code. This patch adds new virtual function
`DynamicTable::getAtomVirtualAddress` which allows to adjust a symbol's
value before using it in a dynamic table tags like DT_INIT / DT_FINI.

llvm-svn: 223963

9 years agoDR1891, PR21787: a lambda closure type has no default constructor, rather than
Richard Smith [Wed, 10 Dec 2014 20:04:48 +0000 (20:04 +0000)]
DR1891, PR21787: a lambda closure type has no default constructor, rather than
having a deleted default constructor.

llvm-svn: 223953

9 years ago[AArch64] MachO large code-model: Materialize FP constants in code.
Juergen Ributzka [Wed, 10 Dec 2014 19:43:32 +0000 (19:43 +0000)]
[AArch64] MachO large code-model: Materialize FP constants in code.

In the large code model we have to first get the address of the GOT entry, load
the address of the constant, and then load the constant itself.

To avoid these loads and the GOT entry alltogether this commit changes the way
how FP constants are materialized in the large code model. The constats are now
materialized in a GPR and then bitconverted/moved into the FPR.

Reviewed by Tim Northover

Fixes rdar://problem/16572564.

llvm-svn: 223941

9 years agoR600/SI: Use getTargetConstant in AdjustRegClass
Marek Olsak [Wed, 10 Dec 2014 19:25:31 +0000 (19:25 +0000)]
R600/SI: Use getTargetConstant in AdjustRegClass

llvm-svn: 223940

9 years agoAdded support to the expression parser for finding
Sean Callanan [Wed, 10 Dec 2014 19:23:29 +0000 (19:23 +0000)]
Added support to the expression parser for finding
Objective-C types and enums in modules.  We now have
a three-stage fallback when looking for methods and
properties: first the DWARF, second the modules, third
the runtime.

<rdar://problem/18782288>

llvm-svn: 223939

9 years agoMake test case 32/64 bit neutral
David Blaikie [Wed, 10 Dec 2014 19:19:24 +0000 (19:19 +0000)]
Make test case 32/64 bit neutral

llvm-svn: 223938

9 years agoDebugInfo: Location information for scalar new expressions
David Blaikie [Wed, 10 Dec 2014 19:04:09 +0000 (19:04 +0000)]
DebugInfo: Location information for scalar new expressions

llvm-svn: 223937

9 years agoclang-format: Factor out UnwrappedLineFormatter into a separate file.
Daniel Jasper [Wed, 10 Dec 2014 19:00:42 +0000 (19:00 +0000)]
clang-format: Factor out UnwrappedLineFormatter into a separate file.

No functional changes intended.

llvm-svn: 223936

9 years agoAdded a testcase to make sure the parser allows
Sean Callanan [Wed, 10 Dec 2014 18:57:09 +0000 (18:57 +0000)]
Added a testcase to make sure the parser allows
but ignores module imports in debugger mode,
even inside functions.

llvm-svn: 223935

9 years agoObjective-C SDK modernizer. When modernizing an enum to
Fariborz Jahanian [Wed, 10 Dec 2014 18:25:24 +0000 (18:25 +0000)]
Objective-C SDK modernizer. When modernizing an enum to
NS_ENUM/NS_OPTIONS use the underlying type if there is
no associated type. rdar://19198042

llvm-svn: 223934

9 years ago[Hexagon] Adding JR class predicated call reg instructions.
Colin LeMahieu [Wed, 10 Dec 2014 18:24:16 +0000 (18:24 +0000)]
[Hexagon] Adding JR class predicated call reg instructions.

llvm-svn: 223933

9 years agoUpdate ASan/Win test expectations broken by r223508
Timur Iskhodzhanov [Wed, 10 Dec 2014 17:56:29 +0000 (17:56 +0000)]
Update ASan/Win test expectations broken by r223508

llvm-svn: 223932

9 years agoAdded documentation for MergeFunctions pass:
Stepan Dyatkovskiy [Wed, 10 Dec 2014 17:42:01 +0000 (17:42 +0000)]
Added documentation for MergeFunctions pass:
Pass looks for equivalent functions that are mergable and folds them.

llvm-svn: 223931

9 years agoclang-format: Remove a few else after return statements.
Daniel Jasper [Wed, 10 Dec 2014 17:24:34 +0000 (17:24 +0000)]
clang-format: Remove a few else after return statements.

They are against the LLVM coding conventions. No functional changes
intended.

llvm-svn: 223930

9 years agoMatch new shuffle codegen for MOVHPD patterns
Sanjay Patel [Wed, 10 Dec 2014 16:58:54 +0000 (16:58 +0000)]
Match new shuffle codegen for MOVHPD patterns

Add patterns to match SSE (shufpd) and AVX (vpermilpd) shuffle codegen
when storing the high element of a v2f64. The existing patterns were
only checking for an unpckh type of shuffle.

http://llvm.org/bugs/show_bug.cgi?id=21791

Differential Revision: http://reviews.llvm.org/D6586

llvm-svn: 223929

9 years agoOpenCL C: Add support for a set of floating point
Pekka Jaaskelainen [Wed, 10 Dec 2014 16:41:14 +0000 (16:41 +0000)]
OpenCL C: Add support for a set of floating point
arithmetic relaxation flags:

-cl-no-signed-zeros
-cl-unsafe-math-optimizations
-cl-finite-math-only
-cl-fast-relaxed-math

Propagate the info to FP instruction flags as well
as function attributes where they are available.

llvm-svn: 223928

9 years ago[mips] Removing __SIZEOF_INT128__ macro for MIPS64
Simon Atanasyan [Wed, 10 Dec 2014 15:44:07 +0000 (15:44 +0000)]
[mips] Removing __SIZEOF_INT128__ macro for MIPS64

This is a temporary workaround while MIPS64 has not yet fully supported
128-bit integers. But declaration of int128 type is necessary even though
`__SIZEOF_INT128__` is undefined because c++ standard header files like
`limits` throw error message if `__int128` is not available.

Patch by Sagar Thakur.

Differential Revision: http://reviews.llvm.org/D6402

llvm-svn: 223927

9 years agoSilencing a -Wsequence-point warning, and the resulting undefined behavior. NFC.
Aaron Ballman [Wed, 10 Dec 2014 14:14:54 +0000 (14:14 +0000)]
Silencing a -Wsequence-point warning, and the resulting undefined behavior. NFC.

llvm-svn: 223926

9 years ago[sanitizer] Disable compile-time checks for __kernel_old_uid_t size on aarch64.
Evgeniy Stepanov [Wed, 10 Dec 2014 11:44:09 +0000 (11:44 +0000)]
[sanitizer] Disable compile-time checks for __kernel_old_uid_t size on aarch64.

Should fix PR21476.

llvm-svn: 223925

9 years agoConstantFold: div undef, 0 should fold to undef, not zero
David Majnemer [Wed, 10 Dec 2014 09:14:55 +0000 (09:14 +0000)]
ConstantFold: div undef, 0 should fold to undef, not zero

Dividing by zero yields an undefined value.

llvm-svn: 223924

9 years agoInstSimplify: [al]shr exact undef, %X -> undef
David Majnemer [Wed, 10 Dec 2014 09:14:52 +0000 (09:14 +0000)]
InstSimplify: [al]shr exact undef, %X -> undef

Exact shifts always keep the non-zero bits of their input.  This means
it keeps it's undef bits.

llvm-svn: 223923

9 years ago[X86] Make a code path in EltsFromConsecutiveLoads work only on vectors it expects
Michael Kuperstein [Wed, 10 Dec 2014 08:46:12 +0000 (08:46 +0000)]
[X86] Make a code path in EltsFromConsecutiveLoads work only on vectors it expects

EltsFromConsecutiveLoads was apparently only ever called for 128-bit vectors, and assumed this implicitly. r223518 started calling it for AVX-sized vectors, causing the code path that had this assumption to crash.
This adds a check to make this path fire only for 128-bit vectors.

Differential Revision: http://reviews.llvm.org/D6579

llvm-svn: 223922