[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaInstrInfo.td AlphaISelPattern.cpp

Andrew Lenharth alenhar2 at cs.uiuc.edu
Thu Mar 31 13:24:22 PST 2005



Changes in directory llvm/lib/Target/Alpha:

AlphaInstrInfo.td updated: 1.35 -> 1.36
AlphaISelPattern.cpp updated: 1.70 -> 1.71
---
Log message:

PCMarker support for DAG and Alpha

---
Diffs of the changes:  (+17 -0)

 AlphaISelPattern.cpp |   15 +++++++++++++++
 AlphaInstrInfo.td    |    2 ++
 2 files changed, 17 insertions(+)


Index: llvm/lib/Target/Alpha/AlphaInstrInfo.td
diff -u llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.35 llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.36
--- llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.35	Tue Mar 22 10:42:52 2005
+++ llvm/lib/Target/Alpha/AlphaInstrInfo.td	Thu Mar 31 15:24:05 2005
@@ -30,6 +30,8 @@
 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
 //*****************


Index: llvm/lib/Target/Alpha/AlphaISelPattern.cpp
diff -u llvm/lib/Target/Alpha/AlphaISelPattern.cpp:1.70 llvm/lib/Target/Alpha/AlphaISelPattern.cpp:1.71
--- llvm/lib/Target/Alpha/AlphaISelPattern.cpp:1.70	Wed Mar 30 12:22:52 2005
+++ llvm/lib/Target/Alpha/AlphaISelPattern.cpp	Thu Mar 31 15:24:05 2005
@@ -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 @@
       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!");
 }






More information about the llvm-commits mailing list