Commit Graph

157989 Commits

Author SHA1 Message Date
Robert Lytton f637e2cb23 Prevent LoopVectorizer and SLPVectorizer running if the target has no vector registers.
XCore target: Add XCoreTargetTransformInfo
This is where getNumberOfRegisters() resides, which in turn returns the
number of vector registers (=0).

llvm-svn: 190936
2013-09-18 12:43:35 +00:00
Daniel Jasper dcab7fbb83 Simplify clang-format-diff.py using new clang-format options.
clang-format's -lines parameter makes this significantly easier.

llvm-svn: 190935
2013-09-18 12:14:09 +00:00
Andrea Di Biagio 1f5d74d8ae Re-add tests from r179291 which were accidentally removed by r181177.
llvm-svn: 190934
2013-09-18 12:06:59 +00:00
Evgeniy Stepanov 91375fd66e [tsan] No-op implementation of AnnotateMemoryIsInitialized.
llvm-svn: 190933
2013-09-18 11:20:31 +00:00
Kostya Serebryany c3d43ca3ec [asan] add a run-time option detect_stack_use_after_return, add verbosity output for fake stack
llvm-svn: 190932
2013-09-18 10:35:12 +00:00
Joey Gouly 1e8637b259 [ARMv8] Add builtins for CRC instructions.
Patch by Bradley Smith!

llvm-svn: 190931
2013-09-18 10:07:09 +00:00
Richard Sandiford 93183ee78c [SystemZ] Add unsigned compare-and-branch instructions
For some reason I never got around to adding these at the same time as
the signed versions.  No idea why.

I'm not sure whether this SystemZII::BranchC* stuff is useful, or whether
it should just be replaced with an "is normal" flag.  I'll leave that
for later though.

There are some boundary conditions that can be tweaked, such as preferring
unsigned comparisons for equality with [128, 256), and "<= 255" over "< 256",
but again I'll leave those for a separate patch.

llvm-svn: 190930
2013-09-18 09:56:40 +00:00
Joey Gouly 36b2e5de3c 'svn add' the test cases.
llvm-svn: 190929
2013-09-18 09:46:49 +00:00
Joey Gouly 2f8890ed1c [ARMv8] Add CRC instructions.
Patch by Bradley Smith!

llvm-svn: 190928
2013-09-18 09:45:55 +00:00
Virgile Bello 90ec1643ad Added new Host/Atomic.h to replace use of <atomic> in LLDB headers.
llvm-svn: 190927
2013-09-18 09:11:16 +00:00
Stepan Dyatkovskiy b88c30facd Recommited:
Fix for PR16752. Second commit.

PR16752: 'mode' attribute for unusual targets doesn't work properly
Description:
Troubles could be happened due to some assumptions in handleModeAttr function (see SemaDeclAttr.cpp).
For example, it assumes that 32 bit integer is 'int', while it could be 16 bit only.
Instead of asking target: 'which type do you want to use for int32_t ?' it just hardcodes general opinion. That doesn't looks pretty correct.
Please consider the next solution:
1. In Basic/TargetInfo add getIntTypeByWidth and getRealTypeByWidth methods. Methods asks target for proper type for given bit width.
2. Fix handleModeAttr according to new methods in TargetInfo.

Fixes:
1st Commit (Done): Add new methods for TargetInfo:
     getRealTypeByWidth and getIntTypeByWidth
  for ASTContext names are almost same(invokes new methods from TargetInfo):
     getIntTypeForBitwidth and getRealTypeForBitwidth

2nd Commit (Current): Fix SemaDeclAttr, handleModeAttr function.

Also test/Sema/attr-mode.c was fixed. 'XC' mode test was disabled for PPC64 machines.

llvm-svn: 190926
2013-09-18 09:08:52 +00:00
Amaury de la Vieuville 718ce62b3c Add support for poly16 vtst and vtstq
vtst and vtstq currently support poly8 types, but they should also work on
poly16.

llvm-svn: 190925
2013-09-18 08:33:53 +00:00
Virgile Bello d0c5c776bc Visual Studio 2013 compilation support: added some #ifdef _MSC_VER for unsupported code in MSVC.
llvm-svn: 190924
2013-09-18 08:09:31 +00:00
Filip Pizlo 591f15411a Revert r190921. It broke Windows.
I'll roll it back in when I have a chance to look at it in detail.

llvm-svn: 190923
2013-09-18 06:37:55 +00:00
Hal Finkel 33be5e0e5c Add new libm LIBBUILTIN definitions, synchronizing with __builtin_*
For all libm __builtin_* functions that are defined, this adds the
corresponding LIBBUILTIN definitions (tagged, as necessary, with "e" instead of
"c" when the function may set errno).

Note that this changes the current definitions for lrint and fma
(unfortunately). The Linux man page documents that these don't set errno, but
the POSIX standard says that they should.

llvm-svn: 190922
2013-09-18 06:19:40 +00:00
Filip Pizlo 4389ee380b Make DynamicLibrary use ManagedStatic. This is pretty simple and should just work as
advertised - but it does have the caveat that calls to DynamicLibrary::AddSymbol will 
"reset" if you shutdown llvm and try to come back for seconds.  This is a subtle 
behavior change, but I'm assuming that nobody is affected by it.

llvm-svn: 190921
2013-09-18 06:03:27 +00:00
Craig Topper 358c7989b1 Prevent extra calls to ToggleFeature for Feature64Bit and FeatureCMOV if they've already been enabled. The extra call ends up clearing the bit in FeatureBits since its a 'toggle'. Can't prove that anything was broken because of this since I don't think the FeatureBits for these are used.
llvm-svn: 190920
2013-09-18 06:01:53 +00:00
Craig Topper a8442344ed Fix X86 subtarget to not overwrite the autodetected features by calling InitMCProcessorInfo right after detecting them. Instead add a new function that only updates the scheduling model and call that.
llvm-svn: 190919
2013-09-18 05:54:09 +00:00
Craig Topper be3e01e61f Revert accidental commit I had to make to get the test case in PR17268 to still work correctly.
llvm-svn: 190917
2013-09-18 04:10:17 +00:00
Craig Topper 98064b9f4d Lift alignment restrictions for load/store folding on VINSERTF128/VEXTRACTF128. Fixes PR17268.
llvm-svn: 190916
2013-09-18 03:55:53 +00:00
Hal Finkel c4d7c82c7f Add the intrinsic __builtin_convertvector
LLVM supports applying conversion instructions to vectors of the same number of
elements (fptrunc, fptosi, etc.) but there had been no way for a Clang user to
cause such instructions to be generated when using builtin vector types.

C-style casting on vectors is already defined in terms of bitcasts, and so
cannot be used for these conversions as well (without leading to a very
confusing set of semantics). As a result, this adds a __builtin_convertvector
intrinsic (patterned after the OpenCL __builtin_astype intrinsic). This is
intended to aid the creation of vector intrinsic headers that create generic IR
instead of target-dependent intrinsics (in other words, this is a generic
_mm_cvtepi32_ps). As noted in the documentation, the action of
__builtin_convertvector is defined in terms of the action of a C-style cast on
each vector element.

llvm-svn: 190915
2013-09-18 03:29:45 +00:00
Hal Finkel 4c2316be49 Remove unnecessary comment regarding AsTypeExpr base class
llvm-svn: 190914
2013-09-18 03:29:09 +00:00
Richard Smith ef985ac91c Fix accepts-invalid if a variable template explicit instantiation is missing an
argument list, but could be instantiated with argument list of <>.

llvm-svn: 190913
2013-09-18 02:10:12 +00:00
Eli Friedman 1d24af872d Fix ObjC @encode for C++ classes w/virtual bases.
PR17142.

llvm-svn: 190912
2013-09-18 01:59:16 +00:00
Richard Smith d25789a671 -ast-dump support for variable templates.
llvm-svn: 190911
2013-09-18 01:36:02 +00:00
Richard Smith 785067eca7 If a variable template specialization with an incomplete array type is
referenced, try to instantiate its definition in order to complete the type.

llvm-svn: 190910
2013-09-18 01:35:26 +00:00
Hans Wennborg e693e8432e Add comment about exporting clang::driver::ArgStringList,
as suggested by Jordan on IRC. Also, use the unqualified name
in Job.cpp.

And while we're here, refer to StringRef with the unqualified
name, because we have a using directive for that too.

llvm-svn: 190909
2013-09-18 00:41:15 +00:00
Reid Kleckner c106fdafdd Claim compatibility with VS 2012 by default
This will define _MSC_VER to 1700 by default and avoid linker errors
from /failifmismatch linker directives in the C++ standard headers.

Most people trying out the Visual Studio integration are using 2012,
since that's the only version that clang-format works with.  This way
they don't have to pass funky -Xclang -fmsc-version=1700 flags just to
link against the standard C++ runtime.

llvm-svn: 190908
2013-09-18 00:33:59 +00:00
Hans Wennborg 0daa1225c6 Revert r190902 and r190906
The first one broke the build, and the latter one made it worse.

llvm-svn: 190907
2013-09-18 00:21:51 +00:00
Hans Wennborg 9b7c8a378a Revert "Move using directive from Job.h to Job.cpp" (r190902)
Seems like it was intentional to export ArgStringList as
driver::ArgStringList, and e.g. examples/clang-interpreter/main.cpp
uses it this way.

However, exporting it with a typedef seems like a more common way to do it.

llvm-svn: 190906
2013-09-18 00:17:07 +00:00
David Blaikie eacc287b49 ifndef NDEBUG-out an asserts-only constant committed in r190863
llvm-svn: 190905
2013-09-18 00:11:27 +00:00
David Majnemer 50ce835ecb Revert "Revert "[-cxx-abi microsoft] Mangle local TagDecls appropriately""
This reverts commit r190895 which reverted r190892.

llvm-svn: 190904
2013-09-17 23:57:10 +00:00
Shankar Easwaran 1b0256c379 [lld][YAML] RefNameResolver : add only if name/refname is not empty
llvm-svn: 190903
2013-09-17 23:38:04 +00:00
Hans Wennborg 138be5e9f4 Move using directive from Job.h to Job.cpp
I don't think it belongs in the header, but seems handy in the .cpp file.

llvm-svn: 190902
2013-09-17 23:37:44 +00:00
Fariborz Jahanian 6e1798e36a ObjectiveC migrator. infer NS_OPTIONS correctly in the
presense of parenthesized enumerator initializers.

llvm-svn: 190901
2013-09-17 23:32:51 +00:00
Hans Wennborg cfe2109978 clang-cl: ignore ths /GS- flag
The /GS- flag is used to turn off run-time buffer security checks (/GS).
Since no such checks are enabled in the first place, I think we should just
ignore this flag.

llvm-svn: 190900
2013-09-17 23:27:39 +00:00
Matt Arsenault d12e8020ec Fix a constant folding address space place I missed.
If address space 0 was smaller than the address space
in a constant inttoptr/ptrtoint pair, the wrong mask size
would be used.

llvm-svn: 190899
2013-09-17 23:23:16 +00:00
Reid Kleckner c1e7621e01 COFF: Ensure that objects produced by LLVM link with /safeseh
Summary:
We indicate that the object files are safe by emitting a @feat.00
absolute address symbol.  The address is presumably interpreted as a
bitfield of features that the compiler would like to enable.  Bit 0 is
documented in the PE COFF spec to opt in to "registered SEH", which is
what /safeseh enables.

LLVM's object files are safe by default because LLVM doesn't know how to
produce SEH handlers.

Reviewers: Bigcheese

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1691

llvm-svn: 190898
2013-09-17 23:18:05 +00:00
Matt Arsenault ce3e4fc934 Missed using check type enum in one place
llvm-svn: 190897
2013-09-17 23:15:35 +00:00
Matt Arsenault c4d2d471ce Use function's argument instead of the global flag.
For now it happens the argument is always the same.

llvm-svn: 190896
2013-09-17 22:45:57 +00:00
David Majnemer 3775441379 Revert "[-cxx-abi microsoft] Mangle local TagDecls appropriately"
This reverts commit r190892.

llvm-svn: 190895
2013-09-17 22:45:28 +00:00
Fariborz Jahanian f6c6505eaa ObjectiveC migrator: Don't infer property from
'deprected' setters either. // rdar://14989365

llvm-svn: 190894
2013-09-17 22:41:25 +00:00
Matt Arsenault 38820972e9 FileCheck refactor: use enum instead of bunch of bools
llvm-svn: 190893
2013-09-17 22:30:02 +00:00
David Majnemer 1ebb145bdf [-cxx-abi microsoft] Mangle local TagDecls appropriately
Summary:
When selecting a mangling for an anonymous tag type:
- We should first try it's typedef'd name.
- If that doesn't work, we should mangle in the name of the declarator
  that specified it as a declaration specifier.
- If that doesn't work, fall back to a static mangling of
  <unnamed-type>.

This should make our anonymous type mangling compatible.

This partially fixes PR16994; we would need to have an implementation of
scope numbering to get it right (a separate issue).

Reviewers: rnk, rsmith, rjmccall, cdavis5x

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1540

llvm-svn: 190892
2013-09-17 22:21:27 +00:00
Quentin Colombet 870b662779 Revert the load slicing done in r190870.
To avoid regressions with bitfield optimizations, this slicing should take place
later, like ISel time.

llvm-svn: 190891
2013-09-17 22:01:26 +00:00
Fariborz Jahanian 75226d5c0d ObjectiveC migrator. Ignore migrating 'deprecated'
entities. // rdar://14989365

llvm-svn: 190890
2013-09-17 21:56:04 +00:00
Daniel Malea 38a7d6fc7a Disabling test broken (on GCC buildbot) due to http://llvm.org/pr14637
- prompt disappears with older libedit versions
- will re-enable once we have a recent libedit on the buildbot in question

llvm-svn: 190889
2013-09-17 21:44:15 +00:00
Reid Kleckner 3ea536fef4 COFF: Emit all MCSymbols rather than filtering out some of them
In particular, this means we emit non-external symbols defined to
variables, such as aliases or absolute addresses.

This is needed to implement /safeseh, and it appears there was some
confusion about what symbols to emit previously.

llvm-svn: 190888
2013-09-17 21:24:44 +00:00
Reid Kleckner 50689eb917 COFF: Remove ExportSection, which has been dead since r114823
llvm-svn: 190887
2013-09-17 21:24:02 +00:00
Eric Christopher e7af7bd8d0 Move variable into assert to avoid unused variable warning.
llvm-svn: 190886
2013-09-17 21:13:57 +00:00