1 //===-- AArch64PBQPRegAlloc.h - AArch64 specific PBQP constraints -------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_LIB_TARGET_AARCH64_AARCH64PBQPREGALOC_H
11 #define LLVM_LIB_TARGET_AARCH64_AARCH64PBQPREGALOC_H
13 #include "llvm/ADT/SetVector.h"
14 #include "llvm/CodeGen/PBQPRAConstraint.h"
18 /// Add the accumulator chaining constraint to a PBQP graph
19 class A57ChainingConstraint : public PBQPRAConstraint {
21 // Add A57 specific constraints to the PBQP graph.
22 void apply(PBQPRAGraph &G) override;
25 SmallSetVector<unsigned, 32> Chains;
26 const TargetRegisterInfo *TRI;
28 // Add the accumulator chaining constraint, inside the chain, i.e. so that
29 // parity(Rd) == parity(Ra).
30 // \return true if a constraint was added
31 bool addIntraChainConstraint(PBQPRAGraph &G, unsigned Rd, unsigned Ra);
33 // Add constraints between existing chains
34 void addInterChainConstraint(PBQPRAGraph &G, unsigned Rd, unsigned Ra);
38 #endif // LLVM_LIB_TARGET_AARCH64_AARCH64PBQPREGALOC_H