Evgeniy Stepanov [Wed, 10 Jul 2013 14:01:51 +0000 (14:01 +0000)]
[sanitizer] Fix handling of edge cases in mbstowcs-like interceptors.
llvm-svn: 186002
Vladimir Medic [Wed, 10 Jul 2013 12:27:25 +0000 (12:27 +0000)]
Reverting commit r185999 due to buildboot failure.
llvm-svn: 186001
Vladimir Medic [Wed, 10 Jul 2013 12:26:26 +0000 (12:26 +0000)]
Reverting commit r185999 due to buildboot failure.
llvm-svn: 186000
Vladimir Medic [Wed, 10 Jul 2013 10:18:10 +0000 (10:18 +0000)]
Add support for Mips break and syscall insructions. The corresponding test cases are added.
llvm-svn: 185999
Chandler Carruth [Wed, 10 Jul 2013 09:50:29 +0000 (09:50 +0000)]
Fix a bug in the readdir_r interceptor: when we reach the end of the
directory stream, the entry is not written to, instead *result is set to
NULL and the entry is not written to at all.
I'm still somewhat suspicious of the correct instrumention here --
I feel like it should be marking the written range as the pointer in
*result and the length (*result)->d_reclen in case the implementation
decides not to use the passed-in entry (if that's even allowed).
Finally, the definition of 'struct dirent' analog used in the
interceptor is wrong in 32-bit mode with _FILE_OFFSET_BITS=64 as it hard
codes the use of a pointer-sized offset.
I've added a somewhat goofy test for the bug I fixed via ASan --
suggestions on how to better test the interceptor logic itself welcome.
llvm-svn: 185998
Serge Pavlov [Wed, 10 Jul 2013 04:59:14 +0000 (04:59 +0000)]
Fixed comment of Sema::FindInstantiatedDecl.
llvm-svn: 185997
Jim Ingham [Wed, 10 Jul 2013 02:21:57 +0000 (02:21 +0000)]
Call xmlFree on the node contents returned by xmlNodeGetContent, as the docs say to do.
<rdar://problem/
14391836>
llvm-svn: 185996
Stephen Lin [Wed, 10 Jul 2013 01:57:39 +0000 (01:57 +0000)]
Fix typo
llvm-svn: 185995
Stephen Lin [Wed, 10 Jul 2013 01:54:24 +0000 (01:54 +0000)]
Explicitly define ARMISelLowering::isFMAFasterThanFMulAndFAdd. No functionality change.
Currently ARM is the only backend that supports FMA instructions (for at least some subtargets) but does not implement this virtual, so FMAs are never generated except from explicit fma intrinsic calls. Apparently this is due to the fact that it supports both fused (one rounding step) and unfused (two rounding step) multiply + add instructions. This patch clarifies that this the case without changing behavior by implementing the virtual function to simply return false, as the default TargetLoweringBase version does.
It is possible that some cpus perform the fused version faster than the unfused version and vice-versa, so the function implementation should be revisited if hard data is found.
llvm-svn: 185994
Adrian Prantl [Wed, 10 Jul 2013 01:53:37 +0000 (01:53 +0000)]
Un-break the buildbot by tweaking the indirection flag.
Pulled in a testcase from the debuginfo-test suite.
llvm-svn: 185993
Adrian Prantl [Wed, 10 Jul 2013 01:53:30 +0000 (01:53 +0000)]
Document a known limitation of the status quo.
llvm-svn: 185992
Eli Friedman [Wed, 10 Jul 2013 01:33:19 +0000 (01:33 +0000)]
Finish off mangling locals in block literals.
Specifically, handle the case where the block is in a default argument
in a class method. The mangling here follows what we do for lambdas.
llvm-svn: 185991
Greg Clayton [Wed, 10 Jul 2013 01:23:25 +0000 (01:23 +0000)]
Cleanup on the unified section list changes. Main changes are:
- ObjectFile::GetSymtab() and ObjectFile::ClearSymtab() no longer takes any flags
- Module coordinates with the object files and contain a unified section list so that object file and symbol file can share sections when they need to, yet contain their own sections.
Other cleanups:
- Fixed Symbol::GetByteSize() to not have the symbol table compute the byte sizes on the fly
- Modified the ObjectFileMachO class to compute symbol sizes all at once efficiently
- Modified the Symtab class to store a file address lookup table for more efficient lookups
- Removed Section::Finalize() and SectionList::Finalize() as they did nothing
- Improved performance of the detection of symbol files that have debug maps by excluding stripped files and core files, debug files, object files and stubs
- Added the ability to tell if an ObjectFile has been stripped with ObjectFile::IsStripped() (used this for the above performance improvement)
llvm-svn: 185990
Eli Friedman [Wed, 10 Jul 2013 01:13:27 +0000 (01:13 +0000)]
Get rid of dead/useless code for block mangling.
llvm-svn: 185989
Greg Clayton [Wed, 10 Jul 2013 01:05:05 +0000 (01:05 +0000)]
Fixed the CommunicationKDP::SendRequestAndGetReply() to correctly be able to deal with getting a reply from a previous packet without resending the packet again.
llvm-svn: 185988
Duncan Sands [Wed, 10 Jul 2013 00:52:41 +0000 (00:52 +0000)]
Correct comment.
llvm-svn: 185987
Eli Friedman [Wed, 10 Jul 2013 00:30:46 +0000 (00:30 +0000)]
More local mangling fixes.
Compute mangling numbers for externally visible local variables and tags.
Change the mangler to consistently use discriminators where necessary.
Tweak the scheme we use to number decls which are not externally visible
to avoid unnecessary discriminators in common cases now that we request
them more consistently.
Fixes <rdar://problem/
14204721>.
llvm-svn: 185986
Fariborz Jahanian [Wed, 10 Jul 2013 00:20:11 +0000 (00:20 +0000)]
objc migrator: More refinment of property
attributes in migration. Specialli use of
'copy' attribute for retainable object types.
llvm-svn: 185985
Eric Christopher [Tue, 9 Jul 2013 23:48:45 +0000 (23:48 +0000)]
Fix comment.
llvm-svn: 185984
Michael Sartain [Tue, 9 Jul 2013 23:22:53 +0000 (23:22 +0000)]
Add silent option to command source.
Patch from Matthew Sorrels
llvm-svn: 185983
Jim Grosbach [Tue, 9 Jul 2013 22:59:22 +0000 (22:59 +0000)]
ARM: Fix incorrect pack pattern for thumb2
Propagate the fix from r185712 to Thumb2 codegen as well. Original
commit message applies here as well:
A "pkhtb x, x, y asr #num" uses the lower 16 bits of "y asr #num" and
packs them in the bottom half of "x". An arithmetic and logic shift are
only equivalent in this context if the shift amount is 16. We would be
shifting in ones into the bottom 16bits instead of zeros if "y" is
negative.
rdar://
14338767
llvm-svn: 185982
Andrew Kaylor [Tue, 9 Jul 2013 22:36:48 +0000 (22:36 +0000)]
Reverting ProcessMonitor shared pointer changes
llvm-svn: 185981
Peter Collingbourne [Tue, 9 Jul 2013 22:04:28 +0000 (22:04 +0000)]
[asan] Update blacklists to use categories.
Differential Revision: http://llvm-reviews.chandlerc.com/D1094
llvm-svn: 185980
Peter Collingbourne [Tue, 9 Jul 2013 22:03:30 +0000 (22:03 +0000)]
Apply BlackList -> SpecialCaseList rename in Clang.
Differential Revision: http://llvm-reviews.chandlerc.com/D1095
llvm-svn: 185979
Peter Collingbourne [Tue, 9 Jul 2013 22:03:17 +0000 (22:03 +0000)]
Implement categories for special case lists.
A special case list can now specify categories for specific globals,
which can be used to instruct an instrumentation pass to treat certain
functions or global variables in a specific way, such as by omitting
certain aspects of instrumentation while keeping others, or informing
the instrumentation pass that a specific uninstrumentable function
has certain semantics, thus allowing the pass to instrument callers
according to those semantics.
For example, AddressSanitizer now uses the "init" category instead of
global-init prefixes for globals whose initializers should not be
instrumented, but which in all other respects should be instrumented.
The motivating use case is DataFlowSanitizer, which will have a
number of different categories for uninstrumentable functions, such
as "functional" which specifies that a function has pure functional
semantics, or "discard" which indicates that a function's return
value should not be labelled.
Differential Revision: http://llvm-reviews.chandlerc.com/D1092
llvm-svn: 185978
Peter Collingbourne [Tue, 9 Jul 2013 22:03:12 +0000 (22:03 +0000)]
Add some SpecialCaseList unit tests.
Differential Revision: http://llvm-reviews.chandlerc.com/D1091
llvm-svn: 185977
Peter Collingbourne [Tue, 9 Jul 2013 22:03:09 +0000 (22:03 +0000)]
Introduce a SpecialCaseList ctor which takes a MemoryBuffer to make
it more unit testable, and fix memory leak in the other ctor.
Differential Revision: http://llvm-reviews.chandlerc.com/D1090
llvm-svn: 185976
Peter Collingbourne [Tue, 9 Jul 2013 22:02:49 +0000 (22:02 +0000)]
Rename BlackList class to SpecialCaseList and move it to Transforms/Utils.
Differential Revision: http://llvm-reviews.chandlerc.com/D1089
llvm-svn: 185975
Fariborz Jahanian [Tue, 9 Jul 2013 22:02:20 +0000 (22:02 +0000)]
Objective-C: merge objc_requires_super attribute of
method declaration into its implementation to
prevent a bogus warning about mismatched attributes.
then make sure the warning about missing call to super comes out
of the method implementation. // rdar://
14251387
llvm-svn: 185974
David Majnemer [Tue, 9 Jul 2013 22:01:22 +0000 (22:01 +0000)]
InstSimplify: X >> X -> 0
llvm-svn: 185973
Adrian Prantl [Tue, 9 Jul 2013 21:44:11 +0000 (21:44 +0000)]
move test into the appropriate subdir.
llvm-svn: 185972
Adrian Prantl [Tue, 9 Jul 2013 21:44:06 +0000 (21:44 +0000)]
Typo.
llvm-svn: 185971
Nadav Rotem [Tue, 9 Jul 2013 21:38:08 +0000 (21:38 +0000)]
Fix PR16571, which is a bug in the code that checks that all of the types in the bundle are uniform.
llvm-svn: 185970
Marshall Clow [Tue, 9 Jul 2013 20:34:14 +0000 (20:34 +0000)]
move __save_flags from <random> to <ios> in preparation for reuse; no functionality change
llvm-svn: 185968
Adrian Prantl [Tue, 9 Jul 2013 20:29:03 +0000 (20:29 +0000)]
Reapply an improved version of r180816/180817.
Do not generate VLAs as complex variables any more, as they are now
correctly represented as breg+0 locations in the backend.
(Paired commit with LLVM: r185966)
rdar://problem/
13658587
llvm-svn: 185967
Adrian Prantl [Tue, 9 Jul 2013 20:28:37 +0000 (20:28 +0000)]
Reapply an improved version of r180816/180817.
Change the informal convention of DBG_VALUE machine instructions so that
we can express a register-indirect address with an offset of 0.
The old convention was that a DBG_VALUE is a register-indirect value if
the offset (operand 1) is nonzero. The new convention is that a DBG_VALUE
is register-indirect if the first operand is a register and the second
operand is an immediate. For plain register values the combination reg,
reg is used. MachineInstrBuilder::BuildMI knows how to build the new
DBG_VALUES.
rdar://problem/
13658587
llvm-svn: 185966
Enrico Granata [Tue, 9 Jul 2013 20:14:26 +0000 (20:14 +0000)]
Second attempt at getting the PyCallable changes in trunk
Thanks to Daniel Malea for helping test this patch for Linux happiness!
llvm-svn: 185965
Michael Gottesman [Tue, 9 Jul 2013 20:08:46 +0000 (20:08 +0000)]
Fixed up the comments in FastISel.h so that they conform to the LLVM style guide.
llvm-svn: 185964
Michael Gottesman [Tue, 9 Jul 2013 20:00:25 +0000 (20:00 +0000)]
Added "mode: c++" to FastISel.h header.
llvm-svn: 185963
Stephen Lin [Tue, 9 Jul 2013 19:27:10 +0000 (19:27 +0000)]
Appease buildbots after r185956: just set -mcpu explicitly, as it should have been from the beginning.
llvm-svn: 185962
Stephen Lin [Tue, 9 Jul 2013 18:55:52 +0000 (18:55 +0000)]
Appease Atom buildbot after r185956 (explicitly turn on AVX)
llvm-svn: 185961
Hal Finkel [Tue, 9 Jul 2013 18:55:10 +0000 (18:55 +0000)]
WidenVecRes_BUILD_VECTOR must use the first operand's type
Because integer BUILD_VECTOR operands may have a larger type than the result's
vector element type, and all operands must have the same type, when widening a
BUILD_VECTOR node by adding UNDEFs, we cannot use the vector element type, but
rather must use the type of the existing operands.
Another bug found by llvm-stress.
llvm-svn: 185960
Bill Schmidt [Tue, 9 Jul 2013 18:50:20 +0000 (18:50 +0000)]
[PowerPC] Better fix for PR16556.
A more complete example of the bug in PR16556 was recently provided,
showing that the previous fix was not sufficient. The previous fix is
reverted herein.
The real problem is that ReplaceNodeResults() uses LowerFP_TO_INT as
custom lowering for FP_TO_SINT during type legalization, without
checking whether the input type is handled by that routine.
LowerFP_TO_INT requires the input to be f32 or f64, so we fail when
the input is ppcf128.
I'm leaving the test case from the initial fix (r185821) in place, and
adding the new test as another crash-only check.
llvm-svn: 185959
Stephen Lin [Tue, 9 Jul 2013 18:41:43 +0000 (18:41 +0000)]
Attempt to appease buildbot after r185956 by explicitly turning setting -fma,-fma4 attrs (I'm assuming they're set because the bot is running on machine that has one or the other.)
llvm-svn: 185958
Stephen Lin [Tue, 9 Jul 2013 18:16:56 +0000 (18:16 +0000)]
AArch64/PowerPC/SystemZ/X86: This patch fixes the interface, usage, and all
in-tree implementations of TargetLoweringBase::isFMAFasterThanMulAndAdd in
order to resolve the following issues with fmuladd (i.e. optional FMA)
intrinsics:
1. On X86(-64) targets, ISD::FMA nodes are formed when lowering fmuladd
intrinsics even if the subtarget does not support FMA instructions, leading
to laughably bad code generation in some situations.
2. On AArch64 targets, ISD::FMA nodes are formed for operations on fp128,
resulting in a call to a software fp128 FMA implementation.
3. On PowerPC targets, FMAs are not generated from fmuladd intrinsics on types
like v2f32, v8f32, v4f64, etc., even though they promote, split, scalarize,
etc. to types that support hardware FMAs.
The function has also been slightly renamed for consistency and to force a
merge/build conflict for any out-of-tree target implementing it. To resolve,
see comments and fixed in-tree examples.
llvm-svn: 185956
Hal Finkel [Tue, 9 Jul 2013 18:16:16 +0000 (18:16 +0000)]
Don't crash in SE dealing with ashr x, -1
ScalarEvolution::getSignedRange uses ComputeNumSignBits from ValueTracking on
ashr instructions. ComputeNumSignBits can return zero, but this case was not
handled correctly by the code in getSignedRange which was calling:
APInt::getSignedMinValue(BitWidth).ashr(NS - 1)
with NS = 0, resulting in an assertion failure in APInt::ashr.
Now, we just return the conservative result (as with NS == 1).
Another bug found by llvm-stress.
llvm-svn: 185955
David Majnemer [Tue, 9 Jul 2013 18:11:10 +0000 (18:11 +0000)]
ValueTracking: Fix bugs in isKnownToBeAPowerOfTwo
(add nsw x, (and x, y)) isn't a power of two if x is zero, it's zero
(add nsw x, (xor x, y)) isn't a power of two if y has bits set that aren't set in x
llvm-svn: 185954
Nadav Rotem [Tue, 9 Jul 2013 17:55:36 +0000 (17:55 +0000)]
Set the default insert point to the first instruction, and not to end()
llvm-svn: 185953
Nadav Rotem [Tue, 9 Jul 2013 17:54:22 +0000 (17:54 +0000)]
IRBuilder: add an assertion that checks if we try to get a debug loc from ->end();
llvm-svn: 185952
Daniel Malea [Tue, 9 Jul 2013 17:36:18 +0000 (17:36 +0000)]
Cleanup in TestConcurrentEvents.py
- re-enable tests fixed by Matt's commit this morning (addressed llvm.org/pr16567)
- disabled tests affected by new bug llvm.org/pr16575
- removed some commented out code in inferior
llvm-svn: 185951
Howard Hinnant [Tue, 9 Jul 2013 17:29:09 +0000 (17:29 +0000)]
Bill Fisher: This patch fixes a bug where regex_iterator doesn't indicate when it's restarting in the middle of a string. This bug causes /^a/ to match in the middle of the string "aaaaaaa", during iteration.
My patch uses to communicate when is false.
llvm-svn: 185950
Hal Finkel [Tue, 9 Jul 2013 17:02:45 +0000 (17:02 +0000)]
DAGCombine tryFoldToZero cannot create illegal types after type legalization
When folding sub x, x (and other similar constructs), where x is a vector, the
result is a vector of zeros. After type legalization, make sure that the input
zero elements have a legal type. This type may be larger than the result's
vector element type.
This was another bug found by llvm-stress.
llvm-svn: 185949
Fariborz Jahanian [Tue, 9 Jul 2013 16:59:14 +0000 (16:59 +0000)]
ObjC migrator: Add -objcmt-migrate-property to do property
migration. Also, fixes an old bug where older migration
flags were not being checked for properly.
llvm-svn: 185948
Andrew Kaylor [Tue, 9 Jul 2013 16:48:30 +0000 (16:48 +0000)]
Change TestRegisters.py attach case to attach to a.out and enable that test case
llvm-svn: 185947
Andrew Kaylor [Tue, 9 Jul 2013 16:44:27 +0000 (16:44 +0000)]
Use shared pointers to hold the process in ProcessMonitor
llvm-svn: 185946
Ulrich Weigand [Tue, 9 Jul 2013 16:41:09 +0000 (16:41 +0000)]
[PowerPC] Revert r185476 and fix up TLS variant kinds
In the commit message to r185476 I wrote:
>The PowerPC-specific modifiers VK_PPC_TLSGD and VK_PPC_TLSLD
>correspond exactly to the generic modifiers VK_TLSGD and VK_TLSLD.
>This causes some confusion with the asm parser, since VK_PPC_TLSGD
>is output as @tlsgd, which is then read back in as VK_TLSGD.
>
>To avoid this confusion, this patch removes the PowerPC-specific
>modifiers and uses the generic modifiers throughout. (The only
>drawback is that the generic modifiers are printed in upper case
>while the usual convention on PowerPC is to use lower-case modifiers.
>But this is just a cosmetic issue.)
This was unfortunately incorrect, there is is fact another,
serious drawback to using the default VK_TLSLD/VK_TLSGD
variant kinds: using these causes ELFObjectWriter::RelocNeedsGOT
to return true, which in turn causes the ELFObjectWriter to emit
an undefined reference to _GLOBAL_OFFSET_TABLE_.
This is a problem on powerpc64, because it uses the TOC instead
of the GOT, and the linker does not provide _GLOBAL_OFFSET_TABLE_,
so the symbol remains undefined. This means shared libraries
using TLS built with the integrated assembler are currently
broken.
While the whole RelocNeedsGOT / _GLOBAL_OFFSET_TABLE_ situation
probably ought to be properly fixed at some point, for now I'm
simply reverting the r185476 commit. Now this in turn exposes
the breakage of handling @tlsgd/@tlsld in the asm parser that
this check-in was originally intended to fix.
To avoid this regression, I'm also adding a different fix for
this problem: while common code now parses @tlsgd as VK_TLSGD,
a special hack in the asm parser translates this code to the
platform-specific VK_PPC_TLSGD that the back-end now expects.
While this is not really pretty, it's self-contained and
shouldn't hurt anything else for now. One the underlying
problem is fixed, this hack can be reverted again.
llvm-svn: 185945
Matt Kopec [Tue, 9 Jul 2013 15:09:45 +0000 (15:09 +0000)]
Fix signal handling for POSIX (only tested on Linux) processes in multi-threaded programs.
Also fix a related issue where if a thread exits after a thread continue, lldb would hang.
llvm-svn: 185944
Vincent Lejeune [Tue, 9 Jul 2013 15:03:33 +0000 (15:03 +0000)]
R600: Do not predicated basic block with multiple alu clause
Test is not included as it is several 1000 lines long.
To test this functionnality, a test case must generate at least 2 ALU clauses,
where an ALU clause is ~110 instructions long.
NOTE: This is a candidate for the stable branch.
llvm-svn: 185943
Vincent Lejeune [Tue, 9 Jul 2013 15:03:25 +0000 (15:03 +0000)]
R600: Fix a rare bug where swizzle optimization returns wrong values
llvm-svn: 185942
Vincent Lejeune [Tue, 9 Jul 2013 15:03:19 +0000 (15:03 +0000)]
R600: Fix wrong export reswizzling
llvm-svn: 185941
Vincent Lejeune [Tue, 9 Jul 2013 15:03:11 +0000 (15:03 +0000)]
R600: Use DAG lowering pass to handle fcos/fsin
NOTE: This is a candidate for the stable branch.
llvm-svn: 185940
Vincent Lejeune [Tue, 9 Jul 2013 15:03:03 +0000 (15:03 +0000)]
R600: Print Export Swizzle
llvm-svn: 185939
Daniel Jasper [Tue, 9 Jul 2013 14:36:48 +0000 (14:36 +0000)]
Initial support for formatting trailing return types.
This fixes llvm.org/PR15170.
For now, the basic formatting rules are (based on the C++11 standard):
* Surround the "->" with spaces.
* Break before "->".
Also fix typo.
llvm-svn: 185938
Rafael Espindola [Tue, 9 Jul 2013 12:49:24 +0000 (12:49 +0000)]
Add missing getters. They will be used in llvm-ar.
llvm-svn: 185937
Rafael Espindola [Tue, 9 Jul 2013 12:45:11 +0000 (12:45 +0000)]
Archive members cannot be larger than 4GB. Return a uint32_t.
llvm-svn: 185936
Evgeniy Stepanov [Tue, 9 Jul 2013 12:34:25 +0000 (12:34 +0000)]
[sanitizer] Update glob64 interceptor to handle GLOB_ALTDIRFUNC as well.
llvm-svn: 185935
Rafael Espindola [Tue, 9 Jul 2013 12:30:10 +0000 (12:30 +0000)]
We never compare iterators from two archives. Assert that.
llvm-svn: 185934
Rafael Espindola [Tue, 9 Jul 2013 12:22:05 +0000 (12:22 +0000)]
Add getHeader helper and move ToHeader to the cpp file.
llvm-svn: 185933
Evgeniy Stepanov [Tue, 9 Jul 2013 12:07:59 +0000 (12:07 +0000)]
[sanitizer] Support GLOB_ALTDIRFUNC in glob interceptor.
llvm-svn: 185932
Rafael Espindola [Tue, 9 Jul 2013 12:05:01 +0000 (12:05 +0000)]
ArrayRef'ize Sema::FinalizeDeclaratorGroup, Sema::BuildDeclaratorGroup and
Sema::ActOnDocumentableDecls.
Patch by Robert Wilhelm.
llvm-svn: 185931
Daniel Jasper [Tue, 9 Jul 2013 11:57:27 +0000 (11:57 +0000)]
Avoid confusing indentations for chained function calls.
Basically treat a function with a trailing call similar to a function
with multiple parameters.
Before:
aaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaaa))
.
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa();
After:
aaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaaa))
.
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa();
Also fix typo.
llvm-svn: 185930
Joey Gouly [Tue, 9 Jul 2013 11:26:18 +0000 (11:26 +0000)]
Add MC assembly/disassembly support for VRINT{A, N, P, M} to V8FP.
llvm-svn: 185929
NAKAMURA Takumi [Tue, 9 Jul 2013 11:14:30 +0000 (11:14 +0000)]
c-index-test/CMakeLists.txt: Suggest -isystem to include libxml2 with include_directories(SYSTEM).
llvm-svn: 185928
NAKAMURA Takumi [Tue, 9 Jul 2013 11:14:24 +0000 (11:14 +0000)]
c-index-test/Makefile: Use -isystem instead of -I on $(LIBXML2_INC) with -Wdocumentation.
-Wdocumentation won't seek -isystem. LIBXML2's headers in a certain distro might be incompatible to -Wdocumentation.
FIXME: Could autoconf detect clang or availability of -isystem?
llvm-svn: 185927
Joey Gouly [Tue, 9 Jul 2013 11:03:21 +0000 (11:03 +0000)]
Add MC assembly/disassembly support for VRINT{Z, X, R} to V8FP.
llvm-svn: 185926
Alexey Samsonov [Tue, 9 Jul 2013 10:56:13 +0000 (10:56 +0000)]
Document LLVM_USE_SANITIZER CMake option
llvm-svn: 185925
Ulrich Weigand [Tue, 9 Jul 2013 10:00:34 +0000 (10:00 +0000)]
[PowerPC] Support ".machine any"
The PowerPC assembler is supposed to provide a directive .machine
that allows switching the supported CPU instruction set on the fly.
Since we do not yet check CPU feature sets at all and always accept
any available instruction, this is not really useful at this point.
However, it makes sense to accept (and ignore) ".machine any" to
avoid spuriously rejecting existing assembler files that use this.
llvm-svn: 185924
Alexander Potapenko [Tue, 9 Jul 2013 10:00:16 +0000 (10:00 +0000)]
Revert r185872 - "Stop emitting weak symbols into the "coal" sections"
This patch broke `make check-asan` on Mac, causing ld warnings like the following one:
ld: warning: direct access in __GLOBAL__I_a to global weak symbol
___asan_mapping_scale means the weak symbol cannot be overridden at
runtime. This was likely caused by different translation units being
compiled with different visibility settings.
The resulting test binaries crashed with incorrect ASan warnings.
llvm-svn: 185923
Joey Gouly [Tue, 9 Jul 2013 09:59:04 +0000 (09:59 +0000)]
Add MC assembly/disassembly support for VCVT{A, N, P, M} to V8FP.
llvm-svn: 185922
Evgeniy Stepanov [Tue, 9 Jul 2013 09:53:37 +0000 (09:53 +0000)]
[sanitizer] Intercept realpath and canonicalize_file_name.
Handle realpath(path, NULL) form.
llvm-svn: 185921
Evgeniy Stepanov [Tue, 9 Jul 2013 09:47:36 +0000 (09:47 +0000)]
[sanitizer] Wrap lines >80 chars.
llvm-svn: 185920
Richard Sandiford [Tue, 9 Jul 2013 09:46:39 +0000 (09:46 +0000)]
[SystemZ] Use MVC for simple load/store pairs
Look for patterns of the form (store (load ...), ...) in which the two
locations are known not to partially overlap. (Identical locations are OK.)
These sequences are better implemented by MVC unless either the load or
the store could use RELATIVE LONG instructions.
The testcase showed that we weren't using LHRL and LGHRL for extload16,
only sextloadi16. The patch fixes that too.
llvm-svn: 185919
Richard Sandiford [Tue, 9 Jul 2013 09:32:42 +0000 (09:32 +0000)]
[SystemZ] Use "STC;MVC" for memset
Use "STC;MVC" for memsets that are too big for two STCs or MV...Is yet
small enough for a single MVC. As with memcpy, I'm leaving longer cases
till later.
The number of tests might seem excessive, but f33 & f34 from memset-04.ll
failed the first cut because I'd not added the "?:" on the calculation
of Size1.
llvm-svn: 185918
Evgeniy Stepanov [Tue, 9 Jul 2013 09:29:19 +0000 (09:29 +0000)]
[asan] Fix windows build.
llvm-svn: 185917
David Majnemer [Tue, 9 Jul 2013 09:24:35 +0000 (09:24 +0000)]
InstCombine: Fix typo in comment for visitICmpInstWithInstAndIntCst
llvm-svn: 185916
David Majnemer [Tue, 9 Jul 2013 09:20:58 +0000 (09:20 +0000)]
InstCombine: variations on 0xffffffff - x >= 4
The following transforms are valid if -C is a power of 2:
(icmp ugt (xor X, C), ~C) -> (icmp ult X, C)
(icmp ult (xor X, C), -C) -> (icmp uge X, C)
These are nice, they get rid of the xor.
llvm-svn: 185915
Daniel Jasper [Tue, 9 Jul 2013 09:06:29 +0000 (09:06 +0000)]
Fix alignment of closing brace in braced initializers.
Before:
someFunction(OtherParam, BracedList{
// comment 1 (Forcing intersting break)
param1, param2,
// comment 2
param3, param4
});
After:
someFunction(OtherParam, BracedList{
// comment 1 (Forcing intersting break)
param1, param2,
// comment 2
param3, param4
});
To do so, the UnwrappedLineParser now stores the information about the
kind of brace in the FormatToken.
llvm-svn: 185914
Evgeniy Stepanov [Tue, 9 Jul 2013 08:54:59 +0000 (08:54 +0000)]
[sanitizer] Syscall handlers for clock_gettime and clock_getres.
llvm-svn: 185913
David Majnemer [Tue, 9 Jul 2013 08:09:32 +0000 (08:09 +0000)]
InstCombine: X & -C != -C -> X <= u ~C
Tests were added in r185910 somehow.
llvm-svn: 185912
Ulrich Weigand [Tue, 9 Jul 2013 07:59:25 +0000 (07:59 +0000)]
[PowerPC] Support .llong and fix .word
This adds support for the .llong PowerPC-specifc assembler directive.
In doing so, I notices that .word is currently incorrect: it is
supposed to define a 2-byte data element, not a 4-byte one.
llvm-svn: 185911
David Majnemer [Tue, 9 Jul 2013 07:58:32 +0000 (07:58 +0000)]
Commit r185909 was a misapplied patch, fix it
llvm-svn: 185910
David Majnemer [Tue, 9 Jul 2013 07:50:59 +0000 (07:50 +0000)]
InstCombine: add more transforms
C1-X <u C2 -> (X|(C2-1)) == C1
C1-X >u C2 -> (X|C2) == C1
X-C1 <u C2 -> (X & -C2) == C1
X-C1 >u C2 -> (X & ~C2) == C1
llvm-svn: 185909
Daniel Jasper [Tue, 9 Jul 2013 07:43:55 +0000 (07:43 +0000)]
Format overloaded operators like other functions.
This fixes llvm.org/PR16328 (at least partially).
Before:
SomeLoooooooooooooooooooooooooooooogType operator<<(
const SomeLooooooooogType &a, const SomeLooooooooogType &b);
After:
SomeLoooooooooooooooooooooooooooooogType
operator<<(const SomeLooooooooogType &a, const SomeLooooooooogType &b);
llvm-svn: 185908
Hal Finkel [Tue, 9 Jul 2013 06:34:51 +0000 (06:34 +0000)]
PPC: Allocate RS spill slot for unaligned i64 load/store
This fixes another bug found by llvm-stress!
If we happen to be doing an i64 load or store into a stack slot that has less
than a 4-byte alignment, then the frame-index elimination may need to use an
indexed load or store instruction (because the offset may not be a multiple of
4, a requirement of the STD/LD instructions). The extra register needed to hold
the offset comes from the register scavenger, and it is possible that the
scavenger will need to use an emergency spill slot. As a result, we need to
make sure that a spill slot is allocated when doing an i64 load/store into a
less-than-4-byte-aligned stack slot.
Because test cases for things like this tend to be fairly fragile, I've
concatenated a few small bugpoint-reduced test cases together to form the
regression test.
llvm-svn: 185907
Jason Molenda [Tue, 9 Jul 2013 05:36:41 +0000 (05:36 +0000)]
Add the frame content dumper function call to one more place.
llvm-svn: 185906
Rafael Espindola [Tue, 9 Jul 2013 05:26:25 +0000 (05:26 +0000)]
Compute the size of an archive member in the constructor.
It is always computed the same way (by parsing the header). Doing it in the
constructor simplifies the callers a bit.
llvm-svn: 185905
Rafael Espindola [Tue, 9 Jul 2013 05:09:08 +0000 (05:09 +0000)]
Remove declare but not implemented methods.
llvm-svn: 185904
Jason Molenda [Tue, 9 Jul 2013 05:08:14 +0000 (05:08 +0000)]
Add new information gathering to the lldb & simple backtrace methods:
print five words of memory at the beginning of the stack frame so it's
easier to track where an incorrect saved-fp or saved-pc may have come from.
llvm-svn: 185903
Rui Ueyama [Tue, 9 Jul 2013 04:44:18 +0000 (04:44 +0000)]
[PECOFF][Writer] Compute the size of a chunk each time it's added rather than all at once.
Contents of ".reloc" section depends on the addresses of other sections, so
the section cannot be created until all the other sections are created and get
their memory addresses (RVAs). That means that computation of section size
needs to be at least two pass.
Techynically there's no reason to compute it all at once, but instead we can
compute the address of a section as added to the output file. Doing so helps
us to create ".reloc" section.
llvm-svn: 185902
Rafael Espindola [Tue, 9 Jul 2013 03:39:35 +0000 (03:39 +0000)]
Move some code out of line. No functionality change.
llvm-svn: 185901