oota-llvm.git
10 years ago[inliner] Completely change (and fix) how the inline cost analysis
Chandler Carruth [Fri, 13 Dec 2013 07:59:56 +0000 (07:59 +0000)]
[inliner] Completely change (and fix) how the inline cost analysis
handles terminator instructions.

The inline cost analysis inheritted some pretty rough handling of
terminator insts from the original cost analysis, and then made it much,
much worse by factoring all of the important analyses into a separate
instruction visitor. That instruction visitor never visited the
terminator.

This works fine for things like conditional branches, but for many other
things we simply computed The Wrong Value. First example are
unconditional branches, which should be free but were counted as full
cost. This is most significant for conditional branches where the
condition simplifies and folds during inlining. We paid a 1 instruction
tax on every branch in a straight line specialized path. =[

Oh, we also claimed that the unreachable instruction had cost.

But it gets worse. Let's consider invoke. We never applied the call
penalty. We never accounted for the cost of the arguments. Nope. Worse
still, we didn't handle the *correctness* constraints of not inlining
recursive invokes, or exception throwing returns_twice functions. Oops.
See PR18206. Sadly, PR18206 requires yet another fix, but this
refactoring is at least a huge step in that direction.

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

10 years agoRevert "DebugInfo: Move type units into the debug_types section with appropriate...
David Blaikie [Fri, 13 Dec 2013 06:43:32 +0000 (06:43 +0000)]
Revert "DebugInfo: Move type units into the debug_types section with appropriate comdat grouping and type unit headers"

This reverts commit r197210.

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

10 years agoDebugInfo: Move type units into the debug_types section with appropriate comdat group...
David Blaikie [Fri, 13 Dec 2013 06:27:38 +0000 (06:27 +0000)]
DebugInfo: Move type units into the debug_types section with appropriate comdat grouping and type unit headers

This commit does not complete the type units feature - there are issues
around fission support (skeletal type units, pubtypes/pubnames) and
hashing of some types including those containing references to types in
other type units.

Originally committed as r197073 and reverted in r197079.
Recommitted as r197197 to reproduce the failure and reverted as r197199

Turns out there was unstable ordering in the type unit dumping code.
Fixed by using MapVector in DWARFContext to store the debug_types
comdat sections.

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

10 years agoChange stack probing code for MingW.
Kai Nacke [Fri, 13 Dec 2013 05:37:05 +0000 (05:37 +0000)]
Change stack probing code for MingW.

Since gcc 4.6 the compiler uses ___chkstk_ms which has the same semantics as the
MS CRT function __chkstk. This simplifies the prologue generation a bit.

Reviewed by Rafael Espíndola.

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

10 years agoObject/COFF: ExportAddressTableEntry is a union of two RVAs.
Rui Ueyama [Fri, 13 Dec 2013 05:19:17 +0000 (05:19 +0000)]
Object/COFF: ExportAddressTableEntry is a union of two RVAs.

The previous definition was wrong. See Microsoft PE/COFF specification
section 5.3.2.

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

10 years agoRevert "DebugInfo: Move type units into the debug_types section with appropriate...
David Blaikie [Fri, 13 Dec 2013 01:24:54 +0000 (01:24 +0000)]
Revert "DebugInfo: Move type units into the debug_types section with appropriate comdat grouping and type unit headers"

This reverts commit r197197.

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

10 years agollvm-cov: Added -b option for branch probabilities.
Yuchen Wu [Fri, 13 Dec 2013 01:15:07 +0000 (01:15 +0000)]
llvm-cov: Added -b option for branch probabilities.

This option tells llvm-cov to print out branch probabilities when
a basic block contains multiple branches. It also prints out some
function summary info including the number of times the function enters,
the percent of time it returns, and how many blocks were executed.

Also updated tests.

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

10 years agoDebugInfo: Move type units into the debug_types section with appropriate comdat group...
David Blaikie [Fri, 13 Dec 2013 01:06:41 +0000 (01:06 +0000)]
DebugInfo: Move type units into the debug_types section with appropriate comdat grouping and type unit headers

This commit does not complete the type units feature - there are issues
around fission support (skeletal type units, pubtypes/pubnames) and
hashing of some types including those containing references to types in
other type units.

Originally committed as r197073 and reverted in r197079.

This commit originally got jumbled up with another build-breaking commit
and I can't find the failures I thought this caused anymore.
Recommitting to hopefully get some clean buildbot results to work from.
I have a sneaking suspicion there's unstable output in the comdat group
output of MCStreamer...

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

10 years agoFix spelling in comment in test: "themselve" -> "themselves"
Mark Seaborn [Thu, 12 Dec 2013 21:26:30 +0000 (21:26 +0000)]
Fix spelling in comment in test: "themselve" -> "themselves"

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

10 years agoFix a use-after-free error in GlobalOpt CleanupConstantGlobalUsers
Hal Finkel [Thu, 12 Dec 2013 20:45:24 +0000 (20:45 +0000)]
Fix a use-after-free error in GlobalOpt CleanupConstantGlobalUsers

GlobalOpt's CleanupConstantGlobalUsers function uses a worklist array to manage
constant users to be visited. The pointers in this array need to be weak
handles because when we delete a constant array, we may also be holding a
pointer to one of its elements (or an element of one of its elements if we're
dealing with an array of arrays) in the worklist.

Fixes PR17347.

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

10 years agoInitialize the barrier pass llvm::initializeIPO
Hal Finkel [Thu, 12 Dec 2013 20:45:08 +0000 (20:45 +0000)]
Initialize the barrier pass llvm::initializeIPO

The barrier pass is a temporary hack, and should go away soon. Nevertheless, if
we don't initialize it, then opt will not understand -barrier, and this will
break bugpoint (because when it dumps the passes from the default pass manager
-barrier will be there).

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

10 years agoRemoved llvm-cov.test from Other folder.
Yuchen Wu [Thu, 12 Dec 2013 20:29:54 +0000 (20:29 +0000)]
Removed llvm-cov.test from Other folder.

More comprehensive llvm-cov tests were added to tools/llvm-cov.

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

10 years agoSimplify the datalayout string of ARM and AArch64.
Rafael Espindola [Thu, 12 Dec 2013 17:43:37 +0000 (17:43 +0000)]
Simplify the datalayout string of ARM and AArch64.

No functionality change.

Reviewed by Tim Northover.

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

10 years agoSimplify the SystemZ datalayout string.
Rafael Espindola [Thu, 12 Dec 2013 17:30:07 +0000 (17:30 +0000)]
Simplify the SystemZ datalayout string.

Reviewed by Richard Sandiford.

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

10 years agoUse "a" instead of "a0" in DataLayout.
Rafael Espindola [Thu, 12 Dec 2013 17:21:51 +0000 (17:21 +0000)]
Use "a" instead of "a0" in DataLayout.

It means exactly the same and is just a bit shorter.

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

10 years agoFix Typo.
Rafael Espindola [Thu, 12 Dec 2013 16:17:40 +0000 (16:17 +0000)]
Fix Typo.

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

10 years agoConvert the other getHostByName implementations to StringRef.
Rafael Espindola [Thu, 12 Dec 2013 16:10:48 +0000 (16:10 +0000)]
Convert the other getHostByName implementations to StringRef.

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

10 years agoSwitch to the new MingW ABI.
Rafael Espindola [Thu, 12 Dec 2013 16:06:58 +0000 (16:06 +0000)]
Switch to the new MingW ABI.

GCC 4.7 changed the MingW ABI. On the LLVM side it means that sret functions
don't pop the stack.

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

10 years ago[AArch64] Removed unnecessary copy patterns with v1fx types.
Chad Rosier [Thu, 12 Dec 2013 15:46:29 +0000 (15:46 +0000)]
[AArch64] Removed unnecessary copy patterns with v1fx types.

- Copy patterns with float/double types are enough.
- Fix typos in test case names that were using v1fx.
- There is no ACLE intrinsic that uses v1f32 type.  And there is no conflict of
  neon and non-neon ovelapped operations with this type, so there is no need to
  support operations with this type.
- Remove v1f32 from FPR32 register and disallow v1f32 as a legal type for
  operations.

Patch by Ana Pazos!

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

10 years agoReturn a StringRef from getHostCPUName.
Rafael Espindola [Thu, 12 Dec 2013 15:45:32 +0000 (15:45 +0000)]
Return a StringRef from getHostCPUName.

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

10 years ago[cleanup] Remove trailing whitespace before I start changing this file.
Chandler Carruth [Thu, 12 Dec 2013 11:59:26 +0000 (11:59 +0000)]
[cleanup] Remove trailing whitespace before I start changing this file.

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

10 years agoPowerPC: add Linux triple to TLS tests
Tim Northover [Thu, 12 Dec 2013 11:51:23 +0000 (11:51 +0000)]
PowerPC: add Linux triple to TLS tests

The tests were failing on OS X.

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

10 years agoAdded new X86 patterns to select SSE scalar fp arithmetic instructions from
Andrea Di Biagio [Thu, 12 Dec 2013 11:50:47 +0000 (11:50 +0000)]
Added new X86 patterns to select SSE scalar fp arithmetic instructions from
a vector packed single/double fp operation followed by a vector insert.

The effect is that the backend coverts the packed fp instruction
followed by a vectro insert into a SSE or AVX scalar fp instruction.

For example, given the following code:
   __m128 foo(__m128 A, __m128 B) {
     __m128 C = A + B;
     return (__m128) {c[0], a[1], a[2], a[3]};
   }

 previously we generated:
   addps %xmm0, %xmm1
   movss %xmm1, %xmm0

 we now generate:
   addss %xmm1, %xmm0

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

10 years agoRemove some dead code
Richard Barton [Thu, 12 Dec 2013 11:18:08 +0000 (11:18 +0000)]
Remove some dead code

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

10 years agotypo in comment
Gabor Greif [Thu, 12 Dec 2013 08:00:34 +0000 (08:00 +0000)]
typo in comment

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

10 years ago[AArch64]Fix the problem that AArch64 backend fails to select scalar_to_vector of...
Hao Liu [Thu, 12 Dec 2013 07:36:26 +0000 (07:36 +0000)]
[AArch64]Fix the problem that AArch64 backend fails to select scalar_to_vector of vector types having more than one element.

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

10 years agoSwap around EXPECT_EQ() arguments orders for more natural gtest Failure messages
Alp Toker [Thu, 12 Dec 2013 03:31:20 +0000 (03:31 +0000)]
Swap around EXPECT_EQ() arguments orders for more natural gtest Failure messages

Somewhat counterintuitively the first arg in gtest is treated as the
expectation.

No change to the tests themselves.

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

10 years agoAdd missing escape characters to the new Regex::escape() function
Alp Toker [Thu, 12 Dec 2013 02:51:58 +0000 (02:51 +0000)]
Add missing escape characters to the new Regex::escape() function

The old AddFixedStringToRegEx() it was based on got away with this for the
longest time, but the problem became easy to spot after the cleanup in r197096.

Also add a quick unit test to cover regex escaping.

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

10 years agoCheck for null pointer before dereferencing. A careless typo on my part.
Reed Kotler [Thu, 12 Dec 2013 02:41:11 +0000 (02:41 +0000)]
Check for null pointer before dereferencing. A careless typo on my part.
I don't know why this did not show up earlier. This code has been
around for ages.

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

10 years agoFix Incorrect CHECK message [0-31]+ in test case.
Kevin Qin [Thu, 12 Dec 2013 02:19:13 +0000 (02:19 +0000)]
Fix Incorrect CHECK message [0-31]+ in test case.
In regular expression, [0-31]+ equals to [0-3]+, not the number from
0 to 31. So change it to [0-9]+.

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

10 years agoResubmit r196544: Apply transformation on OS X 10.9+ and iOS 7.0+: pow(10, x) ―>...
Yi Jiang [Thu, 12 Dec 2013 01:55:04 +0000 (01:55 +0000)]
Resubmit r196544: Apply transformation on OS X 10.9+ and iOS 7.0+: pow(10, x) ―> __exp10(x)

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

10 years agoAdd TargetLibraryInfo in LTO passes builder
Yi Jiang [Thu, 12 Dec 2013 01:37:39 +0000 (01:37 +0000)]
Add TargetLibraryInfo in LTO passes builder

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

10 years agoRemove unused multiclass from PPCInstrInfo.td
Hal Finkel [Thu, 12 Dec 2013 00:23:29 +0000 (00:23 +0000)]
Remove unused multiclass from PPCInstrInfo.td

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

10 years agoImprove instruction scheduling for the PPC POWER7
Hal Finkel [Thu, 12 Dec 2013 00:19:11 +0000 (00:19 +0000)]
Improve instruction scheduling for the PPC POWER7

Aside from a few minor latency corrections, the major change here is a new
hazard recognizer which focuses on better dispatch-group formation on the
POWER7. As with the PPC970's hazard recognizer, the most important thing it
does is avoid load-after-store hazards within the same dispatch group. It uses
the POWER7's special dispatch-group-terminating nop instruction (instead of
inserting multiple regular nop instructions). This new hazard recognizer makes
use of the scheduling dependency graph itself, built using AA information, to
robustly detect the possibility of load-after-store hazards.

significant test-suite performance changes (the error bars are 99.5% confidence
intervals based on 5 test-suite runs both with and without the change --
speedups are negative):

speedups:

MultiSource/Benchmarks/FreeBench/pcompress2/pcompress2
-0.55171% +/- 0.333168%

MultiSource/Benchmarks/TSVC/CrossingThresholds-dbl/CrossingThresholds-dbl
-17.5576% +/- 14.598%

MultiSource/Benchmarks/TSVC/Reductions-dbl/Reductions-dbl
-29.5708% +/- 7.09058%

MultiSource/Benchmarks/TSVC/Reductions-flt/Reductions-flt
-34.9471% +/- 11.4391%

SingleSource/Benchmarks/BenchmarkGame/puzzle
-25.1347% +/- 11.0104%

SingleSource/Benchmarks/Misc/flops-8
-17.7297% +/- 9.79061%

SingleSource/Benchmarks/Shootout-C++/ary3
-35.5018% +/- 23.9458%

SingleSource/Regression/C/uint64_to_float
-56.3165% +/- 25.4234%

SingleSource/UnitTests/Vectorizer/gcc-loops
-18.5309% +/- 6.8496%

regressions:

MultiSource/Benchmarks/ASCI_Purple/SMG2000/smg2000
18.351% +/- 12.156%

SingleSource/Benchmarks/Shootout-C++/methcall
27.3086% +/- 14.4733%

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

10 years agoAdd isBarrier to SDep
Hal Finkel [Thu, 12 Dec 2013 00:19:07 +0000 (00:19 +0000)]
Add isBarrier to SDep

SDep had is* functions for the other kinds of order dependencies (isMustAlias,
isWeak, isArtificial, etc.), but not for barrier. Upcoming commits in the
PowerPC backend will make use of this function.

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

10 years agoFix an over-constrained assertion in MachineFunction::addLiveIn.
Quentin Colombet [Thu, 12 Dec 2013 00:15:47 +0000 (00:15 +0000)]
Fix an over-constrained assertion in MachineFunction::addLiveIn.
The assertion was checking that the virtual register VReg used to represent the
physical register PReg uses the same register class as the one passed to
MachineFunction::addLiveIn.
This is over-constraining because it is sufficient to check that the register
class of VReg (VRegRC) is a subclass of the register class of PReg (PRegRC) and
that VRegRC contains PReg.
Indeed, if VReg gets constrained because of some operation constraints
between two calls of MachineFunction::addLiveIn, the original assertion
cannot match.

This fixes <rdar://problem/15633429>.

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

10 years agoExpose FileCheck's AddFixedStringToRegEx as Regex::escape
Hans Wennborg [Thu, 12 Dec 2013 00:06:41 +0000 (00:06 +0000)]
Expose FileCheck's AddFixedStringToRegEx as Regex::escape

Both FileCheck and clang's -verify need to escape strings for regexes,
so let's expose this as a utility in the Regex class.

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

10 years ago[AArch64] Refactor NEON floating-point Max/Min/Maxnm/Minnm across vector AArch64
Chad Rosier [Wed, 11 Dec 2013 23:21:25 +0000 (23:21 +0000)]
[AArch64] Refactor NEON floating-point Max/Min/Maxnm/Minnm across vector AArch64
intrinsics to use f32 types, rather than their vector equivalents.

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

10 years agoFix the PPC subsumes-predicate check
Hal Finkel [Wed, 11 Dec 2013 23:12:25 +0000 (23:12 +0000)]
Fix the PPC subsumes-predicate check

For one predicate to subsume another, they must both check the same condition
register. Failure to check this prerequisite was causing miscompiles.

Fixes PR18003.

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

10 years agoAdd two additional hazard recognizer functions
Hal Finkel [Wed, 11 Dec 2013 22:33:43 +0000 (22:33 +0000)]
Add two additional hazard recognizer functions

This adds two additional functions to the hazard recognizer interface. These
are optional (in the sense that the default implementations preserve the
current behavior), and used by the post-RA scheduler. Upcoming commits will use
this functionality in order to improve dispatch-group formation on the POWER7
and related cores. Dispatch groups are an odd construct: sometimes we need to
insert nops to force a new one to start (for performance reasons), and some
instructions need to appear in certain positions within a group, but the groups
are not fundamentally cycle based (they can contain instructions with data
dependencies with non-trivial latencies).

Motivation:

unsigned PreEmitNoops(SUnit *) - Used to force the post-RA scheduler to insert
nops to force a new dispatch group to begin. We already have a NoopHazard, and
this is also still needed. However, NoopHazard only causes a nop to be inserted
if there are no other available instructions, and so is not always sufficient.
The number of nops to insert depends on state that only the hazard recognizer
has, so a general callback is necessary.

bool ShouldPreferAnother(SUnit *) - Used to avoid scheduling instructions that
would start a new dispatch group when others are available that could be part
of the current dispatch group. In this case, we don't want to issue nops,
because the non-preferred instruction will implicitly start a new dispatch
group regardless.

Although the motivation for these functions is driven by the PowerPC backend,
they are completely general.

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

10 years agoMerge all tls tests to two files. One for normal codegen (initial and local
Roman Divacky [Wed, 11 Dec 2013 22:25:39 +0000 (22:25 +0000)]
Merge all tls tests to two files. One for normal codegen (initial and local
exec) and one for PIC codegen (local and general dynamic).

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

10 years agoOn ELF and COFF treat linker_private like private.
Rafael Espindola [Wed, 11 Dec 2013 22:18:44 +0000 (22:18 +0000)]
On ELF and COFF treat linker_private like private.

The linkers on these systems don't have anything special to do with these
symbols. Since the intent is for them to be absent from the final object,
just treat them as private.

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

10 years agoRevert "DebugInfo: Move type units into the debug_types section with appropriate...
David Blaikie [Wed, 11 Dec 2013 22:08:39 +0000 (22:08 +0000)]
Revert "DebugInfo: Move type units into the debug_types section with appropriate comdat grouping and type unit headers"

This reverts commit r197073.

The test seems to be failing on some buildbots for unknown reasons.
Reverting until I can figure that out. If anyone's got a reproduction
(.s and .o together would be great) - I'd really appreciate it.

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

10 years agoRemove test thats testing the same thing as tls.ll.
Roman Divacky [Wed, 11 Dec 2013 21:37:04 +0000 (21:37 +0000)]
Remove test thats testing the same thing as tls.ll.

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

10 years agoDebugInfo: Move type units into the debug_types section with appropriate comdat group...
David Blaikie [Wed, 11 Dec 2013 21:36:27 +0000 (21:36 +0000)]
DebugInfo: Move type units into the debug_types section with appropriate comdat grouping and type unit headers

This commit does not complete the type units feature - there are issues
around fission support (skeletal type units, pubtypes/pubnames) and
hashing of some types including those containing references to types in
other type units.

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

10 years agoDwarfUnit: LLVM_OVERRIDE and constify some functions
David Blaikie [Wed, 11 Dec 2013 21:14:02 +0000 (21:14 +0000)]
DwarfUnit: LLVM_OVERRIDE and constify some functions

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

10 years ago[AArch64] Add NEON scalar floating-point compare LLVM AArch64 intrinsics that
Chad Rosier [Wed, 11 Dec 2013 21:03:46 +0000 (21:03 +0000)]
[AArch64] Add NEON scalar floating-point compare LLVM AArch64 intrinsics that
use f32/f64 types, rather than their vector equivalents.

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

10 years ago[AArch64] Refactor the NEON scalar floating-point reciprocal step and
Chad Rosier [Wed, 11 Dec 2013 21:03:43 +0000 (21:03 +0000)]
[AArch64] Refactor the NEON scalar floating-point reciprocal step and
floating-point reciprocal square root step LLVM AArch64 intrinsics to
use f32/f64 types, rather than their vector equivalents.

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

10 years ago[AArch64] Refactor the NEON scalar floating-point reciprocal estimate, floating-
Chad Rosier [Wed, 11 Dec 2013 21:03:40 +0000 (21:03 +0000)]
[AArch64] Refactor the NEON scalar floating-point reciprocal estimate, floating-
point reciprocal exponent, and floating-point reciprocal square root estimate
LLVM AArch64 intrinsics to use f32/f64 types, rather than their vector
equivalents.

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

10 years agoDon't set unused variable.
Rafael Espindola [Wed, 11 Dec 2013 20:40:57 +0000 (20:40 +0000)]
Don't set unused variable.

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

10 years ago[arm] Pass -triple to llvm-mc for ARM ELF test cases.
Logan Chien [Wed, 11 Dec 2013 19:38:10 +0000 (19:38 +0000)]
[arm] Pass -triple to llvm-mc for ARM ELF test cases.

Replace -arch with -triple so that we can guarantee that
ELF object files can be generated.

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

10 years agoR600: Re-format Processors.td
Tom Stellard [Wed, 11 Dec 2013 17:51:51 +0000 (17:51 +0000)]
R600: Re-format Processors.td

This makes it a little easier to read.

Reviewed-by: Vincent Lejeune <vljn at ovi.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197058 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: Register AMDGPUCFGStructurizer pass
Tom Stellard [Wed, 11 Dec 2013 17:51:47 +0000 (17:51 +0000)]
R600: Register AMDGPUCFGStructurizer pass

This enables -print-before-all to dump MachineInstrs after it is run.

Reviewed-by: Vincent Lejeune <vljn at ovi.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197057 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: Register R600EmitClauseMarkers pass
Tom Stellard [Wed, 11 Dec 2013 17:51:41 +0000 (17:51 +0000)]
R600: Register R600EmitClauseMarkers pass

This enables -print-before-all to dump MachineInstrs after it is run.

Reviewed-by: Vincent Lejeune <vljn at ovi.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197056 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[arm] Implement ARM .arch directive.
Logan Chien [Wed, 11 Dec 2013 17:16:25 +0000 (17:16 +0000)]
[arm] Implement ARM .arch directive.

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

10 years agoSelectionDAG: Fix a typo.
Benjamin Kramer [Wed, 11 Dec 2013 16:36:09 +0000 (16:36 +0000)]
SelectionDAG: Fix a typo.

Found by "cppcheck". PR18208.

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

10 years agoARM: constrain register-class in fast-isel
Tim Northover [Wed, 11 Dec 2013 16:04:57 +0000 (16:04 +0000)]
ARM: constrain register-class in fast-isel

The tests were no longer using fast-isel at all (MachO needs an "ios" rather
than "darwin" triple at the moment and Linux needs ARM mode). Once that was
corrected, the verifier complained about a t2ADDri created for the alloca.

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

10 years agoBuild fix for Android NDK which has neither futimes nor futimens
Alp Toker [Wed, 11 Dec 2013 15:42:33 +0000 (15:42 +0000)]
Build fix for Android NDK which has neither futimes nor futimens

Based on a patch by Neil Henning!

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

10 years agoAVX-512: Removed "z" suffix from AVX-512 instructions, since it is incompatible with...
Elena Demikhovsky [Wed, 11 Dec 2013 14:31:04 +0000 (14:31 +0000)]
AVX-512: Removed "z" suffix from AVX-512 instructions, since it is incompatible with GCC.
I moved a test from avx512-vbroadcast-crash.ll to avx512-vbroadcast.ll
I defined HasAVX512 predicate as AssemblerPredicate. It means that you should invoke llvm-mc with "-mcpu=knl" to get encoding for AVX-512 instructions. I need this to let AsmMatcher to set different encoding for AVX and AVX-512 instructions that have the same mnemonic and operands (all scalar instructions).

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

10 years ago[SystemZ] Optimize fcmp X, 0 in cases where X is also negated
Richard Sandiford [Wed, 11 Dec 2013 11:45:08 +0000 (11:45 +0000)]
[SystemZ] Optimize fcmp X, 0 in cases where X is also negated

In such cases it's often better to test the result of the negation instead,
since the negation also sets CC.

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

10 years agoExtend (truncate (load)) folding
Richard Sandiford [Wed, 11 Dec 2013 11:37:27 +0000 (11:37 +0000)]
Extend (truncate (load)) folding

DAGCombiner could fold (truncate (load)) -> smaller load if the original
load was the width of the truncation result or wider.  This patch extends
it to handle cases where the original load was narrower (and so the
extension type stays the same).

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

10 years agoFix XFAIL rules.
Manuel Klimek [Wed, 11 Dec 2013 08:38:42 +0000 (08:38 +0000)]
Fix XFAIL rules.

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

10 years agoMake this test a bit stricter.
Rafael Espindola [Wed, 11 Dec 2013 04:10:41 +0000 (04:10 +0000)]
Make this test a bit stricter.

The extra CHECK and CHECK-NEXT are there to show that we don't print a
linker private symbol on linux.

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

10 years agoAdd TargetRegisterInfo::reverseLocalAssignment hook.
Andrew Trick [Wed, 11 Dec 2013 03:40:15 +0000 (03:40 +0000)]
Add TargetRegisterInfo::reverseLocalAssignment hook.

This hook reverses the order of assignment for local live ranges. This
will generally allocate shorter local live ranges first. For targets with
many registers, this could reduce regalloc compile time by a large
factor. It should still achieve optimal coloring; however, it can change
register eviction decisions. It is disabled by default for two reasons:
(1) Top-down allocation is simpler and easier to debug for targets that
don't benefit from reversing the order.
(2) Bottom-up allocation could result in poor evicition decisions on some
targets affecting the performance of compiled code.

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

10 years agoDistinguish and choose 16 or 32 bit forms of save/restore for Mips16.
Reed Kotler [Wed, 11 Dec 2013 03:32:44 +0000 (03:32 +0000)]
Distinguish and choose 16 or 32 bit forms of save/restore for Mips16.

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

10 years ago[AArch64 NEON] Get instruction BSL matched to VSELECT.
Kevin Qin [Wed, 11 Dec 2013 02:33:50 +0000 (02:33 +0000)]
[AArch64 NEON] Get instruction BSL matched to VSELECT.

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

10 years agoMove mips' datalayout computation out of line and add comments.
Rafael Espindola [Wed, 11 Dec 2013 01:41:10 +0000 (01:41 +0000)]
Move mips' datalayout computation out of line and add comments.

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

10 years agoMove Sparc's getDataLayout out of line and add comments.
Rafael Espindola [Wed, 11 Dec 2013 01:07:43 +0000 (01:07 +0000)]
Move Sparc's getDataLayout out of line and add comments.

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

10 years agoPrune redundant dependencies in LLVMBuild.txt.
NAKAMURA Takumi [Wed, 11 Dec 2013 00:30:57 +0000 (00:30 +0000)]
Prune redundant dependencies in LLVMBuild.txt.

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

10 years agoMove PPC's getDataLayoutString out of line and document it better.
Rafael Espindola [Wed, 11 Dec 2013 00:09:06 +0000 (00:09 +0000)]
Move PPC's getDataLayoutString out of line and document it better.

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

10 years agoRevert the backend fatal error from r196939
Reid Kleckner [Tue, 10 Dec 2013 23:23:52 +0000 (23:23 +0000)]
Revert the backend fatal error from r196939

The combination of inline asm, stack realignment, and dynamic allocas
turns out to be too common to reject out of hand.

ASan inserts empy inline asm fragments and uses aligned allocas.
Compiling any trivial function containing a dynamic alloca with ASan is
enough to trigger the check.

XFAIL the test cases that would be miscompiled and add one that uses the
relevant functionality.

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

10 years agoRefactor the computation of the x86 datalayout.
Rafael Espindola [Tue, 10 Dec 2013 22:05:32 +0000 (22:05 +0000)]
Refactor the computation of the x86 datalayout.

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

10 years ago[asan] Fix the coverage.cc test broken by r196939
Reid Kleckner [Tue, 10 Dec 2013 21:49:28 +0000 (21:49 +0000)]
[asan] Fix the coverage.cc test broken by r196939

It was failing because ASan was adding all of the following to one
function:
- dynamic alloca
- stack realignment
- inline asm

This patch avoids making the static alloca dynamic when coverage is
used.

ASan should probably not be inserting empty inline asm blobs to inhibit
duplicate tail elimination.

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

10 years agoUse llvm_unreachable instead of assert(0)
Matt Arsenault [Tue, 10 Dec 2013 21:37:42 +0000 (21:37 +0000)]
Use llvm_unreachable instead of assert(0)

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

10 years agoon darwin<10, fallback to .weak_definition (PPC,X86)
David Fang [Tue, 10 Dec 2013 21:37:41 +0000 (21:37 +0000)]
on darwin<10, fallback to .weak_definition (PPC,X86)
.weak_def_can_be_hidden was not yet supported by the system assembler

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

10 years ago[AArch64] Refactor the NEON floating-point absolute difference LLVM AArch64
Chad Rosier [Tue, 10 Dec 2013 21:33:59 +0000 (21:33 +0000)]
[AArch64] Refactor the NEON floating-point absolute difference LLVM AArch64
intrinsic to use f32/f64 types, rather than their vector equivalents.

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

10 years ago[AArch64] Refactor the NEON signed/unsigned floating-point convert to fixed-point
Chad Rosier [Tue, 10 Dec 2013 21:33:56 +0000 (21:33 +0000)]
[AArch64] Refactor the NEON signed/unsigned floating-point convert to fixed-point
LLVM AArch64 intrinsics to use f32/f64, rather than their vector equivalents.

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

10 years ago[AArch64] Overload NEON signed/unsigned floating-point convert to fixed-point
Chad Rosier [Tue, 10 Dec 2013 21:33:53 +0000 (21:33 +0000)]
[AArch64] Overload NEON signed/unsigned floating-point convert to fixed-point
and fixed-point convert to floating-point LLVM AArch64 intrinsics.

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

10 years ago[AArch64] Overload NEON signed/unsigned integer convert to floating-point
Chad Rosier [Tue, 10 Dec 2013 21:33:50 +0000 (21:33 +0000)]
[AArch64] Overload NEON signed/unsigned integer convert to floating-point
LLVM AArch64 intrinsics.

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

10 years agoR600/SI: Add i64 cmp tests
Matt Arsenault [Tue, 10 Dec 2013 21:11:55 +0000 (21:11 +0000)]
R600/SI: Add i64 cmp tests

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

10 years agoFix gcc warnings.
Matt Arsenault [Tue, 10 Dec 2013 18:55:37 +0000 (18:55 +0000)]
Fix gcc warnings.

Unused variable and unused typedef in release build.

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

10 years agoReland "Fix miscompile of MS inline assembly with stack realignment"
Reid Kleckner [Tue, 10 Dec 2013 18:27:32 +0000 (18:27 +0000)]
Reland "Fix miscompile of MS inline assembly with stack realignment"

This re-lands commit r196876, which was reverted in r196879.

The tests have been fixed to pass on platforms with a stack alignment
larger than 4.

Update to clang side tests will land shortly.

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

10 years agoMake Triple's isOSBinFormatXXX functions partition triple-space.
Tim Northover [Tue, 10 Dec 2013 16:57:43 +0000 (16:57 +0000)]
Make Triple's isOSBinFormatXXX functions partition triple-space.

Most users would be surprised if "isCOFF" and "isMachO" were simultaneously
true, unless they'd put the compiler in a box with a gun attached to a photon
detector.

This makes sure precisely one of the three formats is true for any triple and
simplifies some target logic based on that.

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

10 years agoSupport: Update documentation for Program functions
Alp Toker [Tue, 10 Dec 2013 16:31:09 +0000 (16:31 +0000)]
Support: Update documentation for Program functions

The docstrings were describing an older interface that has been replaced with
functions.

Also describe the performance characteristics of FindProgramByName() and
ExecuteAndWait() explaining when it's best to avoid them.

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

10 years ago[AArch64] Refactor the Neon vector/scalar floating-point convert intrinsics so
Chad Rosier [Tue, 10 Dec 2013 16:11:39 +0000 (16:11 +0000)]
[AArch64] Refactor the Neon vector/scalar floating-point convert intrinsics so
that they use float/double rather than the vector equivalents when appropriate.

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

10 years ago[AArch64] Refactor the Neon vector/scalar floating-point convert implementation.
Chad Rosier [Tue, 10 Dec 2013 15:35:33 +0000 (15:35 +0000)]
[AArch64] Refactor the Neon vector/scalar floating-point convert implementation.
Specifically, reuse the ARM intrinsics when possible.

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

10 years agoEnsure that the backend no longer emits unnecessary vector insert instructions
Andrea Di Biagio [Tue, 10 Dec 2013 15:22:48 +0000 (15:22 +0000)]
Ensure that the backend no longer emits unnecessary vector insert instructions
immediately after SSE scalar fp instructions like addss or mulss.

Added patterns to select SSE scalar fp arithmetic instructions from a scalar
fp operation followed by a blend.

For example, given the following code:
  __m128 foo(__m128 A, __m128 B) {
    A[0] += B[0];
    return A;
  }

previously we generated:
  addss %xmm0, %xmm1
  movss %xmm1, %xmm0

now we generate:
  addss %xmm1, %xmm0

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

10 years agoUse Field Lists for the types' "Overview", "Syntax" and "Examples".
Rafael Espindola [Tue, 10 Dec 2013 14:53:22 +0000 (14:53 +0000)]
Use Field Lists for the types' "Overview", "Syntax" and "Examples".

Thanks to Sean Silva for the suggestion.

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

10 years agoR600: Fix an infinite loop when trying to reorganize export/tex vector input
Vincent Lejeune [Tue, 10 Dec 2013 14:43:31 +0000 (14:43 +0000)]
R600: Fix an infinite loop when trying to reorganize export/tex vector input

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

10 years agoR600: Fix input modifiers lost for Cayman
Vincent Lejeune [Tue, 10 Dec 2013 14:43:27 +0000 (14:43 +0000)]
R600: Fix input modifiers lost for Cayman

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

10 years agoNext step in Mips16 prologue/epilogue cleanup.
Reed Kotler [Tue, 10 Dec 2013 14:29:38 +0000 (14:29 +0000)]
Next step in Mips16 prologue/epilogue cleanup.
Save S2(reg 18) only when we are calling floating point stubs that
have a return value of float or complex. Some more work to make this
better but this is the first step.

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

10 years agoAVX-512: changed intrinsics for mask operations
Elena Demikhovsky [Tue, 10 Dec 2013 13:53:10 +0000 (13:53 +0000)]
AVX-512: changed intrinsics for mask operations

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

10 years agoAVX-512: Changed intrinsics of VPCONFLICT to match GCC builtin form
Elena Demikhovsky [Tue, 10 Dec 2013 11:58:35 +0000 (11:58 +0000)]
AVX-512: Changed intrinsics of VPCONFLICT to match GCC builtin form

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

10 years agoDarwin: update default iOS version to 5.0
Tim Northover [Tue, 10 Dec 2013 11:53:16 +0000 (11:53 +0000)]
Darwin: update default iOS version to 5.0

Defaulting to iOS 3.0 when LLVM has to guess the version is no longer a useful
option and can give surprising results (like tail calls being disabled).

5.0 seems like a reasonable compromise as a platform that's still interesting
to some people.

rdar://problem/15567348

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

10 years ago[CMake] Add MCDisassembler to tools/lto. (has been removed since r196908)
NAKAMURA Takumi [Tue, 10 Dec 2013 11:50:34 +0000 (11:50 +0000)]
[CMake] Add MCDisassembler to tools/lto. (has been removed since r196908)

lto.exports really exports LLVM-C Disasm stuff.

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

10 years ago[mips][msa] Correct sld and sldi builtins.
Daniel Sanders [Tue, 10 Dec 2013 11:37:00 +0000 (11:37 +0000)]
[mips][msa] Correct sld and sldi builtins.

Summary: The result register of these instructions is also the first operand.

Reviewers: jacksprat, dsanders

Reviewed By: dsanders

Differential Revision: http://llvm-reviews.chandlerc.com/D2362
Differential Revision: http://llvm-reviews.chandlerc.com/D2363

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

10 years ago[CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt.
NAKAMURA Takumi [Tue, 10 Dec 2013 11:13:32 +0000 (11:13 +0000)]
[CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt.

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

10 years agoAdd JIT to LINK_COMPONENTS in MCJITTests/Makefile.
NAKAMURA Takumi [Tue, 10 Dec 2013 11:12:35 +0000 (11:12 +0000)]
Add JIT to LINK_COMPONENTS in MCJITTests/Makefile.

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

10 years agoAdd TargetLowering::prepareVolatileOrAtomicLoad
Richard Sandiford [Tue, 10 Dec 2013 10:49:34 +0000 (10:49 +0000)]
Add TargetLowering::prepareVolatileOrAtomicLoad

One unusual feature of the z architecture is that the result of a
previous load can be reused indefinitely for subsequent loads, even if
a cache-coherent store to that location is performed by another CPU.
A special serializing instruction must be used if you want to force
a load to be reattempted.

Since volatile loads are not supposed to be omitted in this way,
we should insert a serializing instruction before each such load.
The same goes for atomic loads.

The patch implements this at the IR->DAG boundary, in a similar way
to atomic fences.  It is a no-op for targets other than SystemZ.

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

10 years agoAdd TargetLowering::prepareVolatileOrAtomicLoad
Richard Sandiford [Tue, 10 Dec 2013 10:36:34 +0000 (10:36 +0000)]
Add TargetLowering::prepareVolatileOrAtomicLoad

One unusual feature of the z architecture is that the result of a
previous load can be reused indefinitely for subsequent loads, even if
a cache-coherent store to that location is performed by another CPU.
A special serializing instruction must be used if you want to force
a load to be reattempted.

Since volatile loads are not supposed to be omitted in this way,
we should insert a serializing instruction before each such load.
The same goes for atomic loads.

The patch implements this at the IR->DAG boundary, in a similar way
to atomic fences.  It is a no-op for targets other than SystemZ.

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