1. Aug 01, 2019
    • Sanjay Patel's avatar
      [InstCombine] canonicalize fneg before fmul/fdiv · 435cdecd
      Sanjay Patel authored
      Reverse the canonicalization of fneg relative to fmul/fdiv. That makes it
      easier to implement the transforms (and possibly other fneg transforms) in
      1 place because we can always start the pattern match from fneg (either the
      legacy binop or the new unop).
      
      There's a secondary practical benefit seen in PR21914 and PR42681:
      https://bugs.llvm.org/show_bug.cgi?id=21914
      https://bugs.llvm.org/show_bug.cgi?id=42681
      ...hoisting fneg rather than sinking seems to play nicer with LICM in IR
      (although this change may expose analysis holes in the other direction).
      
      1. The instcombine test changes show the expected neutral IR diffs from
         reversing the order.
      
      2. The reassociation tests show that we were missing an optimization
         opportunity to fold away fneg-of-fneg. My reading of IEEE-754 says
         that all of these transforms are allowed (regardless of binop/unop
         fneg version) because:
      
         "For all other operations [besides copy/abs/negate/copysign], this
         standard does not specify the sign bit of a NaN result."
         In all of these transforms, we always have some other binop
         (fadd/fsub/fmul/fdiv), so we are free to flip the sign bit of a
         potential intermediate NaN operand.
         (If that interpretation is wrong, then we must already have a bug in
         the existing transforms?)
      
      3. The clang tests shouldn't exist as-is, but that's effectively a
         revert of rL367149 (the test broke with an extension of the
         pre-existing fneg canonicalization in rL367146).
      
      Differential Revision: https://reviews.llvm.org/D65399
      
      llvm-svn: 367447
      435cdecd
    • Djordje Todorovic's avatar
      Reland "[DwarfDebug] Dump call site debug info" · b9973f87
      Djordje Todorovic authored
      The build failure found after the rL365467 has been
      resolved.
      
      Differential Revision: https://reviews.llvm.org/D60716
      
      llvm-svn: 367446
      b9973f87
    • Johannes Doerfert's avatar
      [docs][FIX] Add missing word to documentation in terms of SCCs · f7ef7050
      Johannes Doerfert authored
      In the approval of D65299, commited as rL367440, I mentioned that my
      proposed wording was lacking the word "maximal". It is added now for
      correctness.
      
      llvm-svn: 367445
      f7ef7050
    • Anusha Basana's avatar
      [build] Add the ability to create a symlink for lipo · f7fbd6cb
      Anusha Basana authored
      Add user enabled option to create lipo with symlink to llvm-lipo
      Used rL326381 for reference.
      
      Differential Revision: https://reviews.llvm.org/D65477
      
      llvm-svn: 367444
      f7fbd6cb
    • Stanislav Mekhanoshin's avatar
      [AMDGPU] Fix for vectorizer crash with pointers of different size · ba1e845c
      Stanislav Mekhanoshin authored
      When vectorizer strips pointers it can eventually end up with
      pointers of two different sizes, then SCEV will crash.
      
      Differential Revision: https://reviews.llvm.org/D65480
      
      llvm-svn: 367443
      ba1e845c
    • Alexander Richardson's avatar
      [Sanitizer][ASAN][MSAN] Fix infinite recursion on FreeBSD · a4ea27de
      Alexander Richardson authored
      Summary:
      MSAN was broken on FreeBSD by https://reviews.llvm.org/D55703: after this
      change accesses to the key variable call __tls_get_addr, which is
      intercepted. The interceptor then calls GetCurrentThread which calls
      MsanTSDGet which again calls __tls_get_addr, etc...
      Using the default implementation in the SANITIZER_FREEBSD case fixes MSAN
      for me.
      
      I then applied the same change to ASAN (introduced in https://reviews.llvm.org/D55596)
      but that did not work yet. In the ASAN case, we get infinite recursion
      again during initialization, this time because calling pthread_key_create() early on
      results in infinite recursion. pthread_key_create() calls sysctlbyname()
      which is intercepted but COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED returns
      true, so the interceptor calls internal_sysctlbyname() which then ends up
      calling the interceptor again. I fixed this issue by using dlsym() to get
      the libc version of sysctlbyname() instead.
      
      This fixes https://llvm.org/PR40761
      
      Reviewers: vitalybuka, krytarowski, devnexen, dim, bsdjhb, #sanitizers, MaskRay
      
      Reviewed By: MaskRay
      
      Subscribers: MaskRay, emaste, kubamracek, jfb, #sanitizers, llvm-commits
      
      Tags: #sanitizers, #llvm
      
      Differential Revision: https://reviews.llvm.org/D65221
      
      llvm-svn: 367442
      a4ea27de
    • Greg Clayton's avatar
      Don't crash when pass by value struct has no definition. · af44f18a
      Greg Clayton authored
      llvm-svn: 367441
      af44f18a
    • Philip Reames's avatar
      [docs] Reword documentation in terms of SCCs not cycles · f3b75236
      Philip Reames authored
      Given the example:
      header:
        br i1 %c, label %next, label %header
      next:
        br i1 %c2, label %exit, label %header
      
      We end up with a loop containing both header and next.  Given that, the describing the loop in terms of cycles is confusing since we have multiple distinct cycles within a single Loop.  Standardize on the SCC to clarify.
      
      Differential Revision: https://reviews.llvm.org/D65299
      
      llvm-svn: 367440
      f3b75236
  2. Jul 31, 2019