[llvm-commits] [llvm] r54676 - in /llvm/trunk/include/llvm/Support: ConstantFolder.h TargetFolder.h
Duncan Sands
baldrick at free.fr
Tue Aug 12 02:43:17 PDT 2008
Author: baldrick
Date: Tue Aug 12 04:43:15 2008
New Revision: 54676
URL: http://llvm.org/viewvc/llvm-project?rev=54676&view=rev
Log:
Point people to ConstantExpr and ConstantFolding,
in case they get the wrong idea. Fit in 80 columns.
Modified:
llvm/trunk/include/llvm/Support/ConstantFolder.h
llvm/trunk/include/llvm/Support/TargetFolder.h
Modified: llvm/trunk/include/llvm/Support/ConstantFolder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/ConstantFolder.h?rev=54676&r1=54675&r2=54676&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/ConstantFolder.h (original)
+++ llvm/trunk/include/llvm/Support/ConstantFolder.h Tue Aug 12 04:43:15 2008
@@ -7,8 +7,10 @@
//
//===----------------------------------------------------------------------===//
//
-// This file defines the ConstantFolder class, which provides a set of methods
-// for creating constants, with minimal folding.
+// This file defines the ConstantFolder class, a helper for IRBuilder.
+// 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.
//
//===----------------------------------------------------------------------===//
Modified: llvm/trunk/include/llvm/Support/TargetFolder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/TargetFolder.h?rev=54676&r1=54675&r2=54676&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/TargetFolder.h (original)
+++ llvm/trunk/include/llvm/Support/TargetFolder.h Tue Aug 12 04:43:15 2008
@@ -7,9 +7,10 @@
//
//===----------------------------------------------------------------------===//
//
-// This file defines the TargetFolder class, which provides a set of methods
-// for creating constants, with target dependent folding.
-//
+// This file defines the TargetFolder class, a helper for IRBuilder.
+// 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 @@
// 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));
}
@@ -169,11 +171,13 @@
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));
}
- 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));
}
More information about the llvm-commits
mailing list