Commit Graph

148360 Commits

Author SHA1 Message Date
Ted Kremenek 004e823539 Further wordsmith release notes for the static analyzer.
llvm-svn: 180585
2013-04-26 00:01:34 +00:00
Jack Carter c15c1d245b Mips assembler: .set reorder support
Mips have delayslots for certain instructions 
like jumps and branches. These are instructions 
that follow the branch or jump and are executed
before the jump or branch is completed.

Early Mips compilers could not cope with delayslots
and left them up to the assembler. The assembler would
fill the delayslots with the appropriate instruction,
usually just a nop to allow correct runtime behavior.

The default behavior for this is set with .set reorder.
To tell the assembler that you don't want it to mess with
the delayslot one used .set noreorder.

For backwards compatibility we need to support
.set reorder and have it be the default behavior in the 
assembler.

Our support for it is to insert a NOP directly after an
instruction with a delayslot when in .set reorder mode.

Contributer: Vladimir Medic
llvm-svn: 180584
2013-04-25 23:31:35 +00:00
Bill Wendling afddaa4719 Revert r180263. It's causing failures.
llvm-svn: 180583
2013-04-25 23:15:02 +00:00
Anna Zaks b6219a9f0e Add Static Analyzer section to the Release Notes for clang 3.3
llvm-svn: 180582
2013-04-25 23:14:38 +00:00
Matt Kopec f92bca3b36 Build fix for systems that do not support NT_X86_XSTATE ptrace support.
Patch by Ashok Thirumurthi.

llvm-svn: 180581
2013-04-25 23:00:45 +00:00
Fariborz Jahanian 73e244a49f Objective-C: This is a small modification to my
patch -n r180198.
When reporting on missing property accessor implementation in
categories, do not report when they are declared in primary class,
class's protocol, or one of it super classes or in of the other
categories. // rdar://13713098

llvm-svn: 180580
2013-04-25 21:59:34 +00:00
Anna Zaks 144579e299 [analyzer] Teach DeadStoreChecker to look though BO_Comma and disregard the LHS.
llvm-svn: 180579
2013-04-25 21:52:35 +00:00
Michael Liao 0b707eb85e Remove SMLoc paired with CHECK-NOT patterns. Not functionality change.
Pattern has source location by itself. After adding a trivial method to
retrieve it, it's unnecessary to pair a source location for CHECK-NOT patterns.
One thing revised after this is the diagnostic info is more accurate by
pointing to the start of the CHECK-NOT pattern instead of the end of the
CHECK-NOT pattern. E.g. diagnostic message previously looks like

    <stdin>:1:1: error: CHECK-NOT: string occurred!
    test
    ^
    test.txt:1:16: note: CHECK-NOT: pattern specified here
    CHECK-NOT: test
                   ^

is changed to

    <stdin>:1:1: error: CHECK-NOT: string occurred!
    test
    ^
    test.txt:1:12: note: CHECK-NOT: pattern specified here
    CHECK-NOT: test
               ^

llvm-svn: 180578
2013-04-25 21:31:34 +00:00
Preston Gurd 128920d9fa Make function documentation conform to llvm standards.
Expunge all remaining traces and use of live variable information.

llvm-svn: 180577
2013-04-25 21:31:33 +00:00
Arnold Schwaighofer 9881dcf2f2 ARM cost model: Integer div and rem is lowered to a function call
Reflect this in the cost model. I observed this in MiBench/consumer-lame.

radar://13354716

llvm-svn: 180576
2013-04-25 21:16:18 +00:00
Andrew Kaylor ced4e8ff6e Re-enabling MCJIT object caching with memory leak fixed
llvm-svn: 180575
2013-04-25 21:02:36 +00:00
Chris Lattner 6b2702a6cc revert r179735, it has no testcases, and doesn't really make sense.
llvm-svn: 180574
2013-04-25 20:34:16 +00:00
Preston Gurd 8b7ab4ba2b This patch adds the X86FixupLEAs pass, which will reduce instruction
latency for certain models of the Intel Atom family, by converting
instructions into their equivalent LEA instructions, when it is both
useful and possible to do so.

llvm-svn: 180573
2013-04-25 20:29:37 +00:00
Ashok Thirumurthi 999caf900a Adds 64-bit POSIX support for AVX
- Adds unique enums for ymm registers to the ABI and the POSIX register context.
- Reworks the register context data structures to support a union of FXSAVE and XSAVE
--- Allows the same code base to deal with the FPU independent of the availability of AVX.
- Determine if AVX is supported by attempting to read XSAVE using ptrace.
--- Support an extended register set for avx registers if available.
- Provide a mechanism to assemble/parse register halves into a single ymm buffer for use with RegisterValue.
--- Reworked Read/WriteRegister routines to read/write/parse ymm registers.

Adds tests for ymm register write with read-back, and expressions involving ymm registers.
- Tests vary depending on the availability of an avx register set.

Thanks to Daniel and Matt for their reviews.

llvm-svn: 180572
2013-04-25 20:12:45 +00:00
Rafael Espindola 3626b7e451 Put friend decls in the correct context.
When we find a friend declaration we have to skip transparent contexts for doing
lookups, but we should not skip them when inserting the new decl if the lookup
found nothing.

Fixes PR15841.

llvm-svn: 180571
2013-04-25 20:12:36 +00:00
Nadav Rotem f43cbeee15 LoopVectorizer: No need to generate pointer disambiguation checks between readonly pointers.
llvm-svn: 180570
2013-04-25 19:55:03 +00:00
Reid Kleckner d973ca3c51 [mc-coff] Forward Linker Option flags into the .drectve section
Summary:
This is modelled on the Mach-O linker options implementation and should
support a Clang implementation of #pragma comment(lib/linker).

Reviewers: rafael

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D724

llvm-svn: 180569
2013-04-25 19:34:41 +00:00
Rafael Espindola b770f897ee Fix section relocation for SECTIONREL32 with immediate offset.
Patch by Kai Nacke. This matches the gnu as output.

llvm-svn: 180568
2013-04-25 19:27:05 +00:00
Sean Callanan fefe43cd3e Purged unnecessary data structures from the IR
interpreter.  They are a legacy from when the IR
interpreter didn't work with materialized values
but rather got values directly from
ClangExpressionDeclMap.

Also updated the #includes for IRInterpreter
accordingly.

llvm-svn: 180565
2013-04-25 18:55:45 +00:00
Michael Liao 61bed2fff4 Remove tailing whitespaces
llvm-svn: 180564
2013-04-25 18:54:02 +00:00
Sean Callanan 8ef197729d Fixed a crash in ClangASTSource when logging is
disabled.

llvm-svn: 180563
2013-04-25 18:50:43 +00:00
Chad Rosier 8180db1f03 [inline asm] Add a test case for r180226. The specific issue is that the inline
assembly is requesting a 64-bit register, which is invalid for i386.
rdar://13731657

llvm-svn: 180445
2013-04-25 17:10:21 +00:00
Anna Zaks dfa25a07d4 Fix a possible null pointer dereference found by the analyzer.
When computing the other parameters, ‘op’ is checked for being null before it’s dereferenced.

llvm-svn: 180271
2013-04-25 16:26:20 +00:00
Benjamin Kramer beea351287 Fix header comment.
llvm-svn: 180268
2013-04-25 16:14:14 +00:00
Howard Hinnant a2ee3a6e2e İsmail Dönmez: Change to mktemp template to make it compatible with Linux.
llvm-svn: 180267
2013-04-25 16:08:55 +00:00
Dmitri Gribenko 046a8ece54 Add an idea for cpp11-migrate and cpp14-migrate
llvm-svn: 180266
2013-04-25 16:07:10 +00:00
Evgeniy Stepanov 9562bbaf9a Add -fno-rtti to ASan runtime cflags on Android.
Otherwise we are picking up an extra libstdc++ dependency.

llvm-svn: 180265
2013-04-25 14:58:23 +00:00
Daniel Jasper e3c0e0144e Improve clang-format's memoization behavior.
Deeply nested expressions basically break clang-format's memoization.
This patch slightly improves the situations and makes expressions like

  aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(
      aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(
          aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(
              aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(
                  aaaaa(aaaaa())))))))))))))))))))))))))))))))))))))));

work.

llvm-svn: 180264
2013-04-25 13:31:51 +00:00
Rafael Espindola 7e2e4fafc0 Fix a case in linkage computation that should check for single line extern "C".
llvm-svn: 180263
2013-04-25 13:10:46 +00:00
Rafael Espindola 04d3f49608 Use a pointer as the relocation iterator.
Since the relocation iterator walks only the relocations in one section, we
can just use a pointer and avoid fetching information about the section at
every reference.

llvm-svn: 180262
2013-04-25 12:45:46 +00:00
Rafael Espindola 1e48387962 Clarify getRelocationAddress x getRelocationOffset a bit.
getRelocationAddress is for dynamic libraries and executables,
getRelocationOffset for relocatable objects.

Mark the getRelocationAddress of COFF and MachO as not implemented yet. Add a
test of ELF's. llvm-readobj -r now prints the same values as readelf -r.

llvm-svn: 180259
2013-04-25 12:28:45 +00:00
Rafael Espindola bff5956cfa Don't mark 'extern "C" void f(void)' as having extern storage class.
Instead, we check for one line extern "C" context in linkage computation and
when deciding if a variable is a definition.

This hopefully completes the transition to having "as written" semantics for
hasExternalStorage.

llvm-svn: 180258
2013-04-25 12:11:36 +00:00
Alexey Samsonov 5c38383205 [ASan] Add allow_user_segv_handler to let users override SEGV handler installed by ASan
llvm-svn: 180255
2013-04-25 10:52:15 +00:00
Silviu Baranga 4ad2bc5963 Fix constant folding for one lane vector types. Constant folding one lane vector types not returns a vector instead of a scalar.
llvm-svn: 180254
2013-04-25 09:32:33 +00:00
Daniel Jasper 6fe2f009df Add option to align escaped newlines left.
This enables formattings like:

  #define A   \
    int aaaa; \
    int b;    \
    int ccc;  \
    int dddddddddd;

Enabling this for Google/Chromium styles only as I don't know whether it
is desired for Clang/LLVM.

llvm-svn: 180253
2013-04-25 08:56:26 +00:00
Daniel Jasper a04337e22b Fix scrolling bug in clang-format's emacs integration.
This patch ensure that nothing scrolls even if the same buffer is opened
in multiple windows.

llvm-svn: 180252
2013-04-25 07:06:48 +00:00
Dmitry Vyukov a05bbe1c9a tsan: add a test that used to crash, fixed by r180180.
llvm-svn: 180251
2013-04-25 06:58:43 +00:00
Peter Collingbourne 2816c023ea [ms-cxxabi] Fix a number of bugs in the mangler.
This includes the following fixes:
 - Implement 4 subtly different variants of qualifier mangling and use them
   in what I believe are the right places.
 - Fix handling of array types.  Previously we were always decaying them,
   which is wrong if the type appears as a template argument, pointee,
   referent etc.
Fixes PR13182.

Differential Revision: http://llvm-reviews.chandlerc.com/D709

llvm-svn: 180250
2013-04-25 04:25:40 +00:00
Rafael Espindola 72780ed996 Revert "Adding object caching support to MCJIT"
This reverts commit 07f03923137a91e3cca5d7fc075a22f8c9baf33a.

Looks like it broke the valgrind bot:

http://lab.llvm.org:8011/builders/llvm-x86_64-linux-vg_leak/builds/649

llvm-svn: 180249
2013-04-25 03:47:41 +00:00
Rafael Espindola 837448bc19 Revert "Exposing MCJIT through C API"
This reverts commit 8c31b298149ca3c3f2bbd9e8aa9a01c4d91f3d74.

It looks like this commit broke some bots:

http://lab.llvm.org:8011/builders/llvm-ppc64-linux2/builds/5209

llvm-svn: 180248
2013-04-25 03:19:12 +00:00
Rafael Espindola ba5899c563 Don't compute a std::vector<uint8_t> just to write it out a stream.
llvm-svn: 180247
2013-04-25 03:07:42 +00:00
Akira Hatanaka 8aba50fd39 Test case for r180241.
llvm-svn: 180246
2013-04-25 02:22:07 +00:00
Akira Hatanaka 714a8f62db Test case for r180238.
llvm-svn: 180245
2013-04-25 02:21:09 +00:00
Jim Ingham 0ad7e0545b In Process::ProcessEventData::DoOnRemoval, we need to handle the case where NO thread has a stop reason
specially, and make sure we stop.  This shouldn't happen, but if it does, the user will probably want to
see it.

<rdar://problem/13273125>

llvm-svn: 180244
2013-04-25 02:04:59 +00:00
Filipe Cabecinhas 10a7a59871 More CMake fixes for OS X.
llvm-svn: 180243
2013-04-25 01:36:53 +00:00
Jason Molenda 8214b01da2 Fix one small whitespace alignment mistake.
llvm-svn: 180242
2013-04-25 01:33:46 +00:00
Akira Hatanaka f0aa6c9101 [mips] Add definitions of micromips load and store instructions.
Patch by Zoran Jovanovic.

llvm-svn: 180241
2013-04-25 01:21:25 +00:00
Filipe Cabecinhas 5afbec8b0c Allow users to choose identity used to sign tools.
Summary:
No change if the identity isn't defined by the makefile.

Reviewers: echristo

Differential Revision: http://llvm-reviews.chandlerc.com/D632

llvm-svn: 180240
2013-04-25 01:17:54 +00:00
Richard Trieu c7699631df Add "-no-canonical-prefixes" to a test case.
llvm-svn: 180239
2013-04-25 01:17:23 +00:00
Akira Hatanaka cd9b74a599 [mips] Add definitions of micromips shift instructions.
Patch by Zoran Jovanovic.

llvm-svn: 180238
2013-04-25 01:11:15 +00:00