platform/upstream/llvm.git
12 years agoFix test better way.
Fariborz Jahanian [Wed, 19 Sep 2012 16:20:17 +0000 (16:20 +0000)]
Fix test better way.

llvm-svn: 164234

12 years agoXFAIL test/CodeGen/PowerPC/structsinregs.ll
Bill Schmidt [Wed, 19 Sep 2012 16:18:23 +0000 (16:18 +0000)]
XFAIL test/CodeGen/PowerPC/structsinregs.ll

llvm-svn: 164233

12 years agoPut the * and & next to the variable, rather than the type.
Michael Ilseman [Wed, 19 Sep 2012 16:17:20 +0000 (16:17 +0000)]
Put the * and & next to the variable, rather than the type.

llvm-svn: 164232

12 years agoDocument the interface for integer expansion, using doxygen-style comments
Michael Ilseman [Wed, 19 Sep 2012 16:03:57 +0000 (16:03 +0000)]
Document the interface for integer expansion, using doxygen-style comments

llvm-svn: 164231

12 years agoForward declarations
Michael Ilseman [Wed, 19 Sep 2012 15:55:03 +0000 (15:55 +0000)]
Forward declarations

llvm-svn: 164230

12 years agoGCC doesn't understand that OrigAliasResult having a value is correlated with
Duncan Sands [Wed, 19 Sep 2012 15:43:44 +0000 (15:43 +0000)]
GCC doesn't understand that OrigAliasResult having a value is correlated with
ArePhisAssumedNoAlias, and warns that OrigAliasResult may be used uninitialized.
Pacify GCC.

llvm-svn: 164229

12 years agoSmall structs for PPC64 SVR4 must be passed right-justified in registers.
Bill Schmidt [Wed, 19 Sep 2012 15:42:13 +0000 (15:42 +0000)]
Small structs for PPC64 SVR4 must be passed right-justified in registers.

lib/Target/PowerPC/PPCISelLowering.{h,cpp}
 Rename LowerFormalArguments_Darwin to LowerFormalArguments_Darwin_Or_64SVR4.
 Rename LowerFormalArguments_SVR4 to LowerFormalArguments_32SVR4.
 Receive small structs right-justified in LowerFormalArguments_Darwin_Or_64SVR4.
 Rename LowerCall_Darwin to LowerCall_Darwin_Or_64SVR4.
 Rename LowerCall_SVR4 to LowerCall_32SVR4.
 Pass small structs right-justified in LowerCall_Darwin_Or_64SVR4.

test/CodeGen/PowerPC/structsinregs.ll
 New test.

llvm-svn: 164228

12 years agoFix some type-related swig bugs on FreeBSD on x86_64 (and maybe other OS/arch).
Filipe Cabecinhas [Wed, 19 Sep 2012 15:22:05 +0000 (15:22 +0000)]
Fix some type-related swig bugs on FreeBSD on x86_64 (and maybe other OS/arch).

llvm-svn: 164227

12 years agoAdded link to HowToSetupToolingForLLVM.html. Added missing #include to the example.
Alexander Kornienko [Wed, 19 Sep 2012 15:17:49 +0000 (15:17 +0000)]
Added link to HowToSetupToolingForLLVM.html. Added missing #include to the example.

llvm-svn: 164226

12 years agoSimplifyCFG: Don't generate invalid code for switch used to initialize
Hans Wennborg [Wed, 19 Sep 2012 14:24:21 +0000 (14:24 +0000)]
SimplifyCFG: Don't generate invalid code for switch used to initialize
two variables where the first variable is returned and the second
ignored.

I don't think this occurs in practice (other passes should have cleaned
up the unused phi node), but it should still be handled correctly.

Also make the logic for determining if we should return early less
sketchy.

llvm-svn: 164225

12 years ago[ASan] Include ASan into CMake build only on Linux, Mac and Windows
Alexey Samsonov [Wed, 19 Sep 2012 14:15:30 +0000 (14:15 +0000)]
[ASan] Include ASan into CMake build only on Linux, Mac and Windows

llvm-svn: 164224

12 years agoAdd some typedefs for clarity.
Rafael Espindola [Wed, 19 Sep 2012 14:11:44 +0000 (14:11 +0000)]
Add some typedefs for clarity.

llvm-svn: 164223

12 years agoFix minor typo in IntervalPartition.h
Will Dietz [Wed, 19 Sep 2012 13:45:43 +0000 (13:45 +0000)]
Fix minor typo in IntervalPartition.h

llvm-svn: 164222

12 years agoMake MapVector a bit more expensive but harder to misuse. We now only
Rafael Espindola [Wed, 19 Sep 2012 13:42:51 +0000 (13:42 +0000)]
Make MapVector a bit more expensive but harder to misuse. We now only
provide insertion order iteration, instead of the old option of
DenseMap order iteration over keys and insertion order iteration over
values.
This is implemented by keeping two copies of each key.

llvm-svn: 164221

12 years agoASTWriter: Tighten up assertions when emitting a declaration name.
Benjamin Kramer [Wed, 19 Sep 2012 13:40:40 +0000 (13:40 +0000)]
ASTWriter: Tighten up assertions when emitting a declaration name.

clang has recently started to warn about the enum compares:
lib/Serialization/ASTWriter.cpp:2760:31: warning: comparison of literal 256 with expression of type
'clang::DeclarationName::NameKind' is always true [-Wtautological-constant-out-of-range-compare]

llvm-svn: 164220

12 years agoInlineCost: Make TotalAllocaSizeRecursiveCaller unsigned to avoid sign-compare warnings.
Benjamin Kramer [Wed, 19 Sep 2012 13:22:27 +0000 (13:22 +0000)]
InlineCost: Make TotalAllocaSizeRecursiveCaller unsigned to avoid sign-compare warnings.

It's a size, not a cost.

llvm-svn: 164219

12 years agoUpdate clang for API change.
Benjamin Kramer [Wed, 19 Sep 2012 13:13:52 +0000 (13:13 +0000)]
Update clang for API change.

llvm-svn: 164218

12 years ago[TSan] Add tsan to cmake build of compiler-rt only on Linux
Alexey Samsonov [Wed, 19 Sep 2012 13:11:13 +0000 (13:11 +0000)]
[TSan] Add tsan to cmake build of compiler-rt only on Linux

llvm-svn: 164217

12 years agoIntegerDivision: Style cleanups, avoid warning about mixing || and && without parens.
Benjamin Kramer [Wed, 19 Sep 2012 13:03:07 +0000 (13:03 +0000)]
IntegerDivision: Style cleanups, avoid warning about mixing || and && without parens.

llvm-svn: 164216

12 years agoRemove unused and broken CloneFunction wrapper.
Benjamin Kramer [Wed, 19 Sep 2012 13:03:01 +0000 (13:03 +0000)]
Remove unused and broken CloneFunction wrapper.

It converted the CodeInfo argument to bool implicitly.

llvm-svn: 164215

12 years ago[ASan] make asan_symbolize script work if there is no llvm-symbolizer available
Alexey Samsonov [Wed, 19 Sep 2012 11:43:41 +0000 (11:43 +0000)]
[ASan] make asan_symbolize script work if there is no llvm-symbolizer available

llvm-svn: 164214

12 years agoMove load_to_switch.ll to test/CodeGen/SPARC/
Hans Wennborg [Wed, 19 Sep 2012 09:25:03 +0000 (09:25 +0000)]
Move load_to_switch.ll to test/CodeGen/SPARC/

Because the test invokes llc -march=sparc, it needs to be in a directory
which is only run when the sparc target is built.

llvm-svn: 164211

12 years agorename test
Nadav Rotem [Wed, 19 Sep 2012 09:22:17 +0000 (09:22 +0000)]
rename test

llvm-svn: 164210

12 years ago[ASan] fix offline python symbolizer script to use llvm-symbolizer if possible
Alexey Samsonov [Wed, 19 Sep 2012 08:49:53 +0000 (08:49 +0000)]
[ASan] fix offline python symbolizer script to use llvm-symbolizer if possible

llvm-svn: 164209

12 years agoPrevent inlining of callees which allocate lots of memory into a recursive caller.
Nadav Rotem [Wed, 19 Sep 2012 08:08:04 +0000 (08:08 +0000)]
Prevent inlining of callees which allocate lots of memory into a recursive caller.

Example:

void foo() {
 ... foo();   // I'm recursive!

  bar();
}

bar() {  int a[1000];  // large stack size }

rdar://10853263

llvm-svn: 164207

12 years agoCodeGenPrep: turn lookup tables into switches for some targets.
Hans Wennborg [Wed, 19 Sep 2012 07:48:16 +0000 (07:48 +0000)]
CodeGenPrep: turn lookup tables into switches for some targets.

This is a follow-up from r163302, which added a transformation to
SimplifyCFG that turns some switches into loads from lookup tables.

It was pointed out that some targets, such as GPUs and deeply embedded
targets, might not find this appropriate, but SimplifyCFG doesn't have
enough information about the target to decide this.

This patch adds the reverse transformation to CodeGenPrep: it turns
loads from lookup tables back into switches for targets where we do not
build jump tables (assuming these are also the targets where lookup
tables are inappropriate).

Hopefully we will eventually get to have target information in
SimplifyCFG, and then this CodeGenPrep transformation can be removed.

llvm-svn: 164206

12 years ago[ASan] cleanup: fix headers and lint warnings
Alexey Samsonov [Wed, 19 Sep 2012 07:07:46 +0000 (07:07 +0000)]
[ASan] cleanup: fix headers and lint warnings

llvm-svn: 164205

12 years agoRemove code for setting the VEX L-bit as a function of operand size from the code...
Craig Topper [Wed, 19 Sep 2012 06:37:45 +0000 (06:37 +0000)]
Remove code for setting the VEX L-bit as a function of operand size from the code emitters and the disassembler table builder. Fix a couple instructions that were still missing VEX_L.

llvm-svn: 164204

12 years agowhitespace.
Nadav Rotem [Wed, 19 Sep 2012 06:24:00 +0000 (06:24 +0000)]
whitespace.

llvm-svn: 164203

12 years agoAdd explicit VEX_L tags to all 256-bit instructions. This will allow us to remove...
Craig Topper [Wed, 19 Sep 2012 06:06:34 +0000 (06:06 +0000)]
Add explicit VEX_L tags to all 256-bit instructions. This will allow us to remove code from the code emitters that examined operands to set the L-bit.

llvm-svn: 164202

12 years agoSilence -Wnon-virtual-dtor in llvm-stress.
Andrew Trick [Wed, 19 Sep 2012 05:08:30 +0000 (05:08 +0000)]
Silence -Wnon-virtual-dtor in llvm-stress.

This was making it hard to scan my builds for new warnings. The
warning still fires with ToT clang. But if my workaround is unnecessary
for whatever reason, feel free to revert.

llvm-svn: 164201

12 years agotsan: fix gcc4.2.1 warning
Dmitry Vyukov [Wed, 19 Sep 2012 04:45:14 +0000 (04:45 +0000)]
tsan: fix gcc4.2.1 warning

llvm-svn: 164200

12 years agoSchedMachineModel: compress the CPU's WriteLatencyTable.
Andrew Trick [Wed, 19 Sep 2012 04:43:19 +0000 (04:43 +0000)]
SchedMachineModel: compress the CPU's WriteLatencyTable.

llvm-svn: 164199

12 years agotsan: fix Go build
Dmitry Vyukov [Wed, 19 Sep 2012 04:39:36 +0000 (04:39 +0000)]
tsan: fix Go build

llvm-svn: 164198

12 years agoUpdated AppleObjCV2Runtime to load the class
Sean Callanan [Wed, 19 Sep 2012 03:23:13 +0000 (03:23 +0000)]
Updated AppleObjCV2Runtime to load the class
data structures more rapidly.  Also added fields
for the other data structures in a class.

I also fixed a problem where I accidentally used
hasExternalLexicalStorage() instead of
hasExternalVisibleStorage() to mark an
incomplete object.

llvm-svn: 164197

12 years agoRemove Context argument from TemplateDeductionInfo constructor. It was no longer...
Craig Topper [Wed, 19 Sep 2012 02:26:47 +0000 (02:26 +0000)]
Remove Context argument from TemplateDeductionInfo constructor. It was no longer needed after the unused Context member was removed in r164104.

llvm-svn: 164196

12 years agoDe-nest if's and fix mix-up
Sean Silva [Wed, 19 Sep 2012 02:14:59 +0000 (02:14 +0000)]
De-nest if's and fix mix-up

Two deeply nested if's obscured that the sense of the conditions was
mixed up. Amazingly, TableGen's output is exactly the same even with the
sense of the tests fixed; it seems that all of TableGen's conversions
are symmetric so that the inverted sense was nonetheless correct "by
accident". As such, I couldn't come up with a test case.

If there does in fact exist a non-symmetric conversion in TableGen's
type system, then a test case should be prepared.

Despite the symmetry, both if's are left in place for robustness in the
face of future changes.

Review by Jakob.

llvm-svn: 164195

12 years agoAdded auto LLDB import to the crashlog script.
Greg Clayton [Wed, 19 Sep 2012 01:59:34 +0000 (01:59 +0000)]
Added auto LLDB import to the crashlog script.

llvm-svn: 164192

12 years agoIterate deterministicaly over ClassInfo*'s
Sean Silva [Wed, 19 Sep 2012 01:47:03 +0000 (01:47 +0000)]
Iterate deterministicaly over ClassInfo*'s

Fixes an observed instance of nondeterministic TableGen output.

Review by Jakob.

llvm-svn: 164191

12 years agoIterate deterministically over register classes
Sean Silva [Wed, 19 Sep 2012 01:47:01 +0000 (01:47 +0000)]
Iterate deterministically over register classes

Fixes an observed instance of nondeterministic TableGen output.

Review by Jakob.

llvm-svn: 164190

12 years agoRefactor Record* by-ID comparator to Record.h
Sean Silva [Wed, 19 Sep 2012 01:47:00 +0000 (01:47 +0000)]
Refactor Record* by-ID comparator to Record.h

This is a generally useful utility; there's no reason to have it hidden
in CodeGenDAGPatterns.cpp.

Also, rename it to fit the other comparators in Record.h

Review by Jakob.

llvm-svn: 164189

12 years ago<rdar://problem/11752499>
Greg Clayton [Wed, 19 Sep 2012 01:46:31 +0000 (01:46 +0000)]
<rdar://problem/11752499>

Improve error messages when memory read/write fails.

llvm-svn: 164188

12 years agoTest for r164186.
Eli Friedman [Wed, 19 Sep 2012 01:35:20 +0000 (01:35 +0000)]
Test for r164186.

llvm-svn: 164187

12 years agoAdd the TypeSourceInfo for the lambda call operator to the lambda's
Eli Friedman [Wed, 19 Sep 2012 01:18:11 +0000 (01:18 +0000)]
Add the TypeSourceInfo for the lambda call operator to the lambda's
definition info; it needs to be there because the mangler needs to
access it before we're finished defining the lambda class.
PR12808.

llvm-svn: 164186

12 years agollvm/test/MC/X86/x86_nop.s: Make sure -arch=x86 when -mcpu=geode.
NAKAMURA Takumi [Wed, 19 Sep 2012 00:56:20 +0000 (00:56 +0000)]
llvm/test/MC/X86/x86_nop.s: Make sure -arch=x86 when -mcpu=geode.

-mcpu doesn't infer -arch. Consider non-x86 host.

llvm-svn: 164185

12 years ago<rdar://problem/12125274>
Greg Clayton [Tue, 18 Sep 2012 23:50:22 +0000 (23:50 +0000)]
<rdar://problem/12125274>

Intentionally leak the module list to avoid unnecessary freeing of modules + object files + symbol files when the program is exiting.

llvm-svn: 164184

12 years agoAllow for numeric cputype-cpusubtype specifications where the subtype is 0. Use...
Jason Molenda [Tue, 18 Sep 2012 23:27:18 +0000 (23:27 +0000)]
Allow for numeric cputype-cpusubtype specifications where the subtype is 0.  Use errno to
detect strtoul parse failure instead of return value of 0.  <rdar://problem/12198994>

llvm-svn: 164183

12 years agoTidy up. Minor formatting.
Jim Grosbach [Tue, 18 Sep 2012 23:05:18 +0000 (23:05 +0000)]
Tidy up. Minor formatting.

llvm-svn: 164182

12 years agoTidy up. 80 columns.
Jim Grosbach [Tue, 18 Sep 2012 23:05:12 +0000 (23:05 +0000)]
Tidy up. 80 columns.

llvm-svn: 164181

12 years agocomment typo
Andrew Trick [Tue, 18 Sep 2012 22:57:42 +0000 (22:57 +0000)]
comment typo

llvm-svn: 164180

12 years agoAdd the freescale_ppc64_tree that should have been included in r164177.
Hal Finkel [Tue, 18 Sep 2012 22:53:24 +0000 (22:53 +0000)]
Add the freescale_ppc64_tree that should have been included in r164177.

llvm-svn: 164179

12 years agoFix the last crasher I've gotten a reproduction for in SROA. This one
Chandler Carruth [Tue, 18 Sep 2012 22:37:19 +0000 (22:37 +0000)]
Fix the last crasher I've gotten a reproduction for in SROA. This one
from the dragonegg build bots when we turned on the full version of the
pass. Included a much reduced test case for this pesky bug, despite
bugpoint's uncooperative behavior.

Also, I audited all the similar code I could find and didn't spot any
other cases where this mistake cropped up.

llvm-svn: 164178

12 years agoAdd C/C++ header locations for the Freescale SDK.
Hal Finkel [Tue, 18 Sep 2012 22:25:07 +0000 (22:25 +0000)]
Add C/C++ header locations for the Freescale SDK.

The Freescale SDK is based on OpenEmbedded, and this might be useful
for other OpenEmbedded-based configurations as well.

With minor modifications, patch by Tobias von Koch!

llvm-svn: 164177

12 years agoAdd e500mc and e5500 to the list of valid PPC CPU names.
Hal Finkel [Tue, 18 Sep 2012 22:25:03 +0000 (22:25 +0000)]
Add e500mc and e5500 to the list of valid PPC CPU names.

Patch by Tobias von Koch!

llvm-svn: 164176

12 years agoTest commit
Sean Silva [Tue, 18 Sep 2012 22:21:43 +0000 (22:21 +0000)]
Test commit

llvm-svn: 164174

12 years agoNew utility for expanding integer division for targets that don't support it.
Michael Ilseman [Tue, 18 Sep 2012 22:02:40 +0000 (22:02 +0000)]
New utility for expanding integer division for targets that don't support it.

Implementation derived from compiler-rt's implementation of signed and unsigned integer division.

llvm-svn: 164173

12 years ago<rdar://problem/12188843> Fixing a problem where a Python command created in the...
Enrico Granata [Tue, 18 Sep 2012 21:53:02 +0000 (21:53 +0000)]
<rdar://problem/12188843> Fixing a problem where a Python command created in the same module where the target function is defined causes the help string not to come out

llvm-svn: 164172

12 years agoFix a small bug in the way we handle builtin candidates for
Eli Friedman [Tue, 18 Sep 2012 21:52:24 +0000 (21:52 +0000)]
Fix a small bug in the way we handle builtin candidates for
relational operators of enumeration type.  From the gcc testsuite.

llvm-svn: 164171

12 years agoI've added Apple-only behavior that looks for libstdc++ in the same process and if...
Howard Hinnant [Tue, 18 Sep 2012 21:34:12 +0000 (21:34 +0000)]
I've added Apple-only behavior that looks for libstdc++ in the same process and if found, checks the string stored in <stdexcept> exception objects to see if it is the gcc empty string singleton before manipulating the reference count.  This is done so that if such an exception is created with a zero-length string in libstdc++, libc++abi won't try to delete the memory.  This is part of a ongoing process to make libc++ exceptions ABI-compatible with libstdc++-4.2 exceptions, to the point that each library can catch exceptions thrown by the other.  If other parties would also like this behavior, the #if __APPLE__ can be broadened.

llvm-svn: 164170

12 years agoMOVi16 (movw) is only legal on cpus with V6T2 support. rdar://12300648
Evan Cheng [Tue, 18 Sep 2012 21:24:16 +0000 (21:24 +0000)]
MOVi16 (movw) is only legal on cpus with V6T2 support. rdar://12300648

llvm-svn: 164169

12 years agoAdd an extra check for invalid decls in the lambda semantic analysis to avoid a crash...
Eli Friedman [Tue, 18 Sep 2012 21:11:30 +0000 (21:11 +0000)]
Add an extra check for invalid decls in the lambda semantic analysis to avoid a crash.  PR13860.

llvm-svn: 164168

12 years agoRemove invalid double colon in test case was previously ignored by FileCheck.
Benjamin Kramer [Tue, 18 Sep 2012 20:59:03 +0000 (20:59 +0000)]
Remove invalid double colon in test case was previously ignored by FileCheck.

llvm-svn: 164167

12 years agoFileCheck: Fix off-by-one bug that made CHECK-NOT: ignore the next character after...
Benjamin Kramer [Tue, 18 Sep 2012 20:51:39 +0000 (20:51 +0000)]
FileCheck: Fix off-by-one bug that made CHECK-NOT: ignore the next character after the colon.

llvm-svn: 164165

12 years agoObjective-C runtime class descriptors can now
Sean Callanan [Tue, 18 Sep 2012 20:36:30 +0000 (20:36 +0000)]
Objective-C runtime class descriptors can now
populate Clang ObjCInterfaceDecls with their
ivars, methods, and properties.  The default
implementation does nothing.  I have also made
sure that AppleObjCRuntimeV2 creates
ObjCInterfaceDecls that actually get queried
appropriately.

llvm-svn: 164164

12 years agoAdd test for r164155 and remove two tests superseded by ppc64-calls.ll.
Roman Divacky [Tue, 18 Sep 2012 19:51:44 +0000 (19:51 +0000)]
Add test for r164155 and remove two tests superseded by ppc64-calls.ll.

llvm-svn: 164162

12 years agoAdd hidden flag to exclude aliases from output.
Jan Sjödin [Tue, 18 Sep 2012 18:47:58 +0000 (18:47 +0000)]
Add hidden flag to exclude aliases from output.

llvm-svn: 164158

12 years agoAdd a MapVector class. It provides a regular set iteration, but
Rafael Espindola [Tue, 18 Sep 2012 18:43:21 +0000 (18:43 +0000)]
Add a MapVector class. It provides a regular set iteration, but
also provides a insertion order iteration over the values.

llvm-svn: 164157

12 years ago<rdar://problem/11398693> Making sure we do not attempt to run code on zombie objects...
Enrico Granata [Tue, 18 Sep 2012 18:34:14 +0000 (18:34 +0000)]
<rdar://problem/11398693> Making sure we do not attempt to run code on zombie objects when attempting to format them

llvm-svn: 164156

12 years agoFix the isLocalCall() by checking for linker weakness as well.
Roman Divacky [Tue, 18 Sep 2012 18:27:49 +0000 (18:27 +0000)]
Fix the isLocalCall() by checking for linker weakness as well.

llvm-svn: 164155

12 years agoTargetSchedule: cleanup computeOperandLatency logic & diagnostics.
Andrew Trick [Tue, 18 Sep 2012 18:20:02 +0000 (18:20 +0000)]
TargetSchedule: cleanup computeOperandLatency logic & diagnostics.

llvm-svn: 164154

12 years agomisched: Make ScheduleDAGInstrs use the TargetSchedule interface.
Andrew Trick [Tue, 18 Sep 2012 18:20:00 +0000 (18:20 +0000)]
misched: Make ScheduleDAGInstrs use the TargetSchedule interface.

llvm-svn: 164153

12 years ago<rdar://problem/12219840>
Greg Clayton [Tue, 18 Sep 2012 18:19:49 +0000 (18:19 +0000)]
<rdar://problem/12219840>

Don't leak mach ports when calling "mach_thread_self()".

llvm-svn: 164152

12 years agoFix a potential issue where data formatters can get confused over malformed UUIDs
Enrico Granata [Tue, 18 Sep 2012 18:15:27 +0000 (18:15 +0000)]
Fix a potential issue where data formatters can get confused over malformed UUIDs

llvm-svn: 164151

12 years agoRevert r164051.
Akira Hatanaka [Tue, 18 Sep 2012 18:08:25 +0000 (18:08 +0000)]
Revert r164051.

llvm-svn: 164150

12 years ago<rdar://problem/12161825> Rephrase formatter for NSIndexSet in terms of indexes inste...
Enrico Granata [Tue, 18 Sep 2012 18:06:37 +0000 (18:06 +0000)]
<rdar://problem/12161825> Rephrase formatter for NSIndexSet in terms of indexes instead of objects

llvm-svn: 164149

12 years agoStop using the "%z" size_t modifier and cast all size_t values to uint64_t. Some...
Greg Clayton [Tue, 18 Sep 2012 18:04:04 +0000 (18:04 +0000)]
Stop using the "%z" size_t modifier and cast all size_t values to uint64_t. Some platforms don't support this modification.

llvm-svn: 164148

12 years agoLSR critical edge splitting fix for PR13756.
Andrew Trick [Tue, 18 Sep 2012 17:51:33 +0000 (17:51 +0000)]
LSR critical edge splitting fix for PR13756.

llvm-svn: 164147

12 years agoFix getCommonType in a different way from the way I fixed it when
Chandler Carruth [Tue, 18 Sep 2012 17:49:37 +0000 (17:49 +0000)]
Fix getCommonType in a different way from the way I fixed it when
working on FCA splitting. Instead of refusing to form a common type when
there are uses of a subsection of the alloca as well as a use of the
entire alloca, just skip the subsection uses and continue looking for
a whole-alloca use with a type that we can use.

This produces slightly prettier IR I think, and also fixes the other
failure in the test.

llvm-svn: 164146

12 years agominor refactoring of my last check-in.
Fariborz Jahanian [Tue, 18 Sep 2012 17:46:26 +0000 (17:46 +0000)]
minor refactoring of my last check-in.

llvm-svn: 164145

12 years ago<rdar://problem/11988289> Making C++ synthetic children provider for NSDictionary...
Enrico Granata [Tue, 18 Sep 2012 17:43:16 +0000 (17:43 +0000)]
<rdar://problem/11988289> Making C++ synthetic children provider for NSDictionary and related classes

llvm-svn: 164144

12 years agoc: warn when an integer value comparison with an
Fariborz Jahanian [Tue, 18 Sep 2012 17:37:21 +0000 (17:37 +0000)]
c: warn when an integer value comparison with an
integral expression have the obvious result.
Patch reviewed by John McCall off line.
// rdar://12202422

llvm-svn: 164143

12 years agoFix build for compilers that don't understand injected class names properly.
Benjamin Kramer [Tue, 18 Sep 2012 17:11:47 +0000 (17:11 +0000)]
Fix build for compilers that don't understand injected class names properly.

llvm-svn: 164142

12 years agoAvoid symbol name clash when filling TOC.
Roman Divacky [Tue, 18 Sep 2012 17:10:37 +0000 (17:10 +0000)]
Avoid symbol name clash when filling TOC.

Patch by Adhemerval Zanella.

llvm-svn: 164141

12 years agoSROA: Use CRTP for OpSplitter to get rid of virtual dispatch and the virtual-dtor...
Benjamin Kramer [Tue, 18 Sep 2012 17:06:32 +0000 (17:06 +0000)]
SROA: Use CRTP for OpSplitter to get rid of virtual dispatch and the virtual-dtor warnings that come with it.

llvm-svn: 164140

12 years agoOn PPC64 emit the environment pointer. Patch by Adhemerval Zanella.
Roman Divacky [Tue, 18 Sep 2012 16:55:29 +0000 (16:55 +0000)]
On PPC64 emit the environment pointer. Patch by Adhemerval Zanella.

llvm-svn: 164139

12 years agoOptimize local func calls to not emit nop for TOC restoration.
Roman Divacky [Tue, 18 Sep 2012 16:47:58 +0000 (16:47 +0000)]
Optimize local func calls to not emit nop for TOC restoration.

Patch by Adhemerval Zanella.

llvm-svn: 164138

12 years agoAdd PowerPC64 relocation definitions. Patch by Adhemerval Zanella!
Roman Divacky [Tue, 18 Sep 2012 16:38:02 +0000 (16:38 +0000)]
Add PowerPC64 relocation definitions. Patch by Adhemerval Zanella!

llvm-svn: 164137

12 years agoSROA: Replace the member function template contraption for recursively splitting...
Benjamin Kramer [Tue, 18 Sep 2012 16:20:46 +0000 (16:20 +0000)]
SROA: Replace the member function template contraption for recursively splitting aggregates into a real class.

No intended functionality change.

llvm-svn: 164135

12 years agoAdd test for r164132.
Roman Divacky [Tue, 18 Sep 2012 16:19:10 +0000 (16:19 +0000)]
Add test for r164132.

llvm-svn: 164134

12 years agoFollow up on llvm r164132.
Roman Divacky [Tue, 18 Sep 2012 16:09:16 +0000 (16:09 +0000)]
Follow up on llvm r164132.

llvm-svn: 164133

12 years agoWhen creating MCAsmBackend pass the CPU string as well. In X86AsmBackend
Roman Divacky [Tue, 18 Sep 2012 16:08:49 +0000 (16:08 +0000)]
When creating MCAsmBackend pass the CPU string as well. In X86AsmBackend
store this and use it to not emit long nops when the CPU is geode which
doesnt support them.

Fixes PR11212.

llvm-svn: 164132

12 years agoWarn about self references in in-class initializers.
Hans Wennborg [Tue, 18 Sep 2012 15:58:06 +0000 (15:58 +0000)]
Warn about self references in in-class initializers.

This makes Clang warn about self references in in-class initializers,
for example:

  struct S {
    int a = a + 42;
  };

This basically just moves UninitializedFieldVisitor up a bit in
SemaDeclCXX.cpp, and adds a call to it from ActOnCXXInClassMemberInitializer.

llvm-svn: 164131

12 years agoSROA.cpp: Appease msvc.
NAKAMURA Takumi [Tue, 18 Sep 2012 15:29:02 +0000 (15:29 +0000)]
SROA.cpp: Appease msvc.

...I don't know why this could appease msvc...baad.

llvm-svn: 164130

12 years agollvm/test/DebugInfo: Move two tests, 2010-04-13-PubType.ll and linkage-name.ll to...
NAKAMURA Takumi [Tue, 18 Sep 2012 14:57:11 +0000 (14:57 +0000)]
llvm/test/DebugInfo: Move two tests, 2010-04-13-PubType.ll and linkage-name.ll to X86.

llvm-svn: 164129

12 years agoXFAIL SROA test until Chandler can get to it.
Benjamin Kramer [Tue, 18 Sep 2012 14:27:53 +0000 (14:27 +0000)]
XFAIL SROA test until Chandler can get to it.

llvm-svn: 164128

12 years agoFix isDerivedFrom matcher.
Daniel Jasper [Tue, 18 Sep 2012 14:17:42 +0000 (14:17 +0000)]
Fix isDerivedFrom matcher.

Without this patch, the isDerivedFrom matcher asserts in the
"assert(ClassDecl != NULL);" in the new test, as a
DependentTemplateSpecilizationType is not a sub-type of
TemplateSpecializationType and also does not offer getAsCXXRecordDecl().

I am not sure why this did not cause problems before. It is now (after
the changed implementation of isDerivedFrom) easier to write a matcher
that actually gets into this branch of the code.

llvm-svn: 164127

12 years agoCoding standards: fix typo: '= deleted' -> '= delete'.
Dmitri Gribenko [Tue, 18 Sep 2012 14:00:58 +0000 (14:00 +0000)]
Coding standards: fix typo: '= deleted' -> '= delete'.

llvm-svn: 164126

12 years agoMake MachinePostDominatorTree::DT private
Tom Stellard [Tue, 18 Sep 2012 13:49:54 +0000 (13:49 +0000)]
Make MachinePostDominatorTree::DT private

llvm-svn: 164125

12 years agoLNT builders have picked up new SROA, disable it to get the remaining builders green...
Benjamin Kramer [Tue, 18 Sep 2012 13:43:00 +0000 (13:43 +0000)]
LNT builders have picked up new SROA, disable it to get the remaining builders green again.

llvm-svn: 164124

12 years agoAdd missing matcher for C-style cast expressions.
Daniel Jasper [Tue, 18 Sep 2012 13:36:17 +0000 (13:36 +0000)]
Add missing matcher for C-style cast expressions.

Patch by Gábor Horváth.

llvm-svn: 164123