[all-commits] [llvm/llvm-project] a6492e: [IR] Value::getPointerAlignment(): handle pointer ...
Roman Lebedev via All-commits
all-commits at lists.llvm.org
Tue Jan 21 14:33:12 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: a6492e22711e45f1e60416371f7b5c29be5f508e
https://github.com/llvm/llvm-project/commit/a6492e22711e45f1e60416371f7b5c29be5f508e
Author: Roman Lebedev <lebedev.ri at gmail.com>
Date: 2020-01-22 (Wed, 22 Jan 2020)
Changed paths:
M llvm/lib/IR/Value.cpp
M llvm/test/Transforms/Attributor/ArgumentPromotion/2008-07-02-array-indexing.ll
M llvm/test/Transforms/Attributor/IPConstantProp/pthreads.ll
M llvm/test/Transforms/Attributor/align.ll
M llvm/test/Transforms/Attributor/callbacks.ll
M llvm/test/Transforms/Attributor/nocapture-1.ll
M llvm/test/Transforms/Attributor/nonnull.ll
M llvm/test/Transforms/Attributor/value-simplify.ll
Log Message:
-----------
[IR] Value::getPointerAlignment(): handle pointer constants
Summary:
New `@test13` in `Attributor/align.ll` is the main motivation - `null` pointer
really does not limit our alignment knowledge, in fact it is fully aligned
since it has no bits set.
Here we don't special-case `null` pointer because it is somewhat controversial
to add one more place where we enforce that `null` pointer is zero,
but instead we do the more general thing of trying to perform constant-fold
of pointer constant to an integer, and perform alignment inferrment on that.
Reviewers: jdoerfert, gchatelet, courbet, sstefan1
Reviewed By: jdoerfert
Subscribers: hiraditya, arphaman, jfb, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73131
More information about the All-commits
mailing list