1. Sep 28, 2015
    • Artyom Skrobov's avatar
      [ARM] Avoid redundant checks for isThumb1Only() after supportsTailCall() · ad8a0638
      Artyom Skrobov authored
      supportsTailCall() has two callers. Both of them double-check isThumb1Only(),
      and refuse to proceed with tail-calling in that case.
      Therefore, it makes sense to move this check to
      ARMSubtarget::initSubtargetFeatures, where SupportsTailCall is initialized;
      and to eliminate the extra checks at the call sites.
      
      Following a review comment, added an "assert(supportsTailCall())"
      in IsEligibleForTailCall.
      
      NFC.
      
      llvm-svn: 248703
      ad8a0638
    • Pavel Labath's avatar
      Revert "Fix race condition during process detach" · c8c77d46
      Pavel Labath authored
      This fix is not correct on its own until D12968 is resolved. Will resumbit once that is done.
      
      llvm-svn: 248702
      c8c77d46
    • Johannes Doerfert's avatar
      Allow switch instructions in SCoPs · 9a132f36
      Johannes Doerfert authored
        This patch allows switch instructions with affine conditions in the
        SCoP. Also switch instructions in non-affine subregions are allowed.
        Both did not require much changes to the code, though there was some
        refactoring needed to integrate them without code duplication.
      
        In the llvm-test suite the number of profitable SCoPs increased from
        135 to 139 but more importantly we can handle more benchmarks and user
        inputs without preprocessing.
      
      Differential Revision: http://reviews.llvm.org/D13200
      
      llvm-svn: 248701
      9a132f36
    • Alexander Kornienko's avatar
      [clang-tidy] Code factorization and cleanup in IdentifierNamingCheck · 3d77768e
      Alexander Kornienko authored
      This is to level the ground a little bit, in preparation for the changes in http://reviews.llvm.org/D13081.
      
      Code factorization replaces all insertions to NamingCheckFailures map with a unique addUsage function that does the job.
      There is also no more difference between the declaration and the references to a given identifier, both cases are treated as ranges in the Usage vector. There is also a check to avoid duplicated ranges to be inserted, which sometimes triggered erroneous replacements.
      
      References can now also be added before the declaration of the identifier is actually found; this looks to be the case for example when a templated class uses its parameters to specialize its templated base class.
      
      Patch by Beren Minor!
      
      Differential revision: http://reviews.llvm.org/D13079
      
      llvm-svn: 248700
      3d77768e
    • Alexander Kornienko's avatar
      [clang-tidy] Removed a stray empty line in the docs. · 501e6cd2
      Alexander Kornienko authored
      llvm-svn: 248699
      501e6cd2
    • Hal Finkel's avatar
      [DAGCombine] Fix getStoreMergeAndAliasCandidates's AA-enabled chain walking · bd582581
      Hal Finkel authored
      When AA is being used, non-aliasing stores are canonicalized to use the same
      chain, and DAGCombiner::getStoreMergeAndAliasCandidates can take advantage of
      this by looking only as users of a store's chain operand. However, user
      iteration is not result-number specific, we need to check that the use is as a
      chain operand, and not via some other operand. It is certainly possible to have
      another potentially-aliasing store, which shares the first's base pointer, and
      uses the first's chain's node via some other operand.
      
      Failure to catch this situation caused, at least in the included test case, an
      assert later because the relative sequence-number ordering caused later
      replacement to create a cycle in the DAG.
      
      llvm-svn: 248698
      bd582581
    • Tobias Grosser's avatar
      [tests] Add memory writes to make this scop not trivially empty · f223cdf1
      Tobias Grosser authored
      llvm-svn: 248697
      f223cdf1
    • Alexey Bataev's avatar
      [OPENMP 4.1] Add 'simd' clause for 'ordered' directive. · d14d1e6f
      Alexey Bataev authored
      Parsing and sema analysis for 'simd' clause in 'ordered' directive.
      Description
      If the simd clause is specified, the ordered regions encountered by any thread will use only a single SIMD lane to execute the ordered
      regions in the order of the loop iterations.
      Restrictions
      An ordered construct with the simd clause is the only OpenMP construct that can appear in the simd region
      
      llvm-svn: 248696
      d14d1e6f
    • Johannes Doerfert's avatar
      Remove obsolete check · f32f5f23
      Johannes Doerfert authored
        This check was needed at some point but seems not useful anymore. Only
        one adjustment in the domain generation was needed to cope with the
        cases this check prevented from happening before.
      
      llvm-svn: 248695
      f32f5f23
    • Johannes Doerfert's avatar
      [NFC] Remove unused SCoP diagnostic · 91ad092b
      Johannes Doerfert authored
      llvm-svn: 248694
      91ad092b
    • Craig Topper's avatar
      862d5d83
    • Justin Bogner's avatar
      AsmWriter: Print the argument names in declarations while debugging · d7d1a72f
      Justin Bogner authored
      When llvm declarations have argument names, it's helpful to actually
      print those names when debugging. Arguably, it'd be nice to print them
      all the time, but that would mean the IR we output wouldn't round trip
      through bitcode, which doesn't store the names.
      
      Make the varous print() methods in AsmWriter optionally print "for
      debug" and set that flag in the dump() methods. The only thing this
      does differently for now is print the argument names in declarations.
      
      llvm-svn: 248692
      d7d1a72f
    • Yaron Keren's avatar
      Silence clang warning: variable ‘Status’ set but not used. · e5a9dc2f
      Yaron Keren authored
      llvm-svn: 248691
      e5a9dc2f
    • Sanjoy Das's avatar
      [SCEV] identical instructions don't compute equal values · f1090b60
      Sanjoy Das authored
      Before this change `HasSameValue` would return true for distinct
      `alloca` instructions if they happened to be allocating the same
      type (`alloca` instructions are not specified as reading memory).  This
      change adds an explicit whitelist of instruction types for which
      "identical" instructions compute the same value.
      
      Fixes PR24952.
      
      llvm-svn: 248690
      f1090b60
    • Sanjay Patel's avatar
      [InstCombine] fold zexts and constants into a phi (PR24766) · 95334075
      Sanjay Patel authored
      This is one step towards solving PR24766:
      https://llvm.org/bugs/show_bug.cgi?id=24766
      
      We were not producing the same IR for these two C functions because the store
      to the temp bool causes extra zexts:
      
      #include <stdbool.h>
      
      bool switchy(char x1, char x2, char condition) {
         bool conditionMet = false;
         switch (condition) {
         case 0: conditionMet = (x1 == x2); break;
         case 1: conditionMet = (x1 <= x2); break;
         }
         return conditionMet;
      }
      
      bool switchy2(char x1, char x2, char condition) {
         switch (condition) {
         case 0: return (x1 == x2);
         case 1: return (x1 <= x2);
         }
        return false;
      }
      
      As noted in the code comments, this test case manages to avoid the more general existing
      phi optimizations where there are only 2 phi inputs or where there are no constant phi 
      args mixed in with the casts ops. It seems like a corner case, but if we don't catch it, 
      then I don't think we can get SimplifyCFG to further optimize towards the canonical form
      for this function shown in the bug report.
      
      Differential Revision: http://reviews.llvm.org/D12866
      
      llvm-svn: 248689
      95334075
    • Tobias Grosser's avatar
      BlockGenerator: Be less agressive with deleting dead instructions · 0722a1e5
      Tobias Grosser authored
      We now only delete trivially dead instructions in the BB we copy (copyBB), but
      not in any other BB.  Only for copyBB we know that there will _never_ be any
      future uses of instructions that have no use after copyBB has been generated.
      Other instructions in the AST that have been generated by IslNodeBuilder may
      look dead at the moment, but may possibly still be referenced by GlobalMaps. If
      we delete them now, later uses would break surprisingly.
      
      We do not have a test case that breaks due to us deleting too many instructions.
      This issue was found by inspection.
      
      llvm-svn: 248688
      0722a1e5
    • Tobias Grosser's avatar
      Drop unused variable · a43b6e93
      Tobias Grosser authored
      llvm-svn: 248687
      a43b6e93
    • Saleem Abdulrasool's avatar
      builtins: silence GCC warning · 0165015f
      Saleem Abdulrasool authored
      If the builtins are built with libgcc as the unwind provider on ARM, the exposed
      _Unwind_SetIP is a macro.  This results in the following warning due to
      expansion of the argument:
      
      warning: suggest parentheses around arithmetic in operand of ‘|’ [-Wparentheses]
      
      Add a no-op set of parenthesis around the argument that will prevent this
      warning.
      
      llvm-svn: 248686
      0165015f
  2. Sep 27, 2015
  3. Sep 26, 2015