oota-llvm.git
10 years ago[mips] Define getTargetNode as a template function.
Akira Hatanaka [Wed, 25 Sep 2013 00:30:25 +0000 (00:30 +0000)]
[mips] Define getTargetNode as a template function.

No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191350 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[PR16882] Ignore noreturn definitions when setting isPhysRegUsed.
Quentin Colombet [Wed, 25 Sep 2013 00:26:17 +0000 (00:26 +0000)]
[PR16882] Ignore noreturn definitions when setting isPhysRegUsed.

PEI inserts a save/restore sequence for the link register, according to the
information it gets from the MachineRegisterInfo.
MachineRegisterInfo is populated by the VirtRegMap pass.
This pass was not aware of noreturn calls and was registering the definitions of
these calls the same way as regular operations.

Modify VirtRegPass so that it does not set the isPhysRegUsed information for
registers only defined by noreturn calls.
The rational is that a noreturn call is the "last instruction" of the program
(if it returns the behavior is undefined), so everything that is defined by it
cannot be used and will not interfere with anything else. Therefore, it is
pointless to account for then.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191349 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoCriticalAntiDepBreaker is no longer needed for armv7 scheduling.
Andrew Trick [Wed, 25 Sep 2013 00:26:16 +0000 (00:26 +0000)]
CriticalAntiDepBreaker is no longer needed for armv7 scheduling.

This is being disabled because it is no longer needed for
performance. It is only used by postRAscheduler which is also planned
for removal, and it is implemented with an out-dated view of register
liveness. It consideres aliases instead of register units, assumes
valid kill flags, and assumes implicit uses on partial register
defs. Kill flags and implicit operands are error prone and impossible
to verify. We should gradually eliminate dependence on them in the
postRA phases.

Targets that still benefit from this should move to the MI
scheduler. If that doesn't solve the problem, then we should add a
hook to regalloc to optimize reload placement.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191348 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMachO: Improve backend diagnostic for overalignment.
Jim Grosbach [Tue, 24 Sep 2013 23:56:31 +0000 (23:56 +0000)]
MachO: Improve backend diagnostic for overalignment.

Give the symbol's name and disengage the enchanced crash reporting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191344 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMove LTO support library to a component, allowing it to be tested
Peter Collingbourne [Tue, 24 Sep 2013 23:52:22 +0000 (23:52 +0000)]
Move LTO support library to a component, allowing it to be tested
more reliably across platforms.  Patch by Tom Roeder!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191343 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd missing check to SETCC optimization.
Eli Friedman [Tue, 24 Sep 2013 22:50:14 +0000 (22:50 +0000)]
Add missing check to SETCC optimization.

PR17338.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191337 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agollvm-dwarfdump: add missing opening quotation mark lost in r191330
David Blaikie [Tue, 24 Sep 2013 20:23:36 +0000 (20:23 +0000)]
llvm-dwarfdump: add missing opening quotation mark lost in r191330

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191333 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoPatch that forces MergeFunctions pass for clang.
Stepan Dyatkovskiy [Tue, 24 Sep 2013 20:06:31 +0000 (20:06 +0000)]
Patch that forces MergeFunctions pass for clang.
It is temporary patch. We need to keep it in trunk, since it makes easer to test it on buildbots on different platforms.
Once we see stable MergeFunctions behaviour with satisfied perfomance, this patch will be removed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191331 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agollvm-dwarfdump: re-add field formatting for the entry kind lost in r191329
David Blaikie [Tue, 24 Sep 2013 19:56:27 +0000 (19:56 +0000)]
llvm-dwarfdump: re-add field formatting for the entry kind lost in r191329

CR feedback from Eric Christopher

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191330 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agollvm-dwarfdump support for gnu_pubtypes
David Blaikie [Tue, 24 Sep 2013 19:50:00 +0000 (19:50 +0000)]
llvm-dwarfdump support for gnu_pubtypes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191329 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoTest case for r191314.
Yi Jiang [Tue, 24 Sep 2013 19:33:53 +0000 (19:33 +0000)]
Test case for r191314.

Some supplemental information for r191314: We would like to make sure SLP Vectorizer will not try to vectorize tiny trees even with a negative threshold so we set the cost to INT_MAX.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191327 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoVerify that we don't optimize null return checks to the nothrow_t version of operator...
Benjamin Kramer [Tue, 24 Sep 2013 18:37:49 +0000 (18:37 +0000)]
Verify that we don't optimize null return checks to the nothrow_t version of operator new.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191325 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdding a feature flag to the llvm backend for x86 TBM instruction set.
Yunzhong Gao [Tue, 24 Sep 2013 18:21:52 +0000 (18:21 +0000)]
Adding a feature flag to the llvm backend for x86 TBM instruction set.
Adding TBM feature to bdver2 processor; piledriver supports this instruction set
according to the following document:
http://developer.amd.com/wordpress/media/2012/10/New-Bulldozer-and-Piledriver-Instructions.pdf

Phabricator code review is located here: http://llvm-reviews.chandlerc.com/D1692

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191324 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMemoryBuiltins: Remove posix_memalign from the list and replace it with a TODO.
Benjamin Kramer [Tue, 24 Sep 2013 17:49:08 +0000 (17:49 +0000)]
MemoryBuiltins: Remove posix_memalign from the list and replace it with a TODO.

This code isn't ready to deal with allocation functions where the return is not
the allocated pointer. The checks below will reject posix_memalign anyways.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191319 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMake the size and expr arguments of .fill directive optional.
Roman Divacky [Tue, 24 Sep 2013 17:44:41 +0000 (17:44 +0000)]
Make the size and expr arguments of .fill directive optional.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191318 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMemoryBuiltins: Reinstate optimizing (uninitialized) loads from operator new.
Benjamin Kramer [Tue, 24 Sep 2013 17:34:29 +0000 (17:34 +0000)]
MemoryBuiltins: Reinstate optimizing (uninitialized) loads from operator new.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191315 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoset the cost of tiny trees to INT_MAX in SLP vectorizer to disable vectorization...
Yi Jiang [Tue, 24 Sep 2013 17:26:43 +0000 (17:26 +0000)]
set the cost of tiny trees to INT_MAX in SLP vectorizer to disable vectorization on them

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191314 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMemoryBuiltins: Fix operator new bits.
Benjamin Kramer [Tue, 24 Sep 2013 17:15:14 +0000 (17:15 +0000)]
MemoryBuiltins: Fix operator new bits.

We really don't want to optimize malloc return value checks away.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191313 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoComment typo.
Andrew Trick [Tue, 24 Sep 2013 17:11:19 +0000 (17:11 +0000)]
Comment typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191312 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoTeach MemoryBuiltins and InstructionSimplify that operator new never returns NULL.
Benjamin Kramer [Tue, 24 Sep 2013 16:37:51 +0000 (16:37 +0000)]
Teach MemoryBuiltins and InstructionSimplify that operator new never returns NULL.

This is safe per C++11 18.6.1.1p3: [operator new returns] a non-null pointer to
suitably aligned storage (3.7.4), or else throw a bad_alloc exception. This
requirement is binding on a replacement version of this function.

Brings us a tiny bit closer to eliminating more vector push_backs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191310 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoPush analysis passes to InstSimplify when they're around anyways.
Benjamin Kramer [Tue, 24 Sep 2013 16:37:40 +0000 (16:37 +0000)]
Push analysis passes to InstSimplify when they're around anyways.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191309 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips][msa] Added support for matching pckev, and pckod from normal IR (i.e. not...
Daniel Sanders [Tue, 24 Sep 2013 14:53:25 +0000 (14:53 +0000)]
[mips][msa] Added support for matching pckev, and pckod from normal IR (i.e. not intrinsics)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191306 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips][msa] Added support for matching ilv[lr], ilvod, and ilvev from normal IR ...
Daniel Sanders [Tue, 24 Sep 2013 14:36:12 +0000 (14:36 +0000)]
[mips][msa] Added support for matching ilv[lr], ilvod, and ilvev from normal IR (i.e. not intrinsics)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191304 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDAGCombiner: Unify rotate matching for extended and unextended amounts.
Benjamin Kramer [Tue, 24 Sep 2013 14:21:28 +0000 (14:21 +0000)]
DAGCombiner: Unify rotate matching for extended and unextended amounts.

No functionality change, lots of indentation changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191303 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips][msa] Added support for matching shf from normal IR (i.e. not intrinsics)
Daniel Sanders [Tue, 24 Sep 2013 14:20:00 +0000 (14:20 +0000)]
[mips][msa] Added support for matching shf from normal IR (i.e. not intrinsics)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191302 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips][msa] Added support for matching vshf from normal IR (i.e. not intrinsics)
Daniel Sanders [Tue, 24 Sep 2013 14:02:15 +0000 (14:02 +0000)]
[mips][msa] Added support for matching vshf from normal IR (i.e. not intrinsics)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191301 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips][msa] Remove the VSPLAT and VSPLATD nodes in favour of matching BUILD_VECTOR.
Daniel Sanders [Tue, 24 Sep 2013 13:33:07 +0000 (13:33 +0000)]
[mips][msa] Remove the VSPLAT and VSPLATD nodes in favour of matching BUILD_VECTOR.

Most constant BUILD_VECTOR's are matched using ComplexPatterns which cover
bitcasted as well as normal vectors. However, it doesn't seem to be possible to
match ldi.[bhwd] in a type-agnostic manner (e.g. to support the widest range of
immediates, it should be possible to use ldi.b to load v2i64) using TableGen so
ldi.[bhwd] is matched using custom code in MipsSEISelDAGToDAG.cpp

This made the majority of the constant splat BUILD_VECTOR lowering redundant.
The only transformation remaining for constant splats is when an (up-to) 32-bit
constant splat is possible but the value does not fit into a 10-bit signed
integer. In this case, the BUILD_VECTOR is transformed into a bitcasted
BUILD_VECTOR so that fill.[bhw] can be used to splat the vector from a GPR32
register (which is initialized using the usual lui/addui sequence).

There are no additional tests since this is a re-implementation of previous
functionality. The change is intended to make it easier to implement some of
the upcoming instruction selection patches since they can rely on existing
support for BUILD_VECTOR's in the DAGCombiner.

compare_float.ll changed slightly because a BITCAST is no longer
introduced during legalization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191299 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips][msa] Non-constant BUILD_VECTOR's should be expanded to INSERT_VECTOR_ELT inste...
Daniel Sanders [Tue, 24 Sep 2013 13:16:15 +0000 (13:16 +0000)]
[mips][msa] Non-constant BUILD_VECTOR's should be expanded to INSERT_VECTOR_ELT instead of memory operations.

The resulting code is the same length, but doesnt cause memory traffic or latency.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191297 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips][msa] Added partial support for matching fmax_a from normal IR (i.e. not intrin...
Daniel Sanders [Tue, 24 Sep 2013 13:02:08 +0000 (13:02 +0000)]
[mips][msa] Added partial support for matching fmax_a from normal IR (i.e. not intrinsics)

This covers the case where fmax_a can be used to implement ISD::FABS.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191296 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips][msa] Line wrapping.
Daniel Sanders [Tue, 24 Sep 2013 12:45:36 +0000 (12:45 +0000)]
[mips][msa] Line wrapping.

No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191295 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips][msa] Added support for matching andi, ori, nori, and xori from normal IR ...
Daniel Sanders [Tue, 24 Sep 2013 12:32:47 +0000 (12:32 +0000)]
[mips][msa] Added support for matching andi, ori, nori, and xori from normal IR (i.e. not intrinsics)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191293 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips][msa] Added support for matching max, maxi, min, mini from normal IR (i.e....
Daniel Sanders [Tue, 24 Sep 2013 12:18:31 +0000 (12:18 +0000)]
[mips][msa] Added support for matching max, maxi, min, mini from normal IR (i.e. not intrinsics)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191291 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips][msa] Added support for matching bsel and bseli from normal IR (i.e. not intrin...
Daniel Sanders [Tue, 24 Sep 2013 12:04:44 +0000 (12:04 +0000)]
[mips][msa] Added support for matching bsel and bseli from normal IR (i.e. not intrinsics)

This required correcting the definition of the bsel and bseli intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191290 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove error output from configure if CFLAGS is set (r174313).
Patrik Hagglund [Tue, 24 Sep 2013 11:38:45 +0000 (11:38 +0000)]
Remove error output from configure if CFLAGS is set (r174313).

This fixes PR16724.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191289 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[msan] Handling of atomic load/store, atomic rmw, cmpxchg.
Evgeniy Stepanov [Tue, 24 Sep 2013 11:20:27 +0000 (11:20 +0000)]
[msan] Handling of atomic load/store, atomic rmw, cmpxchg.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191287 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips][msa] Added support for matching comparisons from normal IR (i.e. not intrinsics)
Daniel Sanders [Tue, 24 Sep 2013 10:46:19 +0000 (10:46 +0000)]
[mips][msa] Added support for matching comparisons from normal IR (i.e. not intrinsics)

MIPS SelectionDAG changes:
* Added VCEQ, VCL[ET]_[SU] nodes to represent vector comparisons that produce a bitmask.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191286 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips][msa] Added support for matching slli, srai, and srli from normal IR (i.e....
Daniel Sanders [Tue, 24 Sep 2013 10:28:18 +0000 (10:28 +0000)]
[mips][msa] Added support for matching slli, srai, and srli from normal IR (i.e. not intrinsics)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191285 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFollowup to r191252.
Bill Wendling [Tue, 24 Sep 2013 07:19:30 +0000 (07:19 +0000)]
Followup to r191252.

Make sure that the code that handles the constant addresses is run for the
GEPs. This just refactors that code and then calls it for the GEPs that are
collected during the iteration.

<rdar://problem/12445434>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191281 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix formatting to match coding standards.
Craig Topper [Tue, 24 Sep 2013 06:21:04 +0000 (06:21 +0000)]
Fix formatting to match coding standards.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191280 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agollvm/test/CodeGen/AArch64/neon-scalar-reduce-pairwise.ll: Use -mtriple here, or aach6...
NAKAMURA Takumi [Tue, 24 Sep 2013 04:14:29 +0000 (04:14 +0000)]
llvm/test/CodeGen/AArch64/neon-scalar-reduce-pairwise.ll: Use -mtriple here, or aach64-pecoff might be misassumed on win32 hosts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191275 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDWARFTypeUnit::dump(): Use PRIx64 to format uint64_t.
NAKAMURA Takumi [Tue, 24 Sep 2013 03:23:07 +0000 (03:23 +0000)]
DWARFTypeUnit::dump(): Use PRIx64 to format uint64_t.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191266 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoInitial support for Neon scalar instructions.
Jiangning Liu [Tue, 24 Sep 2013 02:47:27 +0000 (02:47 +0000)]
Initial support for Neon scalar instructions.

Patch by Ana Pazos.

1.Added support for v1ix and v1fx types.
2.Added Scalar Pairwise Reduce instructions.
3.Added initial implementation of Scalar Arithmetic instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191263 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[stackprotector] Forgot to add in PR number to test case.
Michael Gottesman [Tue, 24 Sep 2013 02:10:55 +0000 (02:10 +0000)]
[stackprotector] Forgot to add in PR number to test case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191261 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[stackprotector] Allow for copies from vreg -> vreg to be in a terminator sequence.
Michael Gottesman [Tue, 24 Sep 2013 01:50:26 +0000 (01:50 +0000)]
[stackprotector] Allow for copies from vreg -> vreg to be in a terminator sequence.

Sometimes a copy from a vreg -> vreg sneaks into the middle of a terminator
sequence. It is safe to slice this into the stack protector success bb.

This fixes PR16979.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191260 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMisc fixes for cpp backend.
Eli Friedman [Tue, 24 Sep 2013 00:36:09 +0000 (00:36 +0000)]
Misc fixes for cpp backend.

PR17317.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191258 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd namespaces to the list of items that we expose via pubnames.
Eric Christopher [Tue, 24 Sep 2013 00:17:57 +0000 (00:17 +0000)]
Add namespaces to the list of items that we expose via pubnames.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191257 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRegenerate testcase from source.
Eric Christopher [Tue, 24 Sep 2013 00:17:54 +0000 (00:17 +0000)]
Regenerate testcase from source.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191256 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFormat the index entry kind string to align.
Eric Christopher [Tue, 24 Sep 2013 00:17:49 +0000 (00:17 +0000)]
Format the index entry kind string to align.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191255 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMake dwarfdump-type-units.test order-independent
David Blaikie [Tue, 24 Sep 2013 00:13:23 +0000 (00:13 +0000)]
Make dwarfdump-type-units.test order-independent

The order in which the comdat type unit sections appear in the output is
unspecified and may vary from machine to machine.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191253 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSelecting the address from a very long chain of GEPs can blow the stack.
Bill Wendling [Tue, 24 Sep 2013 00:13:08 +0000 (00:13 +0000)]
Selecting the address from a very long chain of GEPs can blow the stack.

The recursive nature of the address selection code can cause the stack to
explode if there is a long chain of GEPs. Convert the recursive bit into a
iterative method to avoid this.

<rdar://problem/12445434>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191252 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoComments for r191234 as suggested by Eric Christopher.
David Blaikie [Mon, 23 Sep 2013 23:39:55 +0000 (23:39 +0000)]
Comments for r191234 as suggested by Eric Christopher.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191244 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoExplicitly request unsigned enum types when desired
Reid Kleckner [Mon, 23 Sep 2013 23:26:57 +0000 (23:26 +0000)]
Explicitly request unsigned enum types when desired

The underlying type of all plain enums in MSVC is 'int', even if the
enumerator contains large 32-bit unsigned values or values greater than
UINT_MAX.  The only way to get a large or unsigned enum type is to
request it explicitly with the C++11 strong enum types feature.

However, since LLVM isn't C++11 yet, I had to add a conditional
LLVM_ENUM_INT_TYPE to Compiler.h to control its usage.

The motivating true positive for this change is compiling PointerIntPair
with MSVC for win64.  The PointerIntMask value is supposed to be pointer
sized value of all ones with some low zeros.  Instead, it's truncated to
32-bits!  We are only saved later because it is sign extended back in
the AND with int64_t, and we happen to want all ones.

This silences lots of -Wmicrosoft warnings during a clang self-host
targeting Windows.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191241 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd more external types to the pubtypes table. Expand the asm
Eric Christopher [Mon, 23 Sep 2013 23:15:58 +0000 (23:15 +0000)]
Add more external types to the pubtypes table. Expand the asm
checking patch until we get full dumping support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191239 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUnbreak the build (from r191233)since we're calling printf.
David Blaikie [Mon, 23 Sep 2013 23:15:57 +0000 (23:15 +0000)]
Unbreak the build (from r191233)since we're calling printf.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191238 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRename IsStatic variable to Linkage in order to be a bit more descriptive.
Eric Christopher [Mon, 23 Sep 2013 22:59:14 +0000 (22:59 +0000)]
Rename IsStatic variable to Linkage in order to be a bit more descriptive.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191236 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFormatting.
Eric Christopher [Mon, 23 Sep 2013 22:59:11 +0000 (22:59 +0000)]
Formatting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191235 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agollvm-dwarfdump/libDebugInfo support for type units
David Blaikie [Mon, 23 Sep 2013 22:44:47 +0000 (22:44 +0000)]
llvm-dwarfdump/libDebugInfo support for type units

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191234 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoExract most of DWARFCompileUnit into a new DWARFUnit to prepare for the coming DWARFT...
David Blaikie [Mon, 23 Sep 2013 22:44:40 +0000 (22:44 +0000)]
Exract most of DWARFCompileUnit into a new DWARFUnit to prepare for the coming DWARFTypeUnit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191233 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMake nomips16 mask not repeat if it ends with a '.'.
Reed Kotler [Mon, 23 Sep 2013 22:36:11 +0000 (22:36 +0000)]
Make nomips16 mask not repeat if it ends with a '.'.
This mask is purely for debugging and testing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191231 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoReformat code with clang-format.
Bill Wendling [Mon, 23 Sep 2013 20:57:47 +0000 (20:57 +0000)]
Reformat code with clang-format.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191226 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoHandle gnu pubtypes sections:
Eric Christopher [Mon, 23 Sep 2013 20:55:35 +0000 (20:55 +0000)]
Handle gnu pubtypes sections:

a) Make sure we are emitting the correct section in our section labels
when we begin the module.
b) Make sure we are emitting the correct pubtypes section in the
presence of gnu pubtypes.
c) For C++ struct, union, class, and enumeration types are default
external.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191225 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd a paragraph on prefix data layout.
Peter Collingbourne [Mon, 23 Sep 2013 20:14:21 +0000 (20:14 +0000)]
Add a paragraph on prefix data layout.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191219 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove remaining references to -O4.
Rafael Espindola [Mon, 23 Sep 2013 19:50:59 +0000 (19:50 +0000)]
Remove remaining references to -O4.

Thanks to Hal Finkel for noticing it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191216 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agofix typo: than -> then
Kay Tiong Khoo [Mon, 23 Sep 2013 18:43:51 +0000 (18:43 +0000)]
fix typo: than -> then

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191214 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFixed debug_aranges handling for common symbols.
Richard Mitton [Mon, 23 Sep 2013 17:56:20 +0000 (17:56 +0000)]
Fixed debug_aranges handling for common symbols.

The size of common symbols is now tracked correctly, so they can be listed in the arange section without needing knowledge of other following symbols.

.comm (and .lcomm) do not indicate to the system assembler any particular section to use, so we have to treat them as having no section.

Test case update to account for this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191210 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDebugInfo: Wrap section data and relocs together for dwarf dumping support
David Blaikie [Mon, 23 Sep 2013 17:42:01 +0000 (17:42 +0000)]
DebugInfo: Wrap section data and relocs together for dwarf dumping support

This is a small step that may enable some simplifications in producer
(DWARFContext) and consumer (DWARFCompileUnit and other places) by
making a more complete abstraction around the data and relocations for a
section. Small initial steps could include simple changes such as
passing the pair to DWARFCompileUnit's ctor rather than passing the data
and relocs separately. I don't intend to pursue any such changes
immediately, however.

The motivation for doing this now is that type unit dumping will need to
deal with these data+reloc pairs moreso than the existing dumping
support has needed to associate the data as type unit sections are named
the same (debug_types) and comdat group folded. So to implement dumping
and reloc handling we'll need a mapping of section->data+relocs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191209 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd sha intrinsic tests
Ben Langmuir [Mon, 23 Sep 2013 16:57:52 +0000 (16:57 +0000)]
Add sha intrinsic tests

These should have been included with r190864, but I forgot to use svn add.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191208 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRevert "LoopVectorizer: Only allow vectorization of intrinsics."
Arnold Schwaighofer [Mon, 23 Sep 2013 14:54:39 +0000 (14:54 +0000)]
Revert "LoopVectorizer: Only allow vectorization of intrinsics."

Revert 191122 - with extra checks we are allowed to vectorize math library
function calls.

Standard library indentifiers are reserved names so functions with external
linkage must not overrided them. However, functions with internal linkage can.

Therefore, we can vectorize calls to math library functions with a check for
external linkage and matching signature. This matches what we do during
SelectionDAG building.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191206 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoExpand test case a bit.
Benjamin Kramer [Mon, 23 Sep 2013 14:41:35 +0000 (14:41 +0000)]
Expand test case a bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191205 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips][msa] Added support for matching addvi, and subvi from normal IR (i.e. not...
Daniel Sanders [Mon, 23 Sep 2013 14:29:55 +0000 (14:29 +0000)]
[mips][msa] Added support for matching addvi, and subvi from normal IR (i.e. not intrinsics)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191203 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[ARM] Split A/R class into separate subtarget features.
Amara Emerson [Mon, 23 Sep 2013 14:26:15 +0000 (14:26 +0000)]
[ARM] Split A/R class into separate subtarget features.

Patch by Bradley Smith.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191202 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoInstSimplify: Fold equality comparisons between non-inbounds GEPs.
Benjamin Kramer [Mon, 23 Sep 2013 14:16:38 +0000 (14:16 +0000)]
InstSimplify: Fold equality comparisons between non-inbounds GEPs.

Overflow doesn't affect the correctness of equalities. Computing this is cheap,
we just reuse the computation for the inbounds case and try to peel of more
non-inbounds GEPs. This pattern is unlikely to ever appear in code generated by
Clang, but SCEV occasionally produces it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191200 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips][msa] Added support for matching insert and copy from normal IR (i.e. not intri...
Daniel Sanders [Mon, 23 Sep 2013 14:03:12 +0000 (14:03 +0000)]
[mips][msa] Added support for matching insert and copy from normal IR (i.e. not intrinsics)

Changes to MIPS SelectionDAG:
* Added nodes VEXTRACT_[SZ]EXT_ELT to represent extract and extend in a single
  operation and implemented the DAG combines necessary to fold sign/zero
  extends into the extract.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191199 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips][msa] Added support for matching pcnt from normal IR (i.e. not intrinsics)
Daniel Sanders [Mon, 23 Sep 2013 13:40:21 +0000 (13:40 +0000)]
[mips][msa] Added support for matching pcnt from normal IR (i.e. not intrinsics)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191198 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips][msa] Added support for matching nor from normal IR (i.e. not intrinsics)
Daniel Sanders [Mon, 23 Sep 2013 13:22:24 +0000 (13:22 +0000)]
[mips][msa] Added support for matching nor from normal IR (i.e. not intrinsics)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191195 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips][msa] Added support for matching and, or, and xor from normal IR (i.e. not...
Daniel Sanders [Mon, 23 Sep 2013 12:57:42 +0000 (12:57 +0000)]
[mips][msa] Added support for matching and, or, and xor from normal IR (i.e. not intrinsics)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191194 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoPartially revert r191192: Fix -Wunused-variable error when assertions are disabled...
Daniel Sanders [Mon, 23 Sep 2013 12:33:38 +0000 (12:33 +0000)]
Partially revert r191192: Fix -Wunused-variable error when assertions are disabled and -Werror is in use.

An unrelated change crept in because 'svn revert' isn't recursive by default.
The unrelated changes have been reverted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191193 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix -Wunused-variable error when assertions are disabled and -Werror is in use.
Daniel Sanders [Mon, 23 Sep 2013 12:26:55 +0000 (12:26 +0000)]
Fix -Wunused-variable error when assertions are disabled and -Werror is in use.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191192 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips][msa] Implemented build_vector using ldi, fill, and custom SelectionDAG nodes...
Daniel Sanders [Mon, 23 Sep 2013 12:02:46 +0000 (12:02 +0000)]
[mips][msa] Implemented build_vector using ldi, fill, and custom SelectionDAG nodes (VSPLAT and VSPLATD)

Note: There's a later patch on my branch that re-implements this to select
build_vector without the custom SelectionDAG nodes. The future patch avoids
the constant-folding problems stemming from the custom node (i.e. it doesn't
need to re-implement all the DAG combines related to BUILD_VECTOR).

Changes to MIPS specific SelectionDAG nodes:
* Added VSPLAT
    This is a special case of BUILD_VECTOR that covers the case the
    BUILD_VECTOR is a splat operation.
* Added VSPLATD
    This is a special case of VSPLAT that handles the cases when v2i64 is legal

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191191 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agollvm/test/tools/lto/lit.local.cfg: Add "MingW" for exclusion list.
NAKAMURA Takumi [Mon, 23 Sep 2013 09:03:48 +0000 (09:03 +0000)]
llvm/test/tools/lto/lit.local.cfg: Add "MingW" for exclusion list.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191185 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd missing index comments to the left side of the DAG ISel matcher table for each...
Craig Topper [Sun, 22 Sep 2013 23:18:50 +0000 (23:18 +0000)]
Add missing index comments to the left side of the DAG ISel matcher table for each individual case of SwitchOpcode/Type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191181 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Sparc] Use correct instruction pattern for CMPri.
Venkatraman Govindaraju [Sun, 22 Sep 2013 18:54:54 +0000 (18:54 +0000)]
[Sparc] Use correct instruction pattern for CMPri.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191180 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove dead code
David Blaikie [Sun, 22 Sep 2013 18:25:32 +0000 (18:25 +0000)]
Remove dead code

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191179 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoStringRef-ize some things
David Blaikie [Sun, 22 Sep 2013 17:01:50 +0000 (17:01 +0000)]
StringRef-ize some things

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191178 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoProvide basic type safety for array_pod_sort comparators.
Benjamin Kramer [Sun, 22 Sep 2013 14:09:50 +0000 (14:09 +0000)]
Provide basic type safety for array_pod_sort comparators.

This makes using array_pod_sort significantly safer. The implementation relies
on function pointer casting but that should be safe as we're dealing with void*
here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191175 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDrop spurious handle in comment.
Benjamin Kramer [Sun, 22 Sep 2013 11:24:58 +0000 (11:24 +0000)]
Drop spurious handle in comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191172 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Sparc] Make SPARC instructions' encoding well defined such that TableGen can automat...
Venkatraman Govindaraju [Sun, 22 Sep 2013 09:54:42 +0000 (09:54 +0000)]
[Sparc] Make SPARC instructions' encoding well defined such that TableGen can automatically generate code emitter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191168 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Sparc] Clean up MOVcc instructions so that TableGen can encode them correctly. No...
Venkatraman Govindaraju [Sun, 22 Sep 2013 09:18:26 +0000 (09:18 +0000)]
[Sparc] Clean up MOVcc instructions so that TableGen can encode them correctly. No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191167 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Sparc] Clean up branch instructions, so that TableGen can encode branch conditions...
Venkatraman Govindaraju [Sun, 22 Sep 2013 08:51:55 +0000 (08:51 +0000)]
[Sparc] Clean up branch instructions, so that TableGen can encode branch conditions as well. No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191166 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoISelDAG: spot chain cycles involving MachineNodes
Tim Northover [Sun, 22 Sep 2013 08:21:56 +0000 (08:21 +0000)]
ISelDAG: spot chain cycles involving MachineNodes

Previously, the DAGISel function WalkChainUsers was spotting that it
had entered already-selected territory by whether a node was a
MachineNode (amongst other things). Since it's fairly common practice
to insert MachineNodes during ISelLowering, this was not the correct
check.

Looking around, it seems that other nodes get their NodeId set to -1
upon selection, so this makes sure the same thing happens to all
MachineNodes and uses that characteristic to determine whether we
should stop looking for a loop during selection.

This should fix PR15840.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191165 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Sparc] Add support for TLS in sparc.
Venkatraman Govindaraju [Sun, 22 Sep 2013 06:48:52 +0000 (06:48 +0000)]
[Sparc] Add support for TLS in sparc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191164 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoX86: Use R_X86_64_TPOFF64 for FK_Data_8
David Majnemer [Sun, 22 Sep 2013 05:30:16 +0000 (05:30 +0000)]
X86: Use R_X86_64_TPOFF64 for FK_Data_8

Summary:
LLVM would crash when trying to come up with a relocation type for
assembly like:
movabsq $V@TPOFF, %rax

Instead, we say the relocation type is R_X86_64_TPOFF64.

Fixes PR17274.

Reviewers: dblaikie, nrieck, rafael

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1717

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191163 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[SPARC] Make functions with GLOBAL_OFFSET_TABLE access as non-leaf functions.
Venkatraman Govindaraju [Sun, 22 Sep 2013 01:40:24 +0000 (01:40 +0000)]
[SPARC] Make functions with GLOBAL_OFFSET_TABLE access as non-leaf functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191160 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Sparc] Emit .register directive to declare the use of global registers %g2, %g4...
Venkatraman Govindaraju [Sun, 22 Sep 2013 00:42:30 +0000 (00:42 +0000)]
[Sparc] Emit .register directive to declare the use of global registers %g2, %g4, %g6 and %g7.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191158 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoCorrect the pre-increment load latencies in the PPC A2 itinerary
Hal Finkel [Sun, 22 Sep 2013 00:08:14 +0000 (00:08 +0000)]
Correct the pre-increment load latencies in the PPC A2 itinerary

Pre-increment loads are microcoded on the A2, and the address increment occurs
only after the load completes. As a result, the latency of the GPR address
update is an additional 2 cycles on top of the load latency.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191156 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Sparc] Fix lowering FABS on fp128 (long double) on pre-v9 targets.
Venkatraman Govindaraju [Sat, 21 Sep 2013 23:51:08 +0000 (23:51 +0000)]
[Sparc] Fix lowering FABS on fp128 (long double) on pre-v9 targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191154 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSROA: Handle casts involving vectors of pointers and integer scalars.
Benjamin Kramer [Sat, 21 Sep 2013 20:36:04 +0000 (20:36 +0000)]
SROA: Handle casts involving vectors of pointers and integer scalars.

SROA wants to convert any types of equivalent widths but it's not possible to
convert vectors of pointers to an integer scalar with a single cast. As a
workaround we add a bitcast to the corresponding int ptr type first. This type
of cast used to be an edge case but has become common with SLP vectorization.
Fixes PR17271.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191143 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRevert "SelectionDAG: Teach the legalizer to split SETCC if VSELECT needs splitting...
Juergen Ributzka [Sat, 21 Sep 2013 15:09:46 +0000 (15:09 +0000)]
Revert "SelectionDAG: Teach the legalizer to split SETCC if VSELECT needs splitting too."

This reverts commit r191130.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191138 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove alignment restrictions from FMA load folding.
Craig Topper [Sat, 21 Sep 2013 05:58:59 +0000 (05:58 +0000)]
Remove alignment restrictions from FMA load folding.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191136 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSLPVectorizer: Fix multiline comment warning
Arnold Schwaighofer [Sat, 21 Sep 2013 05:37:30 +0000 (05:37 +0000)]
SLPVectorizer: Fix multiline comment warning

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191135 91177308-0d34-0410-b5e6-96231b3b80d8