Commit Graph

192070 Commits

Author SHA1 Message Date
Johannes Doerfert 9282076ece [NFC] Drop the "scattering" tuple name
llvm-svn: 227801
2015-02-02 13:45:54 +00:00
Erik Eckstein 7330e358f6 Fix: SLPVectorizer crashes with assertion when vectorizing a cmp instruction.
The commit r225977 uncovered this bug. The problem was that the vectorizer tried to
read the second operand of an already deleted instruction.
The bug didn't show up before r225977 because the freed memory still contained a non-null pointer.
With r225977 deletion of instructions is delayed and the read operand pointer is always null.

llvm-svn: 227800
2015-02-02 12:45:34 +00:00
Timur Iskhodzhanov 82cd135738 [ASan/Win] Add a test case for r208215 [stack buffer overflow in <iostream>]
The issue re-appears if one uses the -fsanitize-blacklist= flag,
so it's time to have a test case.

llvm-svn: 227799
2015-02-02 12:31:11 +00:00
Hafiz Abid Qadeer 54ba124098 Make --thread argument optional for various commands.
Currently it was marked as mandatory for many commands. Although it
is recommended that fronends generate this argument, it is not
mandatory. GDB seems to treat it as optional too.

llvm-svn: 227798
2015-02-02 12:17:33 +00:00
Viktor Kutuzov 4cd3ee38e4 Fix missed #endif in rL227790.
llvm-svn: 227797
2015-02-02 10:48:38 +00:00
David Majnemer 129f417efd MS ABI: Implement support for 'novtable'
It is common for COM interface classes to be marked as 'novtable' to
tell the compiler that constructors and destructors should not reference
virtual function tables.

This commit implements this feature in clang.

llvm-svn: 227796
2015-02-02 10:22:20 +00:00
Viktor Kutuzov 1f83bbb6fe [Sanitizers] Intercept ether functions on FreeBSD
Committed unreviewed with permission.

llvm-svn: 227795
2015-02-02 10:00:23 +00:00
Viktor Kutuzov 1a3889da34 [Sanitizers] Intercept memrchr() on FreeBSD
Committed unreviewed with permission.

llvm-svn: 227794
2015-02-02 09:58:30 +00:00
Viktor Kutuzov bb8bd90b06 [Sanitizers] Intercept getpwnam_r() on FreeBSD
Committed unreviewed with permission.

llvm-svn: 227793
2015-02-02 09:56:11 +00:00
Viktor Kutuzov 3ac0eb7480 [Sanitizers] Intercept getpwent_r() on FreeBSD
Committed unreviewed with permission.

llvm-svn: 227792
2015-02-02 09:53:02 +00:00
Viktor Kutuzov fc44a096a9 [Sanitizers] Intercept getpwent() on FreeBSD
Committed unreviewed with permission.

llvm-svn: 227791
2015-02-02 09:49:28 +00:00
Viktor Kutuzov 0c0ebaa79f [Msan] Disable unit tests for non-FreeBSD functions on FreeBSD
Differential Revision: http://reviews.llvm.org/D7252

llvm-svn: 227790
2015-02-02 09:46:07 +00:00
Viktor Kutuzov 7891c8c173 [Sanitizers] Re-apply the fix ordering initialization of coverage and guard arrays
Original commit: http://reviews.llvm.org/rL226440
Related review: http://reviews.llvm.org/D6892

llvm-svn: 227789
2015-02-02 09:38:10 +00:00
Davide Italiano 104949df73 [ELF] Implement action for OUTPUT linker script command
Reviewed by:	ruiu, shankarke

llvm-svn: 227787
2015-02-02 06:28:12 +00:00
Davide Italiano 5cbde851ed [ELF] Support for parsing OUTPUT command in LinkerScript
Differential Revision:	D7326
Reviewed by:	rafaelauler, shankarke, ruiu

llvm-svn: 227786
2015-02-02 06:21:23 +00:00
Lang Hames e644b75782 [Orc] Remove one of the OrcMCJITReplacement regression tests while I
investigate a sanitizer bot failure.

llvm-svn: 227785
2015-02-02 06:01:02 +00:00
Shankar Easwaran 148cd8e8e9 [ELF] Determine default search directories from Context.
Target specific LinkingContext's  determine the default search directory.

No change in functionality.

llvm-svn: 227784
2015-02-02 06:00:04 +00:00
NAKAMURA Takumi b0a52838fa gold-plugin.cpp: Fixup r227599 corresponding to r227685 and r227731 -- Don't lose DataLayoutPass.
llvm-svn: 227783
2015-02-02 05:47:30 +00:00
Nico Weber 82d9e7ec1c Wrap to 80 columns. No behavior change.
llvm-svn: 227782
2015-02-02 05:38:59 +00:00
Nico Weber 7f8ec52067 Follow-up to r217302: Don't crash on ~A::A in a postfix expr suffix followed by '<'.
This used to crash, complaining "ObjectType and scope specifier cannot coexist":

    struct A { } b = b.~A::A <int>;

The only other caller of ParseOptionalCXXScopeSpecifier() that passes in a
non-empty ObjectType clears the ObjectType of the scope specifier comes back
non-empty (see the tok::period case in Parser::ParsePostfixExpressionSuffix()),
so do that here too.

Found by SLi's bot.

llvm-svn: 227781
2015-02-02 05:33:50 +00:00
Lang Hames 16bbaf1639 [Orc] Regression tests for OrcMCJITReplacement.
Duplicated from the MCJIT regression tests.

llvm-svn: 227780
2015-02-02 05:04:55 +00:00
Lang Hames a3e710dddd [Orc] Remove the OwnedModules list from OrcMCJITReplacement and use
ExecutionEngine's Modules list instead.

This makes the owned modules visibile to ExecutionEngine. In particular,
it is required for ExecutionEngine::runStaticConstructorsAndDestructors to
work.

Regression tests for Orc (which test this issue) will be committed shortly.

llvm-svn: 227779
2015-02-02 04:34:02 +00:00
Lang Hames 29dff9837a [Orc] Make the ObjectLinkingLayer take ownership of object files until
finalization time.

As currently implemented, RuntimeDyldELF requires the original object
file to be avaible when relocations are being resolved. This patch
ensures that the ObjectLinkingLayer preserves it until then. In the
future RuntimeDyldELF should be rewritten to remove this requirement, at
which point this patch can be reverted.

Regression test cases for Orc (which include coverage of this bug) will
be committed shortly.
 

llvm-svn: 227778
2015-02-02 04:32:17 +00:00
Nico Weber 10d02b5604 Remove a comment I accidentally added in r227581. No behavior change.
llvm-svn: 227777
2015-02-02 04:18:38 +00:00
Lang Hames 15be546140 [Orc] Add sensible defaults for the ObjectLinkingLayer constructor.
llvm-svn: 227776
2015-02-02 01:03:10 +00:00
Hal Finkel 23a3eab65a [PowerPC] Put PPCEarlyReturn into its own source file
PPCInstrInfo.cpp has ended up containing several small MI-level passes, and
this is making the file harder to read than necessary. Split out
PPCEarlyReturn into its own source file. NFC.

Now that PPCInstrInfo.cpp does not also contain pass implementations, I hope
that it will be slightly less unwieldy.

llvm-svn: 227775
2015-02-01 22:58:46 +00:00
John McCall 2859258e2f Allow objc_bridge(id) to be used on typedefs of [cv] void*.
rdar://19678874

llvm-svn: 227774
2015-02-01 22:34:06 +00:00
Craig Topper 53565c60e7 [X86] Add other flavors of AVX512 cmpps/cmppd intrinsics.
llvm-svn: 227773
2015-02-01 22:27:40 +00:00
Hal Finkel 7c6ab93fba [PowerPC] Remove unnecessary include
llvm-svn: 227772
2015-02-01 22:03:13 +00:00
Hal Finkel 76c751dcef [PowerPC] Put PPCVSXCopy into its own source file
PPCInstrInfo.cpp has ended up containing several small MI-level passes, and
this is making the file harder to read than necessary. Split out
PPCVSXCopy into its own source file. NFC.

llvm-svn: 227771
2015-02-01 22:01:29 +00:00
Hal Finkel 089b8ecf8e [PowerPC] Put PPCVSXFMAMutate into its own source file
PPCInstrInfo.cpp has ended up containing several small MI-level passes, and
this is making the file harder to read than necessary. Split out
PPCVSXFMAMutate into its own source file. NFC.

llvm-svn: 227770
2015-02-01 21:51:22 +00:00
Craig Topper 2a898bfc67 [X86] Add the AVX512 exp2a23 intrinsics.
llvm-svn: 227769
2015-02-01 21:34:11 +00:00
Benjamin Kramer 95514e0422 Remove decltype in an attempt to fix the MSVC build.
C++ is hard, attempt #1 of n.

llvm-svn: 227768
2015-02-01 21:32:12 +00:00
Hal Finkel 83d695419c [PowerPC] Remove the PPCVSXCopyCleanup pass
This MI-level pass was necessary when VSX support was first being developed,
specifically, before the ABI code had been updated to use VSX registers for
arguments (the register assignments did not change, in a physical sense, but
the VSX super-registers are now used). Unfortunately, I never went back and
removed this pass after that was done. I believe this code is now effectively
dead.

llvm-svn: 227767
2015-02-01 21:20:58 +00:00
Benjamin Kramer ad960019b0 LoopVectorize: Remove initializer list that blocks MSVC.
llvm-svn: 227766
2015-02-01 21:13:26 +00:00
Benjamin Kramer 06e0f5a784 Actually we can just inline the base typedef and use the injected class name for the base class.
llvm-svn: 227765
2015-02-01 20:47:51 +00:00
Benjamin Kramer 04ec7e316b Reimplement iterator wrappers on top of llvm::iterator_adaptor_base.
Eliminates a ton of boilerplate proxying the iterator methods. NFC.

llvm-svn: 227764
2015-02-01 20:31:36 +00:00
Hal Finkel 1296f071e0 [PowerPC] Add implicit ops to conditional returns in PPCEarlyReturn
When PPCEarlyReturn, it should really copy implicit ops from the old return
instruction to the new one. This currently does not matter much, because we run
PPCEarlyReturn very late in the pipeline (there is nothing to do DCE on
definitions of those registers). However, for completeness, we should do it
anyway.

Noticed by inspection (and there should be no functional change); thus, no
test case.

llvm-svn: 227763
2015-02-01 20:16:10 +00:00
Craig Topper a5df398006 [X86] Add test for avx512er builtins that I forgot to commit with changes to the header file.
llvm-svn: 227762
2015-02-01 19:56:51 +00:00
Benjamin Kramer 813fc59b9f FoldingSetVectorIterator is just a subset of pointee_iterator, remove it.
llvm-svn: 227761
2015-02-01 19:26:05 +00:00
David Majnemer 8a6578a0e7 ValueTracking: Make isSafeToSpeculativelyExecute a little cleaner
No functional change intended.

llvm-svn: 227760
2015-02-01 19:10:19 +00:00
Hal Finkel e3d2b20c2b [PowerPC] VSX stores don't also read
The VSX store instructions were also picking up an implicit "may read" from the
default pattern, which was an intrinsic (and we don't currently have a way of
specifying write-only intrinsics).

This was causing MI verification to fail for VSX spill restores.

llvm-svn: 227759
2015-02-01 19:07:41 +00:00
Hal Finkel 11d3c561a4 [PowerPC] Better scheduling for isel on P7/P8
isel is actually a cracked instruction on the P7/P8, and must start a dispatch
group. The scheduling model should reflect this so that we don't bunch too many
of them together when possible.

Thanks to Bill Schmidt and Pat Haugen for helping to sort this out.

llvm-svn: 227758
2015-02-01 17:52:16 +00:00
Adam Nemet a9dc8d817d Include cstddef in EquivalenceClasses.h
This is to try to appease bots complaining that ptrdiff_t is undefined in
LoopAccessAnalysis.cpp.

llvm-svn: 227757
2015-02-01 17:21:06 +00:00
Adam Nemet 0456327cfb [LoopVectorize] Move LoopAccessAnalysis to its own module
Other than moving code and adding the boilerplate for the new files, the code
being moved is unchanged.

There are a few global functions that are shared with the rest of the
LoopVectorizer.  I moved these to the new module as well (emitLoopAnalysis,
stripIntegerCast, replaceSymbolicStrideSCEV) along with the Report class used
by emitLoopAnalysis.  There is probably room for further improvement in this
area.

I kept DEBUG_TYPE "loop-vectorize" because it's used as the PassName with
emitOptimizationRemarkAnalysis.  This will obviously have to change.

NFC.  This is part of the patchset that splits out the memory dependence logic
from LoopVectorizationLegality into a new class LoopAccessAnalysis.
LoopAccessAnalysis will be used by the new Loop Distribution pass.

llvm-svn: 227756
2015-02-01 16:56:15 +00:00
Adam Nemet 3f737d935d [LoopVectorize] Move RuntimePointerCheck under LoopAccessAnalysis
This class needs to remain public because it's used by
LoopVectorizationLegality::addRuntimeCheck.

NFC.  This is part of the patchset that splits out the memory dependence logic
from LoopVectorizationLegality into a new class LoopAccessAnalysis.
LoopAccessAnalysis will be used by the new Loop Distribution pass.

llvm-svn: 227755
2015-02-01 16:56:11 +00:00
Adam Nemet c237f68fc9 [LoopVectorize] Pass parameters explicitly to MemoryDepChecker
Rather than using globals use a structure to pass parameters from the
vectorizer.  This prepares the class to be moved outside the LoopVectorizer.

It's not great how all this is passed through in LoopAccessAnalysis but this
is all expected to change once the class start servicing the Loop Distribution
pass as well where some of these parameters make no sense.

NFC.  This is part of the patchset that splits out the memory dependence logic
from LoopVectorizationLegality into a new class LoopAccessAnalysis.
LoopAccessAnalysis will be used by the new Loop Distribution pass.

llvm-svn: 227754
2015-02-01 16:56:09 +00:00
Adam Nemet fababbded9 [LoopVectorize] Make hasVectorInstrinsicScalarOpd inline
VectorUtils.h needs to be included in LoopAccessAnalysis.cpp for
getIntrinsicIDForCall but hasVectorInstrinsicScalarOpd is not used by this
module.

NFC.  This is part of the patchset that splits out the memory dependence logic
from LoopVectorizationLegality into a new class LoopAccessAnalysis.
LoopAccessAnalysis will be used by the new Loop Distribution pass.

llvm-svn: 227753
2015-02-01 16:56:05 +00:00
Michael Kuperstein 13fbd45263 [X86] Convert esp-relative movs of function arguments to pushes, step 2
This moves the transformation introduced in r223757 into a separate MI pass.
This allows it to cover many more cases (not only cases where there must be a 
reserved call frame), and perform rudimentary call folding. It still doesn't 
have a heuristic, so it is enabled only for optsize/minsize, with stack 
alignment <= 8, where it ought to be a fairly clear win.

(Re-commit of r227728)

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

llvm-svn: 227752
2015-02-01 16:56:04 +00:00
Adam Nemet c28ffdcf35 [LoopVectorize] Split out LoopAccessAnalysis from LoopVectorizationLegality
Move the canVectorizeMemory functionality from LoopVectorizationLegality to a
new class LoopAccessAnalysis and forward users.

Currently the collection of the symbolic stride information is kept with
LoopVectorizationLegality and it becomes an input to LoopAccessAnalysis.

NFC.  This is part of the patchset that splits out the memory dependence logic
from LoopVectorizationLegality into a new class LoopAccessAnalysis.
LoopAccessAnalysis will be used by the new Loop Distribution pass.

llvm-svn: 227751
2015-02-01 16:56:04 +00:00