diff options
author | Sanjiv Gupta <sanjiv.gupta@microchip.com> | 2009-12-22 14:25:37 +0000 |
---|---|---|
committer | Sanjiv Gupta <sanjiv.gupta@microchip.com> | 2009-12-22 14:25:37 +0000 |
commit | 66500208a557f082453d138bf7c30e0c9edfa0a5 (patch) | |
tree | f53bf63389a8d674d5dab7fe217a1d37d287e25b /lib/Target/PIC16/PIC16ISelLowering.h | |
parent | a1aa8bba77c5cf2ba164846764ece7d2bd32778a (diff) | |
download | llvm-66500208a557f082453d138bf7c30e0c9edfa0a5.tar.gz llvm-66500208a557f082453d138bf7c30e0c9edfa0a5.tar.bz2 llvm-66500208a557f082453d138bf7c30e0c9edfa0a5.tar.xz |
While converting one of the operands to a memory operand, we need to check if it is Legal and does not result into a cyclic dep.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91904 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PIC16/PIC16ISelLowering.h')
-rw-r--r-- | lib/Target/PIC16/PIC16ISelLowering.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Target/PIC16/PIC16ISelLowering.h b/lib/Target/PIC16/PIC16ISelLowering.h index 286ed2411e..2949465dbc 100644 --- a/lib/Target/PIC16/PIC16ISelLowering.h +++ b/lib/Target/PIC16/PIC16ISelLowering.h @@ -18,6 +18,7 @@ #include "PIC16.h" #include "PIC16Subtarget.h" #include "llvm/CodeGen/SelectionDAG.h" +#include "llvm/CodeGen/SelectionDAGISel.h" #include "llvm/Target/TargetLowering.h" #include <map> @@ -216,7 +217,9 @@ namespace llvm { // This function checks if we need to put an operand of an operation on // stack and generate a load or not. - bool NeedToConvertToMemOp(SDValue Op, unsigned &MemOp); + // DAG parameter is required to access DAG information during + // analysis. + bool NeedToConvertToMemOp(SDValue Op, unsigned &MemOp, SelectionDAG &DAG); /// Subtarget - Keep a pointer to the PIC16Subtarget around so that we can /// make the right decision when generating code for different targets. @@ -239,6 +242,11 @@ namespace llvm { // Check if operation has a direct load operand. inline bool isDirectLoad(const SDValue Op); + public: + // Keep a pointer to SelectionDAGISel to access its public + // interface (It is required during legalization) + SelectionDAGISel *ISel; + private: // The frameindexes generated for spill/reload are stack based. // This maps maintain zero based indexes for these FIs. |