[all-commits] [llvm/llvm-project] b880bd: Add missing dependencies to mayHaveNonDefUseDepend...

Philip Reames via All-commits all-commits at lists.llvm.org
Mon Mar 21 10:21:30 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b880bde92b4a95c7b73dfbab8f04c90704381898
      https://github.com/llvm/llvm-project/commit/b880bde92b4a95c7b73dfbab8f04c90704381898
  Author: Philip Reames <listmail at philipreames.com>
  Date:   2022-03-21 (Mon, 21 Mar 2022)

  Changed paths:
    M llvm/lib/Analysis/ValueTracking.cpp

  Log Message:
  -----------
  Add missing dependencies to mayHaveNonDefUseDependency

Two interesting ommissions:
* When reordering in either direction, reordering two calls which both
  contain inf-loops is illegal.  This one is possibly a change in behavior
  for certain callers (e.g. fixes a latent bug.)
* When moving down, control dependence must be respected by checking the
  inverse of isSafeToSpeculativeExecute.  Current callers all seem to
  handle this case - though admitted, I did not do an exhaustive audit.
  Most seem to be only interested in moving upwards within a block.  This
  is mostly a case of future proofing an API so that it implements what
  the comments says, not just what current callers need.

Noticed via inspection.  I don't have a test case.




More information about the All-commits mailing list