Commit Graph

134114 Commits

Author SHA1 Message Date
Greg Clayton 43e0af06b4 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
2012-09-18 18:04:04 +00:00
Andrew Trick 402edbbe39 LSR critical edge splitting fix for PR13756.
llvm-svn: 164147
2012-09-18 17:51:33 +00:00
Chandler Carruth d356fd02a9 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
2012-09-18 17:49:37 +00:00
Fariborz Jahanian 282071efcc minor refactoring of my last check-in.
llvm-svn: 164145
2012-09-18 17:46:26 +00:00
Enrico Granata 97fca507f4 <rdar://problem/11988289> Making C++ synthetic children provider for NSDictionary and related classes
llvm-svn: 164144
2012-09-18 17:43:16 +00:00
Fariborz Jahanian b1885425c4 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
2012-09-18 17:37:21 +00:00
Benjamin Kramer a59ef5795d Fix build for compilers that don't understand injected class names properly.
llvm-svn: 164142
2012-09-18 17:11:47 +00:00
Roman Divacky 0be33598ce Avoid symbol name clash when filling TOC.
Patch by Adhemerval Zanella.

llvm-svn: 164141
2012-09-18 17:10:37 +00:00
Benjamin Kramer 73a9e4a1f9 SROA: Use CRTP for OpSplitter to get rid of virtual dispatch and the virtual-dtor warnings that come with it.
llvm-svn: 164140
2012-09-18 17:06:32 +00:00
Roman Divacky d4f6f421a9 On PPC64 emit the environment pointer. Patch by Adhemerval Zanella.
llvm-svn: 164139
2012-09-18 16:55:29 +00:00
Roman Divacky 762930637c Optimize local func calls to not emit nop for TOC restoration.
Patch by Adhemerval Zanella.

llvm-svn: 164138
2012-09-18 16:47:58 +00:00
Roman Divacky be42c1e0aa Add PowerPC64 relocation definitions. Patch by Adhemerval Zanella!
llvm-svn: 164137
2012-09-18 16:38:02 +00:00
Benjamin Kramer 65f8c88242 SROA: Replace the member function template contraption for recursively splitting aggregates into a real class.
No intended functionality change.

llvm-svn: 164135
2012-09-18 16:20:46 +00:00
Roman Divacky 24653d41e9 Add test for r164132.
llvm-svn: 164134
2012-09-18 16:19:10 +00:00
Roman Divacky 5bebfb7363 Follow up on llvm r164132.
llvm-svn: 164133
2012-09-18 16:09:16 +00:00
Roman Divacky 5dd4ccb402 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
2012-09-18 16:08:49 +00:00
Hans Wennborg 44fd70a3ad 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
2012-09-18 15:58:06 +00:00
NAKAMURA Takumi eb2c8f0fc6 SROA.cpp: Appease msvc.
...I don't know why this could appease msvc...baad.

llvm-svn: 164130
2012-09-18 15:29:02 +00:00
NAKAMURA Takumi 78e009d799 llvm/test/DebugInfo: Move two tests, 2010-04-13-PubType.ll and linkage-name.ll to X86.
llvm-svn: 164129
2012-09-18 14:57:11 +00:00
Benjamin Kramer d4d37db071 XFAIL SROA test until Chandler can get to it.
llvm-svn: 164128
2012-09-18 14:27:53 +00:00
Daniel Jasper 83dafaf3db 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
2012-09-18 14:17:42 +00:00
Dmitri Gribenko be88f563bf Coding standards: fix typo: '= deleted' -> '= delete'.
llvm-svn: 164126
2012-09-18 14:00:58 +00:00
Tom Stellard 1b5585a350 Make MachinePostDominatorTree::DT private
llvm-svn: 164125
2012-09-18 13:49:54 +00:00
Benjamin Kramer 9bc3efc81c LNT builders have picked up new SROA, disable it to get the remaining builders green again.
llvm-svn: 164124
2012-09-18 13:43:00 +00:00
Daniel Jasper 417f77684b Add missing matcher for C-style cast expressions.
Patch by Gábor Horváth.

llvm-svn: 164123
2012-09-18 13:36:17 +00:00
Benjamin Kramer a73727143a Disable some tests that fail when the x86 backend isn't built.
llvm-svn: 164122
2012-09-18 13:34:01 +00:00
Daniel Jasper 848cbe1a0c 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
2012-09-18 13:09:13 +00:00
Chandler Carruth a34f3567e0 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
2012-09-18 13:02:06 +00:00
Chandler Carruth 42cb9cb14f 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
2012-09-18 12:57:43 +00:00
Alexander Potapenko 431ea19327 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
2012-09-18 12:49:51 +00:00
Richard Osborne b68053e266 Fix instcombine to obey requested alignment when merging allocas.
llvm-svn: 164117
2012-09-18 09:31:44 +00:00
Alexey Samsonov 848abbd236 [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
2012-09-18 09:09:35 +00:00
Alexey Samsonov 3040830fcd [TSan] fix a typo in test dependencies. Silence few remaining pedantic gcc warnings in TSan tests.
llvm-svn: 164115
2012-09-18 08:33:37 +00:00
James Molloy ea05256b58 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
2012-09-18 08:31:15 +00:00
Alexey Samsonov 731219551e [Sanitizer] llvm-symbolizer: turn off symbol table lookup by default while getSymbolAddress from libObject returns wrong values
llvm-svn: 164113
2012-09-18 08:00:21 +00:00
Alexey Samsonov 8661465edd [ASan] Move printing descriptions of heap addresses in error report from allocator internals to asan_report.cc.
llvm-svn: 164112
2012-09-18 07:38:10 +00:00
Alexey Samsonov 5a42ac5b0e [Sanitizer] update lint checker script
llvm-svn: 164111
2012-09-18 07:26:51 +00:00
Alexey Samsonov 341e5bcb45 [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
2012-09-18 07:23:54 +00:00
Craig Topper 7ecfa6d960 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
2012-09-18 07:02:21 +00:00
Craig Topper e2cfeb30a1 Use variable type for index into mnemonic table. Shrinks size of index field on in tree targets. Saving static data space.
llvm-svn: 164108
2012-09-18 06:10:45 +00:00
Kostya Serebryany 0a31ed1417 [tsan] fix the tsan allocator to handle any alignment
llvm-svn: 164107
2012-09-18 06:00:59 +00:00
Craig Topper 802579dc7f Remove an unused private field exposed by the recent LLVM_DELETED_FUNCTION changes.
llvm-svn: 164106
2012-09-18 05:34:55 +00:00
Andrew Trick ba7b921fcb 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
2012-09-18 05:33:15 +00:00
Craig Topper 8760caf1f3 Remove an unused private field exposed by the recent LLVM_DELETED_FUNCTION changes.
llvm-svn: 164104
2012-09-18 05:30:57 +00:00
Craig Topper 462a36d229 Remove an unused private field exposed by the recent LLVM_DELETED_FUNCTION changes.
llvm-svn: 164103
2012-09-18 05:21:59 +00:00
Craig Topper 43201a8261 Mark unimplemented copy constructors and copy assignment operators with LLVM_DELETED_FUNCTION.
llvm-svn: 164102
2012-09-18 04:52:05 +00:00
Craig Topper 1740e05c31 Add LLVM_DELETED_FUNCTION to coding standards.
llvm-svn: 164101
2012-09-18 04:43:40 +00:00
Craig Topper 3215f836b5 Fix a typo. No functional change.
llvm-svn: 164100
2012-09-18 04:43:05 +00:00
Andrew Trick a67b2a702c Let NULL slip through again.
llvm-svn: 164099
2012-09-18 04:18:39 +00:00
Andrew Trick 6e6d597b1c TargetSchedModel API. Implement latency lookup, disabled.
llvm-svn: 164098
2012-09-18 04:03:34 +00:00