Commit Graph

117130 Commits

Author SHA1 Message Date
Ismail Pazarbasi
2bdae13eff TSan: Use createSanitizerCtor to create ctor, and call __tsan_init
Reviewers: kcc, dvyukov

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236778 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 21:41:23 +00:00
Ismail Pazarbasi
914ef58002 ASan: Use createSanitizerCtor to create ctor, and call __asan_init
Reviewers: kcc, samsonov

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236777 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 21:40:46 +00:00
Matthias Braun
bbff669c18 Change getTargetNodeName() to produce compiler warnings for missing cases, fix them
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236775 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 21:33:59 +00:00
Kostya Serebryany
6564ee8933 [lib/Fuzzer] change the way we use taint information for fuzzing. Now, we run a single unit and collect suggested mutations based on tracing+taint data, then apply the suggested mutations one by one. The previous scheme was slower and more complex.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236772 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 21:02:11 +00:00
Steven Wu
82b39321e5 Use auto instead of the long type name. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236768 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 19:56:23 +00:00
Pete Cooper
d887b7ef2f [AArch64] Fix sext/zext folding in address arithmetic.
We were accidentally folding a sign/zero extend in to address arithmetic in a different BB when the extend wasn't available there.

Cross BB fast-isel isn't safe, so restrict this to only when the extend is in the same BB as the use.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236764 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 19:21:36 +00:00
Alex Lorenz
12fe27fe05 Fix r236754: Add the missing yaml-bench dir to the makefile for utils.
This commit adds the missing yaml-bench utility to the
makefile in utils. It was missing before and it caused
the regression tests to fail on some buildbots when llvm-lit 
couldn't find yaml-bench when llvm was built without 
cmake after I committed r236754.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236761 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 18:48:48 +00:00
Sergey Dmitrouk
5ef2a17a62 Disable r235989 "Reapply r235977 "[DebugInfo] Add debug locations to constant SD nodes""
Will be re-enabled with missing changes for ConstantFPSDNode and
fixes for wrong locations due to constant coalescing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236758 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 18:33:50 +00:00
Kostya Serebryany
46fa0aabcb [lib/Fuzzer] minor refactoring/simplification, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236757 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 18:32:29 +00:00
Nemanja Ivanovic
308873bcb8 Add VSX Scalar loads and stores to the PPC back end
This patch corresponds to review:
http://reviews.llvm.org/D9440

It adds a new register class to the PPC back end to contain single precision
values in VSX registers. Additionally, it adds scalar loads and stores for
VSX registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236755 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 18:24:05 +00:00
Alex Lorenz
9e31c0cf91 YAML: Enable the YAMLParser tests.
This commit enables the tests located in test/YAMLParser directory.
Those tests were never actually enabled, as llvm-lit didn't pick up the
files with the 'data' extension. The commit renames those test files to files
with the 'test' extension so that llvm-lit would find them.

This commit also modifies yaml-bench so that it returns an error status
if an error occurred during parsing. It also adds the '-use-color'
command line option to yaml-bench (to make sure that file check matches
the error messages in the output stream).

This commit modifies some of the renamed tests so that they wouldn't
fail. It gets rid of XFAILs and uses the 'not' command instead for
some of the tests that have to fail during parsing. This commit
also adds some 'FIXME' comments to a couple of tests that are
supposed to fail but currently pass because of various bugs
in the implementation of the yaml parser.

Reviewers: Justin Bogner

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236754 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 18:08:46 +00:00
David Blaikie
ad80c2d9ed Recommit r236670: [opaque pointer type] Pass explicit pointer type through GEP constant folding""
Clang regressions were caused by more stringent assertion checking
introduced by this change. Small fix needed to clang has been committed
in r236751.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236752 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 17:28:58 +00:00
Diego Novillo
aa46024ea3 Fix information loss in branch probability computation.
Summary:
This addresses PR 22718. When branch weights are too large, they were
being clamped to the range [1, MaxWeightForBB]. But this clamping is
only applied to edges that go outside the range, so it distorts the
relative branch probabilities.

This patch changes the weight calculation to scale every branch so the
relative probabilities are preserved. The scaling is done differently
now. First, all the branch weights are added up, and if the sum exceeds
32 bits, it computes an integer scale to bring all the weights within
the range.

The patch fixes an existing test that had slightly wrong branch
probabilities due to the previous clamping. It now gets branch weights
scaled accordingly.

Reviewers: dexonsmith

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236750 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 17:22:06 +00:00
Jozef Kolek
8359916759 [mips][microMIPSr6] Implement JIALC and JIC instructions
This patch implements JIALC and JIC instructions using mapping.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236748 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 17:12:23 +00:00
Michael Zolotukhin
d7b5144d53 Populate list of vectorizable functions for Accelerate library.
Summary:
This patch adds majority of supported by Accelerate library functions to the
list of vectorizable functions.

The full list of available vector functions could be found here:
https://developer.apple.com/library/mac/documentation/Performance/Conceptual/vecLib/index.html

Test Plan: Unit tests are added.

Reviewers: hfinkel, aschwaighofer, nadav

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236747 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 17:11:51 +00:00
Matt Arsenault
21cecaf445 R600: Fix comment that mentions AMDIL
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236745 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 17:02:32 +00:00
Sanjay Patel
f575e9f902 Use intrinsic pattern to make a simpler match
This is a follow-on to r236740 where I took Andrea's advice
in D9504 to remove a redundant pattern...except that I removed
the wrong pattern!

AFAICT, there is no change in the final code produced because 
subsequent passes would clean up the extra instructions created
by the more complicated pattern.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236743 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 16:51:12 +00:00
Steven Wu
b05b828eab Fix another hang caused by ManagedStatic in SignalHandler
Fix two other variables that might cause the same hang fixed in r235914.
The hang is caused by constructing ManagedStatic in signalhandler. In
this case, if FileToRemove or CallBacksToRun is not contructed, it means
there is no work to do.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236741 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 16:20:51 +00:00
Sanjay Patel
39cf555429 [x86] eliminate unnecessary shuffling/moves with unary scalar math ops (PR21507)
Finish the job that was abandoned in D6958 following the refactoring in
http://reviews.llvm.org/rL230221:

1. Uncomment the intrinsic def for the AVX r_Int instruction.
2. Add missing r_Int entries to the load folding tables; there are already
   tests that check these in "test/Codegen/X86/fold-load-unops.ll", so I
   haven't added any more in this patch.
3. Add patterns to solve PR21507 ( https://llvm.org/bugs/show_bug.cgi?id=21507 ).

So instead of this:

  movaps	%xmm0, %xmm1
  rcpss	%xmm1, %xmm1
  movss	%xmm1, %xmm0

We should now get:

  rcpss	%xmm0, %xmm0

And instead of this:

  vsqrtss	%xmm0, %xmm0, %xmm1
  vblendps	$1, %xmm1, %xmm0, %xmm0 ## xmm0 = xmm1[0],xmm0[1,2,3]

We should now get:

  vsqrtss	%xmm0, %xmm0, %xmm0


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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236740 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 15:48:53 +00:00
Hans Wennborg
ee25f1e872 Switch lowering: handle zero-weight branch probabilities
After r236617, branch probabilities are no longer guaranteed to be >= 1. This
patch makes the swich lowering code handle that correctly, without bumping the
branch weights by 1 which might cause overflow and skews the probabilities.

Covered by @zero_weight_tree in test/CodeGen/X86/switch.ll.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236739 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 15:47:15 +00:00
Simon Atanasyan
bd58bdb7a6 [obj2yaml/yaml2obj] Add SHT_MIPS_ABIFLAGS section support
This change adds support for the SHT_MIPS_ABIFLAGS section
reading/writing to the obj2yaml and yaml2obj tools.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236738 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 15:40:48 +00:00
Simon Atanasyan
ef7c2568fa [llvm-readobj] Print .MIPS.abiflags section content
This change adds new flag -mips-abi-flags to the llvm-readobj. This flag
forces printing of .MIPS.abiflags section content.

https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking#10.2.1._.MIPS.abiflags

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236737 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 15:40:35 +00:00
Simon Atanasyan
2d0087d82a [MIPS] Move MIPS ABI flags structure constants to the separate header
http://reviews.llvm.org/D9517

The separate header file allows to reuse the MIPS ABI flags structure
constants in other LLVM tools like the llvm-readobj.

No functional changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236732 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 14:57:04 +00:00
Simon Atanasyan
f6fa999df3 [llvm-readobj/obj2yaml/yaml2obj] Support more MIPS ELF header flags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236728 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 14:04:44 +00:00
Elena Demikhovsky
89711f8e5c Masked Gather and Scatter intrinsics - updated documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236721 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 12:25:11 +00:00
Elena Demikhovsky
d08d0340e5 AVX-512: Added all forms of FP compare instructions for KNL and SKX.
Added intrinsics for the instructions. CC parameter of the intrinsics was changed from i8 to i32 according to the spec.

By Igor Breger (igor.breger@intel.com)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236714 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 11:24:42 +00:00
Toma Tabacu
56992eb6ed [mips] Add the SoftFloat MipsSubtarget feature.
Summary: This will enable the IAS to reject floating point instructions if soft-float is enabled.

Reviewers: dsanders, echristo

Reviewed By: dsanders

Subscribers: jfb, llvm-commits, mpf

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236713 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 10:29:52 +00:00
NAKAMURA Takumi
3e9ef05a68 Attributes.h: Fix incorrect \brief introduced in r236666. [-Wdocumentation]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236712 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 10:18:56 +00:00
NAKAMURA Takumi
c128e5c8c2 Scalar/PlaceSafepoints.cpp: Fix a warning introduced in r228090. [-Wunused-variable]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236711 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 10:18:46 +00:00
NAKAMURA Takumi
a3ded6b432 llvm/test/CodeGen/X86/llc-override-mcpu-mattr.ll: Tweak not to be affected by x64 Calling Convention.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236710 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 10:18:28 +00:00
Mehdi Amini
4d5e059cdb Update InstCombine to transform aggregate loads into scalar loads.
Summary:
One step further getting aggregate loads and store being optimized
properly. This will only handle struct with one element at this point.

Test Plan: Added unit tests for the new supported cases.

Reviewers: chandlerc, joker-eph, joker.eph, majnemer

Reviewed By: majnemer

Subscribers: pete, llvm-commits

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

Patch by Amaury Sechet.

From: Amaury Sechet <amaury@fb.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236695 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 05:52:40 +00:00
Alexey Samsonov
cddf82ae35 [SanitizerCoverage] Introduce SanitizerCoverageOptions struct.
Summary:
This gives frontend more precise control over collected coverage
information. User can still override these options by passing
-mllvm flags.

No functionality change.

Test Plan: regression test suite.

Reviewers: kcc

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236687 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 01:00:31 +00:00
Justin Bogner
0518652fc4 IR: Initialize DerefOrNullBytes in the AttrBuilder constructors
MSAN pointed out that this value is used uninitialized:

    http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/3678

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236686 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 00:56:34 +00:00
Justin Bogner
f64a0c1b3e InstrProf: Simplify looking up sections for coverage data
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236685 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 00:31:58 +00:00
Philip Reames
16e7e690b7 [JumpThreading] Simplify comparisons when simplifying branches
If we have recognized that a conditional is constant at a particular location in the code (while trying to decide if we can simplify a conditional branch), we can eagerly replace that condition with a constant if it's definition is post dominated by the branch in question.

In practice, this ends up being a compile time savings at most. JumpThreading would have visited each using branch anyways. CVP would have visited the cmp itself again. Unless LVI gives up early, we shouldn't gain any addition power by doing this transformation early. What we do gain is simplicity and compile time.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236684 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 00:19:14 +00:00
Kostya Serebryany
49204878d7 [lib/Fuzzer] add dfsan_weak_hook_memcmp, enable the test that uses it, simplify the test runner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236683 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 00:11:33 +00:00
Vince Harron
a94bd7a780 Added support for building against Android API-9 SDK
Created an abstraction for log2, llvm::Log2 in Support/MathExtras.h

Hid Android problems inside of it

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236680 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07 00:05:26 +00:00
David Blaikie
be6ad41cdd Revert "[opaque pointer type] Pass explicit pointer type through GEP constant folding"
Causes regressions in Clang. Reverting while I investigate.

This reverts commit r236670.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236678 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-06 23:56:21 +00:00
Akira Hatanaka
e6f0494cd8 Let llc and opt override "-target-cpu" and "-target-features" via command line
options.

This commit fixes a bug in llc and opt where "-mcpu" and "-mattr" wouldn't
override function attributes "-target-cpu" and "-target-features" in the IR.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236677 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-06 23:54:14 +00:00
Sanjoy Das
d9fd44e97a [X86MCInst] Move LowerSTATEPOINT to inside X86AsmPrinter. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236676 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-06 23:53:26 +00:00
Sanjoy Das
9a46db689a [X86MCInst] Clean up LowerSTATEPOINT: variable names. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236675 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-06 23:53:24 +00:00
Sanjoy Das
9397699834 [Statepoints] Clean up PlaceSafepoints.cpp: de-duplicate code.
Common duplicated code and remove unnecessary code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236674 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-06 23:53:21 +00:00
Sanjoy Das
b82de79bc1 [Statepoints] Clean up PlaceSafepoints.cpp: variable naming.
Use CamelCase.  NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236673 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-06 23:53:19 +00:00
Sanjoy Das
8a86e2564d [IRBuilder] Add a CreateGCStatepointInvoke.
Renames the original CreateGCStatepoint to CreateGCStatepointCall, and
moves invoke creating functionality from PlaceSafepoints.cpp to
IRBuilder.cpp.

This changes the labels generated for PlaceSafepoints/invokes.ll so use
a regex there to make the basic block labels more resilient.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236672 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-06 23:53:09 +00:00
Akira Hatanaka
4f28a76c25 Factor out a function which determines the cpu and feature strings based on
command line options -mcpu and -mattr. NFC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236671 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-06 23:49:24 +00:00
David Blaikie
cb0a50fe54 [opaque pointer type] Pass explicit pointer type through GEP constant folding
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236670 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-06 23:49:14 +00:00
Alex Lorenz
9daa4b18f7 YAML: Fix crash in the skip method of KeyValueNode class.
This commit changes the 'skip' method in the 'KeyValueNode' class
to ensure that it doesn't dereference a null pointer when calling 
the 'skip' method of its value child node. It also adds a unittest
that ensures that the crash doesn't occur.

This change is motivated by a patch that implements parsing
of YAML block scalars (http://reviews.llvm.org/D9503), as one
of the unittests in that patch triggered this problem.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236669 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-06 23:21:29 +00:00
Pete Cooper
a7574638e7 Change typeIncompatible to return an AttrBuilder instead of new-ing an AttributeSet.
This makes use of the new API which can remove attributes from a set given a builder.

This is much faster than creating a temporary set and reduces llc time by about 0.3% which was all spent creating temporary attributes sets on the context.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236668 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-06 23:19:56 +00:00
Pete Cooper
4716d634a2 Update all comments to match the previous commit. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236667 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-06 23:19:51 +00:00
Pete Cooper
c58f23eeb6 Add remove method to operate on AttrBuilder instead of AttributeSet.
Prior to this change we would have to construct a temporary AttributeSet (which isn't temporary at all given that its allocated on the context), just to contain the attributes in the builder, then call remove on that.

Now we can just remove any attributes from the (lightweight and really temporary) builder itself.

Will be used in a future commit to remove some temporary attributes sets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236666 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-06 23:19:43 +00:00