platform/upstream/llvm.git
12 years agotsan: add more checks for OOM conditions
Dmitry Vyukov [Mon, 21 May 2012 06:46:27 +0000 (06:46 +0000)]
tsan: add more checks for OOM conditions
tests like to try to malloc((size_t)-1)

llvm-svn: 157176

12 years agoAllow 256-bit shuffles to still be split even if only half of the shuffle comes from...
Craig Topper [Mon, 21 May 2012 06:40:16 +0000 (06:40 +0000)]
Allow 256-bit shuffles to still be split even if only half of the shuffle comes from two 128-bit pieces.

llvm-svn: 157175

12 years agoGive a small negative bias to giant edge bundles.
Jakob Stoklund Olesen [Mon, 21 May 2012 03:11:23 +0000 (03:11 +0000)]
Give a small negative bias to giant edge bundles.

This helps compile time when the greedy register allocator splits live
ranges in giant functions. Without the bias, we would try to grow
regions through the giant edge bundles, usually to find out that the
region became too big and expensive.

If a live range has many uses in blocks near the giant bundle, the small
negative bias doesn't make a big difference, and we still consider
regions including the giant edge bundle.

Giant edge bundles are usually connected to landing pads or indirect
branches.

llvm-svn: 157174

12 years agoTeach Clang about the NVPTX backend.
Peter Collingbourne [Sun, 20 May 2012 23:28:41 +0000 (23:28 +0000)]
Teach Clang about the NVPTX backend.

llvm-svn: 157173

12 years agoTell the driver that CUDA is a C++-like language, so that we get C++
Peter Collingbourne [Sun, 20 May 2012 23:28:36 +0000 (23:28 +0000)]
Tell the driver that CUDA is a C++-like language, so that we get C++
header searches with CUDA.

llvm-svn: 157172

12 years agoCUDA: the device and host attributes must be inheritable, in order
Peter Collingbourne [Sun, 20 May 2012 23:28:32 +0000 (23:28 +0000)]
CUDA: the device and host attributes must be inheritable, in order
to deal with NVIDIA's headers.  We'll need to think of another way
to handle multiple host/device definitions within the same TU.

llvm-svn: 157171

12 years agotest/Tooling/clang-check-pwd.cpp: Mark as XFAIL:mingw for now. Fixing is work-in...
NAKAMURA Takumi [Sun, 20 May 2012 22:28:03 +0000 (22:28 +0000)]
test/Tooling/clang-check-pwd.cpp: Mark as XFAIL:mingw for now. Fixing is work-in-progress.

llvm-svn: 157170

12 years agoClear kill flags on the fly when joining intervals.
Jakob Stoklund Olesen [Sun, 20 May 2012 21:41:05 +0000 (21:41 +0000)]
Clear kill flags on the fly when joining intervals.

With physreg joining out of the way, it is easy to recognize the
instructions that need their kill flags cleared while testing for
interference.

This allows us to skip the final scan of all instructions for an 11%
speedup of the coalescer pass.

llvm-svn: 157169

12 years agoCUDA: add CodeGen support for global variable address spaces.
Peter Collingbourne [Sun, 20 May 2012 21:08:35 +0000 (21:08 +0000)]
CUDA: add CodeGen support for global variable address spaces.
Because in CUDA types do not have associated address spaces,
globals are declared in their "native" address space, and accessed
by bitcasting the pointer to address space 0.  This relies on address
space 0 being a unified address space.

llvm-svn: 157167

12 years agoAdd RPO to the lexicon.
Nick Lewycky [Sun, 20 May 2012 20:30:47 +0000 (20:30 +0000)]
Add RPO to the lexicon.

llvm-svn: 157166

12 years agoMake the global base reg GR32_NOSP.
Jakob Stoklund Olesen [Sun, 20 May 2012 18:43:00 +0000 (18:43 +0000)]
Make the global base reg GR32_NOSP.

It can sometimes be used in addressing modes that don't support %ESP.

llvm-svn: 157165

12 years agoConstrain regclasses in PeepholeOptimizer.
Jakob Stoklund Olesen [Sun, 20 May 2012 18:42:55 +0000 (18:42 +0000)]
Constrain regclasses in PeepholeOptimizer.

It can be necessary to restrict to a sub-class before accessing
sub-registers.

llvm-svn: 157164

12 years agoConstrain register classes in TailDup.
Jakob Stoklund Olesen [Sun, 20 May 2012 18:42:51 +0000 (18:42 +0000)]
Constrain register classes in TailDup.

When rewriting operands, make sure the new registers have a compatible
register class.

llvm-svn: 157163

12 years agoWhen legalising shifts, do not pre-build a list of operands which
Peter Collingbourne [Sun, 20 May 2012 18:36:15 +0000 (18:36 +0000)]
When legalising shifts, do not pre-build a list of operands which
may be RAUW'd by the recursive call to LegalizeOps; instead, retrieve
the other operands when calling UpdateNodeOperands.  Fixes PR12889.

llvm-svn: 157162

12 years agoEmit memcmp directly from the StringMatcherEmitter.
Benjamin Kramer [Sun, 20 May 2012 18:10:42 +0000 (18:10 +0000)]
Emit memcmp directly from the StringMatcherEmitter.

There should be no difference in the resulting binary, given a sufficiently
smart compiler. However we already had compiler timeouts on the generated
code in Intrinsics.gen, this hopefully makes the lives of slow buildbots a
little easier.

llvm-svn: 157161

12 years agoPlug a leak when using MCJIT.
Benjamin Kramer [Sun, 20 May 2012 17:24:08 +0000 (17:24 +0000)]
Plug a leak when using MCJIT.

Found by valgrind.

llvm-svn: 157160

12 years agoAdd a missing PPC 64-bit stwu pattern.
Hal Finkel [Sun, 20 May 2012 17:11:24 +0000 (17:11 +0000)]
Add a missing PPC 64-bit stwu pattern.

This seems to fix the remaining compile-time failures on PPC64 when
compiling with -enable-ppc-preinc.

llvm-svn: 157159

12 years agoBitpack CodeCompletionResults.
Benjamin Kramer [Sun, 20 May 2012 14:19:46 +0000 (14:19 +0000)]
Bitpack CodeCompletionResults.

llvm-svn: 157158

12 years agoAdd documentation regarding -fno-rtti.
Howard Hinnant [Sun, 20 May 2012 13:03:53 +0000 (13:03 +0000)]
Add documentation regarding -fno-rtti.

llvm-svn: 157157

12 years agoUse TargetMachine's register info instead of creating a new one and leaking it.
Benjamin Kramer [Sun, 20 May 2012 11:24:27 +0000 (11:24 +0000)]
Use TargetMachine's register info instead of creating a new one and leaking it.

llvm-svn: 157155

12 years agoFix test for 32-bit hosts.
Jakob Stoklund Olesen [Sun, 20 May 2012 06:43:46 +0000 (06:43 +0000)]
Fix test for 32-bit hosts.

llvm-svn: 157154

12 years agoUse the right register class for LDRrs.
Jakob Stoklund Olesen [Sun, 20 May 2012 06:38:47 +0000 (06:38 +0000)]
Use the right register class for LDRrs.

llvm-svn: 157152

12 years agoTransfer memory operands to the right instruction.
Jakob Stoklund Olesen [Sun, 20 May 2012 06:38:42 +0000 (06:38 +0000)]
Transfer memory operands to the right instruction.

They need to go on the PICLDR as the verifier points out.

llvm-svn: 157151

12 years agoProperly constrain register classes for sub-registers.
Jakob Stoklund Olesen [Sun, 20 May 2012 06:38:37 +0000 (06:38 +0000)]
Properly constrain register classes for sub-registers.

Not all GR64 registers have sub_8bit sub-registers.

llvm-svn: 157150

12 years agoProperly constrain register classes in 2-addr.
Jakob Stoklund Olesen [Sun, 20 May 2012 06:38:32 +0000 (06:38 +0000)]
Properly constrain register classes in 2-addr.

X86 has 2-addr instructions with different constraints on the tied def
and use operands. One is GR32, one is GR32_NOSP.

llvm-svn: 157149

12 years agoMissed a push_back in r157147.
Jakob Stoklund Olesen [Sun, 20 May 2012 05:28:53 +0000 (05:28 +0000)]
Missed a push_back in r157147.

llvm-svn: 157148

12 years agoAvoid deleting extra copies when RegistersDefinedFromSameValue is true.
Jakob Stoklund Olesen [Sun, 20 May 2012 04:52:48 +0000 (04:52 +0000)]
Avoid deleting extra copies when RegistersDefinedFromSameValue is true.

This function adds copies to be erased to DupCopies, avoid also adding
them to DeadCopies.

llvm-svn: 157147

12 years agoFix build bots.
Jakob Stoklund Olesen [Sun, 20 May 2012 03:57:12 +0000 (03:57 +0000)]
Fix build bots.

Avoid looking at the operands of a potentially erased instruction.

llvm-svn: 157146

12 years agoLiveRangeQuery simplifies shrinkToUses().
Jakob Stoklund Olesen [Sun, 20 May 2012 02:54:52 +0000 (02:54 +0000)]
LiveRangeQuery simplifies shrinkToUses().

llvm-svn: 157145

12 years agoUse LiveRangeQuery in ScheduleDAGInstrs.
Jakob Stoklund Olesen [Sun, 20 May 2012 02:44:38 +0000 (02:44 +0000)]
Use LiveRangeQuery in ScheduleDAGInstrs.

llvm-svn: 157144

12 years agoEliminate some uses of struct LiveRange.
Jakob Stoklund Olesen [Sun, 20 May 2012 02:44:36 +0000 (02:44 +0000)]
Eliminate some uses of struct LiveRange.

That struct ought to be a LiveInterval implementation detail.

llvm-svn: 157143

12 years agoUse LiveRangeQuery instead of getLiveRangeContaining().
Jakob Stoklund Olesen [Sun, 20 May 2012 02:44:33 +0000 (02:44 +0000)]
Use LiveRangeQuery instead of getLiveRangeContaining().

llvm-svn: 157142

12 years agoAdd a LiveRangeQuery class.
Jakob Stoklund Olesen [Sun, 20 May 2012 02:44:30 +0000 (02:44 +0000)]
Add a LiveRangeQuery class.

This class is meant to be the primary interface for examining a live
range in the vicinity on a given instruction. It avoids all the messy
dealings with iterators and early clobbers.

This is a more abstract interface to live ranges, hiding the
implementation as a vector of segments.

llvm-svn: 157141

12 years agoDo not pass an invalid domtree to SimplifyInstruction from
Peter Collingbourne [Sun, 20 May 2012 01:32:09 +0000 (01:32 +0000)]
Do not pass an invalid domtree to SimplifyInstruction from
LoopUnswitch.  Fixes PR12887.

llvm-svn: 157140

12 years agoError when using typeid() with -fno-rtti. PR 12888.
Nico Weber [Sun, 20 May 2012 01:27:21 +0000 (01:27 +0000)]
Error when using typeid() with -fno-rtti. PR 12888.

llvm-svn: 157139

12 years agoZap a bogus assert for delegating constructors. PR12890, part 2.
Eli Friedman [Sun, 20 May 2012 00:46:05 +0000 (00:46 +0000)]
Zap a bogus assert for delegating constructors.  PR12890, part 2.

I'm pretty sure we are in fact doing the right thing here, but someone who knows the standard better should double-check that we are in fact supposed to zero out the member in the given testcase.

llvm-svn: 157138

12 years agoSimplify overlap check.
Jakob Stoklund Olesen [Sat, 19 May 2012 23:59:27 +0000 (23:59 +0000)]
Simplify overlap check.

llvm-svn: 157137

12 years agoMake delegating initializers use a similar codepath to base initializers in dependent...
Eli Friedman [Sat, 19 May 2012 23:35:23 +0000 (23:35 +0000)]
Make delegating initializers use a similar codepath to base initializers in dependent contexts.  PR12890.

llvm-svn: 157136

12 years agoFix 12892.
Jakob Stoklund Olesen [Sat, 19 May 2012 23:34:59 +0000 (23:34 +0000)]
Fix 12892.

Dead code elimination during coalescing could cause a virtual register
to be split into connected components. The following rewriting would be
confused about the already joined copies present in the code, but
without a corresponding value number in the live range.

Erase all joined copies instantly when joining intervals such that the
MI and LiveInterval representations are always in sync.

llvm-svn: 157135

12 years agoDo not eliminate allocas whose alignment exceeds that of the
Peter Collingbourne [Sat, 19 May 2012 22:52:10 +0000 (22:52 +0000)]
Do not eliminate allocas whose alignment exceeds that of the
copied-in constant, as a subsequent user may rely on over alignment.
Fixes PR12885.

llvm-svn: 157134

12 years agoAdd a FIXME about access to negative stack-pointer offsets on PPC32.
Hal Finkel [Sat, 19 May 2012 21:52:55 +0000 (21:52 +0000)]
Add a FIXME about access to negative stack-pointer offsets on PPC32.

The current code will generate a prologue which starts with something like:
        mflr 0
        stw 31, -4(1)
        stw 0, 4(1)
        stwu 1, -16(1)

But under the PPC32 SVR4 ABI, access to negative offsets from R1 is not allowed.

This was pointed out by Peter Bergner.

llvm-svn: 157133

12 years agoRemove the late DCE in RegisterCoalescer.
Jakob Stoklund Olesen [Sat, 19 May 2012 21:02:31 +0000 (21:02 +0000)]
Remove the late DCE in RegisterCoalescer.

Dead code and joined copies are now eliminated on the fly, and there is
no need for a post pass.

This makes the coalescer work like other modern register allocator
passes: Code is changed on the fly, there is no pending list of changes
to be committed.

llvm-svn: 157132

12 years agoErase joined copies immediately.
Jakob Stoklund Olesen [Sat, 19 May 2012 20:54:07 +0000 (20:54 +0000)]
Erase joined copies immediately.

The late dead code elimination is no longer necessary.

The test changes are cause by a register hint that can be either %rdi or
%rax. The choice depends on the use list order, which this patch changes.

llvm-svn: 157131

12 years agoFix an ancient bug in removeCopyByCommutingDef().
Jakob Stoklund Olesen [Sat, 19 May 2012 20:54:03 +0000 (20:54 +0000)]
Fix an ancient bug in removeCopyByCommutingDef().

Before rewriting uses of one value in A to register B, check that there
are no tied uses. That would require multiple A values to be rewritten.

This bug can't bite in the current version of the code for a fairly
subtle reason: A tied use would have caused 2-addr to insert a copy
before the use. If the copy has been coalesced, it will be found by the
same loop changed by this patch, and the optimization is aborted.

This was exposed by 400.perlbench and lua after applying a patch that
deletes joined copies aggressively.

llvm-svn: 157130

12 years agoOn Haswell, perfer storing YMM registers using a single instruction.
Nadav Rotem [Sat, 19 May 2012 20:30:08 +0000 (20:30 +0000)]
On Haswell, perfer storing YMM registers using a single instruction.

llvm-svn: 157129

12 years agoRevert fix to http://llvm.org/bugs/show_bug.cgi?id=12867 for the reason now included...
Howard Hinnant [Sat, 19 May 2012 20:20:49 +0000 (20:20 +0000)]
Revert fix to llvm.org/bugs/show_bug.cgi?id=12867 for the reason now included in the code comment.

llvm-svn: 157128

12 years agoAdd support for additional in-reg vbroadcast patterns
Nadav Rotem [Sat, 19 May 2012 19:57:37 +0000 (19:57 +0000)]
Add support for additional in-reg vbroadcast patterns

llvm-svn: 157127

12 years agoDisambiguate call to operator==.
Benjamin Kramer [Sat, 19 May 2012 19:32:11 +0000 (19:32 +0000)]
Disambiguate call to operator==.

clang++ and msvc happily had no problem with it but g++ refuses to compile.

llvm-svn: 157126

12 years agoCollect inflatable virtual registers on the fly.
Jakob Stoklund Olesen [Sat, 19 May 2012 19:25:00 +0000 (19:25 +0000)]
Collect inflatable virtual registers on the fly.

There is no reason to defer the collection of virtual registers whose
register class may be replaced with a larger class.

llvm-svn: 157125

12 years agoValueMap: Use DenseMap's find_as mechanism to reduce use list churn.
Benjamin Kramer [Sat, 19 May 2012 19:15:32 +0000 (19:15 +0000)]
ValueMap: Use DenseMap's find_as mechanism to reduce use list churn.

Otherwise just looking up a value in the map requires creating a VH, adding it to the use lists and destroying it again.

llvm-svn: 157124

12 years agoMove CallbackVHs dtor inline, it can be devirtualized in many cases. Move the other...
Benjamin Kramer [Sat, 19 May 2012 19:15:25 +0000 (19:15 +0000)]
Move CallbackVHs dtor inline, it can be devirtualized in many cases. Move the other virtual methods out of line as they are only called from within Value.cpp anyway.

llvm-svn: 157123

12 years agoTidy up some spacing and inconsistent use of pre/post increment. No functional change...
Craig Topper [Sat, 19 May 2012 19:14:18 +0000 (19:14 +0000)]
Tidy up some spacing and inconsistent use of pre/post increment. No functional change intended.

llvm-svn: 157122

12 years agoobjective-c: Warn if default synthesizing readonly IBOutlet properties
Fariborz Jahanian [Sat, 19 May 2012 18:17:17 +0000 (18:17 +0000)]
objective-c: Warn if default synthesizing readonly IBOutlet properties
and provide a 'fixit' to change 'readonly' to 'readwrite'. 'fixit'
part needs little more work. // rdar://11448209

llvm-svn: 157121

12 years agoMissing line break.
Dmitri Gribenko [Sat, 19 May 2012 17:20:59 +0000 (17:20 +0000)]
Missing line break.

llvm-svn: 157120

12 years agoUse RecordDecl::field_iterator because D1, D2 are RecordDecls. No functional change.
Dmitri Gribenko [Sat, 19 May 2012 17:17:26 +0000 (17:17 +0000)]
Use RecordDecl::field_iterator because D1, D2 are RecordDecls.  No functional change.

llvm-svn: 157119

12 years agoRemove extra semicolons.
Benjamin Kramer [Sat, 19 May 2012 16:44:12 +0000 (16:44 +0000)]
Remove extra semicolons.

llvm-svn: 157118

12 years agoApparently empty names are allowed here.
Benjamin Kramer [Sat, 19 May 2012 16:34:46 +0000 (16:34 +0000)]
Apparently empty names are allowed here.

llvm-svn: 157117

12 years agoSimplify some users of DeclarationName::getNameKind. Fold getFETokenInfoAsVoid into...
Benjamin Kramer [Sat, 19 May 2012 16:03:58 +0000 (16:03 +0000)]
Simplify some users of DeclarationName::getNameKind. Fold getFETokenInfoAsVoid into its only caller.

llvm-svn: 157116

12 years agoInline a trivial clear() method.
Benjamin Kramer [Sat, 19 May 2012 14:28:31 +0000 (14:28 +0000)]
Inline a trivial clear() method.

llvm-svn: 157114

12 years agoProvide move semantics for TinyPtrVector and for DenseMap's rehash function.
Benjamin Kramer [Sat, 19 May 2012 13:28:54 +0000 (13:28 +0000)]
Provide move semantics for TinyPtrVector and for DenseMap's rehash function.

This makes DenseMap<..., TinyPtrVector<...>> as cheap as it always should've been!

llvm-svn: 157113

12 years agoOrdinary PR1255 patch: DifferenceEngine and CPPBackend adopted to the new SwitchInst...
Stepan Dyatkovskiy [Sat, 19 May 2012 13:14:30 +0000 (13:14 +0000)]
Ordinary PR1255 patch: DifferenceEngine and CPPBackend adopted to the new SwitchInst methods.

llvm-svn: 157112

12 years agoSimplify code, add an assertion.
Benjamin Kramer [Sat, 19 May 2012 10:43:54 +0000 (10:43 +0000)]
Simplify code, add an assertion.

llvm-svn: 157111

12 years agoFixes the case where we created a dummy target, deleted it, and then tried to evaluat...
Filipe Cabecinhas [Sat, 19 May 2012 09:59:08 +0000 (09:59 +0000)]
Fixes the case where we created a dummy target, deleted it, and then tried to evaluate an expression with no target.

llvm-svn: 157110

12 years agoCopy some AVX support from MCJIT to JIT. Maybe will fix PR12748.
Craig Topper [Sat, 19 May 2012 08:28:17 +0000 (08:28 +0000)]
Copy some AVX support from MCJIT to JIT. Maybe will fix PR12748.

llvm-svn: 157109

12 years agoRevert my _LIBCPP_INLINE_VISIBILITY changes, r157097 and r157107
Douglas Gregor [Sat, 19 May 2012 07:14:17 +0000 (07:14 +0000)]
Revert my _LIBCPP_INLINE_VISIBILITY changes, r157097 and r157107

llvm-svn: 157108

12 years agovalarray resize should not be _LIBCPP_INLINE_VISIBILITY
Douglas Gregor [Sat, 19 May 2012 07:01:14 +0000 (07:01 +0000)]
valarray resize should not be _LIBCPP_INLINE_VISIBILITY

llvm-svn: 157107

12 years agoEliminate dead code after remat.
Jakob Stoklund Olesen [Sat, 19 May 2012 05:25:59 +0000 (05:25 +0000)]
Eliminate dead code after remat.

This will remove the original def once it has no more uses.

llvm-svn: 157104

12 years agoDon't remat during updateRegDefsUses().
Jakob Stoklund Olesen [Sat, 19 May 2012 05:25:56 +0000 (05:25 +0000)]
Don't remat during updateRegDefsUses().

Remaining virtreg->physreg copies were rematerialized during
updateRegDefsUses(), but we already do the same thing in joinCopy() when
visiting the physreg copy instruction.

Eliminate the preserveSrcInt argument to reMaterializeTrivialDef(). It
is now always true.

llvm-svn: 157103

12 years agoImmediately erase trivially useless copies.
Jakob Stoklund Olesen [Sat, 19 May 2012 05:25:53 +0000 (05:25 +0000)]
Immediately erase trivially useless copies.

There is no need for these instructions to stick around since they are
known to be not dead.

llvm-svn: 157102

12 years agoRun proper recursive dead code elimination during coalescing.
Jakob Stoklund Olesen [Sat, 19 May 2012 05:25:50 +0000 (05:25 +0000)]
Run proper recursive dead code elimination during coalescing.

Dead copies cause problems because they are trivial to coalesce, but
removing them gived the live range a dangling end point. This patch
enables full dead code elimination which trims live ranges to their uses
so end points don't dangle.

DCE may erase multiple instructions. Put the pointers in an ErasedInstrs
set so we never risk visiting erased instructions in the work list.

There isn't supposed to be any dead copies entering RegisterCoalescer,
but they do slip by as evidenced by test/CodeGen/X86/coalescer-dce.ll.

llvm-svn: 157101

12 years agoAllow LiveRangeEdit to be created with a NULL parent.
Jakob Stoklund Olesen [Sat, 19 May 2012 05:25:46 +0000 (05:25 +0000)]
Allow LiveRangeEdit to be created with a NULL parent.

The dead code elimination with callbacks is still useful.

llvm-svn: 157100

12 years agoMove _LIBCPP_VISIBLE_INLINE from the out-of-line definitions of member
Douglas Gregor [Sat, 19 May 2012 04:41:25 +0000 (04:41 +0000)]
Move _LIBCPP_VISIBLE_INLINE from the out-of-line definitions of member
functions to the original declarations, so that Clang will actually
see them. Part of <rdar://problem/11489333>.

llvm-svn: 157097

12 years agoUpdated LLVM to take a disassembler fix that causes
Sean Callanan [Sat, 19 May 2012 02:36:49 +0000 (02:36 +0000)]
Updated LLVM to take a disassembler fix that causes
the LOCK prefix to be printed explicitly when it's
the first prefix on the instruction.

llvm-svn: 157096

12 years agoUpdate API usage for llvm DIBuilder changes for rvalue reference
Eric Christopher [Sat, 19 May 2012 01:36:50 +0000 (01:36 +0000)]
Update API usage for llvm DIBuilder changes for rvalue reference
types and ensure we are actually creating the type.

rdar://11479676

llvm-svn: 157095

12 years agoActually support DW_TAG_rvalue_reference_type that we were trying
Eric Christopher [Sat, 19 May 2012 01:36:37 +0000 (01:36 +0000)]
Actually support DW_TAG_rvalue_reference_type that we were trying
to generate out of the front end.

rdar://11479676

llvm-svn: 157094

12 years agoAdd support for the 'd' mips inline asm output modifier.
Eric Christopher [Sat, 19 May 2012 00:51:56 +0000 (00:51 +0000)]
Add support for the 'd' mips inline asm output modifier.

Patch by Jack Carter.

llvm-svn: 157093

12 years agoSCEV: Add MarkPendingLoopPredicates to avoid recursive isImpliedCond.
Andrew Trick [Sat, 19 May 2012 00:48:25 +0000 (00:48 +0000)]
SCEV: Add MarkPendingLoopPredicates to avoid recursive isImpliedCond.

getUDivExpr attempts to simplify by checking for overflow.
isLoopEntryGuardedByCond then evaluates the loop predicate which
may lead to the same getUDivExpr causing endless recursion.

Fixes PR12868: clang 3.2 segmentation fault.

llvm-svn: 157092

12 years agobump to lldb-150.
Jason Molenda [Sat, 19 May 2012 00:32:19 +0000 (00:32 +0000)]
bump to lldb-150.

llvm-svn: 157090

12 years ago[analyzer] c++11: do not crash on namespace alias
Anna Zaks [Sat, 19 May 2012 00:22:11 +0000 (00:22 +0000)]
[analyzer] c++11: do not crash on namespace alias

llvm-svn: 157089

12 years ago[analyzer] For locations, use isGLValue() instead of isLValue().
Anna Zaks [Sat, 19 May 2012 00:22:07 +0000 (00:22 +0000)]
[analyzer] For locations, use isGLValue() instead of isLValue().

llvm-svn: 157088

12 years agoForgot to bump the local string buffer up in size after debugging to make sure long...
Greg Clayton [Sat, 19 May 2012 00:18:00 +0000 (00:18 +0000)]
Forgot to bump the local string buffer up in size after debugging to make sure long strings would be correctly read when the buffer is too small for the string.

llvm-svn: 157087

12 years agoSuggest adding 'typename' when it would make the compiler
Kaelyn Uhrain [Fri, 18 May 2012 23:42:49 +0000 (23:42 +0000)]
Suggest adding 'typename' when it would make the compiler
accept the template argument expression as a type.

llvm-svn: 157085

12 years agoAdd test cases where we start three worker threads, with a write watchpoint set....
Johnny Chen [Fri, 18 May 2012 23:30:57 +0000 (23:30 +0000)]
Add test cases where we start three worker threads, with a write watchpoint set.  As soon as a watchpoint is hit in either of the worker thread,
we delete the watchpoint.  The test succeeds when no more watchpoint hit event fires after the deletion of the watchpoint.

related to rdar://problem/11320188

llvm-svn: 157084

12 years agoFound a quick way to improve the speed with which we can read object files from memor...
Greg Clayton [Fri, 18 May 2012 23:20:01 +0000 (23:20 +0000)]
Found a quick way to improve the speed with which we can read object files from memory when they are in the shared cache: always read the symbol table strings from memory and let the process' memory cache do the work.

llvm-svn: 157083

12 years ago[analyzer] Fix a c++11 crash: xvalues can be locations (VisitMemberExpr)
Anna Zaks [Fri, 18 May 2012 22:47:43 +0000 (22:47 +0000)]
[analyzer] Fix a c++11 crash: xvalues can be locations (VisitMemberExpr)

llvm-svn: 157082

12 years ago[analyzer] Malloc checker: remove unnecessary comparisons.
Anna Zaks [Fri, 18 May 2012 22:47:40 +0000 (22:47 +0000)]
[analyzer] Malloc checker: remove unnecessary comparisons.

llvm-svn: 157081

12 years agoFix replacing all the users of objc weak runtime routines
Dan Gohman [Fri, 18 May 2012 22:17:29 +0000 (22:17 +0000)]
Fix replacing all the users of objc weak runtime routines
when deleting them. rdar://11434915.

llvm-svn: 157080

12 years agoModernize naming convention for class members.
Jakob Stoklund Olesen [Fri, 18 May 2012 22:10:15 +0000 (22:10 +0000)]
Modernize naming convention for class members.

No functional change.

llvm-svn: 157079

12 years agoWarn when we detect a valid dSYM file that is empty. This can happen when a dSYM...
Greg Clayton [Fri, 18 May 2012 21:47:20 +0000 (21:47 +0000)]
Warn when we detect a valid dSYM file that is empty. This can happen when a dSYM file is created from a binary with no debug info, that has been stripped, or when the .o files are not available when the dSYM is created.

llvm-svn: 157078

12 years agoCleanup a custom thread-format so we don't fail TestLoadUnload when running the
Filipe Cabecinhas [Fri, 18 May 2012 21:35:43 +0000 (21:35 +0000)]
Cleanup a custom thread-format so we don't fail TestLoadUnload when running the
test suite for two architectures (the full path to d.c would appear).

llvm-svn: 157077

12 years agoobjc: use "class extension" instead of "continuation class"
Fariborz Jahanian [Fri, 18 May 2012 21:22:49 +0000 (21:22 +0000)]
objc: use "class extension" instead of "continuation class"
to match documentation. // rdar://11309706

llvm-svn: 157074

12 years agoMove all work list processing to copyCoalesceWorkList().
Jakob Stoklund Olesen [Fri, 18 May 2012 21:09:40 +0000 (21:09 +0000)]
Move all work list processing to copyCoalesceWorkList().

This will make it possible to filter out erased instructions later.

llvm-svn: 157073

12 years agoallow LazyValueInfo::getEdgeValue() to reason about multiple edges from the same...
Nuno Lopes [Fri, 18 May 2012 21:02:10 +0000 (21:02 +0000)]
allow LazyValueInfo::getEdgeValue() to reason about multiple edges from the same switch instruction by doing union of ranges (which may still be conservative, but it's more aggressive than before)

llvm-svn: 157071

12 years agoOptimizations to the Python ObjC formatters - Benchmarking infrastructure
Enrico Granata [Fri, 18 May 2012 19:55:37 +0000 (19:55 +0000)]
Optimizations to the Python ObjC formatters - Benchmarking infrastructure

llvm-svn: 157066

12 years agoLexer::ReadToEndOfLine: Only build the string if it's actually used and do so in...
Benjamin Kramer [Fri, 18 May 2012 19:32:16 +0000 (19:32 +0000)]
Lexer::ReadToEndOfLine: Only build the string if it's actually used and do so in a less malloc-intensive way.

llvm-svn: 157064

12 years agoRefactor data-in-code annotations.
Jim Grosbach [Fri, 18 May 2012 19:12:01 +0000 (19:12 +0000)]
Refactor data-in-code annotations.

Use a dedicated MachO load command to annotate data-in-code regions.
This is the same format the linker produces for final executable images,
allowing consistency of representation and use of introspection tools
for both object and executable files.

Data-in-code regions are annotated via ".data_region"/".end_data_region"
directive pairs, with an optional region type.

data_region_directive := ".data_region" { region_type }
region_type := "jt8" | "jt16" | "jt32" | "jta32"
end_data_region_directive := ".end_data_region"

The previous handling of ARM-style "$d.*" labels was broken and has
been removed. Specifically, it didn't handle ARM vs. Thumb mode when
marking the end of the section.

rdar://11459456

llvm-svn: 157062

12 years agofix warnings when compiling with -Wshadow
Nick Kledzik [Fri, 18 May 2012 18:39:06 +0000 (18:39 +0000)]
fix warnings when compiling with -Wshadow

llvm-svn: 157061

12 years agoRemove duplicate code that we could just fallthrough to.
Eric Christopher [Fri, 18 May 2012 18:24:15 +0000 (18:24 +0000)]
Remove duplicate code that we could just fallthrough to.

llvm-svn: 157060

12 years agoSimplify RegisterCoalescer::copyCoalesceInMBB().
Jakob Stoklund Olesen [Fri, 18 May 2012 18:21:48 +0000 (18:21 +0000)]
Simplify RegisterCoalescer::copyCoalesceInMBB().

It is no longer necessary to separate VirtCopies, PhysCopies, and
ImpDefCopies. Implicitly defined copies are extremely rare after we
added the ProcessImplicitDefs pass, and physical register copies are not
joined any longer.

llvm-svn: 157059

12 years agoadd test case for bugfix in r157032
Nuno Lopes [Fri, 18 May 2012 17:44:58 +0000 (17:44 +0000)]
add test case for bugfix in r157032

llvm-svn: 157058