aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2008-08-12 09:43:15 +0000
committerDuncan Sands <baldrick@free.fr>2008-08-12 09:43:15 +0000
commita21e4d6fe6de397866fc58409a9296c20f69135c (patch)
treecf32658ef00c053902d9822b458d842645ac0e08
parent7bd00bda05cf2d6a1541fa3ba859c9b134f857f2 (diff)
downloadllvm-a21e4d6fe6de397866fc58409a9296c20f69135c.zip
llvm-a21e4d6fe6de397866fc58409a9296c20f69135c.tar.gz
llvm-a21e4d6fe6de397866fc58409a9296c20f69135c.tar.bz2
Point people to ConstantExpr and ConstantFolding,
in case they get the wrong idea. Fit in 80 columns. llvm-svn: 54676
-rw-r--r--llvm/include/llvm/Support/ConstantFolder.h6
-rw-r--r--llvm/include/llvm/Support/TargetFolder.h16
2 files changed, 14 insertions, 8 deletions
diff --git a/llvm/include/llvm/Support/ConstantFolder.h b/llvm/include/llvm/Support/ConstantFolder.h
index 8c36e8b..1d693ee 100644
--- a/llvm/include/llvm/Support/ConstantFolder.h
+++ b/llvm/include/llvm/Support/ConstantFolder.h
@@ -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.
//
//===----------------------------------------------------------------------===//
diff --git a/llvm/include/llvm/Support/TargetFolder.h b/llvm/include/llvm/Support/TargetFolder.h
index a80fb6f..fc0e9c4 100644
--- a/llvm/include/llvm/Support/TargetFolder.h
+++ b/llvm/include/llvm/Support/TargetFolder.h
@@ -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 @@ public:
// 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 @@ public:
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));
}