1. Oct 11, 2014
    • Eric Christopher's avatar
      Remove default case from a fully covered switch. · 53b293e4
      Eric Christopher authored
      llvm-svn: 219548
      53b293e4
    • Eric Christopher's avatar
      Fix unused variable warning from r219544. · baaf0794
      Eric Christopher authored
      llvm-svn: 219547
      baaf0794
    • Kuba Brecka's avatar
      LLDB AddressSanitizer instrumentation runtime plugin, breakpint on error and report data extraction · afdf842b
      Kuba Brecka authored
      Reviewed at http://reviews.llvm.org/D5592
      
      This patch gives LLDB some ability to interact with AddressSanitizer runtime library, on top of what we already have (historical memory stack traces provided by ASan). Namely, that's the ability to stop on an error caught by ASan, and access the report information that are associated with it. The report information is also exposed into SB API.
      
      More precisely this patch...
      
      adds a new plugin type, InstrumentationRuntime, which should serve as a generic superclass for other instrumentation runtime libraries, these plugins get notified when modules are loaded, so they get a chance to "activate" when a specific dynamic library is loaded
      an instance of this plugin type, AddressSanitizerRuntime, which activates itself when it sees the ASan dynamic library or founds ASan statically linked in the executable
      adds a collection of these plugins into the Process class
      AddressSanitizerRuntime sets an internal breakpoint on __asan::AsanDie(), and when this breakpoint gets hit, it retrieves the report information from ASan
      this breakpoint is then exposed as a new StopReason, eStopReasonInstrumentation, with a new StopInfo subclass, InstrumentationRuntimeStopInfo
      the StopInfo superclass is extended with a m_extended_info field (it's a StructuredData::ObjectSP), that can hold arbitrary JSON-like data, which is the way the new plugin provides the report data
      the "thread info" command now accepts a "-s" flag that prints out the JSON data of a stop reason (same way the "-j" flag works now)
      SBThread has a new API, GetStopReasonExtendedInfoAsJSON, which dumps the JSON string into a SBStream
      adds a test case for all of this
      I plan to also get rid of the original ASan plugin (memory history stack traces) and use an instance of AddressSanitizerRuntime for that purpose.
      
      Kuba
      
      llvm-svn: 219546
      afdf842b
    • Bob Wilson's avatar
      Treat -mios-simulator-version-min option as an alias for -mios-version-min. · 7f294b54
      Bob Wilson authored
      We can safely rely on the architecture to distinguish iOS device builds from
      iOS simulator builds. We already have code to do that, in fact. This simplifies
      some of the error checking for the option handling.
      
      llvm-svn: 219545
      7f294b54
    • Jason Molenda's avatar
      Add a new disassembly-format specification so that the disassembler · aff1b357
      Jason Molenda authored
      output style can be customized.  Change the built-in default to be
      more similar to gdb's disassembly formatting.
      
      The disassembly-format for a gdb-like output is
      
      ${addr-file-or-load} <${function.name-without-args}${function.concrete-only-addr-offset-no-padding}>: 
      
      The disassembly-format for the lldb style output is
      
      {${function.initial-function}{${module.file.basename}`}{${function.name-without-args}}:\n}{${function.changed}\n{${module.file.basename}`}{${function.name-without-args}}:\n}{${current-pc-arrow} }{${addr-file-or-load}}: 
      
      The two backticks in the lldb style formatter triggers the sub-expression evaluation in
      CommandInterpreter::PreprocessCommand() so you can't use that one as-is ... changing to
      use ' characters instead of ` would work around that.
      
      <rdar://problem/9885398> 
      
      llvm-svn: 219544
      aff1b357
    • Lang Hames's avatar
      [MCJIT] Replace memcpy with readBytesUnaligned in RuntimeDyldMachOI386. · 3d4340f8
      Lang Hames authored
      This should fix the failures of the MachO_i386_DynNoPIC_relocations.s test case
      on MIPS hosts.
      
      llvm-svn: 219543
      3d4340f8
    • Sanjay Patel's avatar
      Return undef on FP <-> Int conversions that overflow (PR21330). · ad8b6666
      Sanjay Patel authored
      The LLVM Lang Ref states for signed/unsigned int to float conversions:
      "If the value cannot fit in the floating point value, the results are undefined."
      
      And for FP to signed/unsigned int:
      "If the value cannot fit in ty2, the results are undefined."
      
      This matches the C definitions.
      
      The existing behavior pins to infinity or a max int value, but that may just
      lead to more confusion as seen in:
      http://llvm.org/bugs/show_bug.cgi?id=21130
      
      Returning undef will hopefully lead to a less silent failure.
      
      Differential Revision: http://reviews.llvm.org/D5603
      
      llvm-svn: 219542
      ad8b6666
    • Alexey Samsonov's avatar
      Follow-up to r219534 to make symbolization more robust. · 96983b89
      Alexey Samsonov authored
      1) Explicitly provide important arguments to llvm-symbolizer,
      not relying on defaults.
      2) Be more defensive about symbolizer output.
      
      This might fix weird failures on ninja-x64-msvc-RA-centos6 buildbot.
      
      llvm-svn: 219541
      96983b89
    • Enrico Granata's avatar
      When parsing ObjC types from encoded strings (and disallowing any-type), the... · 0aa6926d
      Enrico Granata authored
      When parsing ObjC types from encoded strings (and disallowing any-type), the ^? combination gets resolved to no type, while we could resolve it to void*
      I don't think on any of the platforms where ObjC matters sizeof(T*) depends on T, so even if we never figured out the pointee type, the pointer type should still be sane
      This might also allow some limited inspection where previously none was possible, so a win
      
      llvm-svn: 219540
      0aa6926d
    • Richard Smith's avatar
      [modules] Delay loading the field declared with an anonymous tag declaration · 337f7c97
      Richard Smith authored
      until after we've had a chance to merge that tag.
      
      llvm-svn: 219539
      337f7c97
    • Justin Bogner's avatar
      Correctly handle reading locations from serialized diagnostics · a8dd7322
      Justin Bogner authored
      When reading a serialized diagnostic location with no file ID, we were
      failing to increment the cursor past the rest of the location. This
      would lead to the flags and category always appearing blank in such
      diagnostics.
      
      This changes the function to unconditionally increment the cursor and
      updates the test to check for the correct output instead of testing
      that we were doing this wrong. I've also updated the error check to
      check for the correct number of fields.
      
      llvm-svn: 219538
      a8dd7322
    • Matt Arsenault's avatar
      R600/SI: Change how DS offsets are printed · 61cc9083
      Matt Arsenault authored
      Match SC by using offset/offset0/offset1 and printing
      in decimal.
      
      llvm-svn: 219537
      61cc9083
    • Matt Arsenault's avatar
      R600/SI: Match read2/write2 stride 64 versions · fe0a2e67
      Matt Arsenault authored
      llvm-svn: 219536
      fe0a2e67
    • Fariborz Jahanian's avatar
      Objective-C [qoi]. When reporting that a property is not · c985a7f6
      Fariborz Jahanian authored
      auto synthesized because it is synthesized in its super
      class. locate property declaration in super class
      which will default synthesize the property. rdar://18488727
      
      llvm-svn: 219535
      c985a7f6
    • Alexey Samsonov's avatar
      Re-land r219354: Use llvm-symbolizer to symbolize LLVM/Clang crash dumps. · 8a584bb3
      Alexey Samsonov authored
      In fact, symbolization is now expected to work only on Linux and
      FreeBSD/NetBSD, where we have dl_iterate_phdr and can learn the
      main executable name without argv0 (it will be possible on BSD systems
      after http://reviews.llvm.org/D5693 lands). #ifdef-out the code for
      all the rest Unix systems.
      
      Reviewed in http://reviews.llvm.org/D5610
      
      llvm-svn: 219534
      8a584bb3
    • Matt Arsenault's avatar
      R600/SI: Add load / store machine optimizer pass. · 41033286
      Matt Arsenault authored
      Currently this only functions to match simple cases
      where ds_read2_* / ds_write2_* instructions can be used.
      
      In the future it might match some of the other weird
      load patterns, such as direct to LDS loads.
      
      Currently enabled only with a subtarget feature to enable
      easier testing.
      
      llvm-svn: 219533
      41033286
    • Sanjoy Das's avatar
      This patch teaches ScalarEvolution to pick and use !range metadata. · 1f05c51e
      Sanjoy Das authored
      It also makes it more aggressive in querying range information by
      adding a call to isKnownPredicateWithRanges to
      isLoopBackedgeGuardedByCond and isLoopEntryGuardedByCond.
      
      phabricator: http://reviews.llvm.org/D5638
      
      Reviewed by: atrick, hfinkel
      
      llvm-svn: 219532
      1f05c51e
    • Chandler Carruth's avatar
      [mips] Actually mark that the default case is unreachable as this switch · 38811ccb
      Chandler Carruth authored
      is over a subset of condition codes.
      
      This fixes the -Werror build which warns about use of uninitialized
      variables in the default case.
      
      llvm-svn: 219531
      38811ccb
    • Reed Kotler's avatar
      Implement floating point compare for mips fast-isel · 1f64ecab
      Reed Kotler authored
      Summary: Expand SelectCmp to handle floating point compare
      
      Test Plan:
      fpcmpa.ll
      run 4 flavors of test-suite, mips32 r1/r2 O0/O2
      
      Reviewers: dsanders
      
      Reviewed By: dsanders
      
      Subscribers: llvm-commits, rfuhler
      
      Differential Revision: http://reviews.llvm.org/D5567
      
      llvm-svn: 219530
      1f64ecab
    • Eli Bendersky's avatar
      Add libclang capabilities to retriete template arguments from specializations. · c27a0c49
      Eli Bendersky authored
      Includes Python bindings.
      
      Reviewed in http://reviews.llvm.org/D5621
      Patch by Rob Springer
      
      llvm-svn: 219529
      c27a0c49
    • Bob Wilson's avatar
      Remove rest of the comment that is no longer true after r219527. · f42585fd
      Bob Wilson authored
      llvm-svn: 219528
      f42585fd
    • Bob Wilson's avatar
      Remove a FIXME: use the ios_simulator_version_min linker option consistently. · 771b7cd8
      Bob Wilson authored
      This was previously only used when explicitly requested with a command line
      option because it had to work with some old versions of the linker when it
      was first introduced. That is ancient history now, and it should be safe to
      use the correct option even when using the IPHONEOS_DEPLOYMENT_TARGET
      environment variable to specify that the target is the iOS simulator.
      Besides updating the test for this, I also added a few more tests for the
      iOS linker options.
      
      llvm-svn: 219527
      771b7cd8
    • David Majnemer's avatar
      Make test more robust to appease build bots · d8244050
      David Majnemer authored
      llvm-svn: 219526
      d8244050
    • Alexey Bataev's avatar
      Bugfix for predefined expressions in dependent context. · 769562a3
      Alexey Bataev authored
      This bug break compilation with precompiled headers and predefined expressions in dependent context.
      
      llvm-svn: 219525
      769562a3
    • David Majnemer's avatar
      CodeGen: FieldMemcpyizer didn't handle copies starting inside bitfields · a586eb2c
      David Majnemer authored
      It's possible to construct cases where the first field we are trying to
      copy is in the middle of an IR field.  In some complicated cases, we
      would fail to use an appropriate offset inside the object.  Earlier
      builds of clang seemed to miscompile the code by copying an insufficient
      number of bytes.  Up until now, we would assert: the copying offset was
      insufficiently aligned.
      
      This fixes PR21232.
      
      llvm-svn: 219524
      a586eb2c
    • David Blaikie's avatar
      Revert "DebugInfo: Ensure that all debug location scope chains from... · 325c5757
      David Blaikie authored
      Revert "DebugInfo: Ensure that all debug location scope chains from instructions within a function, lead to the function itself."
      
      This invariant is violated (& the assertions fire) on some Objective C++
      in the test-suite. Reverting while I investigate.
      
      This reverts commit r219215.
      
      llvm-svn: 219523
      325c5757
    • John McCall's avatar
      Change how we distinguish bitfield widths, in-class · c90c1498
      John McCall authored
      initializers, and captured VLA types so that we can
      answer questions like "is this a bit-field" without
      looking at the enclosing DeclContext.  NFC.
      
      llvm-svn: 219522
      c90c1498
    • Rafael Espindola's avatar
      llvm-ar: Start adding support for mri scripts. · b275797e
      Rafael Espindola authored
      I was quiet surprised to find this feature being used. Fortunately the uses
      I found look fairly simple. In fact, they are just a very verbose version
      of the regular ar commands.
      
      Start implementing it then by parsing the script and setting the command
      variables as if we had a regular command line.
      
      This patch adds just enough support to create an empty archive and do a bit
      of error checking. In followup patches I will implement at least addmod
      and addlib.
      
      From the description in the manual, even the more general case should not
      be too hard to implement if needed. The features that don't map 1:1 to
      the simple command line are
      
      * Reading from multiple archives.
      * Creating multiple archives.
      
      llvm-svn: 219521
      b275797e
    • Andrew MacPherson's avatar
      Update assertion in DYLDRendezvous. · 1d33e8d3
      Andrew MacPherson authored
      This accounts for the case where a dlopen() call fails when loading a library with a missing dependency.
      
      llvm-svn: 219520
      1d33e8d3
    • Matt Arsenault's avatar
      R600/SI: Disable copying of SCC · a39da09e
      Matt Arsenault authored
      llvm-svn: 219519
      a39da09e
    • Reed Kotler's avatar
      implement integer compare in mips fast-isel · 497311ab
      Reed Kotler authored
      Summary: implement SelectCmp (integer compare ) in mips fast-isel
      
      Test Plan:
      icmpa.ll
      also ran 4 test-suite flavors mips32 r1/r2 O0/O2
      
      Reviewers: dsanders
      
      Reviewed By: dsanders
      
      Subscribers: llvm-commits, rfuhler, mcrosier
      
      Differential Revision: http://reviews.llvm.org/D5566
      
      llvm-svn: 219518
      497311ab
    • Mark Heffernan's avatar
      This patch de-pessimizes the calculation of loop trip counts in · 2beab5f0
      Mark Heffernan authored
      ScalarEvolution in the presence of multiple exits. Previously all
      loops exits had to have identical counts for a loop trip count to be
      considered computable. This pessimization was implemented by calling
      getBackedgeTakenCount(L) rather than getExitCount(L, ExitingBlock)
      inside of ScalarEvolution::getSmallConstantTripCount() (see the FIXME
      in the comments of that function). The pessimization was added to fix
      a corner case involving undefined behavior (pr/16130). This patch more
      precisely handles the undefined behavior case allowing the pessimization
      to be removed.
      
      ControlsExit replaces IsSubExpr to more precisely track the case where
      undefined behavior is expected to occur. Because undefined behavior is
      tracked more precisely we can remove MustExit from ExitLimit. MustExit
      was used to track the case where the limit was computed potentially
      assuming undefined behavior even if undefined behavior didn't necessarily
      occur.
      
      llvm-svn: 219517
      2beab5f0
    • Fariborz Jahanian's avatar
      Add couple of missing 'override' keyword. NFC. · 2132fbe2
      Fariborz Jahanian authored
      llvm-svn: 219516
      2132fbe2
    • Bill Schmidt's avatar
      [PowerPC] Reduce names from Power8Vector to P8Vector · 8c184e36
      Bill Schmidt authored
      Per Hal Finkel's review, improving typability of some variable names.
      
      llvm-svn: 219515
      8c184e36
    • Bill Schmidt's avatar
      [PowerPC] Reduce names from Power8Vector to P8Vector · dcce0235
      Bill Schmidt authored
      Per Hal Finkel's review, improving typability of some variable names.
      
      llvm-svn: 219514
      dcce0235
    • Dan Albert's avatar
      Alright, just XFAIL all these for Windows. · a7693d2c
      Dan Albert authored
      I'm going to fix up FileCheck to better handle things like this soon,
      but for now let's just unblock the Windows people.
      
      llvm-svn: 219513
      a7693d2c
    • Hal Finkel's avatar
      [MiSched] Fix a logic error in tryPressure() · 7a87f8a6
      Hal Finkel authored
      Fixes a logic error in the MachineScheduler found by Steve Montgomery (and
      confirmed by Andy). This has gone unfixed for months because the fix has been
      found to introduce some small performance regressions. However, Andy has
      recommended that, at this point, we fix this to avoid further dependence on the
      incorrect behavior (and then follow-up separately on any regressions), and I
      agree.
      
      Fixes PR18883.
      
      llvm-svn: 219512
      7a87f8a6
    • Reed Kotler's avatar
      Implement floating point to integer conversion in mips fast-isel · 12f9488e
      Reed Kotler authored
      Summary: Add the ability to convert 64 or 32 bit floating point values to integer in mips fast-isel
      
      Test Plan:
      fpintconv.ll
      ran 4 flavors of test-suite with no errors, misp32 r1/r2 O0/O2
      
      Reviewers: dsanders
      
      Reviewed By: dsanders
      
      Subscribers: llvm-commits, rfuhler, mcrosier
      
      Differential Revision: http://reviews.llvm.org/D5562
      
      llvm-svn: 219511
      12f9488e
    • David Blaikie's avatar
      Simplify a few uses of DwarfDebug::SPMap · 7d6f29d1
      David Blaikie authored
      llvm-svn: 219510
      7d6f29d1
    • JF Bastien's avatar
      Fix documentation typo. · e6ccacf9
      JF Bastien authored
      llvm-svn: 219509
      e6ccacf9