_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()).
Note: This is my first LLVM and Attributor review hence this patch doesn't really do anything yet, I'm just trying to get the initial details down.
Any help / advice / proposal is highly appreciated.
Edit: Correction: The attribute won't be assigned to functions (yet). Its purpose is to be integrated in AAIsDead.
Since we start with a function version only, we probably need to add an llvm::Instruction operand here.
While it makes sense if *every* execution of a function causes UB, the initial implementation will
answer the questions for a single (load) instruction.