Commit Graph

99075 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen 013c4649c0 Teach VirtRegRewriter to update slot indexes when erasing instructions.
It was leaving dangling pointers in the slot index maps.

llvm-svn: 123334
2011-01-12 22:28:51 +00:00
Jakob Stoklund Olesen 71a3853332 Annotate VirtRegRewriter debug output with slot indexes.
llvm-svn: 123333
2011-01-12 22:28:48 +00:00
Douglas Gregor be7b54889f Add IR generation support for SizeOfPackExpr.
llvm-svn: 123332
2011-01-12 22:11:34 +00:00
Douglas Gregor ab2ecacee1 Add some more partial-ordering tests, including one that changes with
the proposed resolution to core isue 692. I'm not certain which way
we'll go on this one.

llvm-svn: 123331
2011-01-12 22:04:05 +00:00
Jakob Stoklund Olesen 58b6f4d832 Verify slot index ordering.
The slot indexes must be monotonically increasing through the function.

llvm-svn: 123324
2011-01-12 21:27:48 +00:00
Jakob Stoklund Olesen 62e01eefde Assert if anybody tries to put a slot index on a DBG_VALUE instruction.
llvm-svn: 123323
2011-01-12 21:27:45 +00:00
Jakob Stoklund Olesen b5b4a5d0ba Verify that machine instruction parent pointers are consistent.
llvm-svn: 123322
2011-01-12 21:27:41 +00:00
Bill Wendling e6ff05c59d Sort the register list based on the *actual* register numbers rather than the
enum values we give to them. <rdar://problem/8823730>

llvm-svn: 123321
2011-01-12 21:20:59 +00:00
Douglas Gregor e6d6e51686 wint_t is defined as 'unsigned int' on Linux. Fixes PR8938.
llvm-svn: 123320
2011-01-12 21:19:25 +00:00
Anders Carlsson 46a525d456 Update Xcode project.
llvm-svn: 123319
2011-01-12 19:36:11 +00:00
Devang Patel 30f3ebbc1f Use SmallVector instead of SmallPtrSet and avoid non-deterministic behavior.
llvm-svn: 123318
2011-01-12 19:12:45 +00:00
Matt Beaumont-Gay 3077bb64e9 Mostly undo r123297, but move the default case in EvaluateAsPCRel to the top
of the switch block to appease GCC.

llvm-svn: 123317
2011-01-12 18:02:55 +00:00
Douglas Gregor 822d030118 Teach TreeTransform how to transform a pack expansion type into
another pack expansion type. This can happen when rebuilding types in
the current instantiation.

Fixes <rdar://problem/8848837> (Clang crashing on libc++ <functional>).

llvm-svn: 123316
2011-01-12 17:07:58 +00:00
Nick Lewycky 7ecc2fc4ca Add another note taken from the gcc bugzilla.
llvm-svn: 123315
2011-01-12 09:06:19 +00:00
Jay Foad 39c7980772 PR3558: mark "logically const" accessor methods in ASTContext as const,
and mark the fields they use as mutable. This allows us to remove a few
const_casts.

llvm-svn: 123314
2011-01-12 09:06:06 +00:00
Zhongxing Xu ebbeb79234 Add some documentation for C++ static analyzer.
llvm-svn: 123313
2011-01-12 07:20:03 +00:00
Zhongxing Xu 9addee2b29 Add cast expr kinds to CheckerVisitor.def.
llvm-svn: 123312
2011-01-12 06:24:01 +00:00
Venkatraman Govindaraju d964580fea Implement RETURNADDR and FRAMEADDR lowering in SPARC backend.
llvm-svn: 123310
2011-01-12 05:08:36 +00:00
Stephen Wilson a08cfb1299 Do not pass an invalid thread to Thread{Cancel,Join}.
A race condition exists between StopReadThread and the reader thread proper.
When StopReadThread sets m_read_thread_enabled to false the reader thread can
terminate and set m_read_thread to LLDB_INVALID_HOST_THREAD on exit.  Thus calls
to ThreadCancel or ThreadJoin in StopReadThread can be passed an invalid handle.

This patch removes the race by using m_read_thread_enabled as the flag thru
which the reader thread can notify the parent thread of early/abnormal
termination.

llvm-svn: 123309
2011-01-12 04:22:54 +00:00
Stephen Wilson c2204398e0 Initialize SymbolFileDWARFDebugMap on Apple platforms only.
SymbolFileDWARFDebugMap handles the parsing of OSO stabs which are effectively a
Mach-O specific feature and is incompatible with other object file formats.

llvm-svn: 123308
2011-01-12 04:22:09 +00:00
Stephen Wilson e5b94a90ca Null terminate path returned by readlink().
llvm-svn: 123307
2011-01-12 04:21:21 +00:00
Stephen Wilson 78a4feb2c4 Log diagnostic when setting software breakpoints only on failure.
Previously we would be posting a "FAILED" message to the log channel even when
the operation succeeded.

Also, take this opportunity to add braces thus eliminating an "ambiguous else"
compiler warning.

llvm-svn: 123306
2011-01-12 04:20:03 +00:00
Greg Clayton ce7b69c3fc Bumped Xcode project version to 40 for lldb-40.
llvm-svn: 123305
2011-01-12 04:03:58 +00:00
Venkatraman Govindaraju ee347f8091 Remove SPARC backend getpcx instruction's Uses. Also, insert an assert to
ensure %o7 is not assigned as the destination of getpcx instruction.

llvm-svn: 123304
2011-01-12 03:52:59 +00:00
John McCall 20f6ab828a Fix a latent bug where, after emitting an expression statement, we would
delete the block we began emitting into if it had no predecessors.  We never
want to do this, because there are several valid cases during statement
emission where an existing block has no known predecessors but will acquire
some later.  The case in my test case doesn't inherently fall into this 
category, because we could safely emit the case-range code before the statement
body, but there are examples with labels that can't be fallen into 
that would also demonstrate this bug.

rdar://problem/8837067

llvm-svn: 123303
2011-01-12 03:41:02 +00:00
Chris Lattner dd5f60b7a7 revert 123144, reenabling the rest of memset formation.
llvm-svn: 123302
2011-01-12 03:25:15 +00:00
Venkatraman Govindaraju 3b71b0ae3d Fix SPARC backend call instruction so that arguments passed through registers
are correctly marked as used instead of passing all possible argument registers
as used.  

llvm-svn: 123301
2011-01-12 03:18:21 +00:00
Greg Clayton 722a0cdc95 Added the following functions to SBThread to allow threads to be suspended when a process is resumed:
bool SBThread::Suspend();
bool SBThread::Resume();
bool SBThread::IsSuspended();

llvm-svn: 123300
2011-01-12 02:25:42 +00:00
Chris Lattner 654098f411 revert r123146 which disabled code that wasn't the root cause
of the bootstrap miscompare issue.

llvm-svn: 123299
2011-01-12 01:52:23 +00:00
Chris Lattner fa7c29d255 revert r123149, reenabling an improvement to memcpyopt that wasn't
the source of the bootstrap problem.

llvm-svn: 123298
2011-01-12 01:43:46 +00:00
Matt Beaumont-Gay ea43172297 Prefer llvm_unreachable to assert(0)
llvm-svn: 123297
2011-01-12 01:42:42 +00:00
Daniel Dunbar e26e500b79 Driver: Change -dumpversion to return a GCC compatible answer.
- See comment for why.

llvm-svn: 123296
2011-01-12 00:43:47 +00:00
John McCall 553d45aaf3 Slight bugfix to the attribute-distribution logic for GC attributes.
Slight optimization of getObjCGCAttrKind.

llvm-svn: 123295
2011-01-12 00:34:59 +00:00
Jason W Kim 9c5b65d289 1. Support ELF pcrel relocations for movw/movt:
R_ARM_MOVT_PREL and R_ARM_MOVW_PREL_NC.
2. Fix minor bug in ARMAsmPrinter - treat bitfield flag as a bitfield, not an enum.
3. Add support for 3 new elf section types (no-ops)

llvm-svn: 123294
2011-01-12 00:19:25 +00:00
Rafael Espindola 25f4620c67 Set unnamed_addr in every type info.
llvm-svn: 123293
2011-01-11 23:55:05 +00:00
Jason W Kim 1f7bc0707d Workaround for bug 8721.
.s Test added.

llvm-svn: 123292
2011-01-11 23:53:41 +00:00
Francois Pichet c3e73b343c Add a comment for r123231.
llvm-svn: 123291
2011-01-11 23:38:13 +00:00
Jakob Stoklund Olesen 43812bfa92 The world is not ready for LiveDebugVariables yet.
llvm-svn: 123290
2011-01-11 23:20:33 +00:00
Douglas Gregor 74c6d19c1f Add TemplateArgument::CreatePackCopy() to create a new parameter pack
in ASTContext-allocated memory, copying the provided template
arguments. Use this new routine where we can. No functionality change.

llvm-svn: 123289
2011-01-11 23:09:57 +00:00
Jakob Stoklund Olesen 12cc296bd4 Remove the PR8954 workaround.
llvm-svn: 123288
2011-01-11 22:56:41 +00:00
Jakob Stoklund Olesen f2407aa98b Fix a non-deterministic loop in llvm::MergeBlockIntoPredecessor.
DT->changeImmediateDominator() trivially ignores identity updates, so there is
really no need for the uniqueing provided by SmallPtrSet.

I expect this to fix PR8954.

llvm-svn: 123286
2011-01-11 22:54:38 +00:00
Jakob Stoklund Olesen 8c98495f43 Enable LiveDebugVariables by default.
llvm-svn: 123282
2011-01-11 22:45:28 +00:00
Venkatraman Govindaraju 4d6ade0e31 SPARC backend: correct ICC/FCC uses for ADDX and SELECT_CC
llvm-svn: 123281
2011-01-11 22:38:28 +00:00
Rafael Espindola bb7f7686c5 Set unnamed_addr in VTTs.
llvm-svn: 123280
2011-01-11 22:29:55 +00:00
Douglas Gregor 2fcb863b2b Implement partial ordering of class template partial specializations
and function templates that contain variadic templates. This involves
three small-ish changes:

  (1) When transforming a pack expansion, if the transformed argument
  still contains unexpanded parameter packs, build a pack
  expansion. This can happen during the substitution that occurs into
  class template partial specialiation template arguments during
  partial ordering. 
 
  (2) When performing template argument deduction where the argument
  is a pack expansion, match against the pattern of that pack
  expansion.

  (3) When performing template argument deduction against a non-pack
  parameter, or a non-expansion template argument, deduction fails if
  the argument itself is a pack expansion (C++0x
  [temp.deduct.type]p22).

llvm-svn: 123279
2011-01-11 22:21:24 +00:00
Cameron Zwarich cb9c4f85ec Dial back the speculative fix for PR8954 a bit, so that we only recompute dominators
once at the beginning of GVN instead of once per iteration.

llvm-svn: 123278
2011-01-11 22:14:42 +00:00
Jakob Stoklund Olesen 803f48bcd1 Don't insert DBG_VALUE instructions after the first terminator.
For one, MachineBasicBlock::getFirstTerminator() doesn't understand what is
happening, and it also makes sense to have all control flow run through the
DBG_VALUE.

llvm-svn: 123277
2011-01-11 22:11:16 +00:00
Evan Cheng e45d685895 Clean up ARM subtarget code by using Triple ADT.
llvm-svn: 123276
2011-01-11 21:46:47 +00:00
Rafael Espindola b1e879c80f Set unnamed_addr for type infos that we are confortable marking as hidden. I
think it is safe to mark all type infos with unnamed_addr, but I am not sure.

llvm-svn: 123275
2011-01-11 21:44:37 +00:00
Devang Patel 447cb38fbe Appropriately truncate debug info range in dwarf output.
This is not yet completely enabled.

llvm-svn: 123274
2011-01-11 21:42:10 +00:00