Commit Graph

95733 Commits

Author SHA1 Message Date
Yi Jiang
89008539a3 In this patch we are trying to do two things:
1) If the width of vectorization list candidate is bigger than vector reg width, we will break it down to fit the vector reg.
2) We do not vectorize the width which is not power of two.

The performance result shows it will help some spec benchmarks. mesa improved 6.97% and ammp improved 1.54%. 

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189830 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-03 17:26:04 +00:00
Joerg Sonnenberger
6217187ff2 Print string value for DT_RPATH and DT_RUNPATH.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189829 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-03 17:13:53 +00:00
Joey Gouly
06ef1ed260 [MC] Revert part of my previous change, I was a bit overzealous.
A change to test the previous commit will be coming soon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189825 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-03 16:18:19 +00:00
Eric Christopher
27ed5716ef Migrate the DWARF_VERSION constant to 4. It largely needs to go away.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189824 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-03 16:11:13 +00:00
Richard Sandiford
8bce43648b [SystemZ] Add support for TMHH, TMHL, TMLH and TMLL
For now this just handles simple comparisons of an ANDed value with zero.
The CC value provides enough information to do any comparison for a
2-bit mask, and some nonzero comparisons with more populated masks,
but that's all future work.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189819 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-03 15:38:35 +00:00
Joey Gouly
f21c18db9f [MC] AvailableFeatures needs to be a uint64_t to match FeatureBits in MCSubtargetInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189815 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-03 15:03:36 +00:00
Evgeniy Stepanov
69086b2962 [msan] Fix handling of select with struct arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189796 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-03 13:05:29 +00:00
Evgeniy Stepanov
6a9b29ec9b [msan] Fix select instrumentation.
Select condition shadow was being ignored resulting in false negatives.
This change OR-s sign-extended condition shadow into the result shadow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189785 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-03 10:04:11 +00:00
Daniel Sanders
fdb6a38913 [mips][msa] Added IntrNoMem and removed Commutative from sub intrinsics.
This changes the SelectionDAG nodes from ISD::INTRINSIC_W_CHAIN to
ISD::INTRINSIC_WO_CHAIN which enables easy lowering to equivalent SelectionDAG
nodes (e.g. __builtin_msa_sub_w -> ISD::SUB) in future patches since nodes
such as ISD::SUB do not have a chain.
It also corrects an obvious mistake, namely that the subtract intrinsics were
marked as being commutative.

As per a similar change in r189106
(http://llvm.org/viewvc/llvm-project?rev=189106&view=rev) there isn’t a new
testcase in this patch since the existing tests should test the intrinsics to
the same standard and the best I can do for a testcase would be a fragile
pass/maybe test of whether memory operations can (and do) cross the intrinsic.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189784 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-03 09:45:20 +00:00
Daniel Sanders
8092b71001 [mips][msa] Added IntrNoMem to the floating-point intrinsics.
This changes the SelectionDAG nodes from ISD::INTRINSIC_W_CHAIN to
ISD::INTRINSIC_WO_CHAIN which enables easy lowering to equivalent SelectionDAG
nodes (e.g. __builtin_msa_fadd_w -> ISD::FADD) in future patches since nodes
such as ISD::FADD do not have a chain.

As per a similar change in r189106
(http://llvm.org/viewvc/llvm-project?rev=189106&view=rev) there isn’t a new
testcase in this patch since the existing tests should test the intrinsics to
the same standard and the best I can do for a testcase would be a fragile
pass/maybe test of whether memory operations can (and do) cross the intrinsic.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189782 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-03 09:35:20 +00:00
Venkatraman Govindaraju
75ddb2bb34 [Sparc] Add support for soft long double (fp128).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189780 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-03 04:11:59 +00:00
Craig Topper
4ccfbedaed Add hadSideEffects=0 to some instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189779 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-03 03:56:17 +00:00
Venkatraman Govindaraju
6ee0857bd7 [Sparc] Implement spill and load for long double(f128) registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189768 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-02 18:32:45 +00:00
Tilmann Scheller
195dd8a1ce ARM: Default to the Swift CPU when targeting armv7s/thumbv7s.
Test cases adjusted accordingly.

This fixes rdar://14871821.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189766 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-02 17:09:01 +00:00
Tilmann Scheller
5bed440eb1 Revert 189756 for now, it doesn't match what rdar://14871821 really wants.
What we really want is to enable Swift by default for *v7s triples (and there already seems to be some logic which attempts to do that). In that case the iOS version doesn't matter. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189763 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-02 15:48:17 +00:00
Tilmann Scheller
024e76b69b ARM: Default to Swift when compiling for iOS 6 or later.
Test cases adjusted accordingly.

This fixes rdar://14871821.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189756 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-02 12:01:58 +00:00
NAKAMURA Takumi
4629e0da6a FileCheck-ize three tests of llvm/test/CodeGen/X86/h-register(s).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189755 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-02 12:00:53 +00:00
NAKAMURA Takumi
b9edd20706 llvm/test/CodeGen/X86: Update tests with -mattr=-bmi not to take BMI, corresponding to Craig's r189742.
AMD Piledriver builder detected failures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189754 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-02 12:00:46 +00:00
Alexey Samsonov
b775f2f39c [CMake] Add -O1 in debug builds with LLVM_USE_SANITIZER
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189747 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-02 09:15:01 +00:00
Craig Topper
69c474ffa8 Create BEXTR instructions for (and ((sra or srl) x, imm), (2**size - 1)). Fixes PR17028.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189742 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-02 07:53:17 +00:00
Elena Demikhovsky
da0ce6eb8b AVX-512: updated the list of high-latency instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189740 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-02 07:41:01 +00:00
Chandler Carruth
5041558645 Add a clang-format file so that the tool can automatically detect the
correct style for the LLVM tree as well as projects checked out under
projects and tools.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189737 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-02 07:19:04 +00:00
Elena Demikhovsky
cafcc99857 AVX-512: gather-scatter tests; added foldable instructions;
Specify GATHER/SCATTER as heavy instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189736 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-02 07:12:29 +00:00
Elena Demikhovsky
4ca0ce2594 llvm interpreter: select, shuffle and insertelement instructions.
This patch implements vector support for  select instruction and adds specific vector instructions : shuffle and insertelement. (tests are also included)
and functions lle_X_memset, lle_X_memcpy added.

Done by Veselov, Yuri (mailto:Yuri.Veselov@intel.com)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189735 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-02 06:40:09 +00:00
Chandler Carruth
ca6ead9f3f Fix some rather confusing indentation and control flow in the errno
printing routine. This is made harder to see due to the surprising
formatting, inconsistent brace usage, and repeated conditions that all
test the same thing.

The only "consequence" of this bug is re-assigning 'str' to an empty
string when computing the error string for an error number of 0 in the
event of a non-GNU strerror_r routine. So, nothing to see here other
than cleanup. It did help me find PR17055 in clang-format though.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189734 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-02 05:55:10 +00:00
Dmitri Gribenko
bf2f2708e1 Added std:: qualifier to find() invocation
Iterator of std::vector may be implemented as a raw pointer. In
this case ADL does not find the find() function in the std namespace.
For example, this is the case with STDCXX implementation of vector.

Patch by Konstantin Tokarev.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189733 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-02 01:18:56 +00:00
Chandler Carruth
cdceda4bc6 Nuke the hilariously out of date suggestion to unpack llvm-gcc 4.2 as
part of getting started with LLVM.

The LLVM getting started document is in woeful need of attention. I may
get to some of this, but some random notes for folks interested:

1) We need to separate the getting started steps for folks who are
   interested in the core LLVM libs and nothing else, folks interested
   in a nifty C++ toolchain and nothing else, and folks interested in
   both.
2) We should include documentation for both release archives, svn, and
   git in equal portion, and we should document all of the various
   repositories of interest: llvm, clang, clang-tools-extra,
   compiler-rt, lld, libcxx, test-suite.
3) We should document the CMake build. We should probably document the
   CMake build first, and give a fall-back set of docs for the Makefile
   build for the use cases where that is still the preferred solution.
   This would more closely match the use cases that folks in the open
   source community are likely to have, and would remove a point of
   discrepancy between Linux, Windows, and Mac instructions.
4) Probably a ton of other modernization stuff that I've not thought of
   here.

Anyways, if anyone at all is interested, please help clean up this
document. It is much needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189732 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-01 23:42:27 +00:00
Chris Lattner
eecd9b1d52 Revert r189704, which removed the guidance about not duplicating doc comments.
This is under active discussion.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189730 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-01 15:48:08 +00:00
Elena Demikhovsky
6adcd58d3c AVX-512: Added GATHER and SCATTER instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189729 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-01 14:24:41 +00:00
Charles Davis
5510728d28 Move everything depending on Object/MachOFormat.h over to Support/MachO.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189728 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-01 04:28:48 +00:00
Reed Kotler
b83c66eb5e Make sure we don't generate stubs for any of these functions because they
don't exist in libc. This is really not the right way to solve this problem;
but it's not clear to me at this time exactly what is the right way.
If we create stubs here, they will cause link errors because these functions
do not exist in libc.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189727 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-01 04:12:59 +00:00
Benjamin Kramer
f53e9b4896 Mark an unreachable code path with llvm_unreachable. Pacifies GCC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189726 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-31 21:20:04 +00:00
Benjamin Kramer
4af4cbbced Free PressureDiffs instead of leaking.
Found by valgrind.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189725 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-31 20:10:01 +00:00
Benjamin Kramer
bc870037f6 SimplifyLibCalls: When emitting an overloaded fp function check that it's available.
The existing code missed some edge cases when e.g. we're going to emit sqrtf but
only the availability of sqrt was checked. This happens on odd platforms like
windows.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189724 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-31 18:19:35 +00:00
Andrew Trick
c94e7b50c3 Fix my previous checkin to updatePressureDiffs.
There was one case that we could hit a DebugValue where I didn't think
to check. DebugValues are evil. No checkinable test case, sorry. It's
an obvious fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189717 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-31 05:17:58 +00:00
Bill Schmidt
cda04f9a0a [PowerPC] Fast-isel cleanup patch.
Here are a few miscellaneous things to tidy up the PPC64 fast-isel
implementation.  I corrected a couple of commentary lapses, and added
documentation of future opportunities.  I also implemented
TargetMaterializeAlloca, which I somehow forgot when I split up the
original huge patch.

Finally, I decided to delete SelectCmp.  I hadn't previously hooked it
in to TargetSelectInstruction(), and when I did I realized it wasn't
serving any useful purpose.  This is only useful for compares that
don't feed a branch in the same block, and to handle that we would
have to have logic to interpret i1 as a condition register.  This
could probably be done, but would require Unseemly Hackery, and
honestly does not seem worth the hassle.

This ends the current patch series.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189715 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-31 02:33:40 +00:00
Bill Schmidt
9d2238cb0f [PowerPC] Add integer truncation support to fast-isel.
This is the last substantive patch I'm planning for fast-isel in the
near future, adding fast selection of integer truncates.  There are
certainly more things that can be improved (many of which are called
out in FIXMEs), but for now we are catching most of the important
cases.

I'll document some of the remaining work in a cleanup patch shortly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189706 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-30 23:31:33 +00:00
Bill Schmidt
9056dd45a4 Correct partially defined variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189705 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-30 23:25:30 +00:00
Chris Lattner
af069a8920 Remove the suggestion to not duplicate comments in header and
implementation files.  While doc generation systems don't need this,
humans do benefit from it.  Not everyone reads all code through doxygen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189704 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-30 23:06:20 +00:00
Bill Schmidt
11addd2a2f [PowerPC] Call support for fast-isel.
This patch adds fast-isel support for calls (but not intrinsic calls
or varargs calls).  It also removes a badly-formed assert.  There are
some new tests just for calls, and also for folding loads into
arguments on calls to avoid extra extends.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189701 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-30 22:18:55 +00:00
Richard Mitton
06f9db01ba Build fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189699 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-30 21:32:42 +00:00
Richard Mitton
d4b3168609 Fixed a bug where diassembling an instruction that had a prefix would cause LLVM to identify a 1-byte instruction, but then upon querying it for that 1-byte instruction would cause an undefined opcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189698 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-30 21:19:48 +00:00
Bill Wendling
86d49563a6 Compulsive reformatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189697 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-30 21:07:33 +00:00
Daniel Dunbar
e179b31bfc [conf] Add config variable to disable crash related overrides.
- We do some nasty things w.r.t. installing or overriding signal handlers in
   order to improve our crash recovery support or interaction with crash
   reporting software, and those things are not necessarily appropriate when
   LLVM is being linked into a client application that has its own ideas about
   how to do things. This gives those clients a way to disable that handling at
   build time.

 - Currently, the code this guards is all Apple specific, but other platforms
   might have the same concerns so I went for a more generic configure
   name. Someone who is more familiar with library embedding on Windows can
   handle choosing which of the Windows/Signals.inc behaviors might make sense
   to go under this flag.

 - This also fixes the proper autoconf'ing of ENABLE_BACKTRACES. The code
   expects it to be undefined when disabled, but the autoconf check was just
   defining it to 0.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189694 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-30 20:39:21 +00:00
Reed Kotler
c673f9c6fe Fix a problem with dual mips16/mips32 mode. When the underlying processor
has hard float, when you compile the mips32 code you have to make sure
that it knows to compile any mips32 routines as hard float. I need to clean
up the way mips16 hard float is specified but I need to first think through
all the details. Mips16 always has a form of soft float, the difference being
whether the underlying hardware has floating point. So it's not really
necessary to pass the -soft-float to llvm since soft-float is always true
for mips16 by virtue of the fact that it will not register floating point
registers. By using this fact, I can simplify the way this is all handled.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189690 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-30 19:40:56 +00:00
Andrew Trick
846b31d74a Use LiveRangeQuery for instruction-level liveness queries.
Remove redundant or bug-prone LiveInterval APIs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189685 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-30 17:58:49 +00:00
Bill Schmidt
9bc94276e7 [PowerPC] Add handling for conversions to fast-isel.
Yet another chunk of fast-isel code.  This one handles various
conversions involving floating-point.  (It also includes some
miscellaneous handling throughout the back end for LWA_32 and LWAX_32
that should have been part of the load-store patch.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189677 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-30 15:18:11 +00:00
Andrey Churbanov
2cc396bfb0 Checking commit access; removed one space added in previous test checkin by Jim
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189673 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-30 14:40:24 +00:00
Benjamin Kramer
a8517ee732 InstCombine: Check for zero shift amounts before subtracting one causing integer overflow.
PR17026. Also avoid undefined shifts and shift amounts larger than 64 bits
(those are always undef because we can't represent integer types that large).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189672 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-30 14:35:35 +00:00
Benjamin Kramer
d7a178eee3 X86: Add a description of the Intel Atom Silvermont CPU.
Currently this is just the atom model with SSE4.2 enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189669 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-30 14:05:32 +00:00