Commit Graph

134044 Commits

Author SHA1 Message Date
Daniel Jasper 87c3d369f1 Add some matchers for basic AST nodes.
Patch by Gábor Horváth.
Review: http://llvm-reviews.chandlerc.com/D45

llvm-svn: 164304
2012-09-20 14:12:57 +00:00
Benjamin Kramer 8a52676b85 StmtPrinter: Print floating point literals with the right suffix to disambiguate them from integers.
Based on a patch by Olaf Krzikalla, UDL fixes by me.

llvm-svn: 164303
2012-09-20 14:07:17 +00:00
Nico Weber acbea3a2b4 Be more consistent about ending suggestions with a '?'
llvm-svn: 164301
2012-09-20 13:02:00 +00:00
NAKAMURA Takumi 77369457e0 clang/test/Analysis: Fix the declaration of strlen() for 32 bit targets.
- Inputs/system-header-simulator.h: Declare strlen() with size_t.

  - malloc-interprocedural.c: Move the definition of size_t into the header above.

Then XFAIL can be pruned.

llvm-svn: 164300
2012-09-20 11:03:56 +00:00
Alexander Potapenko b4f819086a Disable source fortification on Darwin with AddressSanitizer.
ASan doesn't play well with -D_FORTIFY_SOURCE, which is enabled by default starting at OS X 10.7

llvm-svn: 164299
2012-09-20 10:10:01 +00:00
Daniel Jasper d2247528f5 Provide better error messages for incorrect matchers.
By changing the conversion operator into a conversion constructor, we
can enabled based on the template parameters leading to better error
messages. E.g.: stmt(decl()) will now create an error message including:

  note: candidate function not viable: no known conversion from
  'clang::ast_matchers::internal::BindableMatcher<clang::Decl>' to 'const
  clang::ast_matchers::internal::Matcher<clang::Stmt>' for 1st argument

llvm-svn: 164298
2012-09-20 09:24:58 +00:00
Nadav Rotem 841c9a84d0 Fix 80-col violations.
llvm-svn: 164297
2012-09-20 08:53:31 +00:00
Tim Northover 572d0698d2 Make sure lli compiles all code before invalidating instruction caches.
Patch from Amara Emerson.

llvm-svn: 164296
2012-09-20 08:46:30 +00:00
NAKAMURA Takumi 4aa6a010d2 test/Analysis/malloc-interprocedural.c: Mark it as XFAIL: cygwin,mingw,msvc for now. Investigating.
llvm-svn: 164295
2012-09-20 08:44:12 +00:00
Jason Molenda 944cc67eba Bump to lldb-168, debugserver-193.
llvm-svn: 164291
2012-09-20 06:42:30 +00:00
Eric Christopher 8539af7bbb Both OpenBSD and Bitrig need to include machine/endian.h to get the
_BYTE_ORDER define.

Patch by David Hill.

llvm-svn: 164286
2012-09-20 06:19:20 +00:00
Craig Topper 980739afdf Change enum type in a static table to uint8_t instead. Saves about 700 hundred bytes of static data. Change unsigned char in same table to uint8_t for explicitness.
llvm-svn: 164285
2012-09-20 06:14:08 +00:00
Jason Molenda 5c4210be8e Update the LLDB_DISABLE_PYTHON ifdef in FormatManager::LoadObjCFormatters to
get FormatManager.cpp to build on no-python platforms again.

llvm-svn: 164284
2012-09-20 06:06:59 +00:00
Michael Liao 83bc2119dc Specify CPu to prevent failure on ATOM due to different code scheduling
llvm-svn: 164283
2012-09-20 03:34:04 +00:00
Sean Silva 98f84c998f Fix Sphinx warnings.
Toctree was not being interlinked properly.

llvm-svn: 164282
2012-09-20 03:20:53 +00:00
Michael Liao 3237662b65 Re-work X86 code generation of atomic ops with spin-loop
- Rewrite/merge pseudo-atomic instruction emitters to address the
  following issue:
  * Reduce one unnecessary load in spin-loop

    previously the spin-loop looks like

        thisMBB:
        newMBB:
          ld  t1 = [bitinstr.addr]
          op  t2 = t1, [bitinstr.val]
          not t3 = t2  (if Invert)
          mov EAX = t1
          lcs dest = [bitinstr.addr], t3  [EAX is implicit]
          bz  newMBB
          fallthrough -->nextMBB

    the 'ld' at the beginning of newMBB should be lift out of the loop
    as lcs (or CMPXCHG on x86) will load the current memory value into
    EAX. This loop is refined as:

        thisMBB:
          EAX = LOAD [MI.addr]
        mainMBB:
          t1 = OP [MI.val], EAX
          LCMPXCHG [MI.addr], t1, [EAX is implicitly used & defined]
          JNE mainMBB
        sinkMBB:

  * Remove immopc as, so far, all pseudo-atomic instructions has
    all-register form only, there is no immedidate operand.

  * Remove unnecessary attributes/modifiers in pseudo-atomic instruction
    td

  * Fix issues in PR13458

- Add comprehensive tests on atomic ops on various data types.
  NOTE: Some of them are turned off due to missing functionality.

- Revise tests due to the new spin-loop generated.

llvm-svn: 164281
2012-09-20 03:06:15 +00:00
Sean Silva 51fc86ddfe Sphinxify DebuggingJITedCode
LGTM by Michael Spencer

llvm-svn: 164280
2012-09-20 03:05:26 +00:00
Eli Friedman 847f3ca350 The keywords "true" and "false" shouldn't warn under -Wundef.
llvm-svn: 164279
2012-09-20 02:38:38 +00:00
Andrew Trick fc9420c006 Fix static function names in CodingStandards examples.
Try not to violate conventions immediately before explaining them.

llvm-svn: 164278
2012-09-20 02:01:06 +00:00
Jordan Rose d6e5fd52f0 [analyzer] MallocChecker should not do post-call checks on inlined functions.
If someone provides their own function called 'strdup', or 'reallocf', or
even 'malloc', and we inlined it, the inlining should have given us all the
malloc-related information we need. If we then try to attach new information
to the return value, we could end up with spurious warnings.

<rdar://problem/12317671>

llvm-svn: 164276
2012-09-20 01:55:32 +00:00
Jordan Rose ae134c6449 Revert "[analyzer] Remove constraints on dead symbols as part of removeDeadBindings."
While we definitely want this optimization in the future, we're not
currently handling constraints on symbolic /expressions/ correctly.
These should stay live even if the SymExpr itself is no longer referenced
because could recreate an identical SymExpr later. Only once the SymExpr
can no longer be recreated -- i.e. a component symbol is dead -- can we
safely remove the constraints on it.

This liveness issue is tracked by <rdar://problem/12333297>.

This reverts r163444 / 24c7f98828e039005cff3bd847e7ab404a6a09f8.

llvm-svn: 164275
2012-09-20 01:54:56 +00:00
Eli Friedman 8f5e983029 Handle lambdas where the lambda-declarator is an explicit "(void)". PR13854.
llvm-svn: 164274
2012-09-20 01:40:23 +00:00
Richard Smith a31a89a38e Per C++11 [class.friend]p3, the 'friend' keyword must appear first in a
non-function friend declaration. Patch by Josh Magee!

llvm-svn: 164273
2012-09-20 01:31:00 +00:00
Richard Smith b6d516e7bd PR13881: Add -Wzero-length-array for zero length array extension, and move it into -Wgnu.
llvm-svn: 164272
2012-09-20 01:02:05 +00:00
Bill Wendling 3bef2dd5f9 Convert some attribute existence queries over to use the predicate methods.
llvm-svn: 164268
2012-09-19 23:54:18 +00:00
Eli Friedman ee2ff1cb96 Fix a small FIXME involving template partial ordering and
member function templates with an rvalue ref qualifier.

llvm-svn: 164267
2012-09-19 23:52:13 +00:00
Howard Hinnant c43826f003 Add overflow check to tanh(complex) and reduce to finite answer. Fixes http://llvm.org/bugs/show_bug.cgi?id=13874
llvm-svn: 164266
2012-09-19 23:51:47 +00:00
Jim Grosbach 38bfa0c529 ARM: Tidy up IntrinsicsARM.td a bit.
Make the TargetPrefix setting one big setting instead of being spread out
everywhere. No functional change.

llvm-svn: 164265
2012-09-19 23:39:03 +00:00
Bill Wendling d6b2688130 Add predicates for queries on whether an attribute exists.
llvm-svn: 164264
2012-09-19 23:35:21 +00:00
Eli Friedman 3b5774ab0f Fix function template partial ordering rules for static vs. non-static
functions.

llvm-svn: 164263
2012-09-19 23:27:04 +00:00
Benjamin Kramer 75e4bb1d87 ccc-analyzer: pass -stdlib=libc++ through to the analyzer.
Otherwise clang can't analyze code that relies on features provided by libc++.

llvm-svn: 164262
2012-09-19 22:56:24 +00:00
Micah Villmow 75e29c4b78 Add in new data types that are used by AMDIL/ANL among others.
llvm-svn: 164261
2012-09-19 22:47:07 +00:00
Eric Christopher 173d91092a Grammar.
llvm-svn: 164260
2012-09-19 22:40:44 +00:00
Greg Clayton 9e6cffc9fd A patch that allows for mach-o architectures to be specified as "<number>-<number>" where the first number is the cpu type and the second is the cpu subtype. Also added code to allow use of mach-o architectures that aren't in our tables so that symbolication and static file introspection (crashlogs) can work with them.
llvm-svn: 164258
2012-09-19 22:25:17 +00:00
Greg Clayton a150de05f3 Don't get everything when resolving the symbol context of the ObjC Class symbol, just the module + symbol.
llvm-svn: 164257
2012-09-19 22:23:30 +00:00
Owen Anderson dee6583dfd Soften the pattern-can-never-match error in TableGen into a warning. This pattern can be very useful in cases where you want to define a multiclass that covers both commutative and non-commutative operators (say, add and sub).
llvm-svn: 164256
2012-09-19 22:15:06 +00:00
Sean Callanan 39def1f7c0 Fix to the project file, to prevent it from using
an out-of-date compiler in certain cases.

llvm-svn: 164255
2012-09-19 22:10:40 +00:00
Eric Christopher bdb1abb72a Update and expand comment.
llvm-svn: 164254
2012-09-19 22:01:42 +00:00
Eric Christopher 7106ec3ecb Handle a captured this for the debug information as well.
llvm-svn: 164253
2012-09-19 21:47:34 +00:00
Eric Christopher 0f143ae8af Fix awkward comment.
llvm-svn: 164252
2012-09-19 21:47:29 +00:00
Owen Anderson 1fc793e926 Implement a correct copy constructor for Record. Now that we're using the ID number as a key in maps (for determinism), it is imperative that ID numbers be globally unique, even when we copy construct a Record.
This fixes some obscure failure cases involving registers defined inside multiclasses or foreach constructs that would not receive a unique ID, and would end up being omitted from the AsmMatcher tables.

llvm-svn: 164251
2012-09-19 21:34:18 +00:00
Jakob Stoklund Olesen 7d3c9c0a2a Resolve conflicts involving dead vector lanes for -new-coalescer.
A common coalescing conflict in vector code is lane insertion:

  %dst = FOO
  %src = BAR
  %dst:ssub0 = COPY %src

The live range of %src interferes with the ssub0 lane of %dst, but that
lane is never read after %src would have clobbered it. That makes it
safe to merge the live ranges and eliminate the COPY:

  %dst = FOO
  %dst:ssub0 = BAR

This patch teaches the new coalescer to resolve conflicts where dead
vector lanes would be clobbered, at least as long as the clobbered
vector lanes don't escape the basic block.

llvm-svn: 164250
2012-09-19 21:29:18 +00:00
Andrew Kaylor 1f66100755 This patch adds memory support functions which will later be used to implement section-specific protection handling in MCJIT.
llvm-svn: 164249
2012-09-19 20:46:12 +00:00
Preston Gurd 055006475e Add support for macro parameters/arguments delimited by spaces,
to improve compatibility with GNU as.

Based on a patch by PaX Team.

Fixed assertion failures on non-Darwin and added additional test cases.

llvm-svn: 164248
2012-09-19 20:36:12 +00:00
Duncan Sands 12ccbe7a8e Add support for accessing an MDNode's operands via the C binding. Patch by
Anthony Bryant.

llvm-svn: 164247
2012-09-19 20:29:39 +00:00
Preston Gurd 242ed3158a Support default parameters/arguments for assembler macros.
This patch is based on the one by PaX Team.

Patch by Andy Zhang!

llvm-svn: 164246
2012-09-19 20:29:04 +00:00
Preston Gurd eb3ebf16ab Enhance unmatched '.endr' directive error message in assembler.
The directive can be matched with directives other than '.rept'

Patch by Andy Zhang!

llvm-svn: 164245
2012-09-19 20:23:43 +00:00
DeLesley Hutchins 132f8f6959 Thread-safety analysis: Fix warning when EXCLUSIVE_LOCKS_REQUIRED
is placed on a function that has no path to the exit block.

llvm-svn: 164244
2012-09-19 19:49:40 +00:00
Michael Liao 8372539543 Unify the logic in SelectAtomicLoadAdd and SelectAtomicLoadArith
- Merge the processing of LOAD_ADD with other atomic load-arith
  operations
- Separate the logic getting target constant for atomic-load-op and add
  an optimization for atomic-load-add on i16 with negative value
- Optimize a minor case for atomic-fetch-add i16 with negative operand. Test
  case is revised.

llvm-svn: 164243
2012-09-19 19:36:58 +00:00
DeLesley Hutchins a15e1b4f63 Thread-safety analysis: fix ICE when EXCLUSIVE_LOCKS_REQUIRED or
LOCKS_EXCLUDED is used on a method with a name that is is not a simple
identifier.

llvm-svn: 164242
2012-09-19 19:18:29 +00:00