mirror of
				https://github.com/intel/intel-graphics-compiler.git
				synced 2025-11-04 08:21:06 +08:00 
			
		
		
		
	[Autobackout][FuncReg]Revert of change: 1c28c742da
				
					
				
			Fix build with LLVM 12 Removed TargetLibraryInfo.h include from AddressSpaceAliasAnalysis.cpp as this was causing treat-warning-as-error buildbreak, Added casts to fix warnings, Replaced ConstantPropagation and IPConstantPropagation passes with IPSCCP passes, reasoning here: https://lists.llvm.org/pipermail/llvm-dev/2020-July/143788.html Original pull-request: intel/intel-graphics-compiler#171 Signed-off-by: Zoltán Böszörményi zboszor@gmail.com Co-authored-by: Pawel Szymichowski pawel.szymichowski@intel.com Co-authored-by: Zoltán Böszörményi zboszor@pr.hu
This commit is contained in:
		
				
					committed by
					
						
						igcbot
					
				
			
			
				
	
			
			
			
						parent
						
							f7267a3557
						
					
				
				
					commit
					32944e60e9
				
			@ -28,7 +28,6 @@ IN THE SOFTWARE.
 | 
			
		||||
#include "Compiler/CodeGenPublic.h"
 | 
			
		||||
#include "common/LLVMWarningsPush.hpp"
 | 
			
		||||
#include <llvm/Support/Debug.h>
 | 
			
		||||
#include "llvmWrapper/IR/DerivedTypes.h"
 | 
			
		||||
#include "common/LLVMWarningsPop.hpp"
 | 
			
		||||
#include <algorithm>
 | 
			
		||||
#include "Probe/Assertion.h"
 | 
			
		||||
@ -41,13 +40,13 @@ namespace
 | 
			
		||||
    // If V is scalar, return 1.
 | 
			
		||||
    // if V is vector, return the number of elements.
 | 
			
		||||
    inline int getNumElts(Value* V) {
 | 
			
		||||
        IGCLLVM::FixedVectorType* VTy = dyn_cast<IGCLLVM::FixedVectorType>(V->getType());
 | 
			
		||||
        VectorType* VTy = dyn_cast<VectorType>(V->getType());
 | 
			
		||||
        return VTy ? (int)VTy->getNumElements() : 1;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    inline int getTypeSizeInBits(Type* Ty) {
 | 
			
		||||
        int scalarBits = Ty->getScalarSizeInBits();
 | 
			
		||||
        IGCLLVM::FixedVectorType* VTy = dyn_cast<IGCLLVM::FixedVectorType>(Ty);
 | 
			
		||||
        VectorType* VTy = dyn_cast<VectorType>(Ty);
 | 
			
		||||
        return scalarBits * (VTy ? (int)VTy->getNumElements() : 1);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user