mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-02 07:17:36 +00:00
[PBQP] Replace PBQPBuilder with composable constraints (PBQPRAConstraint).
This patch removes the PBQPBuilder class and its subclasses and replaces them with a composable constraints class: PBQPRAConstraint. This allows constraints that are only required for optimisation (e.g. coalescing, soft pairing) to be mixed and matched. This patch also introduces support for target writers to supply custom constraints for their targets by overriding a TargetSubtargetInfo method: std::unique_ptr<PBQPRAConstraints> getCustomPBQPConstraints() const; This patch should have no effect on allocations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219421 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#ifndef LLVM_TARGET_TARGETSUBTARGETINFO_H
|
||||
#define LLVM_TARGET_TARGETSUBTARGETINFO_H
|
||||
|
||||
#include "llvm/CodeGen/PBQPRAConstraint.h"
|
||||
#include "llvm/MC/MCSubtargetInfo.h"
|
||||
#include "llvm/Support/CodeGen.h"
|
||||
|
||||
@@ -160,6 +161,13 @@ public:
|
||||
|
||||
/// \brief Enable the use of the early if conversion pass.
|
||||
virtual bool enableEarlyIfConversion() const { return false; }
|
||||
|
||||
/// \brief Return PBQPConstraint(s) for the target.
|
||||
///
|
||||
/// Override to provide custom PBQP constraints.
|
||||
virtual std::unique_ptr<PBQPRAConstraint> getCustomPBQPConstraints() const {
|
||||
return nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
} // End llvm namespace
|
||||
|
||||
Reference in New Issue
Block a user