Commit Graph

180119 Commits

Author SHA1 Message Date
Joerg Sonnenberger c4ce42980e Add accessors for the PPC 403 bank registers.
llvm-svn: 214875
2014-08-05 15:45:15 +00:00
Benjamin Kramer a5d954b187 [clang-tidy] Simplify ast matcher.
Turns out there is a better way to do this. No functionality change.

llvm-svn: 214874
2014-08-05 15:33:46 +00:00
Jonathan Roelofs 2745d4f0a1 Fix a copy-pasta in r214573
llvm-svn: 214873
2014-08-05 15:31:16 +00:00
Renato Golin 877b9b3513 Add tests for cp10/cp11 on ARMv5/6
Tests for ARMv7/8 are already on diagnostics.s

llvm-svn: 214872
2014-08-05 15:29:41 +00:00
Keith Walker 1045717584 Specify that the thumb setend and blx <immed> instructions are not valid on an m-class target
llvm-svn: 214871
2014-08-05 15:11:59 +00:00
NAKAMURA Takumi 7c15dd79de ASTMatchers.h: Fix an annotation. [-Wdocumentation-html]
Angle brackets, aka &lt; &gt;, should be escaped.

llvm-svn: 214870
2014-08-05 15:01:31 +00:00
NAKAMURA Takumi 51d35107ff [CMake] clangCodeGen: Update libdeps to add clangLex for PPChainedCallbacks.
llvm-svn: 214869
2014-08-05 15:01:12 +00:00
Keith Walker 292aa3d5f7 Define stc2/stc2l/ldc2/ldc2l as thumb2 instructions
llvm-svn: 214868
2014-08-05 14:58:05 +00:00
Joerg Sonnenberger 936a4c8ceb Accessors for SSR2 and SSR3 on PPC 403.
llvm-svn: 214867
2014-08-05 14:53:05 +00:00
Tom Stellard 229d5e669b R600/SI: Update MUBUF assembly string to match AMD proprietary compiler
llvm-svn: 214866
2014-08-05 14:48:12 +00:00
Tom Stellard b37f797678 R600/SI: Avoid generating REGISTER_LOAD instructions.
SI doesn't use REGISTER_LOAD anymore, but it was still hitting this code
path for 8-bit and 16-bit private loads.

llvm-svn: 214865
2014-08-05 14:40:52 +00:00
Joerg Sonnenberger 412471271e Add dci/ici instructions for PPC 476 and friends.
llvm-svn: 214864
2014-08-05 14:40:32 +00:00
Joerg Sonnenberger 048284e1b6 Add mftblo and mftbhi for PPC 4xx.
llvm-svn: 214863
2014-08-05 14:18:16 +00:00
Joerg Sonnenberger 9dedceb71d Add lswi / stswi for assembler use with a warning to not add patterns
for them.

llvm-svn: 214862
2014-08-05 13:34:01 +00:00
Timur Iskhodzhanov 0575694729 [ASan/Win] Handle SEH exceptions even with -GS
This is a follow-up to r213654, r213656, r213667 and r213668.

llvm-svn: 214861
2014-08-05 13:26:26 +00:00
Yi Kong e56de69500 AArch64: Add support for instruction prefetch intrinsic
Instruction prefetch is not implemented for AArch64, it is incorrectly
translated into data prefetch instruction.

Differential Revision: http://reviews.llvm.org/D4777

llvm-svn: 214860
2014-08-05 12:46:47 +00:00
James Molloy 2b8933c354 Teach the SLP Vectorizer that keeping some values live over a callsite can have a cost.
Some types, such as 128-bit vector types on AArch64, don't have any callee-saved registers. So if a value needs to stay live over a callsite, it must be spilled and refilled. This cost is now taken into account.

llvm-svn: 214859
2014-08-05 12:30:34 +00:00
Daniel Jasper ca4ea1ce59 clang-format: Add option to always break after a function's return type.
This is required for GNU coding style, among others.

Also update the configuration documentation.

Modified from an original patch by Jarkko Hietaniemi, thank you!

llvm-svn: 214858
2014-08-05 12:16:31 +00:00
Daniel Jasper d9670878d4 clang-format: Break before 'else' in Stroustrup style.
Seems to be the desired thing to do according to:
  http://www.stroustrup.com/Programming/PPP-style-rev3.pdf

Patch by Jarkko Hietaniemi, thank you!

llvm-svn: 214857
2014-08-05 12:06:20 +00:00
Aaron Ballman 202f3c5346 Updating the documentation comment to list another parameter. No functional changes.
llvm-svn: 214856
2014-08-05 11:48:21 +00:00
Alexander Kornienko c3f7bcbd48 The test doesn't export ASAN_OPTIONS, so $ASAN_OPTIONS should not be used in RUN lines.
llvm-svn: 214855
2014-08-05 11:12:23 +00:00
Tim Northover 00853e5b6a MachO: set sizeof result type to what embedded headers expect.
Embedded systems seem to have inherited Darwin's choise of "unsigned long" for
size_t (via a bunch of headers), so we should respect that.

rdar://problem/17872787

llvm-svn: 214854
2014-08-05 11:07:26 +00:00
Chandler Carruth 183771bd8e [x86] Reformat some code I moved around in a prior commit but left
poorly formatted. Sorry about that.

llvm-svn: 214853
2014-08-05 10:35:30 +00:00
Manuel Klimek d52a3b8897 Adds AST matchers for matching CUDA declarations.
Patch by Jacques Pienaar.

llvm-svn: 214852
2014-08-05 09:45:53 +00:00
Joerg Sonnenberger 6b41a9900a Allow binary and for tblgen math.
llvm-svn: 214851
2014-08-05 09:43:25 +00:00
Jim Cownie 3b81ce6b15 After three iterations of community review, we believe that this new
CMAKE buld system should meet everyone's requirements.

Enhanced CMake Build System Commit 

* Supports Linux, Mac, Windows, and Intel® Xeon Phi builds
* Supports building with gcc, icc, clang, and Visual Studio compilers
* Supports bulding "fat" libraries on OS/X with clang
* Details and documentation on how to use build system 
  are in Build_With_CMake.txt
* To use the old CMake build system (corresponds to 
  CMakeLists.txt.old), just rename CMakeLists.txt to
  CMakeLists.txt.other and rename CMakeLists.txt.old to
  CMakeLists.txt

llvm-svn: 214850
2014-08-05 09:32:28 +00:00
Chandler Carruth 947cef191d [x86] Fix a crash and wrong-code bug in the new vector lowering all
found by a single test reduced out of a failure on llvm-stress.

The start of the problem (and the crash) came when we tried to use
a find of a non-used slot in the move-to half of the move-mask as the
target for two bad-half inputs. While if lucky this will be the first of
a pair of slots which we can place the bad-half inputs into, it isn't
actually guaranteed. This really isn't surprising, not sure what I was
thinking. The correct way to find the two unused slots is to look for
one of the *used* slots. We know it isn't that pair, and we can use some
modular arithmetic to find the other pair by masking off the odd bit and
adding 2 modulo 4. With this, we reliably found a viable pair of slots
for the bad-half inputs.

Sadly, that wasn't enough. We also had a wrong code bug that surfaced
when I reduced the test case for this where we would use the same slot
twice for the two bad inputs. This is because both of the bad inputs
could be in odd slots originally and thus the mod-2 mapping would
actually be the same. The whole point of the weird indexing into the
pair of empty slots was to try to leverage when the end result needed
the two bad-half inputs to be paired in a dword and pre-pair them in the
correct orrientation. This is less important with the powerful combining
we're now doing, and also easier and more reliable to achieve be noting
that we add the bad-half inputs in order. Thus, if they are in a dword
pair, the low part of that will be the first input in the sequence.
Always putting that in the low element will just do the right thing in
addition to computing the correct result.

Test case added. =]

llvm-svn: 214849
2014-08-05 08:19:21 +00:00
Juergen Ributzka 9503327756 [FastIsel][AArch64] Fix previous commit r214844 (Don't perform sign-/zero-extension for function arguments that have already been sign-/zero-extended.)
The original code would fail for unsupported value types like i1, i8, and i16.
This fix changes the code to only create a sub-register copy for i64 value types
and all other types (i1/i8/i16/i32) just use the source register without any
modifications.

getRegClassFor() is now guarded by the i64 value type check, that guarantees
that we always request a register for a valid value type.

llvm-svn: 214848
2014-08-05 07:31:30 +00:00
David Majnemer bbe649c250 MS ABI: Make the alias template mangling more correct
llvm-svn: 214847
2014-08-05 06:42:40 +00:00
Juergen Ributzka a126d1ef3c [FastISel][AArch64] Implement the FastLowerArguments hook.
This implements basic argument lowering for AArch64 in FastISel. It only
handles a small subset of the C calling convention. It supports simple
arguments that can be passed in GPR and FPR registers.

This should cover most of the trivial cases without falling back to
SelectionDAG.

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

llvm-svn: 214846
2014-08-05 05:43:48 +00:00
Kevin Qin ec100526e3 Revert "r214832 - MachineCombiner Pass for selecting faster instruction"
It broke compiling of most Benchmark and internal test, as clang got
clashed by segmentation fault or assertion.

llvm-svn: 214845
2014-08-05 05:43:47 +00:00
Juergen Ributzka 51f5326e25 [FastISel][AArch64] Don't perform sign-/zero-extension for function arguments that have already been sign-/zero-extended.
llvm-svn: 214844
2014-08-05 05:43:44 +00:00
Juergen Ributzka 384c3b5c03 Provide convenient access to the zext/sext attributes of function arguments. NFC.
llvm-svn: 214843
2014-08-05 05:43:41 +00:00
Eric Christopher fc6de428c8 Have MachineFunction cache a pointer to the subtarget to make lookups
shorter/easier and have the DAG use that to do the same lookup. This
can be used in the future for TargetMachine based caching lookups from
the MachineFunction easily.

Update the MIPS subtarget switching machinery to update this pointer
at the same time it runs.

llvm-svn: 214838
2014-08-05 02:39:49 +00:00
Jim Ingham 5beccb22bc If you found a step through plan stop looking up the stack for a step out plan.
llvm-svn: 214837
2014-08-05 01:59:20 +00:00
Jim Ingham cca8995ab2 Add some useful logging to the step log.
llvm-svn: 214836
2014-08-05 01:58:14 +00:00
Rui Ueyama 83095b5e8f [PECOFF] addDeadStripRoot is not thread-safe.
llvm-svn: 214835
2014-08-05 01:44:43 +00:00
Marshall Clow 28d65da618 dit pointed out on IRC that '__i = _VSTD::next(__i)' was a very long-winded way of writing '++__i'. Since I hate being thought of as long-winded (this checkin comment notwithstanding), I fixed it. No functionality change.
llvm-svn: 214834
2014-08-05 01:34:12 +00:00
Alexey Samsonov ff24fd2516 [UBSan] Allow to suppress reports from vptr checker for specified types.
Based on http://reviews.llvm.org/D4702 by Byoungyoung Lee!

llvm-svn: 214833
2014-08-05 01:24:22 +00:00
Gerolf Hoflehner 4dbf44b9d8 MachineCombiner Pass for selecting faster instruction
sequence on AArch64

Re-commit of r214669 without changes to test cases
LLVM::CodeGen/AArch64/arm64-neon-mul-div.ll and
LLVM:: CodeGen/AArch64/dp-3source.ll
This resolves the reported compfails of the original commit.

llvm-svn: 214832
2014-08-05 01:16:13 +00:00
Alexey Samsonov ae1764854e [Sanitizer] Turn SuppressionContext::Init() into InitIfNecessary().
Suppression context might be used in multiple sanitizers working
simultaneously (e.g. LSan and UBSan) and not knowing about each other.

llvm-svn: 214831
2014-08-05 00:43:23 +00:00
Hans Wennborg 02dc000331 ReleaseNotes: add blurb about Windows support
llvm-svn: 214830
2014-08-05 00:21:23 +00:00
David Majnemer 21870f3e87 CodeGenObjCXX: Add a test for r214699
I forgot to add this with the changes for r214699.

llvm-svn: 214829
2014-08-05 00:01:15 +00:00
David Majnemer c017d3613e MS ABI: Aligned tentative definitions don't have CommonLinkage
int __declspec(align(16)) foo; is a tentative definition but the storage
for that variable should not have CommonLinkage.

llvm-svn: 214828
2014-08-05 00:01:13 +00:00
Joerg Sonnenberger 755ffa9b54 Add TCR register access
llvm-svn: 214826
2014-08-04 23:53:42 +00:00
Joerg Sonnenberger 5995e0021d Add PPC 603's tlbld and tlbli instructions.
llvm-svn: 214825
2014-08-04 23:49:45 +00:00
Rui Ueyama 145ef0186c [PECOFF] Fix /include option in .drectve section.
/INCLUDE arguments passed as command line options are handled in the
same way as Unix -u. All option values are converted to an undefined
symbol and added to a dummy input file, so that the specified symbols
are resolved.

One tricky thing on Windows is that the option is also allowed to
appear in the object file's directive section. At the time when
it's being read, all (regular) command line options have already
been processed. We cannot add undefined atoms to the dummy file
anymore.

Previously, we added such /INCLUDE to a set that has already been
processed. As a result the options were ignored.

This patch fixes the issue. Now, /INCLUDE symbols in the directive
section are handled as real undefined symbol in the COFF file.
We create an undefined symbol for each /INCLUDE argument and add
it to the file being parsed.

llvm-svn: 214824
2014-08-04 23:48:57 +00:00
Zachary Turner f490bec4a1 Teach ProcessWindows plugin to support stdio i/o redirection.
llvm-svn: 214816
2014-08-04 23:31:21 +00:00
Renato Golin bc0b0378c5 Allow CP10/CP11 operations on ARMv5/v6
Those registers are VFP/NEON and vector instructions should be used instead,
but old cores rely on those co-processors to enable VFP unwinding. This change
was prompted by the libc++abi's unwinding routine and is also present in many
legacy low-level bare-metal code that we ought to compile/assemble.

Fixing bug PR20025 and allowing PR20529 to proceed with a fix in libc++abi.

llvm-svn: 214802
2014-08-04 23:21:56 +00:00
Bill Schmidt ccbe0a8022 [PPC64LE] Fix wrong IR for vec_sld and vec_vsldoi
My original LE implementation of the vsldoi instruction, with its
altivec.h interfaces vec_sld and vec_vsldoi, produces incorrect
shufflevector operations in the LLVM IR.  Correct code is generated
because the back end handles the incorrect shufflevector in a
consistent manner.

This patch and a companion patch for LLVM correct this problem by
removing the fixup from altivec.h and the corresponding fixup from the
PowerPC back end.  Several test cases are also modified to reflect the
now-correct LLVM IR.

The vec_sums and vec_vsumsws interfaces in altivec.h are also fixed,
because they used vec_perm calls intended to be recognized as vsldoi
instructions.  These vec_perm calls are now replaced with code that
more clearly shows the intent of the transformation.

llvm-svn: 214801
2014-08-04 23:21:26 +00:00