Rafael Espindola [Mon, 28 Oct 2013 20:40:20 +0000 (20:40 +0000)]
Convert a llc -filetype=obj test into a llvm-mc test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193534
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Mon, 28 Oct 2013 18:19:04 +0000 (18:19 +0000)]
TableGen: remove unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193527
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Mon, 28 Oct 2013 18:07:21 +0000 (18:07 +0000)]
TableGen: Refactor DAG patterns to enable parsing one pattern at a time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193526
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Mon, 28 Oct 2013 18:07:17 +0000 (18:07 +0000)]
TableGen: Refactor AsmWriterEmitter to keep AsmWriterInsts.
These used to be referenced by the CGI->AWI map (in AsmWriterEmitter), but
stored in a vector local to EmitPrintInstruction. Move the vector to
AsmWriterEmitter too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193525
91177308-0d34-0410-b5e6-
96231b3b80d8
Logan Chien [Mon, 28 Oct 2013 17:51:12 +0000 (17:51 +0000)]
[arm] Implement eabi_attribute, cpu, and fpu directives.
This commit allows the ARM integrated assembler to parse
and assemble the code with .eabi_attribute, .cpu, and
.fpu directives.
To implement the feature, this commit moves the code from
AttrEmitter to ARMTargetStreamers, and several new test
cases related to cortex-m4, cortex-r5, and cortex-a15 are
added.
Besides, this commit also change the Subtarget->isFPOnlySP()
to Subtarget->hasD16() to match the usage of .fpu directive.
This commit changes the test cases:
* Several .eabi_attribute directives in
2010-09-29-mc-asm-header-test.ll are removed because the .fpu
directive already cover the functionality.
* In the Cortex-A15 test case, the value for
Tag_Advanced_SIMD_arch has be changed from 1 to 2,
which is more precise.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193524
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Mon, 28 Oct 2013 16:52:38 +0000 (16:52 +0000)]
simplify ConstantRange::getSetSize()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193523
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Mon, 28 Oct 2013 13:53:37 +0000 (13:53 +0000)]
[SystemZ] Set usaAA to true
useAA significantly improves the handling of vector code that has TBAA
information attached. It also helps other cases, as shown by the testsuite
changes here. The only real downside I've seen is that it interferes with
MergeConsecutiveStores. The problem is that that optimization works top
down, starting at the first store in the chain, and looks for cases where
the chain result is only used by a single related store. These related
stores don't alias, so useAA will have rewritten all the later stores to
use a different chain input (typically the same one as the first store).
I think the advantages outweigh the disadvantages though, so for now I've
just disabled alias analysis for the unaligned-01.ll test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193521
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Mon, 28 Oct 2013 12:00:00 +0000 (12:00 +0000)]
[DAGCombiner] Respect volatility when checking for aliases
Making useAA() default to true for SystemZ showed that the combiner alias
analysis wasn't handling volatile accesses. This hit many of the SystemZ
tests, but I arbitrarily picked one for the purpose of this patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193518
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Mon, 28 Oct 2013 11:17:59 +0000 (11:17 +0000)]
Keep TBAA info when rewriting SelectionDAG loads and stores
Most SelectionDAG code drops the TBAA info when creating a new form of a
load and store (e.g. during legalization, or when converting a plain
load to an extending one). This patch tries to catch all cases where
the TBAA information can legitimately be carried over.
The patch adds alternative forms of getLoad() and getExtLoad() that take
a MachineMemOperand instead of individual fields. (The corresponding
getTruncStore() already exists.) The idea is to use the MachineMemOperand
forms when all fields are carried over (size, pointer info, isVolatile,
isNonTemporal, alignment and TBAA info). If some adjustment is being
made, e.g. to narrow the load, then we still pass the individual fields
but also pass the TBAA info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193517
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Mon, 28 Oct 2013 10:26:13 +0000 (10:26 +0000)]
lit: multiprocessing platform fix attempt
The error raised by Python varies by platform(!), so let's just catch any
exception and fall back.
Thanks to Sylvestre Ledru for noticing this on a Debian / Python 2.7 system
running code coverage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193516
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 28 Oct 2013 07:30:06 +0000 (07:30 +0000)]
SCEV: Make the final add of an inbounds GEP nuw if we know that the index is positive.
We can't do this for the general case as saying a GEP with a negative index
doesn't have unsigned wrap isn't valid for negative indices.
%gep = getelementptr inbounds i32* %p, i64 -1
But an inbounds GEP cannot run past the end of address space. So we check for
the very common case of a positive index and make GEPs derived from that NUW.
Together with Andy's recent non-unit stride work this lets us analyze loops
like
void foo3(int *a, int *b) {
for (; a < b; a++) {}
}
PR12375, PR12376.
Differential Revision: http://llvm-reviews.chandlerc.com/D2033
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193514
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 28 Oct 2013 04:07:38 +0000 (04:07 +0000)]
Prune utf8 chars in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193512
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 28 Oct 2013 04:07:31 +0000 (04:07 +0000)]
Prune trailing linefeeds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193511
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 28 Oct 2013 04:07:23 +0000 (04:07 +0000)]
Target/R600: Un-tab-ify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193510
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Sun, 27 Oct 2013 21:57:36 +0000 (21:57 +0000)]
Make first substantial checkin of my port of ARM constant islands code to Mips.
Before I just ported the shell of the pass. I've tried to keep everything
nearly identical to the ARM version. I think it will be very easy to eventually
merge these two and create a new more general pass that other targets can
use. I have some improvements I would like to make to allow pools to
be shared across functions and some other things. When I'm all done we
can think about making a more general pass. More to be ported but the
basic mechanism works now almost as good as gcc mips16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193509
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Sun, 27 Oct 2013 20:49:19 +0000 (20:49 +0000)]
Clarify the comment about BSD versions in r193465
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193508
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 27 Oct 2013 11:31:46 +0000 (11:31 +0000)]
NVPTX: Remove unused globals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193500
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 27 Oct 2013 11:16:09 +0000 (11:16 +0000)]
Hexagon: Remove global state.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193499
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 27 Oct 2013 10:22:52 +0000 (10:22 +0000)]
MCJIT-remote: __main should be resolved in child context.
- Mark tests as XFAIL:cygming in test/ExecutionEngine/MCJIT/remote.
Rather to suppress them, I'd like to leave them running as XFAIL.
- Revert r193472. RecordMemoryManager no longer resolves __main on cygming.
There are a couple of issues.
- X86 Codegen emits "call __main" in @main for targeting cygming.
It is useless in JIT. FYI, tests are passing when emitting __main is disabled.
- Current remote JIT does not resolve any symbols in child context.
FIXME: __main should be disabled, or remote JIT should resolve __main.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193498
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Sun, 27 Oct 2013 08:18:37 +0000 (08:18 +0000)]
AVX-512: PMIN/PMAX intrinsics and patterns
Patch by Cameron McInally <cameron.mcinally@nyu.edu>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193497
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 27 Oct 2013 05:09:12 +0000 (05:09 +0000)]
A small grammar-os fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193496
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 27 Oct 2013 04:50:34 +0000 (04:50 +0000)]
Update to current output.
PR14039
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193494
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 27 Oct 2013 04:25:02 +0000 (04:25 +0000)]
Fix Sphinx warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193493
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 27 Oct 2013 04:19:29 +0000 (04:19 +0000)]
Update to specify that both metadata and label types aren't proper return types.
PR15447
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193492
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 27 Oct 2013 04:02:21 +0000 (04:02 +0000)]
Update the Python version. And Perl isn't used anymore.
PR17608
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193491
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 27 Oct 2013 03:57:10 +0000 (03:57 +0000)]
Update link.
PR17608
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193490
91177308-0d34-0410-b5e6-
96231b3b80d8
Shuxin Yang [Sun, 27 Oct 2013 03:08:44 +0000 (03:08 +0000)]
Revert r193251 : Use address-taken to disambiguate global variable and indirect memops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193489
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 26 Oct 2013 13:52:31 +0000 (13:52 +0000)]
lli/RemoteMemoryManager.cpp: Resurrect __main stuff removed in r192504 to unbreak mingw32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193472
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Sat, 26 Oct 2013 13:25:45 +0000 (13:25 +0000)]
self.path may be empty or otherwise miss the normal system directories,
so try PATH next. Assume it is sane enough to cover the usual system
bash locations too, but the old list is not good enough for NetBSD.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193471
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Sat, 26 Oct 2013 09:29:58 +0000 (09:29 +0000)]
lit: Issue a note when multiprocessing fails to load
If multiprocessing was requested, detected as available and subsequently failed
to initialize it's worth letting the user know about it before falling back to
threads.
This condition can arise in certain OpenBSD / FreeBSD Python versions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193465
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Sat, 26 Oct 2013 08:46:05 +0000 (08:46 +0000)]
Fix a referenced before assignment in r193463
Some versions of Python on the builders seem strict about this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193464
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Sat, 26 Oct 2013 08:22:44 +0000 (08:22 +0000)]
lit: handle late multiprocessing errors gracefully
This should be a better fix for lit multiprocessing failures, replacing the
OpenBSD and FreeBSD workarounds in r193413 and r193457.
Reference: http://bugs.python.org/issue3770
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193463
91177308-0d34-0410-b5e6-
96231b3b80d8
Wan Xiaofei [Sat, 26 Oct 2013 03:08:02 +0000 (03:08 +0000)]
Quick look-up for block in loop.
This patch implements quick look-up for block in loop by maintaining a hash set for blocks.
It improves the efficiency of loop analysis a lot, the biggest improvement could be 5-6%(458.sjeng).
Below are the compilation time for our benchmark in llc before & after the patch.
Benchmark llc - trunk llc - patched
401.bzip2 0.339081 100.00% 0.329657 102.86%
403.gcc 19.853966 100.00% 19.605466 101.27%
429.mcf 0.049823 100.00% 0.048451 102.83%
433.milc 0.514898 100.00% 0.510217 100.92%
444.namd 1.109328 100.00% 1.103481 100.53%
445.gobmk 4.988028 100.00% 4.929114 101.20%
456.hmmer 0.843871 100.00% 0.825865 102.18%
458.sjeng 0.754238 100.00% 0.714095 105.62%
464.h264ref 2.9668 100.00% 2.90612 102.09%
471.omnetpp 4.556533 100.00% 4.511886 100.99%
bitmnp01 0.038168 100.00% 0.0357 106.91%
idctrn01 0.037745 100.00% 0.037332 101.11%
libquake2 3.78689 100.00% 3.76209 100.66%
libquake_ 2.251525 100.00% 2.234104 100.78%
linpack 0.033159 100.00% 0.032788 101.13%
matrix01 0.045319 100.00% 0.043497 104.19%
nbench 0.333161 100.00% 0.329799 101.02%
tblook01 0.017863 100.00% 0.017666 101.12%
ttsprk01 0.054337 100.00% 0.053057 102.41%
Reviewer : Andrew Trick <atrick@apple.com>, Hal Finkel <hfinkel@anl.gov>
Approver : Andrew Trick <atrick@apple.com>
Test : Pass make check-all & llvm test-suite
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193460
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 26 Oct 2013 02:50:20 +0000 (02:50 +0000)]
llvm/test/lit.cfg: Tighten conditions to enable 'native'.
I saw the case that 'native' was mis-enabled when x86_64-pc-win32 on x86_64-linux.
FIXME: Consider cases that target can be executed even if host_triple were different from target_triple.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193459
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 26 Oct 2013 02:50:14 +0000 (02:50 +0000)]
llvm/test/Other/close-stderr.ll: Remove "XFAIL:win32". It reverts r173509.
"REQUIRES: shell" should cover if this failed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193458
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Sat, 26 Oct 2013 02:43:08 +0000 (02:43 +0000)]
Attempt to fix the FreeBSD build, disable multiprocessing
Speculative quick fix based on clang-X86_64-freebsd output:
File "/usr/local/lib/python2.6/multiprocessing/synchronize.py", line 33, in <module>
" function, see issue 3770.")
ImportError: This platform lacks a functioning sem_open implementation, therefore, the required synchronization primitives needed will not function, see issue 3770.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193457
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 25 Oct 2013 21:35:56 +0000 (21:35 +0000)]
Fix SCEVExpander: don't try to expand quadratic recurrences outside a loop.
Partial fix for PR17459: wrong code at -O3 on x86_64-linux-gnu
(affecting trunk and 3.3)
When SCEV expands a recurrence outside of a loop it attempts to scale
by the stride of the recurrence. Chained recurrences don't work that
way. We could compute binomial coefficients, but would hve to
guarantee that the chained AddRec's are in a perfectly reduced form.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193438
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 25 Oct 2013 21:35:52 +0000 (21:35 +0000)]
Fix LSR: don't normalize quadratic recurrences.
Partial fix for PR17459: wrong code at -O3 on x86_64-linux-gnu
(affecting trunk and 3.3)
ScalarEvolutionNormalization was attempting to normalize by adding and
subtracting strides. Chained recurrences don't work that way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193437
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 25 Oct 2013 21:29:52 +0000 (21:29 +0000)]
Handle calls and invokes in GlobalStatus.
This patch teaches GlobalStatus to analyze a call that uses the global value as
a callee, not as an argument.
With this change internalize call handle the common use of linkonce_odr
functions. This reduces the number of linkonce_odr functions in a LTO build of
clang (checked with the emit-llvm gold plugin option) from 1730 to 60.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193436
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Fri, 25 Oct 2013 20:40:15 +0000 (20:40 +0000)]
LoopVectorizer: Don't attempt to vectorize extractelement instructions
The loop vectorizer does not currently understand how to vectorize
extractelement instructions. The existing check, which excluded all
vector-valued instructions, did not catch extractelement instructions because
it checked only the return value. As a result, vectorization would proceed,
producing illegal instructions like this:
%58 = extractelement <2 x i32> %15, i32 0
%59 = extractelement i32 %58, i32 0
where the second extractelement is illegal because its first operand is not a vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193434
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 25 Oct 2013 20:04:25 +0000 (20:04 +0000)]
DIEHash: Summary hashing of member functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193432
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 25 Oct 2013 19:47:55 +0000 (19:47 +0000)]
Try to fix the build on windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193431
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 25 Oct 2013 19:06:52 +0000 (19:06 +0000)]
Change MemoryBuffer::getFile to take a Twine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193429
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 25 Oct 2013 18:38:43 +0000 (18:38 +0000)]
DIEHash: Summary hashing of nested types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193427
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Fri, 25 Oct 2013 18:04:12 +0000 (18:04 +0000)]
[X86][AVX512] Add patterns that match the AVX512 floating point register vbroadcast intrinsics.
Patch by Cameron McInally <cameron.mcinally@nyu.edu>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193422
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Fri, 25 Oct 2013 17:47:18 +0000 (17:47 +0000)]
[X86][AVX512] Add patterns that match the AVX512 floating point vbroadcast intrinsics.
Patch by Cameron McInally <cameron.mcinally@nyu.edu>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193421
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 25 Oct 2013 17:41:41 +0000 (17:41 +0000)]
[bugpoint] Increase the default memory limit for subprocesses to 300MB.
Summary:
Currently shared library builds (BUILD_SHARED_LIBS=ON in cmake) fail three
bugpoint tests (BugPoint/remove_arguments_test.ll,
BugPoint/crash-narrowfunctiontest.ll, and BugPoint/metadata.ll).
If I run the bugpoint commands that llvm-lit runs with without -silence-passes
I see errors such as this:
opt: error while loading shared libraries: libLLVMSystemZInfo.so: failed to
map segment from shared object: Cannot allocate memory
It seems that the increased size of the binaries in a shared library build is
causing the subprocess to exceed the 100MB memory limit. This patch therefore
increases the default limit to a level at which these tests pass.
Reviewers: dsanders
Reviewed By: dsanders
CC: llvm-commits, rafael
Differential Revision: http://llvm-reviews.chandlerc.com/D2013
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193420
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 25 Oct 2013 15:58:58 +0000 (15:58 +0000)]
llvm-c-test: Don't leak memory buffers.
Detected by valgrind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193416
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 25 Oct 2013 15:07:59 +0000 (15:07 +0000)]
Try to fix the openbsd bot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193413
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 25 Oct 2013 15:01:34 +0000 (15:01 +0000)]
Call destroy from ~BasicCallGraph.
This fix a memory leak found by valgrind.
Calling it from the base class destructor would not destroy the BasicCallGraph
bits.
FIXME: BasicCallGraph is the only thing that inherits from CallGraph. Can
we merge the two?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193412
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 25 Oct 2013 12:59:02 +0000 (12:59 +0000)]
Use c comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193404
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 25 Oct 2013 12:49:50 +0000 (12:49 +0000)]
ARM: allow .thumb_func to be separated from symbol definition
When assembling, a .thumb_func directive is supposed to be applicable to the
next symbol definition, even if there are intervening directives. We were
racing ahead to try and find it, and this commit should fix the issue.
Patch by Gabor Ballabas
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193403
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Fri, 25 Oct 2013 12:01:53 +0000 (12:01 +0000)]
The FIXME was indeed fixed in the linker, comment removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193402
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 25 Oct 2013 09:30:24 +0000 (09:30 +0000)]
ARM: don't expand atomicrmw inline on Cortex-M0
There's a barrier instruction so that should still be used, but most actual
atomic operations are going to need a platform decision on the correct
behaviour (either nop if single-threaded or OS-support otherwise).
rdar://problem/
15287210
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193399
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 25 Oct 2013 09:30:20 +0000 (09:30 +0000)]
LegalizeDAG: allow libcalls for max/min atomic operations
ARM processors without ldrex/strex need to be able to make libcalls for all
atomic operations, including the newer min/max versions.
The alternative would probably be expanding these operations in terms of
cmpxchg (as x86 does always), but in the configurations where this matters
code-size tends to be paramount so the libcall is more desirable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193398
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 25 Oct 2013 07:34:56 +0000 (07:34 +0000)]
ARM: tweak test to pass on all platforms
A TableGen indeterminacy means that the reason for the failure can
vary, and Windows gets the other option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193394
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 25 Oct 2013 06:41:18 +0000 (06:41 +0000)]
Optimize concat_vectors(X, undef) -> scalar_to_vector(X).
This optimization is not SSE specific so I am moving it to DAGco.
The new scalar_to_vector dag node exposed a missing pattern in the AArch64 target that I needed to add.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193393
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Fri, 25 Oct 2013 03:29:42 +0000 (03:29 +0000)]
Fix ODR violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193391
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuchen Wu [Fri, 25 Oct 2013 02:22:24 +0000 (02:22 +0000)]
llvm-cov dump to dbgs() instead of outs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193390
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuchen Wu [Fri, 25 Oct 2013 02:22:21 +0000 (02:22 +0000)]
Support for reading program counts in llvm-cov.
llvm-cov will now be able to read program counts from the GCDA file and
output it in the same format as gcov. The program summary tag was
identified from gcov-io.h as "\0\0\0\a3".
There is currently a bug in GCOVProfiling.cpp which does not generate
the
run- or program-counting IR, so this change was tested manually by
modifying the GCDA file and comparing the gcov and llvm-cov outputs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193389
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 24 Oct 2013 23:11:05 +0000 (23:11 +0000)]
ARM: Test r193381 a bit more thoroughly.
Make sure we're predicating right based on CPU even if the triple is 'wrong'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193382
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 24 Oct 2013 23:07:11 +0000 (23:07 +0000)]
ARM: Tweak usage of '*vfp' compiler_rt functions.
Only use them if the subtarget has ARM mode, as these routines are implemented
as ARM code.
rdar://
15302004
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193381
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 24 Oct 2013 22:43:10 +0000 (22:43 +0000)]
MCStreamer: Reimplement the virtual EmitRawText as a protected member, EmitRawTextImpl, to avoid string literal ambiguities
Also improve the implementation of EmitRawText(Twine) so it doesn't
bother using the SmallString buffer if the Twine is a simple StringRef
anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193378
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 24 Oct 2013 22:26:04 +0000 (22:26 +0000)]
lto.h: Use lto_bool_t instead of int to restore the ABI
This reverts commit r193255 and instead creates an lto_bool_t typedef
that points to bool, _Bool, or unsigned char depending on what is
available. Only recent versions of MSVC provide a stdbool.h header.
Reviewers: rafael.espindola
Differential Revision: http://llvm-reviews.chandlerc.com/D2019
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193377
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 24 Oct 2013 22:00:44 +0000 (22:00 +0000)]
DWARF emission: Remove unnecessary/redundant DIE reference code
The default case at the end of the switch handles this just fine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193374
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 24 Oct 2013 21:54:58 +0000 (21:54 +0000)]
Fix name of variable in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193373
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 24 Oct 2013 21:20:23 +0000 (21:20 +0000)]
Grammar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193372
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 24 Oct 2013 21:05:08 +0000 (21:05 +0000)]
Update misleading comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193371
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 24 Oct 2013 21:04:51 +0000 (21:04 +0000)]
Formatting and whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193370
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 24 Oct 2013 18:29:03 +0000 (18:29 +0000)]
DIEHash: Const correct and use references where non-null/non-rebound.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193363
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 24 Oct 2013 17:53:58 +0000 (17:53 +0000)]
DIEHash: Do not use shallow type hashing for unnamed types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193361
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 24 Oct 2013 17:51:43 +0000 (17:51 +0000)]
DIEHash: Refactor ref attribute hashing into smaller functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193360
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 24 Oct 2013 17:10:13 +0000 (17:10 +0000)]
Remove unused debug-only member variable.
This may've been used at some point but the 'print' member function grew
an Indent parameter that entirely shadows this parameter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193358
91177308-0d34-0410-b5e6-
96231b3b80d8
David Peixotto [Thu, 24 Oct 2013 16:39:36 +0000 (16:39 +0000)]
Remove class abstraction from ARM struct byval lowering
This commit changes the struct byval lowering for arm to use inline
checks for the subtarget instead of a class abstraction to represent
the differences. The class abstraction was judged to be too much
code for this task.
No intended functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193357
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 24 Oct 2013 16:38:33 +0000 (16:38 +0000)]
Inliner: Handle readonly attribute per argument when adding memcpy
Patch by: Vincent Lejeune
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193356
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Thu, 24 Oct 2013 16:31:43 +0000 (16:31 +0000)]
I had to move and remove
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193355
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 24 Oct 2013 15:49:39 +0000 (15:49 +0000)]
ARM: Mark double-precision instructions as such
This prevents us from silently accepting invalid instructions on (for example)
Cortex-M4 with just single-precision VFP support.
No tests for the extra Pat Requires because they're essentially assertions: the
affected code should have been lowered to libcalls before ISel.
rdar://problem/
15302004
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193354
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Thu, 24 Oct 2013 15:11:03 +0000 (15:11 +0000)]
Fix broken builds by moving test to x86 dir
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193351
91177308-0d34-0410-b5e6-
96231b3b80d8
John Thompson [Thu, 24 Oct 2013 14:52:56 +0000 (14:52 +0000)]
Reverting my r193344 checkin due to build breakage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193350
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Thu, 24 Oct 2013 14:50:51 +0000 (14:50 +0000)]
Mark vector loops as already vectorized
Make sure we mark all loops (scalar and vector) when vectorizing,
so that we don't try to vectorize them anymore. Also, set unroll
to 1, since this is what we check for on early exit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193349
91177308-0d34-0410-b5e6-
96231b3b80d8
John Thompson [Thu, 24 Oct 2013 13:36:58 +0000 (13:36 +0000)]
Added std::string as a built-in type for mapping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193344
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 24 Oct 2013 12:48:05 +0000 (12:48 +0000)]
ARM: add a couple more NEON predicates.
The fused multiply instructions were added in VFPv4 but are still NEON
instructions, in particular they shouldn't be available on a Cortex-M4 not
matter how floaty it is.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193342
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 24 Oct 2013 12:22:58 +0000 (12:22 +0000)]
ARM: mark various aliases with their architecture requirements.
If an alias inherits directly from InstAlias then it doesn't get any default
"Requires" values, so llvm-mc will allow it even on architectures that don't
support the underlying instruction.
This tidies up the obvious VFP and NEON cases I found.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193340
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Thu, 24 Oct 2013 10:55:00 +0000 (10:55 +0000)]
Added tests for microMIPS relocations 1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193332
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 24 Oct 2013 10:37:09 +0000 (10:37 +0000)]
ARM: Use non-VFP softcalls on embedded Darwinish targets
The compiler-rt functions __adddf3vfp and so on exist purely to allow Thumb1
code to make use of VFP instructions by switching back to ARM mode, they make
no sense for M-class processors which don't even have an ARM mode.
Given that justification, in practice this is a platform ABI decision so the
actual check is based on that rather than CPU features.
rdar://problem/
15302004
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193327
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Thu, 24 Oct 2013 10:04:47 +0000 (10:04 +0000)]
Replaced non-ASCII character.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193324
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 24 Oct 2013 09:52:56 +0000 (09:52 +0000)]
Revert part of r193291, restoring the deletion of loaded objects.
Without this, customers of the MCJIT were leaking memory like crazy.
It's not really clear what the *right* memory management is here, so I'm
not trying to add lots of tests or other logic, just trying to get us
back to a better baseline. I'll follow up on the original commit to
figure out the right path forward.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193323
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 24 Oct 2013 09:37:18 +0000 (09:37 +0000)]
ARM: fix assert on unpredictable POP instruction.
POP instructions are aliased to the ARM LDM variants but have different syntax.
This caused two problems: we tried to access a non-existent operand to annotate
the '!', and the error message didn't make much sense.
With some vigorous hand-waving in the error message both problems can be
fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193322
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Thu, 24 Oct 2013 09:36:08 +0000 (09:36 +0000)]
Added test for -elf configuration, to see that _alloca call is properly
generated. See:
http://llvm.org/viewvc/llvm-project?view=revision&revision=193289
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193321
91177308-0d34-0410-b5e6-
96231b3b80d8
Job Noorman [Thu, 24 Oct 2013 09:32:31 +0000 (09:32 +0000)]
Make sure SP is always aligned on a 2 byte boundary
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193320
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Thu, 24 Oct 2013 09:17:24 +0000 (09:17 +0000)]
fix PR17635: false positive with packed structures
LLVM optimizers may widen accesses to packed structures that overflow the structure itself, but should be in bounds up to the alignment of the object
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193317
91177308-0d34-0410-b5e6-
96231b3b80d8
Amara Emerson [Thu, 24 Oct 2013 08:28:24 +0000 (08:28 +0000)]
[AArch64] Fix NZCV reg live-in bug in F128CSEL codegen.
When generating the IfTrue basic block during the F128CSEL pseudo-instruction
handling, the NZCV live-in for the newly created BB wasn't being added. This
caused a fault during MI-sched/live range calculation when the predecessor
for the fall-through BB didn't have a live-in for phys-reg as expected.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193316
91177308-0d34-0410-b5e6-
96231b3b80d8
Zonr Chang [Thu, 24 Oct 2013 08:17:39 +0000 (08:17 +0000)]
Include missing Compiler.h for using LLVM_ENUM_INT_TYPE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193315
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Thu, 24 Oct 2013 07:16:35 +0000 (07:16 +0000)]
AVX-512: added VCVTPH2PS, VCVTPS2PH with intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193312
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 24 Oct 2013 07:00:06 +0000 (07:00 +0000)]
Replace sse41/sse42 with sse4.1/sse4.2 in test command lines to fix bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193311
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 24 Oct 2013 06:50:17 +0000 (06:50 +0000)]
Add non-AVX tests for AES intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193310
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 24 Oct 2013 06:45:13 +0000 (06:45 +0000)]
Add tests for SSE intrinsics in non-avx mode by copying from the AVX test cases. Some of these may have been tested by other tests, but most weren't. Patch by Cameron McInally.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193309
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Thu, 24 Oct 2013 05:29:56 +0000 (05:29 +0000)]
Fix a bug in LinearFunctionTestReplace that created invalid loop exit checks.
Reviewed by Andy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193303
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuchen Wu [Thu, 24 Oct 2013 01:51:04 +0000 (01:51 +0000)]
Fixed llvm-cov to count edges instead of blocks.
This was a fundamental flaw in llvm-cov where it treated the values in
the GCDA files as block counts instead of edge counts. This created
incorrect line counts when branching was present. Instead, the edge
counts should be summed to obtain the correct block count.
The fix was tested using custom test files as well as single source
files from the test-suite directory. The behaviour can be verified by
reading the GCOV documentation that describes the GCDA spec ("ARC_COUNTS
gives the counter values for those arcs that are instrumented") and the
header description provided by GCOVProfiling.cpp ("instruments the code
that runs to records (sic) the edges between blocks that run and emit a
complementary "gcda" file on exit").
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193299
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Thu, 24 Oct 2013 00:43:38 +0000 (00:43 +0000)]
Clarify comments in genLoopLimit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193292
91177308-0d34-0410-b5e6-
96231b3b80d8