1. Mar 05, 2015
  2. Mar 04, 2015
    • JF Bastien's avatar
      Mutate TargetLowering::shouldExpandAtomicRMWInIR to specifically dictate how... · f14889ee
      JF Bastien authored
      Mutate TargetLowering::shouldExpandAtomicRMWInIR to specifically dictate how AtomicRMWInsts are expanded.
      
      Summary:
      In PNaCl, most atomic instructions have their own @llvm.nacl.atomic.* function, each one, with a few exceptions, represents a consistent behaviour across all NaCl-supported targets. Unfortunately, the atomic RMW operations nand, [u]min, and [u]max aren't directly represented by any such @llvm.nacl.atomic.* function. This patch refines shouldExpandAtomicRMWInIR in TargetLowering so that a future `Le32TargetLowering` class can selectively inform the caller how the target desires the atomic RMW instruction to be expanded (ie via load-linked/store-conditional for ARM/AArch64, via cmpxchg for X86/others?, or not at all for Mips) if at all.
      
      This does not represent a behavioural change and as such no tests were added.
      
      Patch by: Richard Diamond.
      
      Reviewers: jfb
      
      Reviewed By: jfb
      
      Subscribers: jfb, aemerson, t.p.northover, llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D7713
      
      llvm-svn: 231250
      f14889ee
    • Jozef Kolek's avatar
      [mips][microMIPS] Make usage of ADDU16 and SUBU16 by code generator · c925808e
      Jozef Kolek authored
      Differential Revision: http://reviews.llvm.org/D7609
      
      llvm-svn: 231249
      c925808e
    • Daniel Jasper's avatar
      Revert "[IAS] Teach -cc1as about the 'target-abi' option." · cbdf3b79
      Daniel Jasper authored
      This reverts commit 0e41c8faeff75614cf4627533331d780ba3db030.
      
      This is breaking buildbots:
      http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/4668/
      
      llvm-svn: 231248
      cbdf3b79
    • Daniel Jasper's avatar
      Prevent test from writing files. · 8dc4a2a3
      Daniel Jasper authored
      llvm-svn: 231247
      8dc4a2a3
    • Bill Schmidt's avatar
      [PowerPC] Remove unnecessary and incomplete commentary · d90aff2c
      Bill Schmidt authored
      This "itinerary class map" in PPCSchedule.td is incomplete and
      redundant with the actual code.  As it provides no value, we've
      decided to remove it.
      
      No functional change.
      
      llvm-svn: 231246
      d90aff2c
    • Joerg Sonnenberger's avatar
      Adjust the changes from r230255 to bail out if the backend can't lower · 244a5777
      Joerg Sonnenberger authored
      __builtin_setjmp/__builtin_longjmp and don't fall back to the libc
      functions.
      
      llvm-svn: 231245
      244a5777
    • Toma Tabacu's avatar
      [IAS] Teach -cc1as about the 'target-abi' option. · 71f5be1e
      Toma Tabacu authored
      Summary:
      When using the IAS from clang, the 'target-abi' option gets passed to cc1as, but cc1as doesn't know about it and gives an "unknown argument" error.
      
      This is fixed by adding the 'CC1AsOption' flag to the 'target-abi' option in CC1Options.td.
      
      Reviewers: atanasyan, echristo, dsanders
      
      Reviewed By: dsanders
      
      Subscribers: cfe-commits
      
      Differential Revision: http://reviews.llvm.org/D7903
      
      llvm-svn: 231244
      71f5be1e
    • Andrea Di Biagio's avatar
      [X86][FastISel] Simplify the logic in method X86SelectSIToFP. · df93ccf4
      Andrea Di Biagio authored
      The target-independent selection algorithm in FastISel already knows how
      to select a SINT_TO_FP if the target is SSE but not AVX.
      
      On targets that have SSE but not AVX, the tablegen'd 'fastEmit' functions
      for ISD::SINT_TO_FP know how to select instruction X86::CVTSI2SSrr
      (for an i32 to f32 conversion) and X86::CVTSI2SDrr (for an i32 to f64
      conversion).
      
      This patch simplifies the logic in method X86SelectSIToFP knowing that
      the code would not be reachable if the subtarget doesn't have AVX.
      No functional change intended.
      
      llvm-svn: 231243
      df93ccf4
    • Daniel Jasper's avatar
      Move one more diagnostic into the new -Wformat-pedantic group. · ad8d849f
      Daniel Jasper authored
      This was apparently overlooked in r231211.
      
      llvm-svn: 231242
      ad8d849f
    • Dmitry Vyukov's avatar
      asan: do not instrument direct inbounds accesses to stack variables · b37b95ed
      Dmitry Vyukov authored
      Do not instrument direct accesses to stack variables that can be
      proven to be inbounds, e.g. accesses to fields of structs on stack.
      
      But it eliminates 33% of instrumentation on webrtc/modules_unittests
      (number of memory accesses goes down from 290152 to 193998) and
      reduces binary size by 15% (from 74M to 64M) and improved compilation time by 6-12%.
      
      The optimization is guarded by asan-opt-stack flag that is off by default.
      
      http://reviews.llvm.org/D7583
      
      llvm-svn: 231241
      b37b95ed
    • Toma Tabacu's avatar
      [mips] Rename the LA/LI/DLI TableGen definitions and classes. NFC. · e1e3ffe7
      Toma Tabacu authored
      Summary:
      Use more reasonable names for these pseudo-instructions.
      As there's only one definition tied to any one of these classes, I named them with abbreviated versions of their respective class' name.
      
      Reviewers: dsanders
      
      Reviewed By: dsanders
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D7831
      
      llvm-svn: 231240
      e1e3ffe7
    • Vasileios Kalintiris's avatar
      [mips] Keep the parameter list of Filler::searchRange() consistent. NFC. · 8761490d
      Vasileios Kalintiris authored
      Summary:
      Move the "Filler" parameter to the end of the parameter list as it is,
      conceptually, the only output parameter of that function.
      
      Reviewers: dsanders
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D7726
      
      llvm-svn: 231239
      8761490d
    • Chandler Carruth's avatar
      [MBP] Fix a really horrible bug in MachineBlockPlacement, but behind · 9a53fbe2
      Chandler Carruth authored
      a flag for now.
      
      First off, thanks to Daniel Jasper for really pointing out the issue
      here. It's been here forever (at least, I think it was there when
      I first wrote this code) without getting really noticed or fixed.
      
      The key problem is what happens when two reasonably common patterns
      happen at the same time: we outline multiple cold regions of code, and
      those regions in turn have diamonds or other CFGs for which we can't
      just topologically lay them out. Consider some C code that looks like:
      
        if (a1()) { if (b1()) c1(); else d1(); f1(); }
        if (a2()) { if (b2()) c2(); else d2(); f2(); }
        done();
      
      Now consider the case where a1() and a2() are unlikely to be true. In
      that case, we might lay out the first part of the function like:
      
        a1, a2, done;
      
      And then we will be out of successors in which to build the chain. We go
      to find the best block to continue the chain with, which is perfectly
      reasonable here, and find "b1" let's say. Laying out successors gets us
      to:
      
        a1, a2, done; b1, c1;
      
      At this point, we will refuse to lay out the successor to c1 (f1)
      because there are still un-placed predecessors of f1 and we want to try
      to preserve the CFG structure. So we go get the next best block, d1.
      
      ... wait for it ...
      
      Except that the next best block *isn't* d1. It is b2! d1 is waaay down
      inside these conditionals. It is much less important than b2. Except
      that this is exactly what we didn't want. If we keep going we get the
      entire set of the rest of the CFG *interleaved*!!!
      
        a1, a2, done; b1, c1; b2, c2; d1, f1; d2, f2;
      
      So we clearly need a better strategy here. =] My current favorite
      strategy is to actually try to place the block whose predecessor is
      closest. This very simply ensures that we unwind these kinds of CFGs the
      way that is natural and fitting, and should minimize the number of cache
      lines instructions are spread across.
      
      It also happens to be *dead simple*. It's like the datastructure was
      specifically set up for this use case or something. We only push blocks
      onto the work list when the last predecessor for them is placed into the
      chain. So the back of the worklist *is* the nearest next block.
      
      Unfortunately, a change like this is going to cause *soooo* many
      benchmarks to swing wildly. So for now I'm adding this under a flag so
      that we and others can validate that this is fixing the problems
      described, that it seems possible to enable, and hopefully that it fixes
      more of our problems long term.
      
      llvm-svn: 231238
      9a53fbe2
    • Vasileios Kalintiris's avatar
      [mips] Specify the correct value type when combining a CMovFP node. · 2ef28882
      Vasileios Kalintiris authored
      This commit fixes a bug introduced in r230956 where we were creating
      CMovFP_{T,F} nodes with multiple return value types (one for each operand).
      With this change the return value type of the new node is the same as the
      value type of the True/False operands of the original node.
      
      llvm-svn: 231237
      2ef28882
    • Alexander Kornienko's avatar
      [clang-tidy] Output more diagnostics in check_clang_tidy.sh · ad53695a
      Alexander Kornienko authored
      Print clang-tidy output and fixes applied.
      
      llvm-svn: 231236
      ad53695a
    • Ilia K's avatar
      Fix build on OS X after r231202 · 41204d09
      Ilia K authored
      llvm-svn: 231235
      41204d09
    • Tamas Berghammer's avatar
      Set the signals based on the OS in the qHostInfo packet · ac839829
      Tamas Berghammer authored
      Setting it from the Target architecture cause problems when the target
      archiutecture is filled just by examining the executable because in that
      case the OS isn't set.
      
      Differential revision: http://reviews.llvm.org/D8035
      
      llvm-svn: 231234
      ac839829
    • Ilia K's avatar
      Added long 'print-values' option for var-update MI command. · 53d33368
      Ilia K authored
      Summary:
      The -var-update MI command should take the same print-values options as var-list children, however currently only the integer versions are supported.
      Added --no-values, --all-values, and --simple-values long options. 
      
      See:
      https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Variable-Objects.html#GDB_002fMI-Variable-Objects
      
      Patch from ewan@codeplay.com
      
      Reviewers: EwanCrawford
      
      Subscribers: ki.stfu, lldb-commits
      
      Differential Revision: http://reviews.llvm.org/D8008
      
      llvm-svn: 231233
      53d33368
    • Tamas Berghammer's avatar
      Fix expectation for TestPlatformCommand.test_shell · ccd28a14
      Tamas Berghammer authored
      * Create expectation based on target platform
      * Add custom expectation for remote android target
      
      Differential revision: http://reviews.llvm.org/D8031
      
      llvm-svn: 231232
      ccd28a14
    • Tamas Berghammer's avatar
      Fix deadlock in operation thread in NativeProcessLinux · 43f2d971
      Tamas Berghammer authored
      The deadlock occurred when the Attach or the Launch operation failed for
      any reason.
      
      Differential revision: http://reviews.llvm.org/D8030
      
      llvm-svn: 231231
      43f2d971
    • Daniel Jasper's avatar
      Add a flag to experiment with outlining optional branches. · 471e856f
      Daniel Jasper authored
      In a CFG with the edges A->B->C and A->C, B is an optional branch.
      
      LLVM's default behavior is to lay the blocks out naturally, i.e. A, B,
      C, in order to improve code locality and fallthroughs. However, if a
      function contains many of those optional branches only a few of which
      are taken, this leads to a lot of unnecessary icache misses. Moving B
      out of line can work around this.
      
      Review: http://reviews.llvm.org/D7719
      llvm-svn: 231230
      471e856f
    • Pavel Labath's avatar
      Use the unified section list when generating a symbol table · 783cbdcd
      Pavel Labath authored
      Summary:
      Symbol table generation code was failing to take into account the debug symbols because
      the object file was looking only into its own section list when doing the generation, even though
      the debug symbols from another object file were correctly detected and loaded by the
      SymbolVendor. This changes the code to use the unified section list, which fixes this problem.
      
      Test Plan:
      I do not intend do submit this yet since it causes (or more like, exposes) the issue
      in D7884, but I wanted to put this out here, so that anyone who wants to take a look at it can do
      so. (And I also wanted to know if this is the right approach to the problem :).
      
      Reviewers: clayborg, zturner
      
      Subscribers: lldb-commits
      
      Differential Revision: http://reviews.llvm.org/D7913
      
      llvm-svn: 231229
      783cbdcd
    • Pavel Labath's avatar
      Correctly resolve symbol names containing linker annotations · c6ae7eaa
      Pavel Labath authored
      Summary:
      Symbols in ELF files can be versioned, but LLDB currently does not understand these. This problem
      becomes apparent once one loads glibc with debug info. Here (in the .symtab section) the versions
      are embedded in the name (name@VERSION), which causes issues when evaluating expressions
      referencing memcpy for example (current glibc contains memcpy@@GLIBC_2.14 and
      memcpy@GLIBC_2.2.5).
      
      This problem was not evident without debug symbols as the .dynsym section
      stores the bare names and the actual versions are present in a separate section (.gnu.version_d),
      which LLDB ignores. This resulted in two definitions of memcpy in the symbol table.
      
      This patch adds support for storing annotated names to the Symbol class. If
      Symbol.m_contains_linker_annotations is true then this symbol is annotated. Unannotated name can
      be obtained by calling StripLinkerAnnotations on the corresponding ObjectFile. ObjectFileELF
      implements this to strip @VERSION suffixes when requested. Symtab uses this function to add the
      bare name as well as the annotated name to the name lookup table.
      
      To preserve the size of the Symbol class, I had to steal one bit from the m_type field.
      
      Test Plan:
      This fixes TestExprHelpExamples.py when run with a glibc with debug symbols. Writing
      an environment agnostic test case would require building a custom shared library with symbol
      versions and testing symbol resolution against that, which is somewhat challenging.
      
      Reviewers: clayborg, jingham
      
      Subscribers: lldb-commits
      
      Differential Revision: http://reviews.llvm.org/D8036
      
      llvm-svn: 231228
      c6ae7eaa
    • Kristof Beyls's avatar
      Fix PR22408 - LLVM producing AArch64 TLS relocations that GNU linkers cannot handle yet. · aea84618
      Kristof Beyls authored
      As is described at http://llvm.org/bugs/show_bug.cgi?id=22408, the GNU linkers
      ld.bfd and ld.gold currently only support a subset of the whole range of AArch64
      ELF TLS relocations. Furthermore, they assume that some of the code sequences to
      access thread-local variables are produced in a very specific sequence.
      When the sequence is not as the linker expects, it can silently mis-relaxe/mis-optimize
      the instructions.
      Even if that wouldn't be the case, it's good to produce the exact sequence,
      as that ensures that linkers can perform optimizing relaxations.
      
      This patch:
      
      * implements support for 16MiB TLS area size instead of 4GiB TLS area size. Ideally clang
        would grow an -mtls-size option to allow support for both, but that's not part of this patch.
      * by default doesn't produce local dynamic access patterns, as even modern ld.bfd and ld.gold
        linkers do not support the associated relocations. An option (-aarch64-elf-ldtls-generation)
        is added to enable generation of local dynamic code sequence, but is off by default.
      * makes sure that the exact expected code sequence for local dynamic and general dynamic
        accesses is produced, by making use of a new pseudo instruction. The patch also removes
        two (AArch64ISD::TLSDESC_BLR, AArch64ISD::TLSDESC_CALL) pre-existing AArch64-specific pseudo
        SDNode instructions that are superseded by the new one (TLSDESC_CALLSEQ).
      
      llvm-svn: 231227
      aea84618
    • Craig Topper's avatar
      [Tablegen] Use correct result number variables with the pattern nodes they go... · 483a3000
      Craig Topper authored
      [Tablegen] Use correct result number variables with the pattern nodes they go with when handling SDTCisSameAs. No functional change as they are always both 0 unless you try to define a multi result type profile that uses SDTCisSame on one of the other results.
      
      llvm-svn: 231226
      483a3000
    • David Blaikie's avatar
      Explicitly default DenseMapTest::CtorTest::operator= · 54a7ca3f
      David Blaikie authored
      Using the implicit default copy assignment operator in the presence of a
      user-declared copy ctor is deprecated in C++11.
      
      llvm-svn: 231225
      54a7ca3f
    • David Blaikie's avatar
      Remove explicit RNSuccIterator copy assignment in favor of implicit default · a985e1eb
      David Blaikie authored
      Asserting that the source and destination iterators are from the same
      region is unnecessary - there's no reason to disallow reassignment from
      any regions, so long as they aren't compared.
      
      llvm-svn: 231224
      a985e1eb
    • David Blaikie's avatar
      use = default instead of {} · 2d5f4292
      David Blaikie authored
      llvm-svn: 231223
      2d5f4292
    • David Blaikie's avatar
      Make format_object_base explicitly copyable, so format_objects can be copied... · 4e152576
      David Blaikie authored
      Make format_object_base explicitly copyable, so format_objects can be copied without relying on the implicit copy ctor
      
      Use of the implicit copy ctor is deprecated in C++11 in the presence of
      a user declared dtor.
      
      llvm-svn: 231222
      4e152576
    • David Blaikie's avatar
      Devirtualize ~parser<T> by making it protected in base classes and making derived classes final · 4d7eb730
      David Blaikie authored
      These objects are never owned/destroyed polymorphically, so there's no
      need for a virtual dtor.
      
      llvm-svn: 231221
      4d7eb730
    • David Blaikie's avatar
      Avoid copying parser objects · c08b2669
      David Blaikie authored
      Use of their copy members is deprecated since they have a user-declared
      dtor.
      
      llvm-svn: 231220
      c08b2669
    • Michael Kuperstein's avatar
      [DAGCombine] Fix a bug in a BUILD_VECTOR combine · fb95697c
      Michael Kuperstein authored
      When trying to convert a BUILD_VECTOR into a shuffle, we try to split a single source vector that is twice as wide as the destination vector. 
      We can not do this when we also need the zero vector to create a blend.
      This fixes PR22774.
      
      Differential Revision: http://reviews.llvm.org/D8040
      
      llvm-svn: 231219
      fb95697c
    • David Blaikie's avatar
      Make OptionValue explicitly copyable · 43fbf68c
      David Blaikie authored
      Since OptionValue (& its base classes) have user-declared dtors, use of
      the implicit copy ctor/assignment operator is deprecated in C++11.
      Provide them explicitly (defaulted) to avoid depending on this
      deprecated feature.
      
      llvm-svn: 231218
      43fbf68c
    • David Blaikie's avatar
      Devirtualize OptionValue::~OptionValue in favor of protected in the base, with... · 4c154c6b
      David Blaikie authored
      Devirtualize OptionValue::~OptionValue in favor of protected in the base, with final derived classes
      
      These objects are never polymorphically owned, so there's no need for
      virtual dtors - just make the dtor protected in the base classes, and
      make the derived classes final.
      
      llvm-svn: 231217
      4c154c6b