Commit Graph

158218 Commits

Author SHA1 Message Date
Eric Christopher cc87253f90 Fix closing brace around ifdef.
llvm-svn: 190965
2013-09-18 22:40:18 +00:00
Hans Wennborg 9cb7d9ba94 clang-cl: Don't warn about overriding /MD with /MT, /Fo with another /Fo, etc.
I put in the warnings because MSVC has them, but I don't think they're very
useful.

Clang does not warn about overriding flags in general, e.g. it's perfectly
fine to have -fomit-frame-pointer followed by -fno-omit-frame-pointer.

We should focus on warning where things get confusing, such as with the
/TP and /TC options. In "clang-cl /TC a.c /TP b.cc", the user might not
realize that the /TP flag will apply to both files, and we warn about that.

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

llvm-svn: 190964
2013-09-18 22:26:39 +00:00
Eric Christopher 0db88a7d7e The intrinsics should all have C linkage.
llvm-svn: 190963
2013-09-18 22:24:01 +00:00
Adrian Prantl 7f2ef22452 get rid of extra parentheses.
llvm-svn: 190962
2013-09-18 22:18:17 +00:00
Adrian Prantl 262bcf4584 Debug info: Get rid of the VLA indirection hack in FastISel.
Use the DIVariable::isIndirect() flag set by the frontend instead of
guessing whether to set the machine location's indirection bit.
Paired commit with CFE.

llvm-svn: 190961
2013-09-18 22:08:59 +00:00
Adrian Prantl 0315f38a92 Debug info: Explicitly set the DIVariable::isIndirect() flag for VLAs.
This allows us to get rid of an ugly hack in the backend.
Paired commit with LLVM.

llvm-svn: 190960
2013-09-18 22:08:57 +00:00
Richard Smith 5977d875c1 Remove some dead code.
llvm-svn: 190959
2013-09-18 21:55:14 +00:00
Preston Gurd dd9891f22d Attempt to fix llvm-ppc64-linux2 buildbot failure by adding
-march=x86 to SLM test.

llvm-svn: 190958
2013-09-18 21:39:33 +00:00
Preston Gurd 457daddc9b Verify that llvm can generate the prefetchw instruction when the CPU is
Atom Silvermont.

Patch by Sriram Murali.

llvm-svn: 190957
2013-09-18 21:08:09 +00:00
Fariborz Jahanian 1c900bcf26 ObjectiveC migrator: For consistency, also infer
'instancetype' for known family of methods
with related result type; such as 'init'
methods. // rdar://14987948

llvm-svn: 190956
2013-09-18 20:35:47 +00:00
Greg Clayton edfaae3956 Fixed a logic error in Module::ResolveSymbolContextForAddress(). Asking an address if its offet is greater than zero doesn't actually correctly tell us wether the address is section offset or not. A symbol could be the first symbol in a section and its offset can be zero. Also, a non-section offset lldb_private::Address can have a NULL section and calling GetOffset() will return the absolute address. To really test if an address is section offset clients should use Address::IsSectionOffset(). Also simplified the code that backs the address up by one to use the Address::Slide() function.
llvm-svn: 190955
2013-09-18 20:03:31 +00:00
Ed Maste 756e1ff676 Apply ProcessMonitor changes from r190820 to FreeBSD
llvm-svn: 190954
2013-09-18 19:34:08 +00:00
Jordan Rose 36bc6b4559 [analyzer] Don't even try to convert floats to booleans for now.
We now have symbols with floating-point type to make sure that
(double)x == (double)x comes out true, but we still can't do much with
these. For now, don't even bother trying to create a floating-point zero
value; just give up on conversion to bool.

PR14634, C++ edition.

llvm-svn: 190953
2013-09-18 18:58:58 +00:00
Galina Kistanova 5eef1ca192 Remove empty dir.
llvm-svn: 190952
2013-09-18 18:39:38 +00:00
Rui Ueyama ccd21fe418 [PECOFF] Fix base relocation block alignment
Base relocation block should be aligned on a 32-bit boundary. While the PECOFF
spec mentions only aligning the blocks, and not padding them, link.exe seems
to add an extra IMAGE_REL_I386_ABSOLUTE entry (just a zeroed WORD) in order to
pad the blocks.

Patch by Ron Ofir.

llvm-svn: 190951
2013-09-18 18:36:39 +00:00
John Thompson 740839260b Check for #include in extern and namespace blocks.
llvm-svn: 190950
2013-09-18 18:19:43 +00:00
Rui Ueyama 0742ce9cf7 [PECOFF] Make helper functions private.
llvm-svn: 190949
2013-09-18 18:15:18 +00:00
Galina Kistanova 7650db0680 Remove empty dir.
llvm-svn: 190948
2013-09-18 17:58:41 +00:00
Fariborz Jahanian 2ba62a7206 ObjectiveC migrator: Infer property in the presense
of methods annotated with attributes. 
// rdar://14987909

llvm-svn: 190947
2013-09-18 17:22:25 +00:00
Filip Pizlo 57093e88e0 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: 190946
2013-09-18 16:40:14 +00:00
Daniel Malea 82066ed0fb SymbolVendor/ELF is actually referenced by default by lib/Makefile on all
platforms and called in lldb.cpp while it is built only on some, excluding OSX.
There is no reason to not build it then by default on all platforms.

This fixes build on OSX using llvm configure & make scripts.

Patch (2 of 2) by Adam Strzelecki!

llvm-svn: 190945
2013-09-18 16:33:12 +00:00
Daniel Malea 15832bc7a1 Respect SDKROOT in lldb Makefile
- If it is not defined (empty) everything remain as it was before.

Patch (1 of 2) by Adam Strzelecki!

llvm-svn: 190944
2013-09-18 16:32:28 +00:00
Fariborz Jahanian e47a14addc ObjectiveC migrator: placing another check for
'deprecated' container before doing the 'instancetype'
inference.

llvm-svn: 190943
2013-09-18 15:43:52 +00:00
Michael Sartain c258b3010f Warning cleanup.
llvm-svn: 190942
2013-09-18 15:32:06 +00:00
Chandler Carruth dbf6589b56 More XCore TTI cleanup -- remove an unused private field flagged by
-Wunused-private-field with Clang.

llvm-svn: 190941
2013-09-18 14:11:11 +00:00
Chandler Carruth b5a34963c8 Name the XCore target-specific subdirectories canonically.
llvm-svn: 190940
2013-09-18 14:08:30 +00:00
Kostya Serebryany f322382e22 [asan] call __asan_stack_malloc_N only if use-after-return detection is enabled with the run-time option
llvm-svn: 190939
2013-09-18 14:07:14 +00:00
NAKAMURA Takumi 69ae1b9aa2 A couple of tests, in llvm/test/Transforms/*/xcore, are XCore-specific. They should be excluded when XCore is not built.
llvm-svn: 190938
2013-09-18 13:56:16 +00:00
NAKAMURA Takumi 0b642ec13d Target/XCore/CMakeLists.txt: Add XCoreTargetTransformInfo.cpp.
llvm-svn: 190937
2013-09-18 12:59:41 +00:00
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