[OperandBundles] Allow operand-specific attributes in operand bundles
authorSanjoy Das <sanjoy@playingwithpointers.com>
Fri, 4 Dec 2015 20:34:37 +0000 (20:34 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Fri, 4 Dec 2015 20:34:37 +0000 (20:34 +0000)
commitfb25c75967e3b30f6687737616613a56c9d442ca
treeb46160b73e97c96dacc12c7a93e6dcf4b67a8bd7
parent697fe024f6dad16e21c9b8e41bb27463971939c0
[OperandBundles] Allow operand-specific attributes in operand bundles

Currently `OperandBundleUse::operandsHaveAttr` computes its result
without being given a specific operand.  This is problematic because it
forces us to say that, e.g., even non-pointer operands in `"deopt"`
operand bundles are `readonly`, which doesn't make sense.

This commit changes `operandsHaveAttr` to work in the context of a
specific operand, so that we can give the operand attributes that make
sense for the operands's `llvm::Type`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254764 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/InstrTypes.h
lib/IR/Instructions.cpp