mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-19 02:25:01 +00:00
Refactor the AddrMode class out of TLI to its own header file.
This class is used by LSR and a number of places in the codegen. This is the first step in de-coupling LSR from TLI, and creating a new interface in between them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165455 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
41
include/llvm/AddressingMode.h
Normal file
41
include/llvm/AddressingMode.h
Normal file
@@ -0,0 +1,41 @@
|
||||
//===--------- llvm/AddressingMode.h - Addressing Mode -------*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
// This file contains addressing mode data structures which are shared
|
||||
// between LSR and a number of places in the codegen.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_ADDRESSING_MODE_H
|
||||
#define LLVM_ADDRESSING_MODE_H
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
namespace llvm {
|
||||
|
||||
class GlobalValue;
|
||||
|
||||
/// AddrMode - This represents an addressing mode of:
|
||||
/// BaseGV + BaseOffs + BaseReg + Scale*ScaleReg
|
||||
/// If BaseGV is null, there is no BaseGV.
|
||||
/// If BaseOffs is zero, there is no base offset.
|
||||
/// If HasBaseReg is false, there is no base register.
|
||||
/// If Scale is zero, there is no ScaleReg. Scale of 1 indicates a reg with
|
||||
/// no scale.
|
||||
///
|
||||
struct AddrMode {
|
||||
GlobalValue *BaseGV;
|
||||
int64_t BaseOffs;
|
||||
bool HasBaseReg;
|
||||
int64_t Scale;
|
||||
AddrMode() : BaseGV(0), BaseOffs(0), HasBaseReg(false), Scale(0) {}
|
||||
};
|
||||
|
||||
} // End llvm namespace
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user