[llvm] 6896d55 - [VNCoercion] Use IRBuilderBase; NFC

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 4 03:45:03 PDT 2020


Author: Nikita Popov
Date: 2020-04-04T12:44:50+02:00
New Revision: 6896d559f3ce5b273dc6d228c9653f31072bf9cc

URL: https://github.com/llvm/llvm-project/commit/6896d559f3ce5b273dc6d228c9653f31072bf9cc
DIFF: https://github.com/llvm/llvm-project/commit/6896d559f3ce5b273dc6d228c9653f31072bf9cc.diff

LOG: [VNCoercion] Use IRBuilderBase; NFC

And remove include from header.

Added: 
    

Modified: 
    llvm/include/llvm/Transforms/Utils/VNCoercion.h
    llvm/lib/Transforms/Utils/VNCoercion.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Transforms/Utils/VNCoercion.h b/llvm/include/llvm/Transforms/Utils/VNCoercion.h
index f67b9ed0afdd..35595e7d560c 100644
--- a/llvm/include/llvm/Transforms/Utils/VNCoercion.h
+++ b/llvm/include/llvm/Transforms/Utils/VNCoercion.h
@@ -20,14 +20,15 @@
 
 #ifndef LLVM_TRANSFORMS_UTILS_VNCOERCION_H
 #define LLVM_TRANSFORMS_UTILS_VNCOERCION_H
-#include "llvm/IR/IRBuilder.h"
 
 namespace llvm {
+class Constant;
 class Function;
 class StoreInst;
 class LoadInst;
 class MemIntrinsic;
 class Instruction;
+class IRBuilderBase;
 class Value;
 class Type;
 class DataLayout;
@@ -44,7 +45,7 @@ bool canCoerceMustAliasedValueToLoad(Value *StoredVal, Type *LoadTy,
 ///
 /// If we can't do it, return null.
 Value *coerceAvailableValueToLoadType(Value *StoredVal, Type *LoadedTy,
-                                      IRBuilder<> &IRB, const DataLayout &DL);
+                                      IRBuilderBase &IRB, const DataLayout &DL);
 
 /// This function determines whether a value for the pointer LoadPtr can be
 /// extracted from the store at DepSI.

diff  --git a/llvm/lib/Transforms/Utils/VNCoercion.cpp b/llvm/lib/Transforms/Utils/VNCoercion.cpp
index 717b2214b3df..53f8e3068806 100644
--- a/llvm/lib/Transforms/Utils/VNCoercion.cpp
+++ b/llvm/lib/Transforms/Utils/VNCoercion.cpp
@@ -144,7 +144,8 @@ static T *coerceAvailableValueToLoadTypeHelper(T *StoredVal, Type *LoadedTy,
 ///
 /// If we can't do it, return null.
 Value *coerceAvailableValueToLoadType(Value *StoredVal, Type *LoadedTy,
-                                      IRBuilder<> &IRB, const DataLayout &DL) {
+                                      IRBuilderBase &IRB,
+                                      const DataLayout &DL) {
   return coerceAvailableValueToLoadTypeHelper(StoredVal, LoadedTy, IRB, DL);
 }
 


        


More information about the llvm-commits mailing list