Dmitri Gribenko [Fri, 28 Sep 2012 14:15:28 +0000 (14:15 +0000)]
Replace the use of strncpy() and sprintf() with std::string and LLVM streams.
Patch by Martinez, Javier E.
llvm-svn: 164822
Alexey Samsonov [Fri, 28 Sep 2012 12:24:23 +0000 (12:24 +0000)]
[ASan] Fix unit test headers. Add an option to change substitute asan_test_config.h file
llvm-svn: 164821
Alexey Samsonov [Fri, 28 Sep 2012 11:05:41 +0000 (11:05 +0000)]
[ASan] use llvm-symbolizer (in offline mode) in ASan output tests on Linux
llvm-svn: 164819
Benjamin Kramer [Fri, 28 Sep 2012 10:42:50 +0000 (10:42 +0000)]
CorrelatedPropagation: BasicBlock::removePredecessor can simplify PHI nodes. If the it's the condition of a SwitchInst, reload it.
Fixes PR13972.
llvm-svn: 164818
Benjamin Kramer [Fri, 28 Sep 2012 10:10:46 +0000 (10:10 +0000)]
Make backtraces work again with both the configure and cmake build.
llvm-svn: 164817
Evgeniy Stepanov [Fri, 28 Sep 2012 10:07:53 +0000 (10:07 +0000)]
[asan] Change defaults for Android target.
This way building without -DASAN_* in CFLAGS produces working binaries.
llvm-svn: 164816
Benjamin Kramer [Fri, 28 Sep 2012 10:01:27 +0000 (10:01 +0000)]
GlobalOpt: non-constexpr bitcasts or GEPs can occur even if the global value is only stored once.
Fixes PR13968.
llvm-svn: 164815
Nick Lewycky [Fri, 28 Sep 2012 09:33:53 +0000 (09:33 +0000)]
Surprisingly, we missed a trivial case here. Fix that!
llvm-svn: 164814
Craig Topper [Fri, 28 Sep 2012 07:17:01 +0000 (07:17 +0000)]
Remove a LLVM_DELETED_FUNCTION from destructor to fix -std=c++11 build on gcc 4.7.
llvm-svn: 164813
Jason Molenda [Fri, 28 Sep 2012 05:46:55 +0000 (05:46 +0000)]
Recognize the eax/ebp/eip etc version of x86 register
names in addition to the rax/rbp/rip register names when
deciding whether a register is volatile or not.
llvm-svn: 164812
Reed Kotler [Fri, 28 Sep 2012 02:26:24 +0000 (02:26 +0000)]
1. Add load/store words from the stack
2. As part of this, added assembly format FEXT_RI16_SP_explicit_ins and
moved other lines for FEXT_RI16 formats to be in the right place in the code.
3. Added mayLoad and mayStore assignements for the load/store instructions added and for ones already there that did not have this assignment.
4. Another patch will deal with the problem of load/store byte/halfword to the stack. This is a particular Mips16 problem.
llvm-svn: 164811
Jason Molenda [Fri, 28 Sep 2012 01:50:47 +0000 (01:50 +0000)]
Fix the extra space char being emitted in this message when breakpoints resolve -
1 location added to breakpoint 2
llvm-svn: 164810
Howard Hinnant [Fri, 28 Sep 2012 00:05:34 +0000 (00:05 +0000)]
Two changes: 1) I still didn't have the ABI correct to match the gcc-4.2 std::string under the exception classes. I think the changes to stdexcept.cpp have got that down now. 2) On Apple platforms I'm seeing visibility bugs in applications with respect to type_info's being hidden. This is causing dynamic_cast to malfunction because there are multiple type_info's running around for one type within an application, making dynamic_cast believe that one type is actually multiple types. As a stop gap measure I'm trying to detect this error, print out an error message, but continue with the most likely desired result. This is all under __APPLE__. This behavior can be expanded to other platforms if desired.
llvm-svn: 164809
Sean Callanan [Thu, 27 Sep 2012 23:47:51 +0000 (23:47 +0000)]
Improved the runtime reading to also get data
out of the metaclass, so as to enumerate class
methods for an object.
llvm-svn: 164808
Jakob Stoklund Olesen [Thu, 27 Sep 2012 23:31:32 +0000 (23:31 +0000)]
Remove <def,read-undef> flags from partial redefinitions.
The new coalescer can turn a full virtual register definition into a
partial redef by merging another value into an unused vector lane.
Make sure to clear the <read-undef> flag on such defs.
llvm-svn: 164807
Greg Clayton [Thu, 27 Sep 2012 22:26:11 +0000 (22:26 +0000)]
Wrapped up the work I am going to do for now for the "add-dsym" or "target symfile add" command.
We can now do:
Specify a path to a debug symbols file:
(lldb) add-dsym <path-to-dsym>
Go and download the dSYM file for the "libunc.dylib" module in your target:
(lldb) add-dsym --shlib libunc.dylib
Go and download the dSYM given a UUID:
(lldb) add-dsym --uuid <UUID>
Go and download the dSYM file for the current frame:
(lldb) add-dsym --frame
llvm-svn: 164806
Micah Villmow [Thu, 27 Sep 2012 22:14:10 +0000 (22:14 +0000)]
Fix more crlf issues.
llvm-svn: 164805
Eli Friedman [Thu, 27 Sep 2012 22:13:33 +0000 (22:13 +0000)]
Fix a regression from r164656.
llvm-svn: 164804
Anna Zaks [Thu, 27 Sep 2012 21:57:17 +0000 (21:57 +0000)]
[analyzer] Address Jordan's code review for r164790.
llvm-svn: 164803
Anna Zaks [Thu, 27 Sep 2012 21:57:14 +0000 (21:57 +0000)]
[analyzer] IvarInvalidation: track synthesized ivars and allow escape
through property getters.
llvm-svn: 164802
Jason Molenda [Thu, 27 Sep 2012 21:26:57 +0000 (21:26 +0000)]
Patch from Dan Malea to get the Bourne shells scripts to run cleanly on Ubuntu.
llvm-svn: 164801
Meador Inge [Thu, 27 Sep 2012 21:21:31 +0000 (21:21 +0000)]
instcombine: Add more test cases for __strncpy_chk simplification
llvm-svn: 164800
Meador Inge [Thu, 27 Sep 2012 21:21:28 +0000 (21:21 +0000)]
instcombine: Add more test cases for __strcpy_chk simplification
llvm-svn: 164799
Meador Inge [Thu, 27 Sep 2012 21:21:25 +0000 (21:21 +0000)]
instcombine: Add more test cases for __memmove_chk simplification
llvm-svn: 164798
Meador Inge [Thu, 27 Sep 2012 21:21:21 +0000 (21:21 +0000)]
instcombine: Add more test cases for __memcpy_chk simplification
llvm-svn: 164797
Meador Inge [Thu, 27 Sep 2012 21:21:18 +0000 (21:21 +0000)]
instcombine: Add more test cases for __memset_chk simplification
llvm-svn: 164796
Jakob Stoklund Olesen [Thu, 27 Sep 2012 21:06:02 +0000 (21:06 +0000)]
Enable the new coalescer algorithm by default.
The new coalescer is better at merging values into unused vector lanes,
improving NEON code.
llvm-svn: 164794
Jakob Stoklund Olesen [Thu, 27 Sep 2012 21:05:59 +0000 (21:05 +0000)]
Don't dereference begin() on an empty vector.
The fix is obvious and the only test case I have is horrible, so I am
not including it. The problem shows up when self-hosting clang on i386
with -new-coalescer enabled.
llvm-svn: 164793
Sean Callanan [Thu, 27 Sep 2012 20:38:15 +0000 (20:38 +0000)]
Fixed some bugs in the runtime reader code. Also
added a parser for method signatures in the
Objective-C @encode format.
llvm-svn: 164792
Anna Zaks [Thu, 27 Sep 2012 20:32:46 +0000 (20:32 +0000)]
Unbreak cmake build
(fixup for r164790)
llvm-svn: 164791
Anna Zaks [Thu, 27 Sep 2012 19:45:15 +0000 (19:45 +0000)]
[analyzer] Add an experimental ObjC direct ivar assignment checker.
llvm-svn: 164790
Anna Zaks [Thu, 27 Sep 2012 19:45:11 +0000 (19:45 +0000)]
Make getDefaultSynthIvarName() a member of ObjCPropertyDecl.
llvm-svn: 164789
Anna Zaks [Thu, 27 Sep 2012 19:45:08 +0000 (19:45 +0000)]
[analyzer] Address Jordan's code review comments for r164716.
llvm-svn: 164788
Akira Hatanaka [Thu, 27 Sep 2012 19:09:21 +0000 (19:09 +0000)]
MIPS DSP: ABSQ_S.PH instruction sub-class.
llvm-svn: 164787
Akira Hatanaka [Thu, 27 Sep 2012 19:05:08 +0000 (19:05 +0000)]
MIPS DSP: SHLL.QB instruction sub-class.
llvm-svn: 164786
Benjamin Kramer [Thu, 27 Sep 2012 18:29:58 +0000 (18:29 +0000)]
Fix a integer overflow in SimplifyCFG's look up table formation logic.
If the width is very large it gets truncated from uint64_t to uint32_t when
passed to TD->fitsInLegalInteger. The truncated value can fit in a register.
This manifested in massive memory usage or crashes (PR13946).
llvm-svn: 164784
Micah Villmow [Thu, 27 Sep 2012 17:51:02 +0000 (17:51 +0000)]
Fix CRLF issues.
llvm-svn: 164782
Benjamin Kramer [Thu, 27 Sep 2012 17:37:30 +0000 (17:37 +0000)]
Pass PrintingPolicy by reference, copying it isn't cheap.
llvm-svn: 164781
Greg Clayton [Thu, 27 Sep 2012 16:48:25 +0000 (16:48 +0000)]
Ashok Thirumurthi patch to enable the latest and greatest DWARF forms from the DWARF 4 specification.
llvm-svn: 164779
Jakob Stoklund Olesen [Thu, 27 Sep 2012 16:34:19 +0000 (16:34 +0000)]
Avoid dereferencing a NULL pointer.
Fixes PR13943.
llvm-svn: 164778
Filipe Cabecinhas [Thu, 27 Sep 2012 15:31:38 +0000 (15:31 +0000)]
Fixed a typo.
llvm-svn: 164777
Micah Villmow [Thu, 27 Sep 2012 15:05:49 +0000 (15:05 +0000)]
Patch for HowToBuildOnARM documentation from Wei-Ren Chen.
llvm-svn: 164776
NAKAMURA Takumi [Thu, 27 Sep 2012 14:55:08 +0000 (14:55 +0000)]
clang/test/CodeGen/ms-inline-asm.c: It requires x86 codegen. Reported by Joey Gouly.
llvm-svn: 164775
Douglas Gregor [Thu, 27 Sep 2012 14:50:15 +0000 (14:50 +0000)]
Following up on r164620, cope with symlinking from an embedded
framework location out to a top-level framework. Such frameworks are
not really embedded at all.
llvm-svn: 164774
Evgeniy Stepanov [Thu, 27 Sep 2012 13:21:08 +0000 (13:21 +0000)]
Add a missing const qualifier.
llvm-svn: 164773
Evgeniy Stepanov [Thu, 27 Sep 2012 13:20:40 +0000 (13:20 +0000)]
Quick fix data/bss detection in TSan.
The old way breaks when a module's bss is adjacent to the [heap] vm area.
Both ways are not very reliable, though.
llvm-svn: 164772
Benjamin Kramer [Thu, 27 Sep 2012 12:52:55 +0000 (12:52 +0000)]
Shrink LinkageInfo from 96 bits to 8 bits.
llvm-svn: 164771
Sylvestre Ledru [Thu, 27 Sep 2012 10:16:10 +0000 (10:16 +0000)]
Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. See: en.wikipedia.org/wiki/If_and_only_if Commit 164766
llvm-svn: 164769
Sylvestre Ledru [Thu, 27 Sep 2012 10:14:43 +0000 (10:14 +0000)]
Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. See: en.wikipedia.org/wiki/If_and_only_if Commit 164767
llvm-svn: 164768
Sylvestre Ledru [Thu, 27 Sep 2012 09:59:43 +0000 (09:59 +0000)]
Fix a typo 'iff' => 'if'
llvm-svn: 164767
Sylvestre Ledru [Thu, 27 Sep 2012 09:57:10 +0000 (09:57 +0000)]
Fix a typo 'iff' => 'if'
llvm-svn: 164766
Alexey Samsonov [Thu, 27 Sep 2012 09:50:19 +0000 (09:50 +0000)]
[TSan] move replacement for new/delete back into tsan_interceptors
llvm-svn: 164764
Nick Lewycky [Thu, 27 Sep 2012 08:33:56 +0000 (08:33 +0000)]
Prefer shuffles to selects. Backends love shuffles!
llvm-svn: 164763
Bill Wendling [Thu, 27 Sep 2012 07:22:30 +0000 (07:22 +0000)]
Add constructors to the attribute builder.
llvm-svn: 164762
Nick Lewycky [Thu, 27 Sep 2012 06:33:40 +0000 (06:33 +0000)]
Add missing function CreateFPCast to the TargetFolder. It's there in the other
folders and not having it here fails to compile if you actually try to use it.
Also, CreatePointerCast was failing to do the part where it does TD-aware
constant folding. Granted there is exactly one case where that it will ever
do anything, but there's no reason to skip it. For reference, that case is a
subtraction between two constant offsets on the same global variable, eg.,
"&A[123] - &A[4].f".
llvm-svn: 164760
Jush Lu [Thu, 27 Sep 2012 05:21:41 +0000 (05:21 +0000)]
[arm-fast-isel] Add support for ELF PIC.
This is a preliminary step towards ELF support; currently ARMFastISel hasn't
been used for ELF object files yet.
llvm-svn: 164759
Akira Hatanaka [Thu, 27 Sep 2012 04:12:30 +0000 (04:12 +0000)]
Test case for r164755 and 164756.
llvm-svn: 164757
Akira Hatanaka [Thu, 27 Sep 2012 04:08:42 +0000 (04:08 +0000)]
MIPS DSP: rddsp (instruction which reads DSPControl register fields to a GPR).
llvm-svn: 164756
Akira Hatanaka [Thu, 27 Sep 2012 03:58:34 +0000 (03:58 +0000)]
MIPS DSP: CMPU.EQ.QB instruction sub-class.
llvm-svn: 164755
Akira Hatanaka [Thu, 27 Sep 2012 03:13:59 +0000 (03:13 +0000)]
MIPS DSP: ADDU.QB instruction sub-class.
llvm-svn: 164754
Greg Clayton [Thu, 27 Sep 2012 03:13:55 +0000 (03:13 +0000)]
Added the ability to download a symboled executable and symbol file given a UUID.
llvm-svn: 164753
Jason Molenda [Thu, 27 Sep 2012 02:47:55 +0000 (02:47 +0000)]
Change the kdp-remote alias to require a hostname (instead of allowing a zero-length hostname to be specified).
llvm-svn: 164752
Akira Hatanaka [Thu, 27 Sep 2012 02:15:57 +0000 (02:15 +0000)]
MIPS DSP: Branch on Greater Than or Equal To Value 32 in DSPControl Pos Field instruction.
llvm-svn: 164751
Akira Hatanaka [Thu, 27 Sep 2012 02:11:20 +0000 (02:11 +0000)]
MIPS DSP: all the remaining instructions which read or write accumulators.
llvm-svn: 164750
Akira Hatanaka [Thu, 27 Sep 2012 02:05:42 +0000 (02:05 +0000)]
MIPS DSP: add support for extract-word instructions.
llvm-svn: 164749
Akira Hatanaka [Thu, 27 Sep 2012 02:01:10 +0000 (02:01 +0000)]
MIPS DSP: add functions which decode DSP and accumulator registers.
llvm-svn: 164748
Akira Hatanaka [Thu, 27 Sep 2012 01:59:07 +0000 (01:59 +0000)]
MIPS DSP: add code necessary for pseudo instruction lowering.
llvm-svn: 164747
Akira Hatanaka [Thu, 27 Sep 2012 01:56:38 +0000 (01:56 +0000)]
MIPS DSP: add bitcast patterns between vectors and int.
No test cases. These patterns will get tested along with dsp intrinsics.
llvm-svn: 164746
NAKAMURA Takumi [Thu, 27 Sep 2012 01:52:00 +0000 (01:52 +0000)]
IvarInvalidationChecker.cpp: Remove an unused member, InterfD. [-Wunused-private-field]
llvm-svn: 164745
Akira Hatanaka [Thu, 27 Sep 2012 01:50:59 +0000 (01:50 +0000)]
MIPS DSP: add vector load/store patterns.
llvm-svn: 164744
Argyrios Kyrtzidis [Thu, 27 Sep 2012 01:42:07 +0000 (01:42 +0000)]
Per discussion in lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-
20120917/064551.html
have PPCallbacks::InclusionDirective pass the character range for the filename quotes or brackets.
rdar://
11113134 & http://llvm.org/PR13880
llvm-svn: 164743
Jordan Rose [Thu, 27 Sep 2012 01:40:12 +0000 (01:40 +0000)]
Use %clang_cc1 so that the test works even if the target isn't available.
Xcode-style clang builds only support Xcode's architectures, so mips
isn't available and the driver tries to use gcc instead. cc1 will go
ahead and do -fsyntax-only for any platform it knows about even if it
can't actually compile.
llvm-svn: 164742
Jim Ingham [Thu, 27 Sep 2012 01:15:29 +0000 (01:15 +0000)]
Implement returning integer values in "thread return" for arm, x86_64 and i386. Also returns
floats & doubles on x86_64.
<rdar://problem/8356523>
llvm-svn: 164741
Argyrios Kyrtzidis [Thu, 27 Sep 2012 00:24:09 +0000 (00:24 +0000)]
[libclang] Always report a CXCursor_MacroDefinition for code-completion
results for a macro name, not CXCursor_NotImplemented.
llvm-svn: 164740
Bill Wendling [Thu, 27 Sep 2012 00:11:09 +0000 (00:11 +0000)]
Use a variable to stop us from building clang testing tools.
<rdar://problem/
11202465>
llvm-svn: 164739
Greg Clayton [Thu, 27 Sep 2012 00:03:39 +0000 (00:03 +0000)]
If we are attached to a platform, then make sure that we can verify that a process exists when attaching by "pid" before we try and do a lengthy command that could take a while to timeout.
llvm-svn: 164738
Greg Clayton [Thu, 27 Sep 2012 00:02:27 +0000 (00:02 +0000)]
Added "k" as an alias to "process kill" since the new "kdb-remote" will now conflict with it.
llvm-svn: 164737
Andrew Kaylor [Wed, 26 Sep 2012 23:43:56 +0000 (23:43 +0000)]
Fix of hang during Intel JIT profiling
Committed on behalf of Kirill Uhanov
llvm-svn: 164736
Bill Wendling [Wed, 26 Sep 2012 23:38:00 +0000 (23:38 +0000)]
Buildbot Fix.
This method can be called with a '0' argument which checks the return
value. However, the method it calls doesn't expect '0' as a valid value. Call the
correct method when it's 0.
llvm-svn: 164735
Nick Lewycky [Wed, 26 Sep 2012 22:48:46 +0000 (22:48 +0000)]
Turn off this test, as the new and old SROA cause it produce different output.
Left in a note that we need to turn it back on once the SROA fallout is cleared
up.
llvm-svn: 164733
Sid Manning [Wed, 26 Sep 2012 22:46:17 +0000 (22:46 +0000)]
Add case for typeConstant in SectionChunk
llvm-svn: 164732
Nick Lewycky [Wed, 26 Sep 2012 22:43:04 +0000 (22:43 +0000)]
Disable the new SROA pass to get the tree back in working order. We don't yet
have testcases for the current problems.
llvm-svn: 164731
Jason Molenda [Wed, 26 Sep 2012 22:42:25 +0000 (22:42 +0000)]
Add examples of using the kdp-remote and gdb-remote commands to connect to
gdb-remote protocol and kdp protocol systems.
llvm-svn: 164730
Greg Clayton [Wed, 26 Sep 2012 22:26:47 +0000 (22:26 +0000)]
Add convenience aliases to allow easy attaching to a remote gdb server or kdp (darwin kernel) server with the new "gdb-remote" regex alias and "kdp-remote" regex alias commands.
llvm-svn: 164729
Dan Gohman [Wed, 26 Sep 2012 22:17:14 +0000 (22:17 +0000)]
Add IRBuilder code for adding !tbaa.struct metadata tags to llvm.memcpy calls.
llvm-svn: 164728
Bill Wendling [Wed, 26 Sep 2012 22:15:19 +0000 (22:15 +0000)]
Query the parameter attributes directly instead of using the Attribute symbols.
llvm-svn: 164727
Bill Wendling [Wed, 26 Sep 2012 21:59:46 +0000 (21:59 +0000)]
Update to new function attribute querying syntax.
llvm-svn: 164726
Bill Wendling [Wed, 26 Sep 2012 21:48:26 +0000 (21:48 +0000)]
Remove the `hasFnAttr' method from Function.
The hasFnAttr method has been replaced by querying the Attributes explicitly. No
intended functionality change.
llvm-svn: 164725
Jim Grosbach [Wed, 26 Sep 2012 21:27:45 +0000 (21:27 +0000)]
X86_32: Large Symbol+Offset relocations.
If the offset is more than 24-bits, it won't fit in a scattered
relocation offset field, so we fall back to using a non-scattered
relocation.
rdar://
12358909
llvm-svn: 164724
Sean Callanan [Wed, 26 Sep 2012 21:16:15 +0000 (21:16 +0000)]
Added support for the DebugClang configuration to the
testsuite.
llvm-svn: 164723
Bill Wendling [Wed, 26 Sep 2012 21:07:29 +0000 (21:07 +0000)]
Initial commit for the AttributesImpl class.
This opaque class will contain all of the attributes. All attribute queries will
go through this object. This object will also be uniqued in the LLVMContext.
Currently not used, so no implementation change.
llvm-svn: 164722
Akira Hatanaka [Wed, 26 Sep 2012 19:27:24 +0000 (19:27 +0000)]
Add case clauses for returning dsp accumulator encoding values in function
getMipsRegisterNumbering.
llvm-svn: 164720
Akira Hatanaka [Wed, 26 Sep 2012 19:25:21 +0000 (19:25 +0000)]
Add DSP accumulator registers and register class. Remove hi/lo registers.
llvm-svn: 164719
Akira Hatanaka [Wed, 26 Sep 2012 19:18:19 +0000 (19:18 +0000)]
Delete member MipsFunctionInfo::OutArgFIRange and code that accesses it.
llvm-svn: 164718
Benjamin Kramer [Wed, 26 Sep 2012 19:01:49 +0000 (19:01 +0000)]
Allow -MF to be used in combination with -E -M or -E -MM.
Fixes PR13851. Patch by Dimitry Andric!
llvm-svn: 164717
Anna Zaks [Wed, 26 Sep 2012 18:55:16 +0000 (18:55 +0000)]
[analyzer] Add experimental ObjC invalidation method checker.
This checker is annotation driven. It checks that the annotated
invalidation method accesses all ivars of the enclosing objects that are
objects of type, which in turn contains an invalidation method.
This is driven by
__attribute((annotation("objc_instance_variable_invalidator")).
llvm-svn: 164716
Anna Zaks [Wed, 26 Sep 2012 18:55:09 +0000 (18:55 +0000)]
[analyzer] Commit a test case for r164579.
llvm-svn: 164715
Benjamin Kramer [Wed, 26 Sep 2012 18:21:47 +0000 (18:21 +0000)]
Add support for detecting some corei7-class Xeons.
llvm-svn: 164714
Ted Kremenek [Wed, 26 Sep 2012 18:19:55 +0000 (18:19 +0000)]
Have set-xcode-analyer report an error if no xcspec file could be found.
llvm-svn: 164713
Ted Kremenek [Wed, 26 Sep 2012 18:13:03 +0000 (18:13 +0000)]
Make set-xcode-analyzer more tolerant of the naming differenes reported by xcode-select.
llvm-svn: 164712