Commit Graph

98849 Commits

Author SHA1 Message Date
Adrian Prantl
b8a316bfcb 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
2013-12-23 23:50:20 +00:00
Andrew Trick
c7b0b7dc8f 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
2013-12-23 23:31:49 +00:00
Adrian Prantl
7ed2b702a2 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
2013-12-23 22:24:47 +00:00
Saleem Abdulrasool
8f57233536 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
2013-12-23 17:23:58 +00:00
Richard Sandiford
166acc9489 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
2013-12-23 14:51:56 +00:00
Richard Sandiford
b09beed540 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
2013-12-23 14:45:00 +00:00
Kostya Serebryany
26f1d1cbbc [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
2013-12-23 14:15:08 +00:00
Kostya Serebryany
1fe014e5fc [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
2013-12-23 09:24:36 +00:00
Hao Liu
0fe0405b52 [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
2013-12-23 02:42:10 +00:00
Alp Toker
7c29d748b8 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
2013-12-22 22:19:49 +00:00
Yaron Keren
4ef09de13e 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
2013-12-22 12:04:23 +00:00
Roman Divacky
1a7ebaaa3d 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
2013-12-22 10:45:37 +00:00
Benjamin Kramer
d1469e0560 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
2013-12-22 10:23:23 +00:00
Elena Demikhovsky
cd70023007 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
2013-12-22 10:13:18 +00:00
Roman Divacky
e6a866cfa3 Add some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197875 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-22 09:48:38 +00:00
Michael Kuperstein
61a8a35f16 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
2013-12-22 07:51:53 +00:00
Alp Toker
4b5724b864 FileCheckize r197869
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197872 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-22 03:43:58 +00:00
Alp Toker
68545899c7 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
2013-12-21 19:11:31 +00:00
Alp Toker
cee93e95a4 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
2013-12-21 18:51:00 +00:00
Mark Lacey
efe6aa1adb 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
2013-12-21 00:00:49 +00:00
Yuchen Wu
5f2ddd6a0c BlockFrequencyInfo: Readded getEntryFreq.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197839 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20 22:11:11 +00:00
Lang Hames
559e456504 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
2013-12-20 20:27:51 +00:00
Timur Iskhodzhanov
93c53f4d24 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
2013-12-20 20:16:51 +00:00
Timur Iskhodzhanov
55b1086af2 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
2013-12-20 19:06:50 +00:00
Timur Iskhodzhanov
8aa3ff05c1 [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
2013-12-20 18:15:00 +00:00
Artyom Skrobov
fc90ff9692 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
2013-12-20 18:13:12 +00:00
Roman Divacky
ed4678820b Implement initial-exec TLS for PPC32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197824 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20 18:08:54 +00:00
Timur Iskhodzhanov
9413345f40 Fix yet another typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197821 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20 17:52:31 +00:00
NAKAMURA Takumi
7c0eb96c8a 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
2013-12-20 17:35:52 +00:00
NAKAMURA Takumi
247ea104f1 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
2013-12-20 17:35:46 +00:00
Zoran Jovanovic
1ef2ca6994 Support for microMIPS FPU instructions 1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197815 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20 15:44:08 +00:00
Rafael Espindola
2c6e51ffed Make this array const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197814 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20 15:21:32 +00:00
Richard Sandiford
23c9710636 [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
2013-12-20 11:56:02 +00:00
Richard Sandiford
1fd4e55828 [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
2013-12-20 11:49:48 +00:00
Timur Iskhodzhanov
78a613731e Fix a typo in the docs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197798 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20 10:32:12 +00:00
Kai Nacke
66732aeff2 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
2013-12-20 09:24:13 +00:00
Justin Bogner
bcb726dc8a 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
2013-12-20 08:21:30 +00:00
Justin Bogner
35c913b5b1 test: Make a branchweight test more specific
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197790 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20 08:21:27 +00:00
Justin Bogner
a2323825cb 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
2013-12-20 08:21:24 +00:00
Saleem Abdulrasool
6692ce18e8 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
2013-12-20 07:21:16 +00:00
NAKAMURA Takumi
69475dd92b 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
2013-12-20 06:25:37 +00:00
Tom Stellard
37ee312f77 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
2013-12-20 05:11:55 +00:00
Eric Christopher
658537c710 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
2013-12-20 04:40:28 +00:00
Eric Christopher
c86696a22a This test requires object emission.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197781 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20 04:34:50 +00:00
Eric Christopher
d1946f7afe 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
2013-12-20 04:34:22 +00:00
NAKAMURA Takumi
e9e7e2cc70 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
2013-12-20 04:20:23 +00:00
Eric Christopher
ff37ddf185 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
2013-12-20 04:16:18 +00:00
Dmitri Gribenko
e899f25163 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
2013-12-20 03:11:07 +00:00
Dmitri Gribenko
8d6a09de7d 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
2013-12-20 02:54:35 +00:00
Dmitri Gribenko
ea5893eb2d Correctly apply the default pointer size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197770 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20 02:46:23 +00:00