oota-llvm.git
10 years ago[ARM] Add support for MVFR2 which is new in ARMv8
Artyom Skrobov [Mon, 11 Nov 2013 19:56:13 +0000 (19:56 +0000)]
[ARM] Add support for MVFR2 which is new in ARMv8

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

10 years agoFixing a problem with iterator validity in RuntimeDyldImpl::resolveExternalSymbols
Andrew Kaylor [Mon, 11 Nov 2013 19:55:10 +0000 (19:55 +0000)]
Fixing a problem with iterator validity in RuntimeDyldImpl::resolveExternalSymbols

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

10 years ago[NVPTX] Properly handle bitcast ConstantExpr when checking for the alignment of funct...
Justin Holewinski [Mon, 11 Nov 2013 19:28:19 +0000 (19:28 +0000)]
[NVPTX] Properly handle bitcast ConstantExpr when checking for the alignment of function parameters

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

10 years ago[NVPTX] Fix logic error in loading vector parameters of more than 4 components
Justin Holewinski [Mon, 11 Nov 2013 19:28:16 +0000 (19:28 +0000)]
[NVPTX] Fix logic error in loading vector parameters of more than 4 components

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

10 years ago[AArch64] The shift right/left and insert immediate builtins expect 3
Chad Rosier [Mon, 11 Nov 2013 19:11:11 +0000 (19:11 +0000)]
[AArch64] The shift right/left and insert immediate builtins expect 3
source operands, a vector, an element to insert, and a shift amount.

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

10 years agoCalcSpillWeights: give a better describing name to calculateSpillWeights
Arnaud A. de Grandmaison [Mon, 11 Nov 2013 19:04:45 +0000 (19:04 +0000)]
CalcSpillWeights: give a better describing name to calculateSpillWeights

Besides, this relates it more obviously to the VirtRegAuxInfo::calculateSpillWeightAndHint.

No functionnal change.

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

10 years agoUnify the adding of enumerators with the construction of the enumeration.
Eric Christopher [Mon, 11 Nov 2013 18:52:39 +0000 (18:52 +0000)]
Unify the adding of enumerators with the construction of the enumeration.

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

10 years agoFormatting.
Eric Christopher [Mon, 11 Nov 2013 18:52:36 +0000 (18:52 +0000)]
Formatting.

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

10 years ago80-col.
Eric Christopher [Mon, 11 Nov 2013 18:52:33 +0000 (18:52 +0000)]
80-col.

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

10 years agoJust pass the DIComposite type by value instead of by pointer.
Eric Christopher [Mon, 11 Nov 2013 18:52:31 +0000 (18:52 +0000)]
Just pass the DIComposite type by value instead of by pointer.

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

10 years ago[AArch64] Add support for NEON scalar floating-point convert to fixed-point instructions.
Chad Rosier [Mon, 11 Nov 2013 18:04:07 +0000 (18:04 +0000)]
[AArch64] Add support for NEON scalar floating-point convert to fixed-point instructions.

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

10 years agoVector forms of SHL, SRA, and SRL can be constant folded using SimplifyVBinOp too
Daniel Sanders [Mon, 11 Nov 2013 17:23:41 +0000 (17:23 +0000)]
Vector forms of SHL, SRA, and SRL can be constant folded using SimplifyVBinOp too

Reviewers: dsanders

Reviewed By: dsanders

CC: llvm-commits, nadav
Differential Revision: http://llvm-reviews.chandlerc.com/D1958

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

10 years ago[mips][msa] CHECK-DAG-ize MSA 3r-a.ll test.
Matheus Almeida [Mon, 11 Nov 2013 16:46:20 +0000 (16:46 +0000)]
[mips][msa] CHECK-DAG-ize MSA 3r-a.ll test.

No functional changes.

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

10 years ago[mips][msa] CHECK-DAG-ize MSA 2rf_int_float.ll test.
Matheus Almeida [Mon, 11 Nov 2013 16:38:55 +0000 (16:38 +0000)]
[mips][msa] CHECK-DAG-ize MSA 2rf_int_float.ll test.

No functional changes.

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

10 years ago[mips][msa] CHECK-DAG-ize MSA 2rf_float_int.ll test.
Matheus Almeida [Mon, 11 Nov 2013 16:31:46 +0000 (16:31 +0000)]
[mips][msa] CHECK-DAG-ize MSA 2rf_float_int.ll test.

No functional changes.

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

10 years agoMove debug message in vectorizer
Renato Golin [Mon, 11 Nov 2013 16:27:35 +0000 (16:27 +0000)]
Move debug message in vectorizer

No functional change, just better reporting.

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

10 years ago[mips][msa] CHECK-DAG-ize MSA 2rf.ll test.
Matheus Almeida [Mon, 11 Nov 2013 16:24:53 +0000 (16:24 +0000)]
[mips][msa] CHECK-DAG-ize MSA 2rf.ll test.

No functional changes.

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

10 years ago[mips][msa] CHECK-DAG-ize MSA 2r.ll test.
Matheus Almeida [Mon, 11 Nov 2013 16:16:53 +0000 (16:16 +0000)]
[mips][msa] CHECK-DAG-ize MSA 2r.ll test.

No functional changes.

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

10 years agoAdd a testcase for pr17852.
Rafael Espindola [Mon, 11 Nov 2013 15:37:52 +0000 (15:37 +0000)]
Add a testcase for pr17852.

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

10 years agoAdd PPC option for full register names in asm
Hal Finkel [Mon, 11 Nov 2013 14:58:40 +0000 (14:58 +0000)]
Add PPC option for full register names in asm

On non-Darwin PPC systems, we currently strip off the register name prefix
prior to instruction printing. So instead of something like this:

  mr r3, r4

we print this:

  mr 3, 4

The first form is the default on Darwin, and is understood by binutils, but not
yet understood by our integrated assembler. Once our integrated-as understands
full register names as well, this temporary option will be replaced by tying
this functionality to the verbose-asm option. The numeric-only form is
compatible with legacy assemblers and tools, and is also gcc's default on most
PPC systems. On the other hand, it is harder to read, and there are some
analysis tools that expect full register names.

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

10 years agoSimplify code. No functionality change.
Benjamin Kramer [Mon, 11 Nov 2013 14:54:34 +0000 (14:54 +0000)]
Simplify code. No functionality change.

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

10 years ago[OCaml] Add missing Llvm_target functions
Peter Zotov [Mon, 11 Nov 2013 14:47:28 +0000 (14:47 +0000)]
[OCaml] Add missing Llvm_target functions

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

10 years ago[OCaml] Accept context explicitly in Llvm_target functions
Peter Zotov [Mon, 11 Nov 2013 14:47:20 +0000 (14:47 +0000)]
[OCaml] Accept context explicitly in Llvm_target functions

Llvm_target.intptr_type used to implicitly use global context. As
none of other functions in OCaml bindings do, it is changed to
accept context explicitly.

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

10 years ago[OCaml] Make Llvm_target.DataLayout.t automatically managed
Peter Zotov [Mon, 11 Nov 2013 14:47:11 +0000 (14:47 +0000)]
[OCaml] Make Llvm_target.DataLayout.t automatically managed

This breaks the API by removing Llvm_target.DataLayout.dispose.

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

10 years ago[llvm-c] Remove dead typedef
Peter Zotov [Mon, 11 Nov 2013 14:47:01 +0000 (14:47 +0000)]
[llvm-c] Remove dead typedef

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

10 years agoUpdate of the 'Code Review' page. The link is now called 'Create Diff' instead of...
Sylvestre Ledru [Mon, 11 Nov 2013 14:27:56 +0000 (14:27 +0000)]
Update of the 'Code Review' page. The link is now called 'Create Diff' instead of 'Create Revision'

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

10 years ago[autoconf] Prune "runtime" stuff in configure, corresponding to r191835.
NAKAMURA Takumi [Mon, 11 Nov 2013 13:53:52 +0000 (13:53 +0000)]
[autoconf] Prune "runtime" stuff in configure, corresponding to r191835.

  config.status: executing runtime/Makefile commands
  autoconf/install-sh: runtime/Makefile does not exist.

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

10 years ago[msan] Propagate origin for insertvalue, extractvalue.
Evgeniy Stepanov [Mon, 11 Nov 2013 13:37:10 +0000 (13:37 +0000)]
[msan] Propagate origin for insertvalue, extractvalue.

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

10 years ago[NVPTX] Blacklist TailDuplicate pass
Justin Holewinski [Mon, 11 Nov 2013 12:58:14 +0000 (12:58 +0000)]
[NVPTX] Blacklist TailDuplicate pass

This causes issues with virtual registers.  We will likely need
to fix TailDuplicate in the future, or introduce a new version
that plays nicely with vregs.

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

10 years agoDon't universally enable initialiser lists on GCC. Thanks for catching this Chandler
Pete Cooper [Mon, 11 Nov 2013 05:14:42 +0000 (05:14 +0000)]
Don't universally enable initialiser lists on GCC.  Thanks for catching this Chandler

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

10 years agoAdd LLVM_HAS_INITIALIZER_LISTS for upcoming C++11 support. Use it in ArrayRef
Pete Cooper [Mon, 11 Nov 2013 03:58:00 +0000 (03:58 +0000)]
Add LLVM_HAS_INITIALIZER_LISTS for upcoming C++11 support.  Use it in ArrayRef

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

10 years agoAArch64: refactor vector list creation to be more uniform
Tim Northover [Mon, 11 Nov 2013 03:35:43 +0000 (03:35 +0000)]
AArch64: refactor vector list creation to be more uniform

Instructions taking a vector list (e.g. "ld2 {v0.2d, v1.d2}, [x0]") need a
special register-class to deal with the constraints, and C++ code to support
selection. However, that C++ code can be made reasonably uniform to simplify
the selection process. Hence this patch.

No functionality change, so no tests.

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

10 years agoCalculateSpillWeights does not need to be a pass
Arnaud A. de Grandmaison [Sun, 10 Nov 2013 17:46:31 +0000 (17:46 +0000)]
CalculateSpillWeights does not need to be a pass

Based on discussions with Lang Hames and Jakob Stoklund Olesen at the hacker's lab, and in the light of upcoming work on the PBQP register allocator, it was though that CalcSpillWeights does not need to be a pass. This change will enable to customize / tune the spill weight computation depending on the allocator.

Update the documentation style while there.

No functionnal change.

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

10 years agoMark 36 tests as XFAIL:vg_leak in llvm/test/TableGen.
NAKAMURA Takumi [Sun, 10 Nov 2013 14:26:08 +0000 (14:26 +0000)]
Mark 36 tests as XFAIL:vg_leak in llvm/test/TableGen.

In historical reason, tblgen is not strictly required to be free from memory leaks.
For now, I mark them as XFAIL, they could be fixed, though.

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

10 years agoRemove 6 of XFAIL(s) in llvm/test/TableGen, since r193736. They have been XPASSing.
NAKAMURA Takumi [Sun, 10 Nov 2013 14:25:44 +0000 (14:25 +0000)]
Remove 6 of XFAIL(s) in llvm/test/TableGen, since r193736. They have been XPASSing.

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

10 years agoRevert "Resurrect r191017 " GVN proceeds in the presence of dead code" plus a fix...
Bill Wendling [Sun, 10 Nov 2013 07:34:34 +0000 (07:34 +0000)]
Revert "Resurrect r191017 " GVN proceeds in the presence of dead code" plus a fix to PR17307 & 17308."

This causes PR17852.

This reverts commit d93e8a06b2ca09ab18f390cd514b7443e2e571f7.

Conflicts:
test/Transforms/GVN/cond_br2.ll

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

10 years agoUse type form of getIntPtrType.
Matt Arsenault [Sun, 10 Nov 2013 04:46:57 +0000 (04:46 +0000)]
Use type form of getIntPtrType.

This should be inconsequential and is work
towards removing the default address space
arguments.

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

10 years agoSimplifyCFG has a heuristics for out-of-order processors that decides when it is...
Nadav Rotem [Sun, 10 Nov 2013 04:13:31 +0000 (04:13 +0000)]
SimplifyCFG has a heuristics for out-of-order processors that decides when it is worthwhile to merge branches. It tries to estimate if the operands of the instruction that we want to hoist are ready. This commit marks function arguments as 'ready' because they require no calculation. This boosts libquantum and a few other workloads from the testsuite.

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

10 years agoUse size function instead of manually calculating it.
Matt Arsenault [Sun, 10 Nov 2013 03:18:50 +0000 (03:18 +0000)]
Use size function instead of manually calculating it.

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

10 years agoResolve TODO in test now that filecheck has multiple check prefixes.
Matt Arsenault [Sun, 10 Nov 2013 02:16:47 +0000 (02:16 +0000)]
Resolve TODO in test now that filecheck has multiple check prefixes.

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

10 years agoAllow multiple check prefixes in FileCheck.
Matt Arsenault [Sun, 10 Nov 2013 02:04:09 +0000 (02:04 +0000)]
Allow multiple check prefixes in FileCheck.

This is useful if you want to run multiple variations
of a single test, and the majority of check lines
should be the same.

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

10 years agoTeach MergeFunctions about address spaces
Matt Arsenault [Sun, 10 Nov 2013 01:44:37 +0000 (01:44 +0000)]
Teach MergeFunctions about address spaces

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

10 years agoIR: Refactor GEP range checks, reuse them for other parts of folding
David Majnemer [Sun, 10 Nov 2013 01:36:22 +0000 (01:36 +0000)]
IR: Refactor GEP range checks, reuse them for other parts of folding

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

10 years agoMake method static
Matt Arsenault [Sun, 10 Nov 2013 01:04:02 +0000 (01:04 +0000)]
Make method static

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

10 years agoFix missing C++ mode comment
Matt Arsenault [Sun, 10 Nov 2013 01:03:59 +0000 (01:03 +0000)]
Fix missing C++ mode comment

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

10 years agoUse variable for register name in test
Matt Arsenault [Sun, 10 Nov 2013 00:57:17 +0000 (00:57 +0000)]
Use variable for register name in test

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

10 years agoMostly finish up constant islands port for Mips for load constants.
Reed Kotler [Sun, 10 Nov 2013 00:09:26 +0000 (00:09 +0000)]
Mostly finish up constant islands port for Mips for load constants.
Still need to finish the branch part. Still lots more review of the code,
clean up and testing.

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

10 years agoRemove some unnecessary temporary strings.
Benjamin Kramer [Sat, 9 Nov 2013 22:48:13 +0000 (22:48 +0000)]
Remove some unnecessary temporary strings.

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

10 years ago[arm] Refine ARMBuildAttrs.h.
Logan Chien [Sat, 9 Nov 2013 14:16:52 +0000 (14:16 +0000)]
[arm] Refine ARMBuildAttrs.h.

This commit cleans up some comments in ARMBuildAttrs.h.
Besides, this commit fixes an error related to AllowWMMXv1
and AllowWMMXv2 (although they are not used currently.)

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

10 years ago[PM] Start sketching out the new module and function pass manager.
Chandler Carruth [Sat, 9 Nov 2013 13:09:08 +0000 (13:09 +0000)]
[PM] Start sketching out the new module and function pass manager.

This is still just a skeleton. I'm trying to pull together the
experimentation I've done into committable chunks, and this is the first
coherent one. Others will follow in hopefully short order that move this
more toward a useful initial implementation. I still expect the design
to continue evolving in small ways as I work through the different
requirements and features needed here though.

Keep in mind, all of this is off by default.

Currently, this mostly exercises the use of a polymorphic smart pointer
and templates to hide the polymorphism for the pass manager from the
pass implementation. The next step will be more significant, adding the
first framework of analysis support.

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

10 years agoMove the old pass manager infrastructure into a legacy namespace and
Chandler Carruth [Sat, 9 Nov 2013 12:26:54 +0000 (12:26 +0000)]
Move the old pass manager infrastructure into a legacy namespace and
give the files a legacy prefix in the right directory. Use forwarding
headers in the old locations to paper over the name change for most
clients during the transitional period.

No functionality changed here! This is just clearing some space to
reduce renaming churn later on with a new system.

Even when the new stuff starts to go in, it is going to be hidden behind
a flag and off-by-default as it is still WIP and under development.

This patch is specifically designed so that very little out-of-tree code
has to change. I'm going to work as hard as I can to keep that the case.
Only direct forward declarations of the PassManager class are impacted
by this change.

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

10 years agoThis exposes the new calling conventions (WebKit_JS and AnyReg) via the C API by...
Filip Pizlo [Sat, 9 Nov 2013 06:00:03 +0000 (06:00 +0000)]
This exposes the new calling conventions (WebKit_JS and AnyReg) via the C API by adding them to the enumeration in Core.h.

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

10 years agoSwitch to allow implicit construction. In many cases, we're wrapping
Chandler Carruth [Sat, 9 Nov 2013 05:55:03 +0000 (05:55 +0000)]
Switch to allow implicit construction. In many cases, we're wrapping
a derived type and this makes it *much* easier to write this code.

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

10 years agoTest the polymorphic behavior of this utility.
Chandler Carruth [Sat, 9 Nov 2013 04:58:13 +0000 (04:58 +0000)]
Test the polymorphic behavior of this utility.

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

10 years agoUse something really explicit to test "move semantics" on builds without
Chandler Carruth [Sat, 9 Nov 2013 04:49:27 +0000 (04:49 +0000)]
Use something really explicit to test "move semantics" on builds without
r-value references. I still want to test that when we have them,
llvm_move is actually a move.

Have I mentioned that I really want to move to C++11? ;]

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

10 years agoAdd the critically missing 'clone' method. =]
Chandler Carruth [Sat, 9 Nov 2013 04:32:34 +0000 (04:32 +0000)]
Add the critically missing 'clone' method. =]

Clang managed to never instantiate the copy constructor. Added tests to
ensure this path is tested.

We could still use tests for the polymorphic nature. Those coming up
next.

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

10 years agoMove the test type out of the function and into the anonymous namespace
Chandler Carruth [Sat, 9 Nov 2013 04:09:50 +0000 (04:09 +0000)]
Move the test type out of the function and into the anonymous namespace
to fix C++98 builds.

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

10 years agoAdd a polymorphic_ptr<T> smart pointer data type. It's a somewhat silly
Chandler Carruth [Sat, 9 Nov 2013 04:06:02 +0000 (04:06 +0000)]
Add a polymorphic_ptr<T> smart pointer data type. It's a somewhat silly
unique ownership smart pointer which is *deep* copyable by assuming it
can call a T::clone() method to allocate a copy of the owned data.

This is mostly useful with containers or other collections of uniquely
owned data in C++98 where they *might* copy. With C++11 we can likely
remove this in favor of move-only types and containers wrapped around
those types.

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

10 years agoinclude/llvm/CodeGen/PBQP: Update @param(s) in comments. [-Wdocumentation]
NAKAMURA Takumi [Sat, 9 Nov 2013 03:54:05 +0000 (03:54 +0000)]
include/llvm/CodeGen/PBQP: Update @param(s) in comments. [-Wdocumentation]

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

10 years agoFix whitespace.
NAKAMURA Takumi [Sat, 9 Nov 2013 03:53:55 +0000 (03:53 +0000)]
Fix whitespace.

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

10 years agoRe-apply r194300 with fixes for warnings.
Lang Hames [Sat, 9 Nov 2013 03:08:56 +0000 (03:08 +0000)]
Re-apply r194300 with fixes for warnings.

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

10 years ago[mips] Make sure there is a chain edge dependency between loads that read
Akira Hatanaka [Sat, 9 Nov 2013 02:38:51 +0000 (02:38 +0000)]
[mips] Make sure there is a chain edge dependency between loads that read
formal arguments on the stack and stores created afterwards. We need this to
ensure tail call optimized function calls do not write over the argument area
of the stack before it is read out.

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

10 years agoRevert r194300 which broke the build.
Nick Lewycky [Sat, 9 Nov 2013 02:01:25 +0000 (02:01 +0000)]
Revert r194300 which broke the build.

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

10 years ago[Stackmap] Materialize the jump address within the patchpoint noop slide.
Juergen Ributzka [Sat, 9 Nov 2013 01:51:33 +0000 (01:51 +0000)]
[Stackmap] Materialize the jump address within the patchpoint noop slide.

This patch moves the jump address materialization inside the noop slide. This
enables patching of the materialization itself or its complete removal. This
patch also adds the ability to define scratch registers that can be used safely
by the code called from the patchpoint intrinsic. At least one scratch register
is required, because that one is used for the materialization of the jump
address. This patch depends on D2009.

Differential Revision: http://llvm-reviews.chandlerc.com/D2074

Reviewed by Andy

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

10 years agoRevert "Move copying of global initializers below the cloning of functions."
Adrian Prantl [Sat, 9 Nov 2013 00:43:18 +0000 (00:43 +0000)]
Revert "Move copying of global initializers below the cloning of functions."

This would cause internal symbols that are only referenced by global initializers to be removed.

This reverts commit 194219.

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

10 years agoRevert "Run clang-format on file."
Adrian Prantl [Sat, 9 Nov 2013 00:43:12 +0000 (00:43 +0000)]
Revert "Run clang-format on file."

This reverts commit 194219.

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

10 years agoRewrite the PBQP graph data structure.
Lang Hames [Sat, 9 Nov 2013 00:14:07 +0000 (00:14 +0000)]
Rewrite the PBQP graph data structure.

The new graph structure replaces the node and edge linked lists with vectors.
Free lists (well, free vectors) are used for fast insertion/deletion.

The ultimate aim is to make PBQP graphs cheap to clone. The motivation is that
the PBQP solver destructively consumes input graphs while computing a solution,
forcing the graph to be fully reconstructed for each round of PBQP. This
imposes a high cost on large functions, which often require several rounds of
solving/spilling to find a final register allocation. If we can cheaply clone
the PBQP graph and incrementally update it between rounds then hopefully we can
reduce this cost. Further, once we begin pooling matrix/vector values (future
work), we can cache some PBQP solver metadata and share it between cloned
graphs, allowing the PBQP solver to re-use some of the computation done in
earlier rounds.

For now this is just a data structure update. The allocator and solver still
use the graph the same way as before, fully reconstructing it between each
round. I expect no material change from this update, although it may change
the iteration order of the nodes, causing ties in the solver to break in
different directions, and this could perturb the generated allocations
(hopefully in a completely benign way).

Thanks very much to Arnaud Allard de Grandmaison for encouraging me to get back
to work on this, and for a lot of discussion and many useful PBQP test cases.

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

10 years ago[Stackmap] Add AnyReg calling convention support for patchpoint intrinsic.
Juergen Ributzka [Fri, 8 Nov 2013 23:28:16 +0000 (23:28 +0000)]
[Stackmap] Add AnyReg calling convention support for patchpoint intrinsic.

The idea of the AnyReg Calling Convention is to provide the call arguments in
registers, but not to force them to be placed in a paticular order into a
specified set of registers. Instead it is up tp the register allocator to assign
any register as it sees fit. The same applies to the return value (if
applicable).

Differential Revision: http://llvm-reviews.chandlerc.com/D2009

Reviewed by Andy

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

10 years agoincrease the accuracy of register pressure computation in the presence of dead defini...
Pedro Artigas [Fri, 8 Nov 2013 22:46:28 +0000 (22:46 +0000)]
increase the accuracy of register pressure computation in the presence of dead definitions by using live intervals, if available, to identify dead definitions and proceed accordingly.

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

10 years agoX86: Assembly files with .cfi_cfa_def shouldn't hit llvm_unreachable()
Jim Grosbach [Fri, 8 Nov 2013 22:33:06 +0000 (22:33 +0000)]
X86: Assembly files with .cfi_cfa_def shouldn't hit llvm_unreachable()

On darwin, when trying to create compact unwind info, a .cfi_cfa_def
directive would case an llvm_unreachable() to be hit. Back off when we
see this directive and generate the regular DWARF style eh_frame.

rdar://15406518

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

10 years agoFix some minor issues with r194282 to get the tree healthy again.
Lang Hames [Fri, 8 Nov 2013 22:30:52 +0000 (22:30 +0000)]
Fix some minor issues with r194282 to get the tree healthy again.

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

10 years agoAdd a method to get the object-file appropriate stack map section.
Lang Hames [Fri, 8 Nov 2013 22:14:49 +0000 (22:14 +0000)]
Add a method to get the object-file appropriate stack map section.

Thanks to Eric Christopher for the tips on the appropriate way to do this.

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

10 years agoRemove dead code from LoopUnswitch
Hal Finkel [Fri, 8 Nov 2013 19:58:21 +0000 (19:58 +0000)]
Remove dead code from LoopUnswitch

LoopUnswitch's code simplification routine has logic to convert conditional
branches into unconditional branches, after unswitching makes the condition
constant, and then remove any blocks that renders dead. Unfortunately, this
code is dead, currently broken, and furthermore, has never been alive (at least
as far back at 2006).

No functionality change intended.

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

10 years agoRevert "CalculateSpillWeights does not need to be a pass"
Arnaud A. de Grandmaison [Fri, 8 Nov 2013 18:19:19 +0000 (18:19 +0000)]
Revert "CalculateSpillWeights does not need to be a pass"

Temporarily revert my previous commit until I understand why it breaks 3 target tests.

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

10 years ago[VirtRegMap] Fix for PR17825. Do not ignore noreturn definitions when setting
Quentin Colombet [Fri, 8 Nov 2013 18:14:17 +0000 (18:14 +0000)]
[VirtRegMap] Fix for PR17825. Do not ignore noreturn definitions when setting
isPhysRegUsed if the unwind information is required.
Indeed, the runtime may need a correct stack to be able to unwind the call.

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

10 years agoMake PrintAsmOperand call to the superclass to handle 'n' and 'c' operand modifiers.
Richard Barton [Fri, 8 Nov 2013 18:09:57 +0000 (18:09 +0000)]
Make PrintAsmOperand call to the superclass to handle 'n' and 'c' operand modifiers.

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

10 years agoCalculateSpillWeights does not need to be a pass
Arnaud A. de Grandmaison [Fri, 8 Nov 2013 17:56:29 +0000 (17:56 +0000)]
CalculateSpillWeights does not need to be a pass

Based on discussions with Lang Hames and Jakob Stoklund Olesen at the hacker's lab, and in the light of upcoming work on the PBQP register allocator, it was though that CalcSpillWeights does not need to be a pass. This change will enable to customize / tune the spill weight computation depending on the allocator.

Update the documentation style while there.

No functionnal change.

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

10 years agoAdd ImmutableSet profiling info for 'bool'.
Jordan Rose [Fri, 8 Nov 2013 17:23:49 +0000 (17:23 +0000)]
Add ImmutableSet profiling info for 'bool'.

Useful for tri-state maps: true, false, and "no data yet".

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

10 years agoARM: fold prologue/epilogue sp updates into push/pop for code size
Tim Northover [Fri, 8 Nov 2013 17:18:07 +0000 (17:18 +0000)]
ARM: fold prologue/epilogue sp updates into push/pop for code size

ARM prologues usually look like:
    push {r7, lr}
    sub sp, sp, #4

If code size is extremely important, this can be optimised to the single
instruction:
    push {r6, r7, lr}

where we don't actually care about the contents of r6, but pushing it subtracts
4 from sp as a side effect.

This should implement such a conversion, predicated on the "minsize" function
attribute (-Oz) since I've yet to find any code it actually makes faster.

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

10 years ago[ARM] Handling for coprocessor instructions that are undefined starting from ARMv8...
Artyom Skrobov [Fri, 8 Nov 2013 16:25:50 +0000 (16:25 +0000)]
[ARM] Handling for coprocessor instructions that are undefined starting from ARMv8 (Thumb encodings)

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

10 years ago[ARM] Handling for coprocessor instructions that are undefined starting from ARMv8...
Artyom Skrobov [Fri, 8 Nov 2013 16:17:14 +0000 (16:17 +0000)]
[ARM] Handling for coprocessor instructions that are undefined starting from ARMv8 (ARM encodings)

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

10 years ago[ARM] Handling for coprocessor instructions that are undefined starting from ARMv8...
Artyom Skrobov [Fri, 8 Nov 2013 16:16:30 +0000 (16:16 +0000)]
[ARM] Handling for coprocessor instructions that are undefined starting from ARMv8 (ARM encodings)

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

10 years agoExport MCDisassembler's SubtargetInfo, to allow architecture-aware disassembly
Artyom Skrobov [Fri, 8 Nov 2013 16:07:43 +0000 (16:07 +0000)]
Export MCDisassembler's SubtargetInfo, to allow architecture-aware disassembly

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

10 years agoCalculateSpillWeights cleanup: remove unneeded includes
Arnaud A. de Grandmaison [Fri, 8 Nov 2013 15:13:05 +0000 (15:13 +0000)]
CalculateSpillWeights cleanup: remove unneeded includes

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

10 years agoTest for microMIPS trap instructions.
Zoran Jovanovic [Fri, 8 Nov 2013 14:55:31 +0000 (14:55 +0000)]
Test for microMIPS trap instructions.

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

10 years agollvm-ar: Let opening a directory failed in llvm-ar.
NAKAMURA Takumi [Fri, 8 Nov 2013 12:35:56 +0000 (12:35 +0000)]
llvm-ar: Let opening a directory failed in llvm-ar.

Linux cannot open directories with open(2), although cygwin and *bsd can.

Motivation: The test, Object/directory.ll, had been failing with --target=cygwin on Linux. XFAIL was improper for host issues.

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

10 years ago[mips][msa] Update encoding of LDI instruction.
Matheus Almeida [Fri, 8 Nov 2013 10:43:11 +0000 (10:43 +0000)]
[mips][msa] Update encoding of LDI instruction.

The encoding was updated in MSA r1.07.

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

10 years ago[ARM] In ARMAsmParser, MatchCoprocessorOperandName() permitted p10 and p11 as operand...
Artyom Skrobov [Fri, 8 Nov 2013 09:16:31 +0000 (09:16 +0000)]
[ARM] In ARMAsmParser, MatchCoprocessorOperandName() permitted p10 and p11 as operands for coprocessor instructions, resulting in encodings that clash with FP/NEON instruction encodings

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

10 years agoRemove ^M from the file.
Bill Wendling [Fri, 8 Nov 2013 08:13:15 +0000 (08:13 +0000)]
Remove ^M from the file.

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

10 years agoIR: Properly canonicalize PointerType in ConstantExpr GEPs
David Majnemer [Thu, 7 Nov 2013 22:29:42 +0000 (22:29 +0000)]
IR: Properly canonicalize PointerType in ConstantExpr GEPs

No additional test was needed, Other/constant-fold-gep.ll detects this
just fine.

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

10 years agoIR: Do not canonicalize constant GEPs into an out-of-bounds array access
David Majnemer [Thu, 7 Nov 2013 22:15:53 +0000 (22:15 +0000)]
IR: Do not canonicalize constant GEPs into an out-of-bounds array access

Summary:
Consider a GEP of:
i8* getelementptr ({ [2 x i8], i32, i8, [3 x i8] }* @main.c, i32 0, i32 0, i64 0)

If we proceeded to GEP the aforementioned object by 8, would form a GEP of:
i8* getelementptr ({ [2 x i8], i32, i8, [3 x i8] }* @main.c, i32 0, i32 0, i64 8)

Note that we would go through the first array member, causing an
out-of-bounds accesses.  This is problematic because we might get fooled
if we are trying to evaluate loads using this GEP, for example, based
off of an object with a constant initializer where the array is zero.

This fixes PR17732.

Reviewers: nicholas, chandlerc, void

Reviewed By: void

CC: llvm-commits, echristo, void, aemerson
Differential Revision: http://llvm-reviews.chandlerc.com/D2093

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

10 years agoRun clang-format on file.
Bill Wendling [Thu, 7 Nov 2013 20:18:21 +0000 (20:18 +0000)]
Run clang-format on file.

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

10 years agoMove copying of global initializers below the cloning of functions.
Bill Wendling [Thu, 7 Nov 2013 20:14:51 +0000 (20:14 +0000)]
Move copying of global initializers below the cloning of functions.

The BlockAddress doesn't have access to the correct basic blocks until the
functions have been cloned. This causes the BlockAddress to point to the old
values. Just wait until the functions have been cloned before copying the
initializers.
PR13163

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

10 years agoSupport for microMIPS trap instructions 1.
Zoran Jovanovic [Thu, 7 Nov 2013 14:35:24 +0000 (14:35 +0000)]
Support for microMIPS trap instructions 1.

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

10 years agollvm-c/Support.h: Add a newline at eof.
NAKAMURA Takumi [Thu, 7 Nov 2013 13:54:24 +0000 (13:54 +0000)]
llvm-c/Support.h: Add a newline at eof.

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

10 years agoDisable some code that is causing some warnings. It's in the process
Reed Kotler [Thu, 7 Nov 2013 11:56:33 +0000 (11:56 +0000)]
Disable some code that is causing some warnings. It's in the process
of being converted and this path is not relevant to anything at this time
so I have just disabled it for a few days while I'm at the LLVM conference
and don't have time to complete it or properly fix it.

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

10 years agoAdd the fact that we anticipate switching to use (some subset of) C++11
Chandler Carruth [Thu, 7 Nov 2013 00:23:08 +0000 (00:23 +0000)]
Add the fact that we anticipate switching to use (some subset of) C++11
after the 3.4 release to the release notes. See the *lengthy* llvmdev
and cfe-dev threads on this subject. There will be more emails,
discussion and announcements, but I want to make noise in as many places
as I can to get everyone's concerns voiced and understood.

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

10 years agoR600: Fix LowerUDIVREM
Vincent Lejeune [Wed, 6 Nov 2013 17:36:04 +0000 (17:36 +0000)]
R600: Fix LowerUDIVREM

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

10 years ago[AArch64] Remove NEON from "generic" CPU target.
Amara Emerson [Wed, 6 Nov 2013 16:19:08 +0000 (16:19 +0000)]
[AArch64] Remove NEON from "generic" CPU target.

We can change this back when NEON support is complete and ready to become
enabled by default.

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

10 years agoAdd DT_VERSYM dynamic table entry tag definition.
Simon Atanasyan [Wed, 6 Nov 2013 12:23:52 +0000 (12:23 +0000)]
Add DT_VERSYM dynamic table entry tag definition.

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