[llvm-commits] [vector_llvm] CVS: llvm/lib/Transforms/Utils/Local.cpp ValueMapper.cpp
Robert Bocchino
bocchino at cs.uiuc.edu
Tue Oct 18 12:22:23 PDT 2005
Changes in directory llvm/lib/Transforms/Utils:
Local.cpp updated: 1.44 -> 1.44.2.1
ValueMapper.cpp updated: 1.20 -> 1.20.4.1
---
Log message:
Initial commit of Vector LLVM.
---
Diffs of the changes: (+4 -1)
Local.cpp | 1 +
ValueMapper.cpp | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
Index: llvm/lib/Transforms/Utils/Local.cpp
diff -u llvm/lib/Transforms/Utils/Local.cpp:1.44 llvm/lib/Transforms/Utils/Local.cpp:1.44.2.1
--- llvm/lib/Transforms/Utils/Local.cpp:1.44 Tue Sep 27 20:34:32 2005
+++ llvm/lib/Transforms/Utils/Local.cpp Tue Oct 18 14:21:57 2005
@@ -21,6 +21,7 @@
#include "llvm/Support/MathExtras.h"
#include <cerrno>
#include <cmath>
+
using namespace llvm;
//===----------------------------------------------------------------------===//
Index: llvm/lib/Transforms/Utils/ValueMapper.cpp
diff -u llvm/lib/Transforms/Utils/ValueMapper.cpp:1.20 llvm/lib/Transforms/Utils/ValueMapper.cpp:1.20.4.1
--- llvm/lib/Transforms/Utils/ValueMapper.cpp:1.20 Thu Apr 21 18:45:34 2005
+++ llvm/lib/Transforms/Utils/ValueMapper.cpp Tue Oct 18 14:21:57 2005
@@ -16,10 +16,12 @@
#include "llvm/Constants.h"
#include "llvm/GlobalValue.h"
#include "llvm/Instruction.h"
+#include "llvm/DerivedTypes.h"
#include <iostream>
using namespace llvm;
+
Value *llvm::MapValue(const Value *V, std::map<const Value*, Value*> &VM) {
Value *&VMSlot = VM[V];
if (VMSlot) return VMSlot; // Does it exist in the map yet?
@@ -32,7 +34,7 @@
if (Constant *C = const_cast<Constant*>(dyn_cast<Constant>(V))) {
if (isa<ConstantIntegral>(C) || isa<ConstantFP>(C) ||
isa<ConstantPointerNull>(C) || isa<ConstantAggregateZero>(C) ||
- isa<UndefValue>(C))
+ isa<UndefValue>(C) || isa<VectorType>(C->getType()))
return VMSlot = C; // Primitive constants map directly
else if (ConstantArray *CA = dyn_cast<ConstantArray>(C)) {
for (unsigned i = 0, e = CA->getNumOperands(); i != e; ++i) {
More information about the llvm-commits
mailing list