2006-05-14 22:18:28 +00:00
|
|
|
//===- ARMRegisterInfo.h - ARM Register Information Impl --------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
2007-12-29 20:36:04 +00:00
|
|
|
// This file is distributed under the University of Illinois Open Source
|
2006-05-14 22:18:28 +00:00
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
2008-02-10 18:45:23 +00:00
|
|
|
// This file contains the ARM implementation of the TargetRegisterInfo class.
|
2006-05-14 22:18:28 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef ARMREGISTERINFO_H
|
|
|
|
#define ARMREGISTERINFO_H
|
|
|
|
|
2009-06-27 12:16:40 +00:00
|
|
|
#include "ARM.h"
|
2008-02-10 18:45:23 +00:00
|
|
|
#include "llvm/Target/TargetRegisterInfo.h"
|
2009-07-08 17:28:55 +00:00
|
|
|
#include "ARMBaseRegisterInfo.h"
|
2006-05-14 22:18:28 +00:00
|
|
|
|
|
|
|
namespace llvm {
|
2007-01-19 07:51:42 +00:00
|
|
|
class ARMSubtarget;
|
2009-07-08 18:31:39 +00:00
|
|
|
class ARMBaseInstrInfo;
|
2007-01-19 07:51:42 +00:00
|
|
|
class Type;
|
2006-05-14 22:18:28 +00:00
|
|
|
|
2009-10-06 22:01:59 +00:00
|
|
|
namespace ARM {
|
|
|
|
/// SubregIndex - The index of various subregister classes. Note that
|
|
|
|
/// these indices must be kept in sync with the class indices in the
|
|
|
|
/// ARMRegisterInfo.td file.
|
|
|
|
enum SubregIndex {
|
2010-05-14 02:13:41 +00:00
|
|
|
SSUBREG_0 = 1, SSUBREG_1 = 2, SSUBREG_2 = 3, SSUBREG_3 = 4,
|
|
|
|
DSUBREG_0 = 5, DSUBREG_1 = 6, DSUBREG_2 = 7, DSUBREG_3 = 8,
|
|
|
|
DSUBREG_4 = 9, DSUBREG_5 = 10, DSUBREG_6 = 11, DSUBREG_7 = 12,
|
Teach two-address pass to do some coalescing while eliminating REG_SEQUENCE
instructions.
e.g.
%reg1026<def> = VLDMQ %reg1025<kill>, 260, pred:14, pred:%reg0
%reg1027<def> = EXTRACT_SUBREG %reg1026, 6
%reg1028<def> = EXTRACT_SUBREG %reg1026<kill>, 5
...
%reg1029<def> = REG_SEQUENCE %reg1028<kill>, 5, %reg1027<kill>, 6, %reg1028, 7, %reg1027, 8, %reg1028, 9, %reg1027, 10, %reg1030<kill>, 11, %reg1032<kill>, 12
After REG_SEQUENCE is eliminated, we are left with:
%reg1026<def> = VLDMQ %reg1025<kill>, 260, pred:14, pred:%reg0
%reg1029:6<def> = EXTRACT_SUBREG %reg1026, 6
%reg1029:5<def> = EXTRACT_SUBREG %reg1026<kill>, 5
The regular coalescer will not be able to coalesce reg1026 and reg1029 because it doesn't
know how to combine sub-register indices 5 and 6. Now 2-address pass will consult the
target whether sub-registers 5 and 6 of reg1026 can be combined to into a larger
sub-register (or combined to be reg1026 itself as is the case here). If it is possible,
it will be able to replace references of reg1026 with reg1029 + the larger sub-register
index.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103835 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-14 23:21:14 +00:00
|
|
|
QSUBREG_0 = 13, QSUBREG_1 = 14, QSUBREG_2 = 15, QSUBREG_3 = 16,
|
|
|
|
QQSUBREG_0= 17, QQSUBREG_1= 18
|
2009-10-06 22:01:59 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2009-06-27 12:16:40 +00:00
|
|
|
struct ARMRegisterInfo : public ARMBaseRegisterInfo {
|
|
|
|
public:
|
2009-07-08 18:31:39 +00:00
|
|
|
ARMRegisterInfo(const ARMBaseInstrInfo &tii, const ARMSubtarget &STI);
|
2006-05-14 22:18:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|