mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-26 05:25:47 +00:00
IR: Split up Constant{Array,Vector}::get(), NFC
Introduce `getImpl()` that tries the simplification logic from `get()` and then gives up. This allows the logic to be reused elsewhere in a follow-up commit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215963 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -342,6 +342,10 @@ public:
|
||||
// ConstantArray accessors
|
||||
static Constant *get(ArrayType *T, ArrayRef<Constant*> V);
|
||||
|
||||
private:
|
||||
static Constant *getImpl(ArrayType *T, ArrayRef<Constant *> V);
|
||||
|
||||
public:
|
||||
/// Transparently provide more efficient getOperand methods.
|
||||
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Constant);
|
||||
|
||||
@@ -439,6 +443,10 @@ public:
|
||||
// ConstantVector accessors
|
||||
static Constant *get(ArrayRef<Constant*> V);
|
||||
|
||||
private:
|
||||
static Constant *getImpl(ArrayRef<Constant *> V);
|
||||
|
||||
public:
|
||||
/// getSplat - Return a ConstantVector with the specified constant in each
|
||||
/// element.
|
||||
static Constant *getSplat(unsigned NumElts, Constant *Elt);
|
||||
|
Reference in New Issue
Block a user