1. Apr 23, 2015
  2. Apr 22, 2015
    • Krzysztof Parzyszek's avatar
      [Hexagon] Treat CFI as solo instructions · 6bbcb31f
      Krzysztof Parzyszek authored
      llvm-svn: 235516
      6bbcb31f
    • Ilia K's avatar
      MI Refactor CMIUtilSystemWindows::GetExecutablesPath() · 5a931869
      Ilia K authored
      Summary:
      My understanding of the Windows API call GetLastError() is that it should only be checked when ::GetModuleFileName()  returns 0 on error.
      Otherwise GetExecutablesPath() could return an error despite nLen being valid if GetLastError() was inconsistent.
      Patch updates function to only call GetOSLastError() when nLen == 0
      
      Patch from ewan@codeplay.com
      
      Reviewers: EwanCrawford
      
      Subscribers: lldb-commits, deepak2427
      
      Differential Revision: http://reviews.llvm.org/D9154
      
      llvm-svn: 235515
      5a931869
    • Krzysztof Parzyszek's avatar
      [Hexagon] Implement HexagonInstPrinter::printRegName · badf3a63
      Krzysztof Parzyszek authored
      llvm-svn: 235514
      badf3a63
    • Adhemerval Zanella's avatar
      Support arm32 R_ARM_V4BX relocation format · 9f3dbff0
      Adhemerval Zanella authored
      ARM32 ELF R_ARM_V4BX relocation format is a special relocation type
      that records the location of an ARMv4t BX instruction to enable a
      static linker to generate ARMv4 compatible instructions.  This
      relocation does not contain a reference symbol.
      
      This patch enabled its creation by removing the requeriment of a
      relocation symbol target in ELFState<ELFT>::writeSectionContent.
      
      llvm-svn: 235513
      9f3dbff0
    • Aaron Ballman's avatar
      Silencing a -Wunused-variable warning; NFC. · c75a192f
      Aaron Ballman authored
      llvm-svn: 235512
      c75a192f
    • Brendon Cahoon's avatar
      Fix a type mismatch assert in SCEV division · f9751ad1
      Brendon Cahoon authored
      An assert was triggered when attempting to create a new SCEV
      with operands of different types in the visitAddRecExpr. In this
      test case, the operand types of the numerator and denominator
      are different. The SCEV division code should generate a
      conservative answer when this happens.
      
      Differential Revision: http://reviews.llvm.org/D9021
      
      llvm-svn: 235511
      f9751ad1
    • Ed Maste's avatar
      Skip additional lldb-mi tests that failed on FreeBSD · 60785973
      Ed Maste authored
      llvm-svn: 235510
      60785973
    • Andrea Di Biagio's avatar
      [X86][AVX] Fix failure due to a missing ISel pattern to select VBROADCAST nodes (PR23259). · 6cd2f42f
      Andrea Di Biagio authored
      This fixes a regression introduced at revision 218263.
      
      On AVX, if we optimize for size, a splat build_vector of a load
      is lowered into a VBROADCAST node. This is done even if the value type of the
      splat build_vector node is v2i64.
      
      Since AVX doesn't support v2f64/v2i64 broadcasts, revision 218263 added two
      extra tablegen patterns to allow selecting a VMOVDDUPrm from an X86VBroadcast
      where the scalar element comes from a loadi64/loadf64.
      
      However, revision 218263 forgot to add an extra fallback pattern for the case
      where we have a X86VBroadcast of a loadi64 with multiple uses.
      
      This patch adds the missing tablegen pattern in X86InstrSSE.td.
      This patch also adds an extra test to 'splat-for-size.ll' to verify that ISel
      doesn't crash with a 'fatal error in the backend' due to a missing AVX pattern
      to select v2i64 X86ISD::BROADCAST nodes.
      
      llvm-svn: 235509
      6cd2f42f
    • Olivier Sallenave's avatar
      Fixed logic to enable complex FMA formation. · c587bee4
      Olivier Sallenave authored
      llvm-svn: 235508
      c587bee4
    • Alexey Bataev's avatar
      [OPENMP] Codegen for 'if' clause in 'task' directive. · 1d67713b
      Alexey Bataev authored
      If condition evaluates to true, the code executes task by calling @__kmpc_omp_task() runtime function.
      If condition evaluates to false, the code executes serial version of the code by executing the following code:
      
      call void @__kmpc_omp_task_begin_if0(<loc>, <threadid>, <task_t_ptr, returned by @__kmpc_omp_task_alloc()>);
      proxy_task_entry(<gtid>, <task_t_ptr, returned by @__kmpc_omp_task_alloc()>);
      call void @__kmpc_omp_task_complete_if0(<loc>, <threadid>, <task_t_ptr, returned by @__kmpc_omp_task_alloc()>);
      Also it checks if the condition is constant and if it is constant it evaluates its value and then generates either parallel version of the code (if the condition evaluates to true), or the serial version of the code (if the condition evaluates to false).
      Differential Revision: http://reviews.llvm.org/D9143
      
      llvm-svn: 235507
      1d67713b
    • Alexey Bataev's avatar
      [OPENMP] Codegen for 'reduction' clause in 'for' directive. · 7ebe5fdd
      Alexey Bataev authored
      Emit a code for reduction clause. Next code should be emitted for reductions:
      
      static kmp_critical_name lock = { 0 };
      
      void reduce_func(void *lhs[<n>], void *rhs[<n>]) {
          *(Type0*)lhs[0] = ReductionOperation0(*(Type0*)lhs[0], *(Type0*)rhs[0]);
            ...
              *(Type<n>-1*)lhs[<n>-1] =
                ReductionOperation<n>-1(*(Type<n>-1*)lhs[<n>-1],
                  *(Type<n>-1*)rhs[<n>-1]);
      }
      
       ...
        void *RedList[<n>] = {&<RHSExprs>[0], ..., &<RHSExprs>[<n>-1]};
         switch (__kmpc_reduce{_nowait}(<loc>, <gtid>, <n>, sizeof(RedList), RedList, reduce_func, &<lock>)) {
            case 1:
              <LHSExprs>[0] = ReductionOperation0(*<LHSExprs>[0], *<RHSExprs>[0]);
                ...
                  <LHSExprs>[<n>-1] = ReductionOperation<n>-1(*<LHSExprs>[<n>-1], *<RHSExprs>[<n>-1]);
                   __kmpc_end_reduce{_nowait}(<loc>, <gtid>, &<lock>);
                    break;
                     case 2:
                       Atomic(<LHSExprs>[0] = ReductionOperation0(*<LHSExprs>[0], *<RHSExprs>[0]));
                         ...
                           Atomic(<LHSExprs>[<n>-1] = ReductionOperation<n>-1(*<LHSExprs>[<n>-1], *<RHSExprs>[<n>-1]));
                            break;
                             default:;
                              }
                              Reduction variables are a kind of a private variables, they have private copies, but initial values are chosen in accordance with the reduction operation.
      Differential Revision: http://reviews.llvm.org/D9139
      
      llvm-svn: 235506
      7ebe5fdd
    • Zoran Jovanovic's avatar
      [mips][microMIPSr6] Implement mips32 to microMIPSr6 mapping support · b59a5419
      Zoran Jovanovic authored
      Differential Revision: http://reviews.llvm.org/D8661
      
      llvm-svn: 235505
      b59a5419
    • Pavel Labath's avatar
      XFAILing a single test in TestConcurrentEvents · c32e04d8
      Pavel Labath authored
      apparently, TestConcurrentEvents is still not fixed. One test has failed on Linux i386 build.
      Will disable the failing test on i386 for now, and see how it goes..
      
      llvm-svn: 235504
      c32e04d8
    • Alexey Bataev's avatar
      [OPENMP] Codegen for 'private' clause in 'for' directive. · 50a64588
      Alexey Bataev authored
      This patch generates helper variables which used as a private copies of the corresponding original variables inside an OpenMP 'for' directive. These generated variables are initialized by default (with the default constructor, if any). In OpenMP region references to original variables are replaced by the references to these private helper variables.
      Differential Revision: http://reviews.llvm.org/D9106
      
      llvm-svn: 235503
      50a64588
    • Pavel Labath's avatar
      Enable TestConcurrentEvents on Linux · 5c3c43af
      Pavel Labath authored
      After the latest changes in NativeProcessLinux, these tests should be stable now. Please revert
      (and let me know) if any issue crops up.
      
      llvm-svn: 235502
      5c3c43af
    • Alexey Bataev's avatar
      [OPENMP] Fixed test incompatibility for simd codegen. · 9e4b8204
      Alexey Bataev authored
      llvm-svn: 235501
      9e4b8204
    • Alexey Bataev's avatar
      [OPENMP] Fix use of unsigned counters in loops with zero trip count. · 62dbb979
      Alexey Bataev authored
      Patch fixes bugs in codegen for loops with unsigned counters and zero trip count. Previously preconditions for all loops were built using logic (Upper - Lower) > 0. But if the loop is a loop with zero trip count, then Upper - Lower is < 0 only for signed integer, for unsigned we're running into an underflow situation.
      In this patch we're using original Lower<Upper condition to check that loop body can be executed at least once. Also this allows to skip code generation for loops, if it is known that preconditions for the loop are always false.
      Differential Revision: http://reviews.llvm.org/D9103
      
      llvm-svn: 235500
      62dbb979
    • Leny Kholodov's avatar
      [ARM] Update R_ARM_TARGET1 command line option names (remove prefix 'arm-') · 592cee66
      Leny Kholodov authored
      Command line options --arm-target1-rel and --arm-target1-abs have been renamed to be compatible with GNU linkers.
      Two tests have been updated:
        test/elf/options/target-specific-args.test
        test/elf/ARM/rel-arm-target1.test
      
      Differential Revision: http://reviews.llvm.org/D9037
      
      llvm-svn: 235499
      592cee66
    • Leny Kholodov's avatar
      [ARM] Replace branches to undefined weak functions with NOP · 9e4292c0
      Leny Kholodov authored
      According to the code model (ARM, Thumb, Thumb2) this patch updates the b/bl/blx 0 instructions with NOP.
      test/elf/ARM/weak-branch.test has been added with tests for all available NOP (A1, T1, T2 encodings).
      
      Differential Revision: http://reviews.llvm.org/D8807
      
      llvm-svn: 235498
      9e4292c0
    • Hal Finkel's avatar
      [DAGCombine] Disable select(c, load,load) for indexed loads · 0d49cf26
      Hal Finkel authored
      This turned up after r235333, but was a pre-existing bug. The optimization
      which transforms select(c, load, load) into a load of a select of the addresses
      does not handle indexed loads (pre/post inc/dec). However, it did not check for
      them either, leading to a crash if it tried to transform one of them.
      
      llvm-svn: 235497
      0d49cf26
    • Alexey Bataev's avatar
      [OPENMP] Codegen for 'ordered' directive. · 98eb6e3d
      Alexey Bataev authored
      Add codegen for 'ordered' directive:
      
      __kmpc_ordered(ident_t *, gtid);
      <associated statement>;
      __kmpc_end_ordered(ident_t *, gtid);
      Also for 'for' directives with the dynamic scheduling and an 'ordered' clause added a call to '__kmpc_dispatch_fini_(4|8)[u]()' function after increment expression for loop control variable:
      
      while(__kmpc_dispatch_next(&LB, &UB)) {
        idx = LB;
        while (idx <= UB) { BODY; ++idx;
          __kmpc_dispatch_fini_(4|8)[u](); // For ordered loops only.
        } // inner loop
      }
      Differential Revision: http://reviews.llvm.org/D9070
      
      llvm-svn: 235496
      98eb6e3d
    • Vasileios Kalintiris's avatar
      Revert "[mips][FastISel] Implement shift ops for Mips fast-isel." · e7508c9f
      Vasileios Kalintiris authored
      This reverts commit r235194. It was causing a failure in FastISel buildbots
      due to sign-extension issues.
      
      llvm-svn: 235495
      e7508c9f
    • Tamas Berghammer's avatar
      Fix signle stepping on arm when multiple thread is involved · e7708688
      Tamas Berghammer authored
      On linux-arm we use software single stepping where setting the new
      breakpoint is only possible while the process is in stopped state.
      This CL moves the setup code for single stepping form the SigneStep
      operation into the Resum method to avoid an error when the process
      already started when we want to step one of the thread.
      
      Differential revision: http://reviews.llvm.org/D9108
      
      llvm-svn: 235494
      e7708688
    • Pavel Labath's avatar
      [DWARF CFI] Add support for DW_CFA_def_cfa_sf when parsing CIE · 701db367
      Pavel Labath authored
      Summary: Just what it says on the box.
      
      Reviewers: jasonmolenda
      
      Subscribers: lldb-commits
      
      Differential Revision: http://reviews.llvm.org/D9150
      
      llvm-svn: 235493
      701db367