Commit Graph

122456 Commits

Author SHA1 Message Date
Ted Kremenek d519cae8aa Have conjured symbols depend on LocationContext, to add context sensitivity for functions called more than once.
llvm-svn: 150849
2012-02-17 23:13:45 +00:00
Eric Christopher 81e2bf2b77 Ignore the lifetime intrinsics in fast-isel.
llvm-svn: 150848
2012-02-17 23:03:39 +00:00
Anna Zaks 1fdedc99f2 [analyzer] Malloc Checker more tests.
llvm-svn: 150847
2012-02-17 22:35:34 +00:00
Anna Zaks e56167e8f8 [analyzer] Fix another false positive in the Malloc Checker, by making
it aware of CString APIs that return the input parameter.

Malloc Checker needs to know how the 'strcpy' function is
evaluated. Introduce the dependency on CStringChecker for that.
CStringChecker knows all about these APIs.

Addresses radar://10864450

llvm-svn: 150846
2012-02-17 22:35:31 +00:00
Anna Zaks 6348a810fe [analyzer] Generalize function name checking in CString checker.
(Ex: It was not treating __inline_strcpy as strcpy. Will add tests that
rely on this later on.)

llvm-svn: 150845
2012-02-17 22:35:26 +00:00
Fariborz Jahanian d268b0caba modern objc translator: postpone writing of class definitions
until the end when all their ivars are known then.

llvm-svn: 150844
2012-02-17 22:20:12 +00:00
Jim Ingham ec1da844f8 Remove unneeded includes.
llvm-svn: 150843
2012-02-17 21:59:03 +00:00
Jakob Stoklund Olesen a2755ea8f2 Don't print out pointer values in SUnit::dump().
llvm-svn: 150842
2012-02-17 21:44:51 +00:00
Matt Beaumont-Gay 714b99dc84 Sink variable into assert
llvm-svn: 150841
2012-02-17 21:40:48 +00:00
Lang Hames a9afc6ac4a Add support for regmask slots to HMEditor. Also fixes a comment error.
llvm-svn: 150840
2012-02-17 21:29:41 +00:00
Fariborz Jahanian 320c88afce modern objc writer: more work for category metadata rewrite
and some cleanup.

llvm-svn: 150839
2012-02-17 20:33:00 +00:00
Richard Smith 132bea96ad Don't emit optimization-specific intrinsic at -O0.
llvm-svn: 150838
2012-02-17 20:12:52 +00:00
Kevin Enderby 1eb5cd9b74 Fix typo in comment ldopen() -> dlopen().
llvm-svn: 150836
2012-02-17 19:26:00 +00:00
Howard Hinnant f95d9f0a3a Move typeinfos for exceptions in <stdexcept> to the abi
llvm-svn: 150835
2012-02-17 19:24:42 +00:00
Howard Hinnant 3e7d155768 Move typeinfos for exceptions in <stdexcept> to the abi
llvm-svn: 150834
2012-02-17 19:23:47 +00:00
Jakob Stoklund Olesen 4fad5b2b9e Handle regmask operands in ARMInstrInfo.
llvm-svn: 150833
2012-02-17 19:23:15 +00:00
Kevin Enderby 86f94ce509 Put back the initializing the targets in the disassembler API with a comment as
to why this is needed.  This broke the darwin's otool(1) program.  This change
was made in r144385.

llvm-svn: 150832
2012-02-17 19:18:29 +00:00
Jakob Stoklund Olesen 96732a438d Fix ARMBaseInstrInfo::getInstrLatency for calls.
Calls always clobber CPSR.

llvm-svn: 150831
2012-02-17 19:07:59 +00:00
Jakob Stoklund Olesen a0cf42f2e1 Transfer regmasks to MRI.
MRI keeps track of which physregs have been used. Make sure it gets
updated with all the regmask-clobbered registers.

Delete the closePhysRegsUsed() function which isn't necessary.

llvm-svn: 150830
2012-02-17 19:07:56 +00:00
Dan Gohman 0155f30a9c Calls and invokes with the new clang.arc.no_objc_arc_exceptions
metadata may still unwind, but only in ways that the ARC
optimizer doesn't need to consider. This permits more
aggressive optimization.

llvm-svn: 150829
2012-02-17 18:59:53 +00:00
Howard Hinnant 995fcc0d49 Add (reluctantly) a namespace alias for __cxxabiv1.
llvm-svn: 150828
2012-02-17 18:45:44 +00:00
Howard Hinnant d901bb4de4 Remove outdated information from comment.
llvm-svn: 150827
2012-02-17 18:45:04 +00:00
Lang Hames b9057d5fae Refactor 'handleMove' code in live intervals. Clients of LiveIntervals won't see
any changes.

Internally this adds a private inner class HMEditor, to LiveIntervals. HMEditor provides
an API for updating live intervals when code is moved or bundled.

llvm-svn: 150826
2012-02-17 18:44:18 +00:00
Fariborz Jahanian f20550543f modern objc translator: category metadata related
patch.

llvm-svn: 150825
2012-02-17 18:40:41 +00:00
David Chisnall 0c1941cb05 On Solaris, define some standard macros that the Solaris headers require in
order to not be broken (by Solaris standards).

llvm-svn: 150822
2012-02-17 18:35:11 +00:00
Dan Gohman 9017b846d4 Remove a comment about an alternative approach that wouldn't
actually work, at least as described. LLVM Metadata is not
intended to suppress LLVM IR rules, as it can be stripped at
any time.

llvm-svn: 150821
2012-02-17 18:33:38 +00:00
Jim Grosbach 905c952efa Tidy up.
llvm-svn: 150820
2012-02-17 17:35:10 +00:00
David Chisnall 07f8d3e4e9 Generate the correct EH frame section types on Solaris, this time without breaking other platforms...
llvm-svn: 150819
2012-02-17 17:31:15 +00:00
David Chisnall 85dd309e85 Revert r150814. It turns out that there is a good reason for this after all...
llvm-svn: 150818
2012-02-17 16:51:02 +00:00
Douglas Gregor 23b05417c9 De-nest tentative parsing to disambiguate lambdas from designators; no
functionality change.

llvm-svn: 150817
2012-02-17 16:41:16 +00:00
Jakob Stoklund Olesen fd7d1b47ba Revert r150288, "Allow Post-RA LICM to hoist reserved register reads."
This caused miscompilations on out-of-tree targets, and possibly i386 as
well.

I'll find some other way of hoisting %rip-relative loads from loops
containing calls.

llvm-svn: 150816
2012-02-17 16:40:44 +00:00
Richard Osborne 484980e37e Fix typo in comment.
llvm-svn: 150815
2012-02-17 16:39:47 +00:00
David Chisnall 38e25ab513 Don't lazily allocate eh_frame. We're not lazily allocating things like the LSDA, which are only used when the eh frame is used, so this lazy allocation doesn't really make sense.
Fix the type of eh_frame on Solaris so that Sun ld doesn't fail to combine them (thus making it impossible for the unwind library to find them and breaking exceptions).

llvm-svn: 150814
2012-02-17 16:32:07 +00:00
David Chisnall 368d460d35 ... and it's probably best to use the correct alignment, rather than just guessing that it's the same as the size.
llvm-svn: 150813
2012-02-17 16:30:39 +00:00
Alexey Samsonov 0d0b406aba AddressSanitizer: use custom strtol/atoll functions
llvm-svn: 150812
2012-02-17 16:15:09 +00:00
David Chisnall 8fa1716508 It turns out that putting an 8-byte symbol in a 4-byte section makes Solaris ld sulk. GNU ld is perfectly happy with it, which is worrying for a whole other set of reasons...
Thanks to Anton, Duncan and Rafael for helping me track this down.
Pointy hat to Rafael for introducing the bug in the first place.

llvm-svn: 150811
2012-02-17 16:05:50 +00:00
Nick Lewycky aed0553360 Remove question.
llvm-svn: 150809
2012-02-17 09:55:20 +00:00
Jia Liu 9f6101191b remove Emacs-tag form .cpp files in Mips Backend, and fix some typo.
llvm-svn: 150805
2012-02-17 08:55:11 +00:00
Sebastian Redl eb54f08aee Don't allow non-empty ParenListExprs as array-new initializers.
Don't know what I was thinking there. Fixes PR12023.

llvm-svn: 150804
2012-02-17 08:42:32 +00:00
Sebastian Redl c83ed8248e Basic code generation support for std::initializer_list.
We now generate temporary arrays to back std::initializer_list objects
initialized with braces. The initializer_list is then made to point at
the array. We support both ptr+size and start+end forms, although
the latter is untested.

Array lifetime is correct for temporary std::initializer_lists (e.g.
call arguments) and local variables. It is untested for new expressions
and member initializers.

Things left to do:
Massively increase the amount of testing. I need to write tests for
start+end init lists, temporary objects created as a side effect of
initializing init list objects, new expressions, member initialization,
creation of temporary objects (e.g. std::vector) for initializer lists,
and probably more.
Get lifetime "right" for member initializers and new expressions. Not
that either are very useful.
Implement list-initialization of array new expressions.

llvm-svn: 150803
2012-02-17 08:42:25 +00:00
Alexey Samsonov 8e7bfceb98 AddressSanitizer: fix lint
llvm-svn: 150802
2012-02-17 08:31:10 +00:00
Greg Clayton cc4d0146b4 This checking is part one of trying to add some threading safety to our
internals. The first part of this is to use a new class:

lldb_private::ExecutionContextRef

This class holds onto weak pointers to the target, process, thread and frame
and it also contains the thread ID and frame Stack ID in case the thread and
frame objects go away and come back as new objects that represent the same
logical thread/frame. 

ExecutionContextRef objcets have accessors to access shared pointers for
the target, process, thread and frame which might return NULL if the backing
object is no longer available. This allows for references to persistent program
state without needing to hold a shared pointer to each object and potentially
keeping that object around for longer than it needs to be. 

You can also "Lock" and ExecutionContextRef (which contains weak pointers)
object into an ExecutionContext (which contains strong, or shared pointers)
with code like

ExecutionContext exe_ctx (my_obj->GetExectionContextRef().Lock());

llvm-svn: 150801
2012-02-17 07:49:44 +00:00
Gregory Szorc dd19169988 [clang.py] Implement Type.element_count
llvm-svn: 150800
2012-02-17 07:47:38 +00:00
Gregory Szorc e1e9ec1082 [clang.py] Implement Type.element_type
llvm-svn: 150799
2012-02-17 07:44:46 +00:00
Richard Smith 08a5144621 The clang half of r150794: after the construction of a global or static const
variable ends, if the variable has a trivial destructor and no mutable
subobjects then emit an llvm.invariant.start call for it. globalopt knows to
make the variable const when evaluating this.

llvm-svn: 150798
2012-02-17 07:31:37 +00:00
Eric Christopher 2939e6e136 Index "12" holds the vtable, not "9".
Fixes lots of gdb testsuite failures.

llvm-svn: 150797
2012-02-17 07:09:48 +00:00
Eric Christopher b23b32e43b Typo in variable name.
llvm-svn: 150796
2012-02-17 07:08:46 +00:00
Craig Topper ba172d2d59 Remove the last of the old vector_shuffle patterns from X86 isel.
llvm-svn: 150795
2012-02-17 07:02:34 +00:00
Nick Lewycky 68f9f9d9c8 Add support for invariant.start inside the static constructor evaluator. This is
useful to represent a variable that is const in the source but can't be constant
in the IR because of a non-trivial constructor. If globalopt evaluates the
constructor, and there was an invariant.start with no matching invariant.end
possible, it will mark the global constant afterwards.

llvm-svn: 150794
2012-02-17 06:59:21 +00:00
Richard Smith e070fd2ac8 Bug fix: do not emit static const local variables with mutable members
as constants.

Refactor and simplify all the separate checks for whether a type can be
emitted as a constant.

llvm-svn: 150793
2012-02-17 06:48:11 +00:00