[all-commits] [llvm/llvm-project] a2caa3: Remove GlobalValue::getAlignment().
Eli Friedman via All-commits
all-commits at lists.llvm.org
Tue Jun 23 19:14:15 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: a2caa3b61497b6be8c8b77823d0fd62b4be1f177
https://github.com/llvm/llvm-project/commit/a2caa3b61497b6be8c8b77823d0fd62b4be1f177
Author: Eli Friedman <efriedma at quicinc.com>
Date: 2020-06-23 (Tue, 23 Jun 2020)
Changed paths:
M llvm/include/llvm/CodeGen/AsmPrinter.h
M llvm/include/llvm/IR/GlobalObject.h
M llvm/include/llvm/IR/GlobalValue.h
M llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
M llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
M llvm/lib/IR/ConstantFold.cpp
M llvm/lib/IR/Core.cpp
M llvm/lib/IR/Globals.cpp
M llvm/lib/IR/Verifier.cpp
M llvm/lib/LTO/LTOModule.cpp
M llvm/lib/Object/IRSymtab.cpp
M llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
M llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
M llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
M llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
M llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp
M llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h
M llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
M llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
M llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
M llvm/lib/Target/SystemZ/SystemZSubtarget.cpp
M llvm/lib/Target/XCore/XCoreISelLowering.cpp
M llvm/test/CodeGen/AArch64/funcptr_cast.ll
M llvm/test/CodeGen/AArch64/global-alignment.ll
M llvm/test/CodeGen/PowerPC/atomics-constant.ll
Log Message:
-----------
Remove GlobalValue::getAlignment().
This function is deceptive at best: it doesn't return what you'd expect.
If you have an arbitrary GlobalValue and you want to determine the
alignment of that pointer, Value::getPointerAlignment() returns the
correct value. If you want the actual declared alignment of a function
or variable, GlobalObject::getAlignment() returns that.
This patch switches all the users of GlobalValue::getAlignment to an
appropriate alternative.
Differential Revision: https://reviews.llvm.org/D80368
More information about the All-commits
mailing list