Commit Graph

131200 Commits

Author SHA1 Message Date
Kevin Enderby 5c490f1b8f Fix a bug in ARMMachObjectWriter::RecordRelocation() in ARMMachObjectWriter.cpp
where the other_half of the movt and movw relocation entries needs to get set
and only with the 16 bits of the other half.

rdar://10038370

llvm-svn: 160978
2012-07-30 18:46:15 +00:00
Jakob Stoklund Olesen 7361846f32 Add MachineInstr::isTransient().
This is a cleaned up version of the isFree() function in
MachineTraceMetrics.cpp.

Transient instructions are very unlikely to produce any code in the
final output. Either because they get eliminated by RegisterCoalescing,
or because they are pseudo-instructions like labels and debug values.

llvm-svn: 160977
2012-07-30 18:34:14 +00:00
Jakob Stoklund Olesen 3df6c46fdd Add MachineTraceMetrics::verify().
This function verifies the consistency of cached data in the
MachineTraceMetrics analysis.

llvm-svn: 160976
2012-07-30 18:34:11 +00:00
Dmitri Gribenko 1ba47ca4b5 Comment parser: don't crash on a completely empty \param followed by a block
command

llvm-svn: 160975
2012-07-30 18:05:28 +00:00
Dmitri Gribenko ec551f67e5 c-index-test: remove dead store. Found by Clang static analyzer!
llvm-svn: 160974
2012-07-30 18:00:35 +00:00
Dmitri Gribenko 4aa05c571e Lexer: remove dead stores. Found by Clang static analyzer!
llvm-svn: 160973
2012-07-30 17:59:40 +00:00
Dmitri Gribenko ad40ba91ae Comment dumper: silence a warning by not casting away const
llvm-svn: 160972
2012-07-30 17:52:50 +00:00
Dmitri Gribenko 5de4c064c1 Add missing include for Linux buildbot
llvm-svn: 160971
2012-07-30 17:49:32 +00:00
Dmitri Gribenko a260c030b8 Add an assert to ParamCommandComment::getParamIndex() -- it should not be
called unless index is valid.

llvm-svn: 160970
2012-07-30 17:38:19 +00:00
Jakob Stoklund Olesen eb488fe165 Verify that the CFG hasn't changed during invalidate().
The MachineTraceMetrics analysis must be invalidated before modifying
the CFG. This will catch some of the violations of that rule.

llvm-svn: 160969
2012-07-30 17:36:49 +00:00
Jakob Stoklund Olesen fee94ca15b Add MachineBasicBlock::isPredecessor().
A->isPredecessor(B) is the same as B->isSuccessor(A), but it can
tolerate a B that is null or dangling. This shouldn't happen normally,
but it it useful for verification code.

llvm-svn: 160968
2012-07-30 17:36:47 +00:00
Howard Hinnant 088e37c77a Despite my pathological distrust of spin locks, the number just don't lie. I've put a small spin in __sp_mut::lock() on std::mutex::try_lock(), which is testing quite well. In my experience, putting in a yield for every failed iteration is also a major performance booster. This change makes one of the performance tests I was using (a highly contended one) run about 20 times faster.
llvm-svn: 160967
2012-07-30 17:13:21 +00:00
Hans Wennborg ebcd1c7ca2 Make -Wformat check the argument type for %n.
This makes Clang check that the corresponding argument for "%n" in a
format string is a pointer to int.

llvm-svn: 160966
2012-07-30 17:11:32 +00:00
Dmitri Gribenko dfe14f7848 Comment parser: add one more test
llvm-svn: 160965
2012-07-30 16:52:51 +00:00
Benjamin Kramer 6d574fe155 Update source location in test.
llvm-svn: 160964
2012-07-30 16:51:34 +00:00
Filipe Cabecinhas 0b75116ae9 Fixed ePathTypePythonDir for Linux and FreeBSD (at least). This works for non-installed compilations. I will test further.
llvm-svn: 160963
2012-07-30 16:46:32 +00:00
Benjamin Kramer e3895eb050 Use the location of the copy assignment when diagnosing classes that are nontrivial because of it.
llvm-svn: 160962
2012-07-30 16:41:40 +00:00
Benjamin Kramer bc7dd9ea02 Fix ambiguity detection in GetBestOverloadCandidateSimple.
When performing the simplistic overload resolution for single-argument methods,
don't check the best overload for ambiguity with itself when the best overload
doesn't happen to be the first one.

Fixes PR13480.

llvm-svn: 160961
2012-07-30 15:53:26 +00:00
Howard Hinnant 355b660a4b Updated status
llvm-svn: 160959
2012-07-30 13:59:36 +00:00
Jiangning Liu eabbf92223 Fix dynamic object linker for ARM GNUEABIHF.
llvm-svn: 160958
2012-07-30 11:05:56 +00:00
Alexey Samsonov 36d2dff143 [ASan] fix cmake build warning
llvm-svn: 160957
2012-07-30 10:18:31 +00:00
Alexey Samsonov a2e0cf4802 [TSan] delete trailing spaces
llvm-svn: 160955
2012-07-30 07:46:09 +00:00
Nadav Rotem 77f1b9c477 When constant folding GEP expressions, keep the address space information of pointers.
Together with Ran Chachick <ran.chachick@intel.com>

llvm-svn: 160954
2012-07-30 07:25:20 +00:00
Craig Topper efd97044a3 Mark MOVZX16/MOVSX16 as neverHasSideEffects/mayLoad
llvm-svn: 160953
2012-07-30 07:14:07 +00:00
Craig Topper c6b7ef61f4 Mark MOVZX32_NOREX as isCodeGenOnly and neverHasSideEffects. The isCodeGenOnly change allows special detection of _NOREX instructions to be removed from tablegen disassembler code.
llvm-svn: 160951
2012-07-30 06:48:11 +00:00
Craig Topper 08ead0b14e Remove some unnecessary filter checks. They were already covered by IsCodeGenOnly
llvm-svn: 160950
2012-07-30 06:27:19 +00:00
Craig Topper 6f4ad80dc8 Remove check for sub class of X86Inst from filter function since caller guaranteed it. Replace another sub class check with ShouldBeEmitted flag since it was factored in there already.
llvm-svn: 160949
2012-07-30 05:39:34 +00:00
Craig Topper b58dc17025 Simplify code that filtered certain instructions in two different ways. No functional change.
llvm-svn: 160948
2012-07-30 05:10:05 +00:00
Daniel Jasper 3cb72b476d Fix for ASTMatchFinder to visit a functions parameter declarations.
llvm-svn: 160947
2012-07-30 05:03:25 +00:00
Craig Topper 60a58ac3e2 Remove check for f256mem from has256BitOperands as nothing depended on it and it isn't the only 256-bit memory type anyway.
llvm-svn: 160946
2012-07-30 04:53:00 +00:00
Craig Topper ac172e225d Remove trailing whitespace.
llvm-svn: 160945
2012-07-30 04:48:12 +00:00
Howard Hinnant fe9fe2dedc Updated the complete by-chapter graph
llvm-svn: 160943
2012-07-30 02:29:34 +00:00
Craig Topper 14eac5dda8 Give VCVTTPD2DQ priority over CVTTPD2DQ.
llvm-svn: 160942
2012-07-30 02:20:32 +00:00
Craig Topper f881d385da Fix patterns for CVTTPS2DQ to specify SSE2 instead of SSE1.
llvm-svn: 160941
2012-07-30 02:14:02 +00:00
Howard Hinnant d77851e837 Implement [util.smartptr.shared.atomic]. This is the last unimplemented
section in libc++.  This requires a recompiled dylib.  Failure to rebuild
the dylib will result in a link-time error if and only if the functions from
[util.smartptr.shared.atomic] are used.

The implementation is not lock free.  After considerable thought, I know of no
way to make the implementation lock free.  Ideas welcome along that front.  But
changing the ABI of shared_ptr is not on the table at this point.

The mutex used to lock these function is encapsulated by std::__sp_mut.  The
only thing the client knows about std::__sp_mut is that it has a void* data
member, can't be constructed, and has lock and unlock members.  Within the
binary __sp_mut is currently implemented as a pointer to a std::mutex.  That can
change in the future without disturbing the ABI (as long as sizeof(__sp_mut)
remains constant.

I specifically did not make __sp_mut a spin lock as I have a pathological
distrust of spin locks.  Testing on OS X reveals that the use of std::mutex in
this role is not a large performance penalty as long as the contention for the
mutex is low (more likely to get the lock than to have to wait).  In the future
we can still make __sp_mut a spin lock if that is what is desired (without ABI
damage).

The dylib contains 16 __sp_mut's to be chosen based on the hash of the address
of the shared_ptr.  The constant 16 is a ball-park reasonable space/time
tradeoff.

std::hash<T*> was changed to call __murmur2_or_cityhash, instead of the identity
function.  I had thought we had already done this, but I was mistaken.

All of this is under #if __has_feature(cxx_atomic) even though the
implementation is not lock free, because the signatures require access to
std::memory_order, which is currently available only under
__has_feature(cxx_atomic).

llvm-svn: 160940
2012-07-30 01:40:57 +00:00
Craig Topper 415b3586d0 Fix up patterns for VCVTSS2SD. Specifically give it priority over SSE form. Add an OptForSpeed to explicitly pair up with an OptForSize that was already on another pattern.
llvm-svn: 160939
2012-07-30 01:38:57 +00:00
Craig Topper 28402efcb6 Fix load types on intrinsic forms of SS2SD and SD2SS AVX/SSE convert instruction patterns.
llvm-svn: 160938
2012-07-29 23:26:34 +00:00
Craig Topper b6767f3acd Move more SSE/AVX convert instruction patterns into their definitions.
llvm-svn: 160937
2012-07-29 22:30:06 +00:00
Howard Hinnant a8c5d770f9 Andrew Morrow: Mainline clang seems to have recently become more strict about the
consistent application of visibility attributes, which causes some new
breakage in libcxxabi:

In file included from src/libcxxabi/src/cxa_default_handlers.cpp:19:
src/libcxxabi/src/private_typeinfo.h:123:23: error: visibility does
not match previous declaration
class __attribute__ ((__visibility__(default))) __class_type_info
                     ^
src/libcxxabi/src/private_typeinfo.h:19:13: note: previous attribute is here
#pragma GCC visibility push(hidden)
           ^
1 error generated.

The forward declaration of __class_type_info is picking up hidden
visibility from the #pragma, which conflicts with the default
visibility applied when the class is later fully declared. I'm
assuming that the full declaration has it right (and that the
diagnostic is correct), so the attached patch applies the default
visibility attribute to the forward declaration.

llvm-svn: 160933
2012-07-29 20:41:19 +00:00
Howard Hinnant 95d917f8ee Andrew Morrow: The variable 't1' on line 10188 of cxa_demangle.cpp is uninitialized
which generates -Wsometimes-uninitialized.  Howard:  The only thing this patch is missing is an update to CREDITS.TXT.

llvm-svn: 160932
2012-07-29 16:14:52 +00:00
David Chisnall 5f99f48bcd Provide correct linker command line options on FreeBSD 8 (GNU ld 2.15) and on newer FreeBSD (GNU ld 2.17).
Patch by Dimitry Andric!

llvm-svn: 160931
2012-07-29 15:24:44 +00:00
Benjamin Kramer ef2932125d APInt: Simplify code.
No functionality change.

llvm-svn: 160929
2012-07-29 12:33:29 +00:00
Benjamin Kramer e0d6e8427a Microoptimize isOffsetInFileID a bit.
llvm-svn: 160928
2012-07-29 11:12:46 +00:00
Manman Ren f87dd7c01b Revert r160920 and r160919 due to dragonegg and clang selfhost failure
llvm-svn: 160927
2012-07-29 02:44:09 +00:00
Nick Lewycky d2c3bdd269 Add testcases for GlobalOpt changes in r160693 and r160757.
llvm-svn: 160925
2012-07-29 01:15:37 +00:00
Richard Smith f86b0ae196 PR13433: In Microsoft mode, don't require function calls within decltype
expressions to have complete return types (or accessible destructors). If the
return type is required to be complete for some other reason (for instance, if
it is needed by overload resolution), then it will still be required to be
complete. This is apparently required in order to parse a MSVC11 header.

llvm-svn: 160924
2012-07-28 19:54:11 +00:00
Fariborz Jahanian f7759e8fab assert on ACC_bottom when checking for invalid
CF to ARC conversions.

llvm-svn: 160923
2012-07-28 18:59:49 +00:00
Craig Topper fc93281c07 Fold patterns for some of the SSE/AVX convert instructions into their instruction definitions.
llvm-svn: 160922
2012-07-28 18:59:19 +00:00
Craig Topper 024797b9a2 Mark some of the SSE/AVX convert instructions as mayLoad/neverHasSideEffects.
llvm-svn: 160921
2012-07-28 18:36:39 +00:00
Manman Ren 9de95e779c X86 Peephole: fold loads to the source register operand if possible.
Trying to fix the bot by specifying a triple in the failing testing cases.

llvm-svn: 160920
2012-07-28 17:51:24 +00:00