mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-28 03:25:23 +00:00
Implement Value* tracking for loads and stores in the selection DAG. This enables one to use alias analysis in the backends.
(TRUNK)Stores and (EXT|ZEXT|SEXT)Loads have an extra SDOperand which is a SrcValueSDNode which contains the Value*. Note that if the operation is introduced by the backend, it will still have the operand, but the value* will be null. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21599 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -161,6 +161,8 @@ public:
|
||||
SDOperand N1, SDOperand N2);
|
||||
SDOperand getNode(unsigned Opcode, MVT::ValueType VT,
|
||||
SDOperand N1, SDOperand N2, SDOperand N3);
|
||||
SDOperand getNode(unsigned Opcode, MVT::ValueType VT,
|
||||
SDOperand N1, SDOperand N2, SDOperand N3, SDOperand N4);
|
||||
SDOperand getNode(unsigned Opcode, MVT::ValueType VT,
|
||||
std::vector<SDOperand> &Children);
|
||||
|
||||
@@ -172,11 +174,16 @@ public:
|
||||
SDOperand N, MVT::ValueType EVT);
|
||||
SDOperand getNode(unsigned Opcode, MVT::ValueType VT, SDOperand N1,
|
||||
SDOperand N2, SDOperand N3, MVT::ValueType EVT);
|
||||
SDOperand getNode(unsigned Opcode, MVT::ValueType VT, SDOperand N1,
|
||||
SDOperand N2, SDOperand N3, SDOperand N4, MVT::ValueType EVT);
|
||||
|
||||
/// getLoad - Loads are not normal binary operators: their result type is not
|
||||
/// determined by their operands, and they produce a value AND a token chain.
|
||||
///
|
||||
SDOperand getLoad(MVT::ValueType VT, SDOperand Chain, SDOperand Ptr);
|
||||
SDOperand getLoad(MVT::ValueType VT, SDOperand Chain, SDOperand Ptr, SDOperand SV);
|
||||
|
||||
// getSrcValue - construct a node to track a Value* through the backend
|
||||
SDOperand getSrcValue(const Value* I);
|
||||
|
||||
void replaceAllUsesWith(SDOperand Old, SDOperand New) {
|
||||
assert(Old != New && "RAUW self!");
|
||||
|
Reference in New Issue
Block a user