Commit Graph

87160 Commits

Author SHA1 Message Date
Dmitri Gribenko
e26b62cb61 Documentation for lit: formatting improvements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168902 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 17:05:34 +00:00
Patrik Hagglund
284c249031 Test commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168899 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 16:19:11 +00:00
Dmitri Gribenko
b129b9b617 Documentation: formatting improvements
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168897 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 16:12:13 +00:00
Meador Inge
5c5e230ac7 instcombine: Migrate fputs optimizations
This patch migrates the fputs optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168893 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 15:45:43 +00:00
Meador Inge
c2e331275b instcombine: Migrate fwrite optimizations
This patch migrates the fwrite optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168892 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 15:45:39 +00:00
Meador Inge
28d52913ab instcombine: Migrate fprintf optimizations
This patch migrates the fprintf optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168891 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 15:45:33 +00:00
Evgeniy Stepanov
2aac385417 [msan] Handle vector manipulation instructions.
Handle insertelement, extractelement, shufflevector.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168889 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 15:22:06 +00:00
Evgeniy Stepanov
b096a9d02f [msan] Fix getOriginForNaryOp.
The old version failed on a 3-arg instruction with (-1, 0, 0) shadows (it would
pick the 3rd operand origin irrespective of its shadow).
    
The new version always picks the origin of the rightmost poisoned operand.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168887 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 14:44:00 +00:00
Silviu Baranga
35b3df6e31 Added atomic 64 min/max/umin/umax instrinsics support in the ARM backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168886 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 14:41:25 +00:00
Benjamin Kramer
5175fd990c misched: Recompute priority queue when DFSResults are updated.
This was found by MSVC10's STL debug mode on a test from the test suite. Sadly
std::is_heap isn't standard so there is no way to assert this without writing
our own heap verify, which looks like overkill to me.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168885 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 14:36:26 +00:00
Evgeniy Stepanov
6d988b423a [msan] Basic handling of inline asm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168884 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 14:32:03 +00:00
Justin Holewinski
7f128ea00c Teach the legalizer how to handle operands for VSELECT nodes
If we need to split the operand of a VSELECT, it must be the mask operand. We
split the entire VSELECT operand with EXTRACT_SUBVECTOR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168883 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 14:26:28 +00:00
Justin Holewinski
3d200255d5 Allow targets to prefer TypeSplitVector over TypePromoteInteger when computing the legalization method for vectors
For some targets, it is desirable to prefer scalarizing <N x i1> instead of promoting to a larger legal type, such as <N x i32>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168882 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 14:26:24 +00:00
Evgeniy Stepanov
84af05e1ba [msan] Propagate shadow through (x<0) and (x>=0) comparisons.
This is a special case of signed relational comparison where result
only depends on the sign of x.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168881 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 14:25:47 +00:00
Evgeniy Stepanov
3a10b49781 [msan] Fix shadow & origin store & load alignment.
This change ensures that shadow memory accesses have the same alignment
as corresponding app memory accesses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168880 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 14:05:53 +00:00
Evgeniy Stepanov
af4451b37e [msan] Optimize getOriginPtr.
Rewrite getOriginPtr in a way that lets subsequent optimizations factor out
the common part of Shadow and Origin address calculation. Improves perf by
up to 5%.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168879 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 13:43:05 +00:00
Evgeniy Stepanov
2ea25f2f1c [msan] Fix a few compilation warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168878 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 13:12:03 +00:00
Evgeniy Stepanov
323c3acf51 [msan] Add a test for r168873.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168877 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 13:11:09 +00:00
Evgeniy Stepanov
2e815e7cf4 [msan] Transform memcpy and memset to library calls.
This was already done for memmove, where it is required for correctness.
This change improves performance by avoiding copyingthe same memory twice.
Also, the library functions are given __msan_ prefix to prevent instcombine
pass from converting them back to intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168876 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 12:49:04 +00:00
Elena Demikhovsky
8564dc67b5 I changed hasAVX() to hasFp256() and hasAVX2() to hasInt256() in X86IselLowering.cpp.
The logic was not changed, only names.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168875 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 12:44:59 +00:00
Evgeniy Stepanov
f29865d9bb [msan] Update tests (broken in r168873).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168874 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 12:43:56 +00:00
Evgeniy Stepanov
f62b4e3ee3 [msan] Make sure that report callbacks do not get merged.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168873 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 12:30:18 +00:00
Dmitri Gribenko
6bb2b5d76e Documentation: use correct highlighter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168871 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 12:00:32 +00:00
Evgeniy Stepanov
aa4f97d6ed Initial commit of MemorySanitizer.
Compiler pass only.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168866 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 09:57:20 +00:00
Kostya Serebryany
8b390ffbfd [asan/tsan] initialize the asan/tsan callbacks in runOnFunction as opposed to doInitialization. This is required to allow the upcoming changes in PassManager behavior
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168864 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 09:54:21 +00:00
Kostya Serebryany
5085eb80ab [asan] when checking the noreturn attribute on the call, also check it on the callee
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168861 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 08:57:20 +00:00
Preston Briggs
a18d377e73 Cleaned up a couple of comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168854 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 04:30:52 +00:00
Jakob Stoklund Olesen
39b5c0c049 Use MCPhysReg for RegisterClassInfo allocation orders.
This saves a bit of memory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168852 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 03:34:17 +00:00
Jakob Stoklund Olesen
e26e8a64ab Add an MCPhysReg typedef to replace naked uint16_t.
Use this type for arrays of physical registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168850 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 02:39:28 +00:00
Shuxin Yang
9b7f6f2de8 Instruction::isAssociative() returns true for fmul/fadd if they are tagged "unsafe" mode.
Approved by: Eli and Michael.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168848 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 01:47:31 +00:00
Jakob Stoklund Olesen
89bea17af2 Avoid rewriting instructions twice.
This could cause miscompilations in targets where sub-register
composition is not always idempotent (ARM).

<rdar://problem/12758887>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168837 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 00:26:11 +00:00
Nick Lewycky
7b09b97bdf Issue a fatal error if the line doesn't have a regular expression.
Also a couple not-user-visible changes; using empty() instead of size(), and
make inSection() not insert NULL Regex*'s into StringMap when doing a lookup.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168833 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 00:01:38 +00:00
Nadav Rotem
90e11dc8ad When combining consecutive stores allow loads in between the stores, if the loads do not alias.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168832 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 00:00:08 +00:00
Bill Wendling
bf2ad736c7 When we delete a dead basic block, see if any of its successors are dead and
delete those as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168829 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-28 23:23:48 +00:00
Dmitri Gribenko
0215368887 Documentation: improve formatting and remove unneeded empty lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168817 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-28 21:40:54 +00:00
Michael Ilseman
3d15a91777 Whoops, fixed bad merge
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168816 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-28 21:21:18 +00:00
Michael Ilseman
9eec659952 Fixed bad test case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168815 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-28 21:19:52 +00:00
Michael Ilseman
f564e9ff2d Fast-math: IRBuilder test for creating instructions with fast-math flags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168814 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-28 21:17:34 +00:00
Michael Ilseman
9992bf75fc Fast-math: Extend IRBuilder to have settable FastMathFlags to create instructions with
Also extended IRBuilder's documentation to mention the convenience state for DefaultFPMathTag and FastMathFlags that can be set.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168812 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-28 21:16:19 +00:00
Michael Ilseman
0d38424bbe Fast-math comments and convenience method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168811 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-28 21:11:25 +00:00
Jyotsna Verma
61c654ce5c Define signed const-ext immediate operands and their predicates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168810 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-28 20:58:14 +00:00
Benjamin Kramer
350c00843b ARM: Implement CanLowerReturn so large vectors get expanded into sret.
Fixes 14337.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168809 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-28 20:55:10 +00:00
Jakob Stoklund Olesen
1ead68d769 Make the LiveRegMatrix analysis available to targets.
No functional change, just moved header files.

Targets can inject custom passes between register allocation and
rewriting. This makes it possible to tweak the register allocation
before rewriting, using the full global interference checking available
from LiveRegMatrix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168806 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-28 19:13:06 +00:00
Eli Bendersky
6b731486d4 Add backreference matching capabilities to Support/Regex, with
appropriate unit tests. This change in itself is not expected to
affect any functionality at this point, but it will serve as a
stepping stone to improve FileCheck's variable matching capabilities.

Luckily, our regex implementation already supports backreferences,
although a bit of hacking is required to enable it. It supports both
Basic Regular Expressions (BREs) and Extended Regular Expressions
(EREs), without supporting backrefs for EREs, following POSIX strictly
in this respect. And EREs is what we actually use (rightly). This is
contrary to many implementations (including the default on Linux) of
POSIX regexes, that do allow backrefs in EREs.

Adding backref support to our EREs is a very simple change in the
regcomp parsing code. I fail to think of significant cases where it
would clash with existing things, and can bring more versatility to
the regexes we write. There's always the danger of a backref in a
specially crafted regex causing exponential matching times, but since
we mainly use them for testing purposes I don't think it's a big
problem. [it can also be placed behind a flag specific to FileCheck,
if needed].

For more details, see:

* http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-November/055840.html
* http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121126/156878.html



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168802 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-28 19:00:02 +00:00
Benjamin Kramer
bacc82548a MCJIT depends on JIT.
Unbreaks the CMake shared library build. This is nasty and should be fixed
eventually.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168800 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-28 18:35:35 +00:00
Ulrich Weigand
781dfbd482 Fix initial frame state on powerpc64.
The createPPCMCAsmInfo routine used PPC::R1 as the initial frame
pointer register, but on PPC64 the 32-bit R1 register does not
have a corresponding DWARF number, causing invalid CIE initial
frame state to be emitted.  Fix by using PPC::X1 instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168799 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-28 18:21:03 +00:00
Patrik Hägglund
dacb9a51bd Fix warning. [-Wunused-variable]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168792 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-28 14:32:52 +00:00
Patrik Hägglund
37d5be777c Add error handling in getInt.
Accordingly, update a testcase with a broken datalayout string.

Also, we never parse negative numbers, because '-' is used as a
separator. Therefore, use unsigned as result type.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168785 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-28 12:13:12 +00:00
Kostya Serebryany
1416edc30a [asan] Split AddressSanitizer into two passes (FunctionPass, ModulePass), LLVM part. This requires a clang part which will follow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168781 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-28 10:31:36 +00:00
Bill Wendling
3defc0bfa6 Add back support for reading and parsing 'deplibs'.
This is for backwards compatibility for pre-3.x bc files. The code reads the
code, but does nothing with it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168779 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-28 08:41:48 +00:00