platform/upstream/llvm.git
11 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

11 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

11 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

11 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

11 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

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

llvm-svn: 164150

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 years agoDisable some tests that fail when the x86 backend isn't built.
Benjamin Kramer [Tue, 18 Sep 2012 13:34:01 +0000 (13:34 +0000)]
Disable some tests that fail when the x86 backend isn't built.

llvm-svn: 164122

11 years agoMake all VariadicDynCast-Expr-matchers StatementMatchers
Daniel Jasper [Tue, 18 Sep 2012 13:09:13 +0000 (13:09 +0000)]
Make all VariadicDynCast-Expr-matchers StatementMatchers

Having Expr-subclass-matchers being VariadicDynCast-Expr-matchers does
not provide additional type safety and just makes using them harder. In
the clang AST, expressions are always statements and an expression
matcher can be used anywhere, a statement matcher is expected. Any given
matcher definition still has at least one noun.

llvm-svn: 164121

11 years agoFix a warning in release builds and a test case I forgot to update with
Chandler Carruth [Tue, 18 Sep 2012 13:02:06 +0000 (13:02 +0000)]
Fix a warning in release builds and a test case I forgot to update with
a fix to getCommonType in the previous patch.

llvm-svn: 164120

11 years agoAdd a major missing piece to the new SROA pass: aggressive splitting of
Chandler Carruth [Tue, 18 Sep 2012 12:57:43 +0000 (12:57 +0000)]
Add a major missing piece to the new SROA pass: aggressive splitting of
FCAs. This is essential in order to promote allocas that are used in
struct returns by frontends like Clang. The FCA load would block the
rest of the pass from firing, resulting is significant regressions with
the bullet benchmark in the nightly test suite.

Thanks to Duncan for repeated discussions about how best to do this, and
to both him and Benjamin for review.

This appears to have blocked many places where the pass tries to fire,
and so I'm expect somewhat different results with this fix added.

As with the last big patch, I'm including a change to enable the SROA by
default *temporarily*. Ben is going to remove this as soon as the LNT
bots pick up the patch. I'm just trying to get a round of LNT numbers
from the stable machines in the lab.

NOTE: Four clang tests are expected to fail in the brief window where
this is enabled. Sorry for the noise!

llvm-svn: 164119

11 years agoIntercept signal() and sigaction() within the dynamic runtime on Mac.
Alexander Potapenko [Tue, 18 Sep 2012 12:49:51 +0000 (12:49 +0000)]
Intercept signal() and sigaction() within the dynamic runtime on Mac.
Add a test that ensures that ASan does not allow to override the signal handlers.

llvm-svn: 164118

11 years agoFix instcombine to obey requested alignment when merging allocas.
Richard Osborne [Tue, 18 Sep 2012 09:31:44 +0000 (09:31 +0000)]
Fix instcombine to obey requested alignment when merging allocas.

llvm-svn: 164117

11 years ago[TSan] s/uintptr_t/intptr_t in TSan test and enforce stack size limit in one of TSan...
Alexey Samsonov [Tue, 18 Sep 2012 09:09:35 +0000 (09:09 +0000)]
[TSan] s/uintptr_t/intptr_t in TSan test and enforce stack size limit in one of TSan output tests that somewhy fails otherwise

llvm-svn: 164116

11 years ago[TSan] fix a typo in test dependencies. Silence few remaining pedantic gcc warnings...
Alexey Samsonov [Tue, 18 Sep 2012 08:33:37 +0000 (08:33 +0000)]
[TSan] fix a typo in test dependencies. Silence few remaining pedantic gcc warnings in TSan tests.

llvm-svn: 164115

11 years agoMore domain conversion; convert VFP VMOVS to NEON instructions in more cases - when...
James Molloy [Tue, 18 Sep 2012 08:31:15 +0000 (08:31 +0000)]
More domain conversion; convert VFP VMOVS to NEON instructions in more cases - when we may clobber the other S-lane by converting an S to a D instruction, make an effort to work out if the S lane is clobberable or not.

llvm-svn: 164114

11 years ago[Sanitizer] llvm-symbolizer: turn off symbol table lookup by default while getSymbolA...
Alexey Samsonov [Tue, 18 Sep 2012 08:00:21 +0000 (08:00 +0000)]
[Sanitizer] llvm-symbolizer: turn off symbol table lookup by default while getSymbolAddress from libObject returns wrong values

llvm-svn: 164113

11 years ago[ASan] Move printing descriptions of heap addresses in error report from allocator...
Alexey Samsonov [Tue, 18 Sep 2012 07:38:10 +0000 (07:38 +0000)]
[ASan] Move printing descriptions of heap addresses in error report from allocator internals to asan_report.cc.

llvm-svn: 164112

11 years ago[Sanitizer] update lint checker script
Alexey Samsonov [Tue, 18 Sep 2012 07:26:51 +0000 (07:26 +0000)]
[Sanitizer] update lint checker script

llvm-svn: 164111

11 years ago[TSan] port all output tests to lit and move them to lit_tests directory. This makes...
Alexey Samsonov [Tue, 18 Sep 2012 07:23:54 +0000 (07:23 +0000)]
[TSan] port all output tests to lit and move them to lit_tests directory. This makes 'make check-tsan' command test both unit and output TSan tests. Old custom makefiles for running TSan tests are still functional as well.

llvm-svn: 164110

11 years agoMake custom operand parsing mnemonic indices use the same mnemonic table as the match...
Craig Topper [Tue, 18 Sep 2012 07:02:21 +0000 (07:02 +0000)]
Make custom operand parsing mnemonic indices use the same mnemonic table as the match table. Reorder fields in OperandMatchEntry to provide the least amount of padding for in tree targets.

llvm-svn: 164109

11 years agoUse variable type for index into mnemonic table. Shrinks size of index field on in...
Craig Topper [Tue, 18 Sep 2012 06:10:45 +0000 (06:10 +0000)]
Use variable type for index into mnemonic table. Shrinks size of index field on in tree targets. Saving static data space.

llvm-svn: 164108

11 years ago[tsan] fix the tsan allocator to handle any alignment
Kostya Serebryany [Tue, 18 Sep 2012 06:00:59 +0000 (06:00 +0000)]
[tsan] fix the tsan allocator to handle any alignment

llvm-svn: 164107

11 years agoRemove an unused private field exposed by the recent LLVM_DELETED_FUNCTION changes.
Craig Topper [Tue, 18 Sep 2012 05:34:55 +0000 (05:34 +0000)]
Remove an unused private field exposed by the recent LLVM_DELETED_FUNCTION changes.

llvm-svn: 164106

11 years agoReplaced ReInitMCSubtargetInfo with InitMCProcessor.
Andrew Trick [Tue, 18 Sep 2012 05:33:15 +0000 (05:33 +0000)]
Replaced ReInitMCSubtargetInfo with InitMCProcessor.

Now where we used to call ReInitMCSubtargetInfo, we actually recompute
the same information as InitMCSubtargetInfo instead of only setting
the feature bits.

llvm-svn: 164105

11 years agoRemove an unused private field exposed by the recent LLVM_DELETED_FUNCTION changes.
Craig Topper [Tue, 18 Sep 2012 05:30:57 +0000 (05:30 +0000)]
Remove an unused private field exposed by the recent LLVM_DELETED_FUNCTION changes.

llvm-svn: 164104

11 years agoRemove an unused private field exposed by the recent LLVM_DELETED_FUNCTION changes.
Craig Topper [Tue, 18 Sep 2012 05:21:59 +0000 (05:21 +0000)]
Remove an unused private field exposed by the recent LLVM_DELETED_FUNCTION changes.

llvm-svn: 164103

11 years agoMark unimplemented copy constructors and copy assignment operators with LLVM_DELETED_...
Craig Topper [Tue, 18 Sep 2012 04:52:05 +0000 (04:52 +0000)]
Mark unimplemented copy constructors and copy assignment operators with LLVM_DELETED_FUNCTION.

llvm-svn: 164102

11 years agoAdd LLVM_DELETED_FUNCTION to coding standards.
Craig Topper [Tue, 18 Sep 2012 04:43:40 +0000 (04:43 +0000)]
Add LLVM_DELETED_FUNCTION to coding standards.

llvm-svn: 164101

11 years agoFix a typo. No functional change.
Craig Topper [Tue, 18 Sep 2012 04:43:05 +0000 (04:43 +0000)]
Fix a typo. No functional change.

llvm-svn: 164100

11 years agoLet NULL slip through again.
Andrew Trick [Tue, 18 Sep 2012 04:18:39 +0000 (04:18 +0000)]
Let NULL slip through again.

llvm-svn: 164099

11 years agoTargetSchedModel API. Implement latency lookup, disabled.
Andrew Trick [Tue, 18 Sep 2012 04:03:34 +0000 (04:03 +0000)]
TargetSchedModel API. Implement latency lookup, disabled.

llvm-svn: 164098

11 years agocomment typo
Andrew Trick [Tue, 18 Sep 2012 04:03:30 +0000 (04:03 +0000)]
comment typo

llvm-svn: 164097

11 years agoTableGen subtarget emitter. Use getSchedClassIdx.
Andrew Trick [Tue, 18 Sep 2012 03:55:55 +0000 (03:55 +0000)]
TableGen subtarget emitter. Use getSchedClassIdx.

llvm-svn: 164096

11 years agoTableGen subtarget emitter. Generate resolveSchedClass generated hook for resolving...
Andrew Trick [Tue, 18 Sep 2012 03:41:43 +0000 (03:41 +0000)]
TableGen subtarget emitter. Generate resolveSchedClass generated hook for resolving instruction variants.

llvm-svn: 164095

11 years agoTableGen subtarget emitter. Remove unnecessary header dependence.
Andrew Trick [Tue, 18 Sep 2012 03:32:57 +0000 (03:32 +0000)]
TableGen subtarget emitter. Remove unnecessary header dependence.

llvm-svn: 164094

11 years agoMark unimplemented operator new as LLVM_DELETED_FUNCTION.
Craig Topper [Tue, 18 Sep 2012 03:25:49 +0000 (03:25 +0000)]
Mark unimplemented operator new as LLVM_DELETED_FUNCTION.

llvm-svn: 164093

11 years agoTableGen subtarget emitter. Initialize MCSubtargetInfo with the new machine model.
Andrew Trick [Tue, 18 Sep 2012 03:18:56 +0000 (03:18 +0000)]
TableGen subtarget emitter. Initialize MCSubtargetInfo with the new machine model.

llvm-svn: 164092

11 years agoMark constructors, destructors, and operator new commented as 'do not implement'...
Craig Topper [Tue, 18 Sep 2012 02:05:45 +0000 (02:05 +0000)]
Mark constructors, destructors, and operator new commented as 'do not implement' with LLVM_DELETED_FUNCTION instead.

llvm-svn: 164091

11 years agoMark unimplemented copy constructors and copy assignment operators as LLVM_DELETED_FU...
Craig Topper [Tue, 18 Sep 2012 02:01:41 +0000 (02:01 +0000)]
Mark unimplemented copy constructors and copy assignment operators as LLVM_DELETED_FUNCTION.

llvm-svn: 164090

11 years agoUse vld1 / vst2 for unaligned v2f64 load / store. e.g. Use vld1.16 for 2-byte
Evan Cheng [Tue, 18 Sep 2012 01:42:45 +0000 (01:42 +0000)]
Use vld1 / vst2 for unaligned v2f64 load / store. e.g. Use vld1.16 for 2-byte
aligned address. Based on patch by David Peixotto.

Also use vld1.64 / vst1.64 with 128-bit alignment to take advantage of alignment
hints. rdar://12090772, rdar://12238782

llvm-svn: 164089

11 years agoMark asm matcher conversion table as const.
Craig Topper [Tue, 18 Sep 2012 01:41:49 +0000 (01:41 +0000)]
Mark asm matcher conversion table as const.

llvm-svn: 164088

11 years agoFix some funky indentation.
Evan Cheng [Tue, 18 Sep 2012 01:34:40 +0000 (01:34 +0000)]
Fix some funky indentation.

llvm-svn: 164087

11 years agoFix typo in comment. No functional change.
Craig Topper [Tue, 18 Sep 2012 01:13:36 +0000 (01:13 +0000)]
Fix typo in comment. No functional change.

llvm-svn: 164086

11 years agoIf a comma operator is followed by a token which unambiguously indicates the
Richard Smith [Tue, 18 Sep 2012 00:52:05 +0000 (00:52 +0000)]
If a comma operator is followed by a token which unambiguously indicates the
start of a statement or the end of a compound-statement, diagnose the comma as
a typo for a semicolon. Patch by Ahmed Bougacha! Additional test cases and
minor refactoring by me.

llvm-svn: 164085

11 years agoPGO: preserve branch-weight metadata when simplifying Switch to a sub, an icmp
Manman Ren [Tue, 18 Sep 2012 00:47:33 +0000 (00:47 +0000)]
PGO: preserve branch-weight metadata when simplifying Switch to a sub, an icmp
and a conditional branch; also when removing dead cases from a switch.

llvm-svn: 164084

11 years agoPer discussion on cfe-dev, remove -Wunique-enums entirely. There
Ted Kremenek [Tue, 18 Sep 2012 00:41:42 +0000 (00:41 +0000)]
Per discussion on cfe-dev, remove -Wunique-enums entirely.  There
is no compelling argument that this is a generally useful warning,
and imposes a strong stylistic argument on code beyond what it was
intended to find warnings in.

llvm-svn: 164083

11 years agoMaking ClangExpression hold on to a WP to the Process instead of a SP. This fix shoul...
Enrico Granata [Tue, 18 Sep 2012 00:08:47 +0000 (00:08 +0000)]
Making ClangExpression hold on to a WP to the Process instead of a SP. This fix should enable us to have per-process maps of ClangExpressions without fear of keeping the process alive forever

llvm-svn: 164082

11 years agoRemove a spurious control character coming from trying to save files in Xcode with...
Jim Ingham [Tue, 18 Sep 2012 00:00:25 +0000 (00:00 +0000)]
Remove a spurious control character coming from trying to save files in Xcode with emacs' ^x^s.

llvm-svn: 164081

11 years agoobjective-C: don't warn about class extension property's
Fariborz Jahanian [Mon, 17 Sep 2012 23:57:35 +0000 (23:57 +0000)]
objective-C: don't warn about class extension property's
missing 'assign' attribute as it is determined by its
overridden property in primary class. // rdar://12214070

llvm-svn: 164080

11 years agoobjective-C: add Doug's test for my last patch.
Fariborz Jahanian [Mon, 17 Sep 2012 23:24:36 +0000 (23:24 +0000)]
objective-C: add Doug's test for my last patch.

llvm-svn: 164079

11 years agoBackout the wrong subtarget emitter fix
Andrew Trick [Mon, 17 Sep 2012 23:14:15 +0000 (23:14 +0000)]
Backout the wrong subtarget emitter fix

llvm-svn: 164078

11 years agoobjective-C: improve on warnings about misplacement of method
Fariborz Jahanian [Mon, 17 Sep 2012 23:09:59 +0000 (23:09 +0000)]
objective-C: improve on warnings about misplacement of method
argument names. // rdar://12263549

llvm-svn: 164077

11 years agoPGO: preserve branch-weight metadata when simplifying Switch
Manman Ren [Mon, 17 Sep 2012 23:07:43 +0000 (23:07 +0000)]
PGO: preserve branch-weight metadata when simplifying Switch

Hanlde the case when we split the default edge if the default target has "icmp"
and unconditinal branch.

llvm-svn: 164076

11 years agoFix release build after reverting
Andrew Trick [Mon, 17 Sep 2012 23:05:04 +0000 (23:05 +0000)]
Fix release build after reverting

llvm-svn: 164075

11 years agoMerge into undefined lanes under -new-coalescer.
Jakob Stoklund Olesen [Mon, 17 Sep 2012 23:03:25 +0000 (23:03 +0000)]
Merge into undefined lanes under -new-coalescer.

Add LIS::pruneValue() and extendToIndices(). These two functions are
used by the register coalescer when merging two live ranges requires
more than a trivial value mapping as supported by LiveInterval::join().

The pruneValue() function can remove the part of a value number that is
going to conflict in join(). Afterwards, extendToIndices can restore the
live range, using any new dominating value numbers and updating the SSA
form.

Use this complex value mapping to support merging a register into a
vector lane that has a conflicting value, but the clobbered lane is
undef.

llvm-svn: 164074

11 years agoStop adding <imp-def> operands when expanding REG_SEQUENCE.
Jakob Stoklund Olesen [Mon, 17 Sep 2012 23:03:21 +0000 (23:03 +0000)]
Stop adding <imp-def> operands when expanding REG_SEQUENCE.

These extra operands are not needed by register allocators using
VirtRegRewriter, and RAFast don't need them any longer.

By omitting the <imp-def> operands, it becomes possible for the new
register coalescer to track which lanes are valid and which are undef.

llvm-svn: 164073

11 years agoRevert r164061-r164067. Most of the new subtarget emitter.
Andrew Trick [Mon, 17 Sep 2012 23:00:42 +0000 (23:00 +0000)]
Revert r164061-r164067. Most of the new subtarget emitter.

I have to work out the Target/CodeGen header dependencies
before putting this back.

llvm-svn: 164072

11 years agoRemove redundant semicolons to fix -pedantic-errors build break with older Clangs.
Richard Smith [Mon, 17 Sep 2012 22:52:05 +0000 (22:52 +0000)]
Remove redundant semicolons to fix -pedantic-errors build break with older Clangs.

llvm-svn: 164071

11 years agollvm/Target/TargetSubtargetInfo.h: Fix case in #include, s#llvm/Codegen/#llvm/CodeGen#.
NAKAMURA Takumi [Mon, 17 Sep 2012 22:34:56 +0000 (22:34 +0000)]
llvm/Target/TargetSubtargetInfo.h: Fix case in #include, s#llvm/Codegen/#llvm/CodeGen#.

llvm-svn: 164070

11 years agoPGO: preserve branch-weight metadata when simplifying SwitchOnSelect.
Manman Ren [Mon, 17 Sep 2012 22:28:55 +0000 (22:28 +0000)]
PGO: preserve branch-weight metadata when simplifying SwitchOnSelect.

llvm-svn: 164068

11 years agoDon't use NULL as a fake keyword
Andrew Trick [Mon, 17 Sep 2012 22:26:34 +0000 (22:26 +0000)]
Don't use NULL as a fake keyword

llvm-svn: 164067

11 years agoInitMCProcessor
Andrew Trick [Mon, 17 Sep 2012 22:19:12 +0000 (22:19 +0000)]
InitMCProcessor

llvm-svn: 164066

11 years agoTargetSchedModel API. Implement latency lookup, disabled.
Andrew Trick [Mon, 17 Sep 2012 22:19:08 +0000 (22:19 +0000)]
TargetSchedModel API. Implement latency lookup, disabled.

llvm-svn: 164065

11 years agocomment typo
Andrew Trick [Mon, 17 Sep 2012 22:19:04 +0000 (22:19 +0000)]
comment typo

llvm-svn: 164064

11 years agoTableGen subtarget emitter. Use getSchedClassIdx.
Andrew Trick [Mon, 17 Sep 2012 22:19:01 +0000 (22:19 +0000)]
TableGen subtarget emitter. Use getSchedClassIdx.

llvm-svn: 164063

11 years agoTableGen subtarget emitter. Generate resolveSchedClass generated hook for resolving...
Andrew Trick [Mon, 17 Sep 2012 22:18:58 +0000 (22:18 +0000)]
TableGen subtarget emitter. Generate resolveSchedClass generated hook for resolving instruction variants.

llvm-svn: 164062

11 years agoTableGen subtarget emitter. Initialize MCSubtargetInfo with the new machine model.
Andrew Trick [Mon, 17 Sep 2012 22:18:55 +0000 (22:18 +0000)]
TableGen subtarget emitter. Initialize MCSubtargetInfo with the new machine model.

llvm-svn: 164061

11 years agoTableGen subtarget emitter. Format and emit data tables for the new machine model.
Andrew Trick [Mon, 17 Sep 2012 22:18:50 +0000 (22:18 +0000)]
TableGen subtarget emitter. Format and emit data tables for the new machine model.

llvm-svn: 164060

11 years agoTableGen subtarget emitter. Generate data tables for the new machine model.
Andrew Trick [Mon, 17 Sep 2012 22:18:48 +0000 (22:18 +0000)]
TableGen subtarget emitter. Generate data tables for the new machine model.

Map the CodeGenSchedule object model onto data tables. The structure
of the data tables is defined in MC, so for convenience we include
MCSchedule.h. The alternative is maintaining a redundant copy of the
table structure definitions. Mapping the object model onto data tables
is sufficiently complicated that it should not be interleaved with
emitting source code. This avoids major problem with the backend for
itinerary generation.

llvm-svn: 164059

11 years agoTableGen subtarget emitter. Emit processor resources for the new machine model.
Andrew Trick [Mon, 17 Sep 2012 22:18:45 +0000 (22:18 +0000)]
TableGen subtarget emitter. Emit processor resources for the new machine model.

llvm-svn: 164058

11 years agoTableGen subtarget parser: Add getProcResourcesIdx().
Andrew Trick [Mon, 17 Sep 2012 22:18:43 +0000 (22:18 +0000)]
TableGen subtarget parser: Add getProcResourcesIdx().

llvm-svn: 164057

11 years agoAdd some cases to x86 OptimizeCompare to handle DEC and INC, too.
Jan Wen Voung [Mon, 17 Sep 2012 22:04:23 +0000 (22:04 +0000)]
Add some cases to x86 OptimizeCompare to handle DEC and INC, too.

While we are setting the earlier def to true, also make it live.

llvm-svn: 164056

11 years agoAdded an example of an empty case label to avoid confusion.
Alexander Kornienko [Mon, 17 Sep 2012 21:45:21 +0000 (21:45 +0000)]
Added an example of an empty case label to avoid confusion.

llvm-svn: 164055

11 years agoPGO: preserve branch-weight metadata when simplifying two branches with a common
Manman Ren [Mon, 17 Sep 2012 21:30:40 +0000 (21:30 +0000)]
PGO: preserve branch-weight metadata when simplifying two branches with a common
destination in SimplifyCondBranchToCondBranch.

llvm-svn: 164054