Alexander Potapenko [Wed, 25 Dec 2013 14:22:15 +0000 (14:22 +0000)]
[ASan] Make sure none of the __asan_gen_ global strings end up in the symbol table, add a test.
This should fix http://llvm.org/bugs/show_bug.cgi?id=17976
Another test checking for the global variables' locations and prefixes on Darwin will be committed separately.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198017
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Wed, 25 Dec 2013 11:40:51 +0000 (11:40 +0000)]
AVX-512: decoder for AVX-512, made by Alexey Bader.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198013
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 25 Dec 2013 10:50:11 +0000 (10:50 +0000)]
unittests/Support/ProcessTest.cpp: Don't use "windows.h". Use <windows.h> instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198011
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Wed, 25 Dec 2013 10:14:07 +0000 (10:14 +0000)]
Support for microMIPS load effective address.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198010
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Wed, 25 Dec 2013 10:09:27 +0000 (10:09 +0000)]
Support for microMIPS FPU instructions 2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198009
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Wed, 25 Dec 2013 10:06:40 +0000 (10:06 +0000)]
AVX-512: Result type of scalar SETCC is MVT::i1 for AVX-512.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198008
91177308-0d34-0410-b5e6-
96231b3b80d8
Hao Liu [Wed, 25 Dec 2013 07:12:34 +0000 (07:12 +0000)]
[AArch64]Fix a problem that the register order of fmls/fmla by element is incorrect.
E.g. the codegen result is
fmls v1.2s, v0.2s, v2.s[3]
which is expected to be
fmls v0.2s, v1.2s, v2.s[3]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198001
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 25 Dec 2013 02:24:38 +0000 (02:24 +0000)]
gold-plugin.cpp: Use form of <plugin-api.h>, since it is external header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197997
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 25 Dec 2013 02:24:32 +0000 (02:24 +0000)]
llvm-config: Fix typo in help message introduced with r197664.
Thanks, Vinson Lee!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197996
91177308-0d34-0410-b5e6-
96231b3b80d8
Jiangning Liu [Wed, 25 Dec 2013 01:22:51 +0000 (01:22 +0000)]
Add missing pattern matches to support ACLE intrinsics of AArch64 NEON.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197993
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Wed, 25 Dec 2013 01:15:36 +0000 (01:15 +0000)]
Fix the MSVC 2010 build
C++11-style forward declared enums weren't supported until MSVC 2012.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197992
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Tue, 24 Dec 2013 19:58:49 +0000 (19:58 +0000)]
Remove link to unexisting llvm-prof docs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197989
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Tue, 24 Dec 2013 19:33:22 +0000 (19:33 +0000)]
llvm-symbolizer: add --obj flag to specify a single object file that should be symbolized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197988
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Tue, 24 Dec 2013 15:22:39 +0000 (15:22 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197986
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Tue, 24 Dec 2013 15:18:04 +0000 (15:18 +0000)]
[SystemZ] Use interlocked-access 1 instructions for CodeGen
...namely LOAD AND ADD, LOAD AND AND, LOAD AND OR and LOAD AND EXCLUSIVE OR.
LOAD AND ADD LOGICAL isn't really separately useful for LLVM.
I'll look at adding reusing the CC results in new year.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197985
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Tue, 24 Dec 2013 15:14:05 +0000 (15:14 +0000)]
[SystemZ] Add MC support for interlocked-access 1 instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197984
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Tue, 24 Dec 2013 14:24:07 +0000 (14:24 +0000)]
AVX-512: fixed some patterns for MVT::i1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197981
91177308-0d34-0410-b5e6-
96231b3b80d8
Hao Liu [Tue, 24 Dec 2013 09:00:21 +0000 (09:00 +0000)]
[AArch64]Add patterns to match normal shift nodes: shl, sra and srl.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197969
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Qin [Tue, 24 Dec 2013 08:16:06 +0000 (08:16 +0000)]
[AArch64 NEON] Fix a bug when lowering BUILD_VECTOR.
DAG.getVectorShuffle() doesn't always return a vector_shuffle node.
If mask is the exact sequence of it's operand(For example, operand_0
is v8i8, and the mask is 0, 1, 2, 3, 4, 5, 6, 7), it will directly
return that operand. So a check is added here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197967
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Qin [Tue, 24 Dec 2013 08:11:47 +0000 (08:11 +0000)]
[AArch64 NEON] Fix a pattern match failure with NEON_VDUP.
This failure caused by improper condition when lowering shuffle_vector
to scalar_to_vector. After this patch NEON_VDUP with v1i64 will not
be generated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197966
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 24 Dec 2013 02:57:25 +0000 (02:57 +0000)]
LangRef documentation for the stackmap and patchpoint intrinsics.
These still have "experimental" status, meaning we don't guarantee
backward compatibility. However, they are already actively used by the
open source WebKit project, and have started to be adopted by other
projects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197930
91177308-0d34-0410-b5e6-
96231b3b80d8
Ana Pazos [Tue, 24 Dec 2013 00:47:29 +0000 (00:47 +0000)]
[AArch64] Check fmul node single use in fused multiply patterns
Check for single use of fmul node in fused multiply patterns
to allow generation of fused multiply add/sub instructions.
Otherwise fmul operation ends up being repeated more than
once which does not help peformance on targets with
only one MAC unit, as for example cortex-a53.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197929
91177308-0d34-0410-b5e6-
96231b3b80d8
Ana Pazos [Tue, 24 Dec 2013 00:40:10 +0000 (00:40 +0000)]
[AArch64 NEON] Fixed fused multiply negate add/sub patterns
The correct pattern matching should be:
- fnmadd is (-Ra) + (-Rn)*Rm which should be matched as:
fma (fneg node:$Rn), node:$Rm, (fneg node:$Ra) and as
(f32 (fsub (f32 (fneg FPR32:$Ra)), (f32 (fmul FPR32:$Rn, FPR32:$Rm))))
- fnmsub is (-Ra) + Rn*Rm which should be matched as
fma node:$Rn, node:$Rm, (fneg node:$Ra) and as
(f32 (fsub (f32 (fmul FPR32:$Rn, FPR32:$Rm)), FPR32:$Ra))))
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197928
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Mon, 23 Dec 2013 23:50:20 +0000 (23:50 +0000)]
Debug info: Add enumerators to the __apple_names accelerator table.
rdar://problem/
11516681.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197927
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Mon, 23 Dec 2013 23:31:49 +0000 (23:31 +0000)]
Add support to indvars for optimizing sadd.with.overflow.
Split sadd.with.overflow into add + sadd.with.overflow to allow
analysis and optimization. This should ideally be done after
InstCombine, which can perform code motion (eventually indvars should
run after all canonical instcombines). We want ISEL to recombine the
add and the check, at least on x86.
This is currently under an option for reducing live induction
variables: -liv-reduce. The next step is reducing liveness of IVs that
are live out of the overflow check paths. Once the related
optimizations are fully developed, reviewed and tested, I do expect
this to become default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197926
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Mon, 23 Dec 2013 22:24:47 +0000 (22:24 +0000)]
Debug info: On ARM ensure that the data sections come before the
(optional) DWARF sections, so compiling with -g does not result in
different code being generated.
rdar://problem/
15623193
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197922
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Mon, 23 Dec 2013 17:23:58 +0000 (17:23 +0000)]
ARM: bkpt has an implicit immediate constant 0
The bkpt mnemonic has an implicit immediate constant of 0 unless otherwise
specified. Add an instruction alias for the unvalued breakpoint mnemonic to
treat it as a 0. This improves compatibility with GNU AS.
Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197913
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Mon, 23 Dec 2013 14:51:56 +0000 (14:51 +0000)]
Fix Scalarizer insertion point when replacing PHIs with insertelements
If the Scalarizer scalarized a vector PHI but could not scalarize
all uses of it, it would insert a series of insertelements to reconstruct
the vector PHI value from the scalar ones. The problem was that it would
emit these insertelements immediately after the PHI, even if there were
other PHIs after it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197909
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Mon, 23 Dec 2013 14:45:00 +0000 (14:45 +0000)]
Fix Scalarizer handling of vector GEPs with multiple index operands
The old code only worked for one index operand. Also handle "inbounds".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197908
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Mon, 23 Dec 2013 14:15:08 +0000 (14:15 +0000)]
[asan] don't unpoison redzones on function exit in use-after-return mode.
Summary:
Before this change the instrumented code before Ret instructions looked like:
<Unpoison Frame Redzones>
if (Frame != OriginalFrame) // I.e. Frame is fake
<Poison Complete Frame>
Now the instrumented code looks like:
if (Frame != OriginalFrame) // I.e. Frame is fake
<Poison Complete Frame>
else
<Unpoison Frame Redzones>
Reviewers: eugenis
Reviewed By: eugenis
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2458
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197907
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Mon, 23 Dec 2013 09:24:36 +0000 (09:24 +0000)]
[asan] produce fewer stores when poisoning stack shadow
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197904
91177308-0d34-0410-b5e6-
96231b3b80d8
Hao Liu [Mon, 23 Dec 2013 02:42:10 +0000 (02:42 +0000)]
[AArch64]The compare to zero intrinsics should be implemented by 'icmp/fcmp' and 'sext' not 'zext'. Modify the test cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197897
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Sun, 22 Dec 2013 22:19:49 +0000 (22:19 +0000)]
Define LLVM_HAS_STRONG_ENUMS
This is needed to guard an upcoming feature in clang until the C++11 transition
is complete, at which point it can be removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197895
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Sun, 22 Dec 2013 12:04:23 +0000 (12:04 +0000)]
The count() function for STL datatypes returns unsigned, even
where it's only bool-like 1/0 result like std::set.count().
Some of the LLVM ADT already return unsigned count(), while
others return bool count().
This patch modifies SmallPtrSet, SmallSet, SparseSet count()
to return unsigned instead of bool:
1 instead of true
0 instead of false
More ADT to follow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197879
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Sun, 22 Dec 2013 10:45:37 +0000 (10:45 +0000)]
Use r2 when encoding tls on ppc32. Fixes PR18305.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197878
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 22 Dec 2013 10:23:23 +0000 (10:23 +0000)]
Dwarf: Fix a copy-paste bug.
This tag isn't emitted by any compiler at the moment. PR18306.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197877
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Sun, 22 Dec 2013 10:13:18 +0000 (10:13 +0000)]
AVX512: SETCC returns i1 for AVX-512 and i8 for all others
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197876
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Sun, 22 Dec 2013 09:48:38 +0000 (09:48 +0000)]
Add some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197875
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Sun, 22 Dec 2013 07:51:53 +0000 (07:51 +0000)]
Ensure bitcode encoding of calling conventions stays stable. Patch by Boaz Ouriel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197873
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Sun, 22 Dec 2013 03:43:58 +0000 (03:43 +0000)]
FileCheckize r197869
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197872
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Sat, 21 Dec 2013 19:11:31 +0000 (19:11 +0000)]
Relax tab check into a whitespace check to fix the test in r197869
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197870
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Sat, 21 Dec 2013 18:51:00 +0000 (18:51 +0000)]
TableGen: Generate valid identifiers for anonymous records
Backends like OptParserEmitter assume that record names can be used as valid
identifiers.
The period '.' in generated anonymous names broke that assumption, causing a
build-time error and in practice forcing all records to be named.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197869
91177308-0d34-0410-b5e6-
96231b3b80d8
Mark Lacey [Sat, 21 Dec 2013 00:00:49 +0000 (00:00 +0000)]
Fix typo in assert message: s/load/store
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197846
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuchen Wu [Fri, 20 Dec 2013 22:11:11 +0000 (22:11 +0000)]
BlockFrequencyInfo: Readded getEntryFreq.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197839
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 20 Dec 2013 20:27:51 +0000 (20:27 +0000)]
ARM AnalyzeBranch should ignore DEBUG_VALUES while analyzing terminators.
Found by inspection by Julien Lerouge. Thanks Julian!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197833
91177308-0d34-0410-b5e6-
96231b3b80d8
Timur Iskhodzhanov [Fri, 20 Dec 2013 20:16:51 +0000 (20:16 +0000)]
clang-format a couple of mis-formatted functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197831
91177308-0d34-0410-b5e6-
96231b3b80d8
Timur Iskhodzhanov [Fri, 20 Dec 2013 19:06:50 +0000 (19:06 +0000)]
Add the .secidx test I've forgotten to svn add in 197826
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197828
91177308-0d34-0410-b5e6-
96231b3b80d8
Timur Iskhodzhanov [Fri, 20 Dec 2013 18:15:00 +0000 (18:15 +0000)]
[COFF] Add support for the .secidx directive
Reviewed at http://llvm-reviews.chandlerc.com/D2445
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197826
91177308-0d34-0410-b5e6-
96231b3b80d8
Artyom Skrobov [Fri, 20 Dec 2013 18:13:12 +0000 (18:13 +0000)]
Resinstate the command line taking priority over CMakeLists in setting CMAKE_INSTALL_RPATH
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197825
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Fri, 20 Dec 2013 18:08:54 +0000 (18:08 +0000)]
Implement initial-exec TLS for PPC32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197824
91177308-0d34-0410-b5e6-
96231b3b80d8
Timur Iskhodzhanov [Fri, 20 Dec 2013 17:52:31 +0000 (17:52 +0000)]
Fix yet another typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197821
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 20 Dec 2013 17:35:52 +0000 (17:35 +0000)]
llvm-config: Show OBJROOT rather than OBJROOT/BUILD_MODE in MakefileStyle.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197818
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 20 Dec 2013 17:35:46 +0000 (17:35 +0000)]
llvm-config: Use build_mode instead of LLVM_BUILDMODE. It should be equivalent in MakefileStyle.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197817
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Fri, 20 Dec 2013 15:44:08 +0000 (15:44 +0000)]
Support for microMIPS FPU instructions 1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197815
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 20 Dec 2013 15:21:32 +0000 (15:21 +0000)]
Make this array const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197814
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Fri, 20 Dec 2013 11:56:02 +0000 (11:56 +0000)]
[SystemZ] Optimize comparisons with truncated extended loads
If the extension of a loaded value is compared against zero and used in
other arithmetic, InstCombine will change the comparison to use the
unextended load. It's also possible that the comparison could be against
the unextended load from the outset.
In DAG form this becomes a truncation of an extending load. We want to
strip the truncation if possible so that we can use load-and-test instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197804
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Fri, 20 Dec 2013 11:49:48 +0000 (11:49 +0000)]
[SystemZ] Extend RISBG optimization
The handling of ANY_EXTEND and ZERO_EXTEND was too strict. In this context
we can treat ZERO_EXTEND in much the same way as an AND and then also handle
outermost ZERO_EXTENDs.
I couldn't find a test that benefited from the ANY_EXTEND change, but it's
more obvious to write it this way once SIGN_EXTEND and ZERO_EXTEND are
handled differently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197802
91177308-0d34-0410-b5e6-
96231b3b80d8
Timur Iskhodzhanov [Fri, 20 Dec 2013 10:32:12 +0000 (10:32 +0000)]
Fix a typo in the docs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197798
91177308-0d34-0410-b5e6-
96231b3b80d8
Kai Nacke [Fri, 20 Dec 2013 09:24:13 +0000 (09:24 +0000)]
Add support for krait cpu in llvm::sys::getHostCPUName()
Recently, support for krait cpu was added. This commit extends getHostCPUName()
to return krait as cpu for the APQ8064 (a Krait 300).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197792
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Fri, 20 Dec 2013 08:21:30 +0000 (08:21 +0000)]
Transforms: Don't create bad weights when eliminating dead cases
If we happen to eliminate every case in a switch that has branch
weights, we currently try to create metadata for the one remaining
branch, triggering an assert. Instead, we need to check that the
metadata we're trying to create is sensible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197791
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Fri, 20 Dec 2013 08:21:27 +0000 (08:21 +0000)]
test: Make a branchweight test more specific
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197790
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Fri, 20 Dec 2013 08:21:24 +0000 (08:21 +0000)]
test: Prefer CHECK-LABEL to CHECK in branchweight tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197789
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Fri, 20 Dec 2013 07:21:16 +0000 (07:21 +0000)]
ARM IAS: add support for the .pool directive
The .pool directive is an alias for the .ltorg directive used to create a
literal pool. Simply treat .pool as if .ltorg was passed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197787
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 20 Dec 2013 06:25:37 +0000 (06:25 +0000)]
Install three utils, "FileCheck", "count", and "not", for now to appease llvmlab dragonegg builder.
Since r197684, "install/bin/llvm-config --obj-root" hasn't shown the build tree. The builder was finding utils in the build tree, from the installed tree.
I will revert this after dragonegg builder would be tweaked not to use installed llvm-config.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197786
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 20 Dec 2013 05:11:55 +0000 (05:11 +0000)]
R600: Allow ftrunc
v2: Add ftrunc->TRUNC pattern instead of replacing int_AMDGPU_trunc
v3: move ftrunc pattern next to TRUNC definition, it's available since R600
Patch By: Jan Vesely
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197783
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 20 Dec 2013 04:40:28 +0000 (04:40 +0000)]
Remove extra check line that's failing on windows and not necessary at
the moment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197782
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 20 Dec 2013 04:34:50 +0000 (04:34 +0000)]
This test requires object emission.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197781
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 20 Dec 2013 04:34:22 +0000 (04:34 +0000)]
Ranges in the .debug_range section need to have begin and end labels,
assert that this is so.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197780
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 20 Dec 2013 04:20:23 +0000 (04:20 +0000)]
Makefile.unittest: cleanup may fail. Add '-' in the action.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197777
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 20 Dec 2013 04:16:18 +0000 (04:16 +0000)]
Add support for a CU to output a set of ranges for the CU. This is useful
when you want to have the full list of addresses for a particular CU or
when you have multiple modules linked together and can't depend upon the
ordering of a single CU for begin/end ranges.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197776
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Fri, 20 Dec 2013 03:11:07 +0000 (03:11 +0000)]
Remove the AnyPointerSize and AnyEndianness enumerators, which were left from
LLVM's early days. Today LLVM IR is always target-specific.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197772
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Fri, 20 Dec 2013 02:54:35 +0000 (02:54 +0000)]
When parsing data layout string looking for endianness, use the correct default
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197771
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Fri, 20 Dec 2013 02:46:23 +0000 (02:46 +0000)]
Correctly apply the default pointer size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197770
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 20 Dec 2013 02:04:49 +0000 (02:04 +0000)]
[x86] Rename In32BitMode predicate to Not64BitMode
That's what it actually means, and with 16-bit support it's going to be
a little more relevant since in a few corner cases we may actually want
to distinguish between 16-bit and 32-bit mode (for example the bare 'push'
aliases to pushw/pushl etc.)
Patch by David Woodhouse
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197768
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 20 Dec 2013 00:37:18 +0000 (00:37 +0000)]
move test back into the parent directory and add a REQUIRES: obj emission.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197759
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 20 Dec 2013 00:36:59 +0000 (00:36 +0000)]
Makefile.ocaml: Tweak to use --system-libs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197758
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Fri, 20 Dec 2013 00:33:39 +0000 (00:33 +0000)]
Fix documentation typos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197757
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 19 Dec 2013 23:38:09 +0000 (23:38 +0000)]
Update the ML test to expect the new string format of getStringRepresentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197750
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Thu, 19 Dec 2013 23:16:14 +0000 (23:16 +0000)]
Un-revert: the buildbot failure in LLVM on lld-x86_64-win7 had me with
this commit as the only one on the Blamelist so I quickly reverted this.
However it was actually Nick's change who has since fixed that issue.
Original commit message:
Changed the X86 assembler for intel syntax to work with directional labels.
The X86 assembler as a separate code to parser the intel assembly syntax
in X86AsmParser::ParseIntelOperand(). This did not parse directional labels.
And if something like 1f was used as a branch target it would get an
"Unexpected token" error.
The fix starts in X86AsmParser::ParseIntelExpression() in the case for
AsmToken::Integer, it needs to grab the IntVal from the current token
then look for a 'b' or 'f' following an Integer. Then it basically needs to
do what is done in AsmParser::parsePrimaryExpr() for directional
labels. It saves the MCExpr it creates in the IntelExprStateMachine
in the Sym field.
When it returns to X86AsmParser::ParseIntelOperand() it looks
for a non-zero Sym field in the IntelExprStateMachine and if
set it creates a memory operand not an immediate operand
it would normally do for the Integer.
rdar://
14961158
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197744
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 19 Dec 2013 23:13:58 +0000 (23:13 +0000)]
Use $ORIGIN when setting rpath.
This matches what the configure build does.
Patch by Jan Vesely.
Fixes pr14189.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197743
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 19 Dec 2013 23:03:03 +0000 (23:03 +0000)]
Change getStringRepresentation to skip defaults.
I have a pending change for clang to use getStringRepresentation to check
that its DataLayout is in sync with llvm's.
getStringRepresentation is not called from llvm itself, so far it is mostly
a debugging aid, so the shorter strings are an independent improvement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197740
91177308-0d34-0410-b5e6-
96231b3b80d8
David Peixotto [Thu, 19 Dec 2013 22:41:56 +0000 (22:41 +0000)]
Ensure deterministic when printing ARM assembler constant pools
We dump any non-empty assembler constant pools after a successful
parse of an assembly file that uses the ldr pseudo opcode. These
per-section constant pools should be output in a deterministic order
to ensure that we always generate the same output when printing the
output with an AsmStreamer.
This patch changes the map data struture used to associate a section
with its constant pool to a MapVector to ensure deterministic
output. Because this map type does not support deletion, we now
check that the constant pool is not empty before dumping its entries
and clear the entries after emitting them with the streamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197735
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Thu, 19 Dec 2013 22:24:09 +0000 (22:24 +0000)]
Revert my change to the X86 assembler for intel syntax to work with
directional labels. Because it doesn't work for windows :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197731
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Thu, 19 Dec 2013 22:02:03 +0000 (22:02 +0000)]
Changed the X86 assembler for intel syntax to work with directional labels.
The X86 assembler has a separate code to parser the intel assembly syntax
in X86AsmParser::ParseIntelOperand(). This did not parse directional labels.
And if something like 1f was used as a branch target it would get an
"Unexpected token" error.
The fix starts in X86AsmParser::ParseIntelExpression() in the case for
AsmToken::Integer, it needs to grab the IntVal from the current token
then look for a 'b' or 'f' following the Integer. Then it basically needs to
do what is done in AsmParser::parsePrimaryExpr() for directional
labels. It saves the MCExpr it creates in the IntelExprStateMachine
in the Sym field.
When it returns to X86AsmParser::ParseIntelOperand() it looks
for a non-zero Sym field in the IntelExprStateMachine and if
set it creates a memory operand not an immediate operand
it would normally do for the Integer.
rdar://
14961158
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197728
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 19 Dec 2013 20:54:33 +0000 (20:54 +0000)]
Update the links to the SPARC information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197719
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 19 Dec 2013 20:32:44 +0000 (20:32 +0000)]
Make sys::ThreadLocal<> zero-initialized on non-thread builds (PR18205)
According to the docs, ThreadLocal<>::get() should return NULL
if no object has been set. This patch makes that the case also for non-thread
builds and adds a very basic unit test to check it.
(This was causing PR18205 because PrettyStackTraceHead didn't get zero-
initialized and we'd crash trying to read past the end of that list. We didn't
notice this so much on Linux since we'd crash after printing all the entries,
but on Mac we print into a SmallString, and would crash before printing that.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197718
91177308-0d34-0410-b5e6-
96231b3b80d8
Kay Tiong Khoo [Thu, 19 Dec 2013 18:35:54 +0000 (18:35 +0000)]
Stay classy (and legal) LLVM. Remove links to 3rd party SMT solver whose links may not be permanent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197713
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Thu, 19 Dec 2013 18:32:04 +0000 (18:32 +0000)]
[X86][fast-isel] Fix select lowering.
The condition in selects is supposed to be i1.
Make sure we are just reading the less significant bit
of the 8 bits width value to match this constraint.
<rdar://problem/
15651765>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197712
91177308-0d34-0410-b5e6-
96231b3b80d8
David Peixotto [Thu, 19 Dec 2013 18:26:07 +0000 (18:26 +0000)]
Implement the .ltorg directive for ARM assembly
This directive will write out the assembler-maintained constant
pool for the current section. These constant pools are created to
support the ldr-pseudo instruction (e.g. ldr r0, =val).
The directive can be used by the programmer to place the constant
pool in a location that can be reached by a pc-relative offset in
the ldr instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197711
91177308-0d34-0410-b5e6-
96231b3b80d8
Josh Magee [Thu, 19 Dec 2013 18:14:42 +0000 (18:14 +0000)]
Unbreak ARM buildbots after r197653 by forcing the target triple on this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197709
91177308-0d34-0410-b5e6-
96231b3b80d8
David Peixotto [Thu, 19 Dec 2013 18:12:36 +0000 (18:12 +0000)]
Implement the ldr-pseudo opcode for ARM assembly
The ldr-pseudo opcode is a convenience for loading 32-bit constants.
It is converted into a pc-relative load from a constant pool. For
example,
ldr r0, =0x10001
ldr r1, =bar
will generate this output in the final assembly
ldr r0, .Ltmp0
ldr r1, .Ltmp1
...
.Ltmp0: .long 0x10001
.Ltmp1: .long bar
Sketch of the LDR pseudo implementation:
Keep a map from Section => ConstantPool
When parsing ldr r0, =val
parse val as an MCExpr
get ConstantPool for current Section
Label = CreateTempSymbol()
remember val in ConstantPool at next free slot
add operand to ldr that is MCSymbolRef of Label
On finishParse() callback
Write out all non-empty constant pools
for each Entry in ConstantPool
Emit Entry.Label
Emit Entry.Value
Possible improvements to be added in a later patch:
1. Does not convert load of small constants to mov
(e.g. ldr r0, =0x1 => mov r0, 0x1)
2. Does reuse constant pool entries for same constant
The implementation was tested for ARM, Thumb1, and Thumb2 targets on
linux and darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197708
91177308-0d34-0410-b5e6-
96231b3b80d8
David Peixotto [Thu, 19 Dec 2013 18:08:08 +0000 (18:08 +0000)]
Add a finishParse() callback to the targer asm parser
This callback is invoked when the parse has finished successfuly. It
will be used to write out ARM constant pools to implement the ldr
pseudo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197706
91177308-0d34-0410-b5e6-
96231b3b80d8
Kay Tiong Khoo [Thu, 19 Dec 2013 18:07:17 +0000 (18:07 +0000)]
Improved fix for PR17827 (instcombine of shift/and/compare).
This change fixes the case of arithmetic shift right - do not attempt to fold that case.
This change also relaxes the conditions when attempting to fold the logical shift right and shift left cases.
No additional IR-level test cases included at this time. See http://llvm.org/bugs/show_bug.cgi?id=17827 for proofs that these are correct transformations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197705
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 19 Dec 2013 17:11:08 +0000 (17:11 +0000)]
Revert r197682, "[CMake] Introduce LIT in add_lit_target."
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197703
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Thu, 19 Dec 2013 17:09:05 +0000 (17:09 +0000)]
Move testcase to the appropriate X86 subdirectory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197701
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 19 Dec 2013 16:51:03 +0000 (16:51 +0000)]
Small simplification, p0 is the same as p.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197699
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Thu, 19 Dec 2013 16:25:00 +0000 (16:25 +0000)]
Support for microMIPS control instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197696
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 19 Dec 2013 16:23:59 +0000 (16:23 +0000)]
Long doubles are required to be aligned to 128 bits and svr4 32 bits.
Clang was already getting this right.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197694
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 19 Dec 2013 16:13:01 +0000 (16:13 +0000)]
Add a disassembler to the PowerPC backend
The tests for the disassembler were adapted from the encoder tests, and for the
most part, the output from the disassembler matches that encoder-test inputs.
There are some places where more-informative mnemonics could be produced
(notably for the branch instructions), and those cases are noted in the tests
with FIXMEs.
Future work includes:
- Generating more-informative mnemonics when possible (this may also be done
in the printer).
- Remove the dependence on positional "numbered" operand-to-variable mapping
(for both encoding and decoding).
- Internally using 64-bit instruction variants in 64-bit mode (if this turns
out to matter).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197693
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Thu, 19 Dec 2013 16:12:56 +0000 (16:12 +0000)]
Support for microMIPS LL and SC instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197692
91177308-0d34-0410-b5e6-
96231b3b80d8