forked from OSchip/llvm-project
parent
21ce5f7a66
commit
dec53920b4
|
@ -225,6 +225,8 @@ namespace ISD {
|
|||
ADJCALLSTACKDOWN, // Beginning of a call sequence
|
||||
ADJCALLSTACKUP, // End of a call sequence
|
||||
|
||||
// PCMARKER - This corrosponds to the pcmarker intrinsic.
|
||||
PCMARKER,
|
||||
|
||||
// BUILTIN_OP_END - This must be the last enum value in this list.
|
||||
BUILTIN_OP_END,
|
||||
|
|
|
@ -552,6 +552,10 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
|
|||
break;
|
||||
}
|
||||
break;
|
||||
case ISD::PCMARKER:
|
||||
Tmp1 = LegalizeOp(Node->getOperand(0)); // Legalize the chain.
|
||||
Result = DAG.getNode(ISD::PCMARKER, MVT::Other, Tmp1, Node->getOperand(1));
|
||||
break;
|
||||
case ISD::TRUNCSTORE:
|
||||
Tmp1 = LegalizeOp(Node->getOperand(0)); // Legalize the chain.
|
||||
Tmp3 = LegalizeOp(Node->getOperand(2)); // Legalize the pointer.
|
||||
|
|
|
@ -1099,6 +1099,7 @@ bool SDNode::hasNUsesOfValue(unsigned NUses, unsigned Value) {
|
|||
const char *SDNode::getOperationName() const {
|
||||
switch (getOpcode()) {
|
||||
default: return "<<Unknown>>";
|
||||
case ISD::PCMARKER: return "PCMarker";
|
||||
case ISD::EntryToken: return "EntryToken";
|
||||
case ISD::TokenFactor: return "TokenFactor";
|
||||
case ISD::Constant: return "Constant";
|
||||
|
|
|
@ -662,6 +662,12 @@ void SelectionDAGLowering::visitCall(CallInst &I) {
|
|||
setValue(&I, DAG.getSetCC(ISD::SETUO, MVT::i1, getValue(I.getOperand(1)),
|
||||
getValue(I.getOperand(2))));
|
||||
return;
|
||||
case Intrinsic::pcmarker: {
|
||||
SDOperand Num = getValue(I.getOperand(1));
|
||||
DAG.setRoot(DAG.getNode(ISD::PCMARKER, MVT::Other, getRoot(), Num));
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
SDOperand Callee;
|
||||
|
|
|
@ -27,10 +27,20 @@
|
|||
#include "llvm/Support/MathExtras.h"
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include <set>
|
||||
#include <algorithm>
|
||||
using namespace llvm;
|
||||
|
||||
namespace llvm {
|
||||
cl::opt<bool> EnableAlphaIDIV("enable-alpha-intfpdiv",
|
||||
cl::desc("Use the FP div instruction for integer div when possible"),
|
||||
cl::Hidden);
|
||||
cl::opt<bool> EnableAlpha("enable-alpha-ftoi",
|
||||
cl::desc("Enablue use of ftoi* and itof* instructions (ev6 and higher)"),
|
||||
cl::Hidden);
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// AlphaTargetLowering - Alpha Implementation of the TargetLowering interface
|
||||
namespace {
|
||||
|
@ -1697,6 +1707,11 @@ void ISel::Select(SDOperand N) {
|
|||
Alpha::ADJUSTSTACKUP;
|
||||
BuildMI(BB, Opc, 1).addImm(Tmp1);
|
||||
return;
|
||||
|
||||
case ISD::PCMARKER:
|
||||
Select(N.getOperand(0)); //Chain
|
||||
BuildMI(BB, Alpha::PCLABEL, 2).addImm( cast<ConstantSDNode>(N.getOperand(1))->getValue());
|
||||
return;
|
||||
}
|
||||
assert(0 && "Should not be reached!");
|
||||
}
|
||||
|
|
|
@ -30,6 +30,8 @@ def WTF : PseudoInstAlpha<(ops ), "#wtf">;
|
|||
def ADJUSTSTACKUP : PseudoInstAlpha<(ops ), "ADJUP">;
|
||||
def ADJUSTSTACKDOWN : PseudoInstAlpha<(ops ), "ADJDOWN">;
|
||||
|
||||
def PCLABEL : PseudoInstAlpha<(ops s64imm:$num), "PCMARKER_$num:\n">;
|
||||
|
||||
//*****************
|
||||
//These are shortcuts, the assembler expands them
|
||||
//*****************
|
||||
|
|
Loading…
Reference in New Issue