This makes attribute accessors on CallInst and InvokeInst do the
(conservatively) right thing. This essentially involves, in some
cases, *not* falling back querying the attributes on the called
llvm::Function when operand bundles are present.
Attributes locally present on the CallInst or InvokeInst will still
override operand bundle semantics. The LangRef has been amended to
reflect this. Note: this change does not do anything prevent
-function-attrs from inferring CallSite local attributes after
inspecting the called function -- that will be done as a separate
change.
I've used -adce and -early-cse to test these changes. There is
nothing special about these passes (and they did not require any
changes) except that they seemed be the easiest way to write the tests.
This change does not add deal with argmemonly. That's a later change
because alias analysis requires a related fix before argmemonly can be
tested.