[all-commits] [llvm/llvm-project] 78a750: [Attributor] Track a GEP Instruction in align dedu...
Hideto Ueno via All-commits
all-commits at lists.llvm.org
Mon Nov 25 23:59:35 PST 2019
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 78a750276f442726193b007a0010432765abe9d4
https://github.com/llvm/llvm-project/commit/78a750276f442726193b007a0010432765abe9d4
Author: Hideto Ueno <uenoku.tokotoko at gmail.com>
Date: 2019-11-26 (Tue, 26 Nov 2019)
Changed paths:
M llvm/lib/Transforms/IPO/Attributor.cpp
M llvm/test/Transforms/FunctionAttrs/align.ll
M llvm/test/Transforms/FunctionAttrs/arg_nocapture.ll
M llvm/test/Transforms/FunctionAttrs/nocapture.ll
M llvm/test/Transforms/InferFunctionAttrs/dereferenceable.ll
Log Message:
-----------
[Attributor] Track a GEP Instruction in align deduction
Summary:
This patch enables us to track GEP instruction in align deduction.
If a pointer `B` is defined as `A+Offset` and known to have alignment `C`, there exists some integer Q such that
```
A + Offset = C * Q = B
```
So we can say that the maximum power of two which is a divisor of gcd(Offset, C) is an alignment.
Reviewers: jdoerfert, sstefan1
Reviewed By: jdoerfert
Subscribers: lebedev.ri, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70392
More information about the All-commits
mailing list