[all-commits] [llvm/llvm-project] f26bdb: Make Value::getPointerAlignment() return an Align, ...

Eli Friedman via All-commits all-commits at lists.llvm.org
Wed May 20 16:37:50 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f26bdb539e8acef23e2a0370408521a6458001ee
      https://github.com/llvm/llvm-project/commit/f26bdb539e8acef23e2a0370408521a6458001ee
  Author: Eli Friedman <efriedma at quicinc.com>
  Date:   2020-05-20 (Wed, 20 May 2020)

  Changed paths:
    M llvm/docs/ReleaseNotes.rst
    M llvm/include/llvm/IR/Value.h
    M llvm/lib/Analysis/Loads.cpp
    M llvm/lib/Analysis/ValueTracking.cpp
    M llvm/lib/CodeGen/ExpandMemCmp.cpp
    M llvm/lib/IR/ConstantFold.cpp
    M llvm/lib/IR/Value.cpp
    M llvm/lib/Target/AArch64/AArch64InstrInfo.td
    M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
    M llvm/test/Analysis/ValueTracking/memory-dereferenceable.ll
    M llvm/test/Transforms/GVN/PRE/load-pre-licm.ll
    M llvm/test/Transforms/GVN/PRE/pre-load.ll
    M llvm/test/Transforms/InstCombine/call-guard.ll
    M llvm/test/Transforms/InstCombine/masked_intrinsics.ll
    M llvm/test/Transforms/InstCombine/select.ll
    M llvm/test/Transforms/LICM/hoist-deref-load.ll
    M llvm/test/Transforms/SimplifyCFG/SpeculativeExec.ll
    M llvm/test/Transforms/TailCallElim/reorder_load.ll
    M llvm/unittests/IR/FunctionTest.cpp
    M polly/test/ScopInfo/invariant_load_dereferenceable.ll

  Log Message:
  -----------
  Make Value::getPointerAlignment() return an Align, not a MaybeAlign.

If we don't know anything about the alignment of a pointer, Align(1) is
still correct: all pointers are at least 1-byte aligned.

Included in this patch is a bugfix for an issue discovered during this
cleanup: pointers with "dereferenceable" attributes/metadata were
assumed to be aligned according to the type of the pointer.  This
wasn't intentional, as far as I can tell, so Loads.cpp was fixed to
stop making this assumption. Frontends may need to be updated.  I
updated clang's handling of C++ references, and added a release note for
this.

Differential Revision: https://reviews.llvm.org/D80072




More information about the All-commits mailing list