Commit Graph

130179 Commits

Author SHA1 Message Date
Sean Callanan a0d17365ab On i386 we see occasional crashes when the register
context is not returning valid registers yet.  Don't
crash in these situations.

<rdar://problem/11650335>

llvm-svn: 159885
2012-07-07 01:38:30 +00:00
Greg Clayton 7820bd1e52 <rdar://problem/11357711>
Fixed a crasher where the section load list was not thread safe.

llvm-svn: 159884
2012-07-07 01:24:12 +00:00
Greg Clayton 9407302d37 Make const result value objects able to return dynamic types.
Modified the heap.py to be able to correctly indentify the exact ivar for the "ptr_refs" command no matter how deep the ivar is in a class hierarchy. Also fixed the ability for the heap command to symbolicate the stack backtrace when MallocStackLogging is set in the environment and the "--stack" option was specified.

llvm-svn: 159883
2012-07-07 01:22:45 +00:00
Sean Callanan 3b18fbd983 Fixed a crasher that happens if we try to inspect
a NULL symbol file.

<rdar://problem/11795939>

llvm-svn: 159882
2012-07-07 01:07:33 +00:00
Bill Wendling 786de35fa0 Use the DebugInfo wrappers instead of mucking about with the MDNode directly.
llvm-svn: 159881
2012-07-07 00:52:35 +00:00
Sean Callanan 210b815f9d Fixed a crash in the class uniq'ing code where we
didn't check if the two classes had the same number
of members.

<rdar://problem/11678873>

llvm-svn: 159880
2012-07-07 00:29:33 +00:00
Bill Wendling 56543735c9 Print the name last.
llvm-svn: 159879
2012-07-06 23:43:12 +00:00
Dmitri Gribenko 44cd7e6746 Restrict the set of declaration kinds for which we allow trailing comments.
llvm-svn: 159878
2012-07-06 23:27:33 +00:00
Chad Rosier 73b02825d0 Fix the naming of ensureAlignment. Per the coding standard function names
should be camel case, and start with a lower case letter.

llvm-svn: 159877
2012-07-06 23:13:38 +00:00
Nuno Lopes fa0dffccee teach instcombine to remove allocated buffers even if there are stores, memcpy/memmove/memset, and objectsize users.
This means we can do cheap DSE for heap memory.
Nothing is done if the pointer excapes or has a load.

The churn in the tests is mostly due to objectsize, since we want to make sure we
don't delete the malloc call before evaluating the objectsize (otherwise it becomes -1/0)

llvm-svn: 159876
2012-07-06 23:09:25 +00:00
Ted Kremenek 9877f689f2 Implement -Wpedantic and --no-pedantic to complement -Weverything.
This patch introduces some magic in tablegen to create a "Pedantic" diagnostic
group which automagically includes all warnings that are extensions.  This
allows a user to suppress specific warnings traditionally under -pedantic used
an ordinary warning flag.  This also allows users to use #pragma to silence
specific -pedantic warnings, or promote them to errors, within blocks of text
(just like any other warning).

-Wpedantic is NOT an alias for -pedantic.  Instead, it provides another way
to (a) activate -pedantic warnings and (b) disable them.  Where they differ
is that -pedantic changes the behavior of the preprocessor slightly, whereas
-Wpedantic does not (it just turns on the warnings).

The magic in the tablegen diagnostic emitter has to do with computing the minimal
set of diagnostic groups and diagnostics that should go into -Wpedantic, as those
diagnostics that already members of groups that themselves are (transitively) members
of -Wpedantic do not need to be included in the Pedantic group directly.  I went
back and forth on whether or not to magically generate this group, and the invariant
was that we always wanted extension warnings to be included in -Wpedantic "some how",
but the bookkeeping would be very onerous to manage by hand.

-no-pedantic (and --no-pedantic) is included for completeness, and matches many of the
same kind of flags the compiler already supports.  It does what it says: cancels out
-pedantic.  One discrepancy is that if one specifies --no-pedantic and -Weverything or
-Wpedantic the pedantic warnings are still enabled (essentially the -W flags win).  We
can debate the correct behavior here.

Along the way, this patch nukes some code in TextDiagnosticPrinter.cpp and CXStoredDiagnostic.cpp
that determine whether to include the "-pedantic" flag in the warning output.  This is
no longer needed, as all extensions now have a -W flag.

This patch also significantly reduces the number of warnings not under flags from 229
to 158 (all extension warnings).  That's a 31% reduction.

llvm-svn: 159875
2012-07-06 23:07:31 +00:00
Dmitri Gribenko d01af8772d Since SmallMap was removed in r158644, remove documentation in ProgrammersManual.html.
llvm-svn: 159874
2012-07-06 23:06:47 +00:00
Bill Wendling 3270582ceb Check if it's a scope last, because several things are scopes.
llvm-svn: 159873
2012-07-06 23:06:16 +00:00
Jordan Rose 183096d0c4 [analyzer] Fix mis-committed test. No functionality change.
llvm-svn: 159869
2012-07-06 22:10:39 +00:00
Jordan Rose 1e0719ef6f Constify the argument to SourceLocation::getFromPtrEncoding.
This allows SourceLocations to be stored in generic "data" fields
that are typed as "const void *" and are also used to point to
const objects.

Really we should probably be returning a const pointer from
getPtrEncoding as well, but in some places we want to store
SourceLocations in the same generic "data" field as proper
pointers to /mutable/ objects. Oh well.

llvm-svn: 159868
2012-07-06 22:00:04 +00:00
Jordan Rose 5df10aa540 [analyzer] Add comments to Calls.h.
No functionality change.

llvm-svn: 159867
2012-07-06 22:00:01 +00:00
Jordan Rose 3f89e0ec93 [analyzer] Be careful about LazyCompoundVals, which may be for the first field.
We use LazyCompoundVals to avoid copying the contents of structs and arrays
around in the store, and when we need to pass a struct around that already
has a LazyCompoundVal we just use the original one. However, it's possible
that the first field of a struct may have a LazyCompoundVal of its own, and
we currently can't distinguish a LazyCompoundVal for the first element of a
struct from a LazyCompoundVal for the entire struct. In this case we should
just drop the optimization and make a new LazyCompoundVal that encompasses
the old one.

PR13264 / <rdar://problem/11802440>

llvm-svn: 159866
2012-07-06 21:59:56 +00:00
Howard Hinnant 8a9ee14803 Apply noexcept to tuple.
llvm-svn: 159865
2012-07-06 21:53:48 +00:00
Jim Grosbach 09487775d3 ARM: Add test cleanup entry to the README.
llvm-svn: 159864
2012-07-06 21:52:04 +00:00
Matt Beaumont-Gay 4106ea3b4e Sprinkle llvm_unreachable around to placate GCC's -Wreturn-type.
llvm-svn: 159860
2012-07-06 21:13:09 +00:00
Fariborz Jahanian dabd133186 objc-arc: warn when assigning retained object to
a 'weak' property just as we do the same for
'weak' variables. // rdar://11814185

llvm-svn: 159859
2012-07-06 21:09:27 +00:00
Howard Hinnant a0f4c45c38 As a conforming extension give tuple a noexcept default constructor conditionalized on its held types.
llvm-svn: 159858
2012-07-06 20:50:27 +00:00
Howard Hinnant a62ebe043e Give tuple a constexpr default constructor.
llvm-svn: 159857
2012-07-06 20:39:45 +00:00
Dmitry Vyukov 239ae7186b tsan: Go language support fixes
llvm-svn: 159856
2012-07-06 20:23:59 +00:00
Akira Hatanaka b577ff116d revert r159851.
llvm-svn: 159854
2012-07-06 20:16:48 +00:00
Howard Hinnant 9f06558f86 New Windows libc++ test results provided by Ruben Van Boxem.
llvm-svn: 159852
2012-07-06 19:35:31 +00:00
Akira Hatanaka cfa35fa0ff Reapply r158846.
Include file MipsGenRegisterInfo.inc.

llvm-svn: 159851
2012-07-06 19:29:11 +00:00
Howard Hinnant 9d6d1c6860 Apply noexcept to those functions implemented in <cstdlib> as a conforming extension.
llvm-svn: 159850
2012-07-06 19:16:56 +00:00
Howard Hinnant 9c14b75a37 Apply noexcept to those functions implemented in <cmath> as a conforming extension.
llvm-svn: 159849
2012-07-06 19:13:50 +00:00
Bill Wendling aa02e36fa8 Add a print method to the ObjC property object.
llvm-svn: 159848
2012-07-06 19:12:31 +00:00
Fariborz Jahanian 0021347926 objective-c++11: extend c++11 range-based loop to iterate
over objective-c container collection. // rdar://9293227

llvm-svn: 159847
2012-07-06 19:04:04 +00:00
Howard Hinnant 227001d12e Add noexcept test for offsetof macro per [support.types]/p4.
llvm-svn: 159846
2012-07-06 18:39:01 +00:00
Dmitri Gribenko 7dd29d4d3d Don't store pointers into a std::vector (RawCommentList::Comments). Although
currently we take address of std::vector's contents only after we finished
adding all comments (so no reallocation can happen), this will change in
future.

llvm-svn: 159845
2012-07-06 18:19:34 +00:00
Greg Clayton a98fde5d70 <rdar://problem/11819635>
llvm-svn: 159844
2012-07-06 17:58:01 +00:00
Bill Wendling 5ef3159820 Remove trailing comma in array initialization list.
llvm-svn: 159843
2012-07-06 17:49:19 +00:00
Bill Wendling 7154c43eff Remove unnecessary 'llvm::'.
llvm-svn: 159842
2012-07-06 17:47:36 +00:00
Bill Wendling 16d944ce11 Remove unnecessary 'llvm::'.
llvm-svn: 159841
2012-07-06 17:46:28 +00:00
Sean Callanan ec440dd774 Since SBTarget::FindFunctions returns a
SBSymbolContextList, we should include the
relevant header file.

llvm-svn: 159840
2012-07-06 17:44:41 +00:00
Chad Rosier 879c34f45a Whitespace.
llvm-svn: 159839
2012-07-06 17:44:22 +00:00
Manman Ren c965673707 X86: peephole optimization to remove cmp instruction
For each Cmp, we check whether there is an earlier Sub which make Cmp
redundant. We handle the case where SUB operates on the same source operands as
Cmp, including the case where the two source operands are swapped.

llvm-svn: 159838
2012-07-06 17:36:20 +00:00
Chad Rosier 88d53eae56 [fast-isel] Tell fast-isel to do nothing with the new donothing intrinsic.
llvm-svn: 159837
2012-07-06 17:33:39 +00:00
Howard Hinnant 4cb38a82a2 This commit establishes a new bucket_count policy in the unordered containers: The policy now allows a power-of-2 number of buckets to be requested (and that request honored) by the client. And if the number of buckets is set to a power of 2, then the constraint of the hash to the number of buckets uses & instead of %. If the client does not specify a number of buckets, then the policy remains unchanged: a prime number of buckets is selected. The growth policy is that the number of buckets is roughly doubled when needed. While growing, either the prime, or the power-of-2 strategy will be preserved. There is a small run time cost for putting in this switch. For very cheap hash functions, e.g. identity for int, the cost can be as high as 18%. However with more typical use cases, e.g. strings, the cost is in the noise level. I've measured cases with very cheap hash functions (int) that using a power-of-2 number of buckets can make look up about twice as fast. However I've also noted that a power-of-2 number of buckets is more susceptible to accidental catastrophic collisions. Though I've also noted that accidental catastrophic collisions are also possible when using a prime number of buckets (but seems far less likely). In short, this patch adds an extra tuning knob for those clients trying to get the last bit of performance squeezed out of their hash containers. Casual users of the hash containers will not notice the introduction of this tuning knob. Those clients who swear by power-of-2 hash containers can now opt-in to that strategy. Clients who prefer a prime number of buckets can continue as they have.
llvm-svn: 159836
2012-07-06 17:31:14 +00:00
Chad Rosier e3a87b1511 Update getFunction parameter documentation. Fixes PR13268.
llvm-svn: 159835
2012-07-06 17:15:03 +00:00
Dmitri Gribenko aa4f47f266 Revert r159789.
llvm-svn: 159834
2012-07-06 16:42:25 +00:00
Dmitri Gribenko bacb9f65a7 Stop using new[] on llvm::BumpPtrAllocator.
llvm-svn: 159833
2012-07-06 16:41:59 +00:00
Filipe Cabecinhas 5d261b0601 Fix a wrong variable name.
llvm-svn: 159832
2012-07-06 16:20:13 +00:00
NAKAMURA Takumi b8c7dada33 llvm/include/llvm/CMakeLists.txt: Cut dependency to intrinsics_gen.
llvm-svn: 159831
2012-07-06 15:55:39 +00:00
Dmitri Gribenko 08630059c5 Use C++ cast.
llvm-svn: 159830
2012-07-06 15:40:08 +00:00
Benjamin Kramer b2c42807a4 Remove unreachable default case to pacify clang's -Wcovered-switch-default.
llvm-svn: 159829
2012-07-06 15:27:25 +00:00
Dmitry Vyukov e0d31e9170 tsan: Go lang: symbolize stack traces
llvm-svn: 159827
2012-07-06 14:54:25 +00:00