]> granicus.if.org Git - llvm/commit
[Attributor] ValueSimplify Abstract Attribute
authorHideto Ueno <uenoku.tokotoko@gmail.com>
Sat, 7 Sep 2019 07:03:05 +0000 (07:03 +0000)
committerHideto Ueno <uenoku.tokotoko@gmail.com>
Sat, 7 Sep 2019 07:03:05 +0000 (07:03 +0000)
commit45251098394045f37997ccca97f11951ad07fd0a
tree36fcd3acdc61636126531cf3b49fbb0d5b1c2d43
parent03e62e9930dc883361a8b72dadd9bd37553c331c
[Attributor] ValueSimplify Abstract Attribute

Summary:
This patch introduces initial `AAValueSimplify` which simplifies a value in a context.

example
- (for function returned) If all the return values are the same and constant, then we can replace callsite returned with the constant.
- If an internal function takes the same value(constant) as an argument in the callsite, then we can replace the argument with that constant.

Reviewers: jdoerfert, sstefan1

Reviewed By: jdoerfert

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371291 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/IPO/Attributor.h
lib/Transforms/IPO/Attributor.cpp
test/Transforms/FunctionAttrs/align.ll
test/Transforms/FunctionAttrs/noreturn_sync.ll
test/Transforms/FunctionAttrs/nounwind.ll
test/Transforms/FunctionAttrs/value-simplify.ll [new file with mode: 0644]