Commit Graph

136531 Commits

Author SHA1 Message Date
Seth Cantrell 2939416871 fix calculation of end pointer
llvm-svn: 167006
2012-10-30 06:13:50 +00:00
Ted Kremenek 1f44223e38 Update test case.
llvm-svn: 167005
2012-10-30 05:28:33 +00:00
Kostya Serebryany 508a128f74 [asan docs] explain why asan exits on the first error
llvm-svn: 167004
2012-10-30 05:07:05 +00:00
Ted Kremenek 0a43c26acb Change -Wcompare-distinct-pointer-type to -Wcompare-distinct-pointer-types, as
the warning is about comparing different types (plural).

llvm-svn: 167003
2012-10-30 04:43:57 +00:00
Ted Kremenek 8de92c0fd4 Trim #includes.
llvm-svn: 167002
2012-10-30 04:43:51 +00:00
Anna Zaks 92d96604d5 [analyzer]SimpleStreamChecker: add a TODO for better leak report.
llvm-svn: 167001
2012-10-30 04:18:21 +00:00
Anna Zaks 302da83fc2 [analyzer] Fix a bug in REGISTER_MAP_WITH_PROGRAMSTATE
The ImmutableMap should not be the key into the GDM map as there could
be several entries with the same map type. Thanks, Jordan.

This complicates the usage of the macro a bit. When we want to retrieve
the whole map, we need to use another name. Currently, I set it to be
Name ## Ty as in "type of the map we are storing in the ProgramState".

llvm-svn: 167000
2012-10-30 04:17:40 +00:00
Anna Zaks 4afaaf228c [analyzer] Rename REGISTER_MAP_WITH_GDM ->REGISTER_MAP_WITH_PROGRAMSTATE
llvm-svn: 166999
2012-10-30 04:17:18 +00:00
Hal Finkel d0b95b0961 Remove an invalid assert in TargetTransformImpl
getCastInstrCost had an assert prohibiting scalar to vector casts. Such casts,
however, are allowed. This should make the vectorizer buildbot happier.

llvm-svn: 166998
2012-10-30 02:41:57 +00:00
Sid Manning 67211fb6fb * Add e_flags enum for Hexagon
* Add Hexagon specific section indexes for small data
- Reviewed by Michael Spencer

llvm-svn: 166997
2012-10-30 02:26:15 +00:00
Rafael Espindola 9141aa1b1e Remove leftover const.
llvm-svn: 166996
2012-10-30 01:49:46 +00:00
Jordan Rose 9e068aaa6f [analyzer] Warn about reallocf with an allocation size of 0, like realloc.
Patch by Sean McBride!

llvm-svn: 166995
2012-10-30 01:37:16 +00:00
Jordan Rose 3c2f65a73d [analyzer] New checker for missing super calls in UIViewController subclasses.
This is a syntactic checker aimed at helping iOS programmers correctly
subclass and override the methods of UIViewController. While this should
eventually be covered by the 'objc_requires_super' attribute, this
checker can be used with the existing iOS SDKs without any header changes.

This new checker is currently named 'alpha.osx.cocoa.MissingSuperCall'.
Patch by Julian Mayer!

llvm-svn: 166993
2012-10-30 01:21:35 +00:00
Eli Friedman fb9c49e250 Don't crash on bad atomic operations. PR14176.
llvm-svn: 166992
2012-10-30 01:15:28 +00:00
Jim Grosbach 4739f2eb19 ARM: Better disassembly for pc-relative LDR.
When the operand is a plain immediate rather than a label, print it
as [pc, #imm] like we do for the Thumb2 wide encoding variant.

rdar://12154503

llvm-svn: 166991
2012-10-30 01:04:51 +00:00
Reed Kotler a811753716 Change mips16 delay slot jumps to non delay slot forms by default.
We will make them delay slot forms if there is something that can be
placed in the delay slot during a separate pass. Mips16 extended instructions
cannot be placed in delay slots.

llvm-svn: 166990
2012-10-30 00:54:49 +00:00
Nadav Rotem 73ddcfe03f LoopVectorizer: change debug prints: Print the module identifier when deciding to vectorize. When deciding not to vectorize do not print the called function name because it can be null.
llvm-svn: 166989
2012-10-30 00:40:39 +00:00
Rafael Espindola fd5e756ad0 getOriginalSourceFileName and getOriginalSourceFile can return a StringRef.
MaybeAddSystemRootToFilename doesn't need to return anything, it modifies
its argument.

llvm-svn: 166988
2012-10-30 00:38:13 +00:00
Argyrios Kyrtzidis efaa54a5a8 [PCH] The diagnostic state points can refer to previously created
diagnostic states; make sure the ASTReader sets the diagnostic state
properly instead of always recreating it.

Fixes rdar://12581618 & http://llvm.org/PR14181

llvm-svn: 166987
2012-10-30 00:27:21 +00:00
Rafael Espindola 84619411eb In the past "production" clang builds would not be used for c++, and
we had the -ccc-clang-cxx and -ccc-no-clang-cxx options to force them
on or off for testing.

Clang c++ support is now production quality and these options are dead.

llvm-svn: 166986
2012-10-30 00:13:16 +00:00
Jakub Staszak a3d8e9974a Re-commit r166971. I reverted it to quickly, when buildbots didn't have a chance
to test it with chapni's fix (-mattr=+avx).

llvm-svn: 166985
2012-10-30 00:01:57 +00:00
Argyrios Kyrtzidis f7cc29519a [libclang] Bump the version number of the libclang API.
llvm-svn: 166984
2012-10-29 23:53:52 +00:00
Rafael Espindola 077bc8bdaa Remove a bit of dead code.
llvm-svn: 166983
2012-10-29 23:41:43 +00:00
Kevin Enderby 6fd9624843 Fix ARM's b.w instruction for thumb 2 and the encoding T4. The branch target
is 24 bits not 20 and the decoding needed to correctly handle converting the
J1 and J2 bits to their I1 and I2 values to reconstruct the displacement. 

llvm-svn: 166982
2012-10-29 23:27:20 +00:00
Rafael Espindola e878343c12 Move getOriginalSourceFileName inline. Patch by Laszlo Nagy.
llvm-svn: 166981
2012-10-29 23:26:40 +00:00
Argyrios Kyrtzidis 5b216ed713 [libclang] Introduce a version constant for the libclang API.
rdar://12587974

llvm-svn: 166980
2012-10-29 23:24:44 +00:00
Jakub Staszak d74cb61d86 Revert r166971. It causes buildbot failure. To be investigated.
llvm-svn: 166979
2012-10-29 23:13:50 +00:00
Enrico Granata 7389f8454f Ensuring that the swig typemaps for SBData set the size to 0 along with the pointer to NULL
There should be no functional changes as SBData creation functions already checked for NULL regardless of size - but it ensures consistency

llvm-svn: 166978
2012-10-29 23:06:44 +00:00
Anna Zaks 58a2c4e453 [analyzer] Malloc checker cleanup/refactor
No need for the auxiliary flag. No need to generate a leak node when
there is no error.

llvm-svn: 166977
2012-10-29 22:51:54 +00:00
Anna Zaks be70d4d0b4 [analyzer] Add SimpleStreamChecker.
This is an example checker for catching fopen fclose API misuses.

llvm-svn: 166976
2012-10-29 22:51:50 +00:00
Anna Zaks 2ab0321b0d [analyzer] Add checker helpers to CheckerContext.
- Adding Immutable Map to GDM and getIdentifierInfo helper method.

llvm-svn: 166975
2012-10-29 22:51:44 +00:00
NAKAMURA Takumi 382df5eb18 llvm/test/CodeGen/X86/vec_shuffle-30.ll: Try to unbreak builds - assuming +avx.
llvm-svn: 166974
2012-10-29 22:45:18 +00:00
Jakub Staszak c3a92131dc Remove unused variable.
llvm-svn: 166973
2012-10-29 22:04:32 +00:00
Jakub Staszak 9c361bdfeb Simplify code. No functionality change.
llvm-svn: 166972
2012-10-29 22:02:26 +00:00
Jakub Staszak c8f4825ba6 Allow to fold vector load if there is more than one bitcast, so in the case:
%0 = load <8 x i16>* %dest
%1 = shufflevector <8 x i16> %0, <8 x i16> %in,
      <8 x i32> < i32 0, i32 1, i32 2, i32 3, i32 13, i32 undef, i32 14, i32 14>
store <8 x i16> %1, <8 x i16>* %dest

We get:
  vmovlpd (%eax), %xmm0, %xmm0

instead of:
  vmovaps (%eax), %xmm1
  vmovsd  %xmm1, %xmm0, %xmm0

No extra test-case is added. I just fixed the existing one
(also it uses FileCheck now).

llvm-svn: 166971
2012-10-29 21:56:35 +00:00
Nadav Rotem 5ad045a8c5 LoopVectorize: Update and preserve the dominator tree info.
llvm-svn: 166970
2012-10-29 21:52:38 +00:00
Jakub Staszak 850eb67cc0 Typo.
llvm-svn: 166969
2012-10-29 21:49:46 +00:00
Bill Schmidt bd4ac26973 This patch solves a problem with passing varargs parameters under the PPC64
ELF ABI.

A varargs parameter consisting of a single-precision floating-point value,
or of a single-element aggregate containing a single-precision floating-point
value, must be passed in the low-order (rightmost) four bytes of the
doubleword stack slot reserved for that parameter.  If there are GPR protocol
registers remaining, the parameter must also be mirrored in the low-order
four bytes of the reserved GPR.

Prior to this patch, such parameters were being passed in the high-order
four bytes of the stack slot and the mirrored GPR.

The patch adds a new test case to verify the correct code generation.

llvm-svn: 166968
2012-10-29 21:18:16 +00:00
Enrico Granata b588726ec9 <rdar://problem/11449953> Change Debugger::SetOutputFileHandle() so that it does not automatically initialize the script interpreter in order to transfer its output file handle to it
This should delay initialization of Python until strictly necessary and speed-up debugger startup
Also, convert formatters for SEL and BOOL ObjC data-types from Python to C++, in order to reap more performance benefits from the above changes

llvm-svn: 166967
2012-10-29 21:18:03 +00:00
Richard Smith 8f4d7eb518 Consistently declare 'extern "C"' variable in namespace __ubsan. No functionality change.
llvm-svn: 166966
2012-10-29 21:01:59 +00:00
Richard Smith f0aac0b99e Don't define an extern "C" variable in its first declaration, to appease a
bogus gcc warning. Take this opportunity to move the declaration to the header,
since it's part of the API of this file.

llvm-svn: 166965
2012-10-29 20:54:34 +00:00
Greg Clayton 35a4cc5ea7 <rdar://problem/12500785>
I tracked down a leak that could happen when detaching from a process where the lldb_private::Process objects would stay around forever. This was caused by a eStateDetached event that was queued up on the lldb_private::Process private state thread listener. Since process events contain shared pointers to the process, this is dangerous if they don't get consume or cleared as having the lldb_private::Process class contain a collection of things that have a shared pointer to yourself is obviously bad. 

To fix this I modified the Process::Finalize() function to clear this list. The actual thing that was holding onto the ModuleSP and thus the static archive, was a stack frame. Since the process wasn't going away, it still had thread objects and they still had frames. I modified the Thread::Destroy() to clear the stack frames to ensure this further doesn't happen.

llvm-svn: 166964
2012-10-29 20:52:08 +00:00
Simon Atanasyan c2cccd795f Add mips64-* and mips64el-* triples to configure scripts
as valid triples denote  Mips target.

llvm-svn: 166961
2012-10-29 19:49:45 +00:00
Reed Kotler 740981e35c Implement patterns for extloadi8 and extloadi16
llvm-svn: 166960
2012-10-29 19:39:04 +00:00
Jim Ingham 629e7a9846 Fix an incorrect comment...
llvm-svn: 166959
2012-10-29 19:24:56 +00:00
Ulrich Weigand 3abb34389d In various places throughout the code generator, there were special
checks to avoid performing compile-time arithmetic on PPCDoubleDouble.

Now that APFloat supports arithmetic on PPCDoubleDouble, those checks
are no longer needed, and we can treat the type like any other.

llvm-svn: 166958
2012-10-29 18:35:49 +00:00
Quentin Colombet ee3e0fb632 Revert commit r166946
llvm-svn: 166957
2012-10-29 18:28:57 +00:00
Richard Smith bf83009c7f Partially roll back r166898; it exposed a bug in the standard.
The problem is as follows: C++11 has contexts which are not
potentially-evaluated, and yet in which we are required or encouraged to
perform constant evaluation. In such contexts, we are not permitted to
implicitly define special member functions for literal types, therefore
we cannot evalaute those constant expressions.

Punt on this in one more context for now by skipping checking constexpr
variable initializers if they occur in dependent contexts.

llvm-svn: 166956
2012-10-29 18:26:47 +00:00
Ulrich Weigand 908c936fa9 APFloat cleanup: Remove now unused "arithmeticOK" logic.
llvm-svn: 166954
2012-10-29 18:18:44 +00:00
Chad Rosier 466c1c6870 Remove redundant test case from r166949, per Eli's suggestion.
llvm-svn: 166953
2012-10-29 18:18:26 +00:00