Andrew Trick [Tue, 18 Sep 2012 18:20:00 +0000 (18:20 +0000)]
misched: Make ScheduleDAGInstrs use the TargetSchedule interface.
llvm-svn: 164153
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
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
Akira Hatanaka [Tue, 18 Sep 2012 18:08:25 +0000 (18:08 +0000)]
Revert r164051.
llvm-svn: 164150
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
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
Andrew Trick [Tue, 18 Sep 2012 17:51:33 +0000 (17:51 +0000)]
LSR critical edge splitting fix for PR13756.
llvm-svn: 164147
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
Fariborz Jahanian [Tue, 18 Sep 2012 17:46:26 +0000 (17:46 +0000)]
minor refactoring of my last check-in.
llvm-svn: 164145
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
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
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
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
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
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
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
Roman Divacky [Tue, 18 Sep 2012 16:38:02 +0000 (16:38 +0000)]
Add PowerPC64 relocation definitions. Patch by Adhemerval Zanella!
llvm-svn: 164137
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
Roman Divacky [Tue, 18 Sep 2012 16:19:10 +0000 (16:19 +0000)]
Add test for r164132.
llvm-svn: 164134
Roman Divacky [Tue, 18 Sep 2012 16:09:16 +0000 (16:09 +0000)]
Follow up on llvm r164132.
llvm-svn: 164133
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
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
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
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
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
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
Dmitri Gribenko [Tue, 18 Sep 2012 14:00:58 +0000 (14:00 +0000)]
Coding standards: fix typo: '= deleted' -> '= delete'.
llvm-svn: 164126
Tom Stellard [Tue, 18 Sep 2012 13:49:54 +0000 (13:49 +0000)]
Make MachinePostDominatorTree::DT private
llvm-svn: 164125
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
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
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
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
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
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
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
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
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
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
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
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
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
Alexey Samsonov [Tue, 18 Sep 2012 07:26:51 +0000 (07:26 +0000)]
[Sanitizer] update lint checker script
llvm-svn: 164111
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
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
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
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
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
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
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
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
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
Craig Topper [Tue, 18 Sep 2012 04:43:40 +0000 (04:43 +0000)]
Add LLVM_DELETED_FUNCTION to coding standards.
llvm-svn: 164101
Craig Topper [Tue, 18 Sep 2012 04:43:05 +0000 (04:43 +0000)]
Fix a typo. No functional change.
llvm-svn: 164100
Andrew Trick [Tue, 18 Sep 2012 04:18:39 +0000 (04:18 +0000)]
Let NULL slip through again.
llvm-svn: 164099
Andrew Trick [Tue, 18 Sep 2012 04:03:34 +0000 (04:03 +0000)]
TargetSchedModel API. Implement latency lookup, disabled.
llvm-svn: 164098
Andrew Trick [Tue, 18 Sep 2012 04:03:30 +0000 (04:03 +0000)]
comment typo
llvm-svn: 164097
Andrew Trick [Tue, 18 Sep 2012 03:55:55 +0000 (03:55 +0000)]
TableGen subtarget emitter. Use getSchedClassIdx.
llvm-svn: 164096
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
Andrew Trick [Tue, 18 Sep 2012 03:32:57 +0000 (03:32 +0000)]
TableGen subtarget emitter. Remove unnecessary header dependence.
llvm-svn: 164094
Craig Topper [Tue, 18 Sep 2012 03:25:49 +0000 (03:25 +0000)]
Mark unimplemented operator new as LLVM_DELETED_FUNCTION.
llvm-svn: 164093
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
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
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
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
Craig Topper [Tue, 18 Sep 2012 01:41:49 +0000 (01:41 +0000)]
Mark asm matcher conversion table as const.
llvm-svn: 164088
Evan Cheng [Tue, 18 Sep 2012 01:34:40 +0000 (01:34 +0000)]
Fix some funky indentation.
llvm-svn: 164087
Craig Topper [Tue, 18 Sep 2012 01:13:36 +0000 (01:13 +0000)]
Fix typo in comment. No functional change.
llvm-svn: 164086
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
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
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
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
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
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
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
Andrew Trick [Mon, 17 Sep 2012 23:14:15 +0000 (23:14 +0000)]
Backout the wrong subtarget emitter fix
llvm-svn: 164078
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
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
Andrew Trick [Mon, 17 Sep 2012 23:05:04 +0000 (23:05 +0000)]
Fix release build after reverting
llvm-svn: 164075
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
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
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
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
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
Manman Ren [Mon, 17 Sep 2012 22:28:55 +0000 (22:28 +0000)]
PGO: preserve branch-weight metadata when simplifying SwitchOnSelect.
llvm-svn: 164068
Andrew Trick [Mon, 17 Sep 2012 22:26:34 +0000 (22:26 +0000)]
Don't use NULL as a fake keyword
llvm-svn: 164067
Andrew Trick [Mon, 17 Sep 2012 22:19:12 +0000 (22:19 +0000)]
InitMCProcessor
llvm-svn: 164066
Andrew Trick [Mon, 17 Sep 2012 22:19:08 +0000 (22:19 +0000)]
TargetSchedModel API. Implement latency lookup, disabled.
llvm-svn: 164065
Andrew Trick [Mon, 17 Sep 2012 22:19:04 +0000 (22:19 +0000)]
comment typo
llvm-svn: 164064
Andrew Trick [Mon, 17 Sep 2012 22:19:01 +0000 (22:19 +0000)]
TableGen subtarget emitter. Use getSchedClassIdx.
llvm-svn: 164063
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
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
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
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
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
Andrew Trick [Mon, 17 Sep 2012 22:18:43 +0000 (22:18 +0000)]
TableGen subtarget parser: Add getProcResourcesIdx().
llvm-svn: 164057
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
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
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
Fariborz Jahanian [Mon, 17 Sep 2012 20:57:19 +0000 (20:57 +0000)]
objective-C: peroform property attribute consistency
checking on property declared in class extension.
// rdar://
12214070
llvm-svn: 164053
Bill Wendling [Mon, 17 Sep 2012 20:43:11 +0000 (20:43 +0000)]
Remove debugging code.
llvm-svn: 164052