mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-18 14:31:27 +00:00
Point people to ConstantExpr and ConstantFolding,
in case they get the wrong idea. Fit in 80 columns. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54676 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
721e59cfb2
commit
20df07ba22
@ -7,8 +7,10 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// This file defines the ConstantFolder class, which provides a set of methods
|
// This file defines the ConstantFolder class, a helper for IRBuilder.
|
||||||
// for creating constants, with minimal folding.
|
// It provides IRBuilder with a set of methods for creating constants
|
||||||
|
// with minimal folding. For general constant creation and folding,
|
||||||
|
// use ConstantExpr and the routines in llvm/Analysis/ConstantFolding.h.
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -7,9 +7,10 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// This file defines the TargetFolder class, which provides a set of methods
|
// This file defines the TargetFolder class, a helper for IRBuilder.
|
||||||
// for creating constants, with target dependent folding.
|
// It provides IRBuilder with a set of methods for creating constants with
|
||||||
//
|
// target dependent folding. For general constant creation and folding,
|
||||||
|
// use ConstantExpr and the routines in llvm/Analysis/ConstantFolding.h.
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
@ -153,7 +154,8 @@ public:
|
|||||||
// Compare Instructions
|
// Compare Instructions
|
||||||
//===--------------------------------------------------------------------===//
|
//===--------------------------------------------------------------------===//
|
||||||
|
|
||||||
Constant *CreateCompare(CmpInst::Predicate P, Constant *LHS, Constant *RHS) const {
|
Constant *CreateCompare(CmpInst::Predicate P, Constant *LHS,
|
||||||
|
Constant *RHS) const {
|
||||||
return Fold(ConstantExpr::getCompare(P, LHS, RHS));
|
return Fold(ConstantExpr::getCompare(P, LHS, RHS));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -169,11 +171,13 @@ public:
|
|||||||
return Fold(ConstantExpr::getExtractElement(Vec, Idx));
|
return Fold(ConstantExpr::getExtractElement(Vec, Idx));
|
||||||
}
|
}
|
||||||
|
|
||||||
Constant *CreateInsertElement(Constant *Vec, Constant *NewElt, Constant *Idx)const {
|
Constant *CreateInsertElement(Constant *Vec, Constant *NewElt,
|
||||||
|
Constant *Idx) const {
|
||||||
return Fold(ConstantExpr::getInsertElement(Vec, NewElt, Idx));
|
return Fold(ConstantExpr::getInsertElement(Vec, NewElt, Idx));
|
||||||
}
|
}
|
||||||
|
|
||||||
Constant *CreateShuffleVector(Constant *V1, Constant *V2, Constant *Mask) const {
|
Constant *CreateShuffleVector(Constant *V1, Constant *V2,
|
||||||
|
Constant *Mask) const {
|
||||||
return Fold(ConstantExpr::getShuffleVector(V1, V2, Mask));
|
return Fold(ConstantExpr::getShuffleVector(V1, V2, Mask));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user