summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/LICM.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-10-14 17:29:00 +0000
committerDevang Patel <dpatel@apple.com>2009-10-14 17:29:00 +0000
commit92f86199236e914aad6d98213c860478b88e98d4 (patch)
treeb428ced9d89d351cbde75884d6b9cab7e4145c22 /llvm/lib/Transforms/Scalar/LICM.cpp
parent12b47997870d80bc416601dc1c1affeebdbd833f (diff)
downloadbcm5719-llvm-92f86199236e914aad6d98213c860478b88e98d4.tar.gz
bcm5719-llvm-92f86199236e914aad6d98213c860478b88e98d4.zip
Use isVoidTy()
llvm-svn: 84118
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LICM.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/LICM.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp
index 1574115aa6c..756fbf3e7bd 100644
--- a/llvm/lib/Transforms/Scalar/LICM.cpp
+++ b/llvm/lib/Transforms/Scalar/LICM.cpp
@@ -489,7 +489,7 @@ void LICM::sink(Instruction &I) {
// If I has users in unreachable blocks, eliminate.
// If I is not void type then replaceAllUsesWith undef.
// This allows ValueHandlers and custom metadata to adjust itself.
- if (I.getType() != Type::getVoidTy(I.getContext()))
+ if (!I.getType()->isVoidTy())
I.replaceAllUsesWith(UndefValue::get(I.getType()));
I.eraseFromParent();
} else {
@@ -505,7 +505,7 @@ void LICM::sink(Instruction &I) {
// If I has users in unreachable blocks, eliminate.
// If I is not void type then replaceAllUsesWith undef.
// This allows ValueHandlers and custom metadata to adjust itself.
- if (I.getType() != Type::getVoidTy(I.getContext()))
+ if (!I.getType()->isVoidTy())
I.replaceAllUsesWith(UndefValue::get(I.getType()));
I.eraseFromParent();
} else {
@@ -516,7 +516,7 @@ void LICM::sink(Instruction &I) {
// Firstly, we create a stack object to hold the value...
AllocaInst *AI = 0;
- if (I.getType() != Type::getVoidTy(I.getContext())) {
+ if (!I.getType()->isVoidTy()) {
AI = new AllocaInst(I.getType(), 0, I.getName(),
I.getParent()->getParent()->getEntryBlock().begin());
CurAST->add(AI);
OpenPOWER on IntegriCloud