[Attributor] Function level undefined behavior attribute
authorJohannes Doerfert <johannes@jdoerfert.de>
Wed, 25 Dec 2019 00:48:50 +0000 (18:48 -0600)
committerJohannes Doerfert <johannes@jdoerfert.de>
Wed, 25 Dec 2019 01:23:08 +0000 (19:23 -0600)
commit58f324a468ffc66398199f1a55218e10b718e495
tree7cd7045c0ddd4a9a4b09724ae1e2214c23521aec
parent583ef13f0be7b0045f9508dfceee17ab4ef4b1ea
[Attributor] Function level undefined behavior attribute

_Eventually_, this attribute will be assigned to a function if it
contains undefined behavior. As a first small step, I tried to make it
loop through the load instructions in a function (eventually, the plan
is to check if a load instructions causes undefined behavior, because
e.g. dereferences a null pointer - Also eventually, this won't happen in
initialize() but in updateImpl()).

Patch By: Stefanos Baziotis (@baziotis)

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D71435
llvm/include/llvm/Transforms/IPO/Attributor.h
llvm/lib/Transforms/IPO/Attributor.cpp
llvm/test/Transforms/Attributor/undefined_behavior.ll [new file with mode: 0644]