summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/SelectionDAGNodes.h
diff options
context:
space:
mode:
authorMichael Liao <michael.liao@intel.com>2012-09-12 21:43:09 +0000
committerMichael Liao <michael.liao@intel.com>2012-09-12 21:43:09 +0000
commit6c7ccaa3fd1d6e96d0bf922554b09d2b17c3b0e3 (patch)
treec7b701b54f8f7c6bf9c23b4b1d9005e085b1733d /include/llvm/CodeGen/SelectionDAGNodes.h
parent0d1bc5f916d6b0f4eb5bf69cf87e244b52be009e (diff)
downloadllvm-6c7ccaa3fd1d6e96d0bf922554b09d2b17c3b0e3.tar.gz
llvm-6c7ccaa3fd1d6e96d0bf922554b09d2b17c3b0e3.tar.bz2
llvm-6c7ccaa3fd1d6e96d0bf922554b09d2b17c3b0e3.tar.xz
Fix PR11985
- BlockAddress has no support of BA + offset form and there is no way to propagate that offset into machine operand; - Add BA + offset support and a new interface 'getTargetBlockAddress' to simplify target block address forming; - All targets are modified to use new interface and X86 backend is enhanced to support BA + offset addressing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163743 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/SelectionDAGNodes.h')
-rw-r--r--include/llvm/CodeGen/SelectionDAGNodes.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h
index 3bea2ded68..48c0409836 100644
--- a/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -1483,15 +1483,17 @@ public:
class BlockAddressSDNode : public SDNode {
const BlockAddress *BA;
+ int64_t Offset;
unsigned char TargetFlags;
friend class SelectionDAG;
BlockAddressSDNode(unsigned NodeTy, EVT VT, const BlockAddress *ba,
- unsigned char Flags)
+ int64_t o, unsigned char Flags)
: SDNode(NodeTy, DebugLoc(), getSDVTList(VT)),
- BA(ba), TargetFlags(Flags) {
+ BA(ba), Offset(o), TargetFlags(Flags) {
}
public:
const BlockAddress *getBlockAddress() const { return BA; }
+ int64_t getOffset() const { return Offset; }
unsigned char getTargetFlags() const { return TargetFlags; }
static bool classof(const BlockAddressSDNode *) { return true; }