File tree Expand file tree Collapse file tree 1 file changed +0
-18
lines changed
IGC/Compiler/Optimizer/OpenCLPasses/GenericAddressResolution Expand file tree Collapse file tree 1 file changed +0
-18
lines changed Original file line number Diff line number Diff line change @@ -147,8 +147,6 @@ bool GASResolving::resolveMemoryFromHost(Function& F) const {
147147
148148 // collect load candidates and in parallel check for unsafe instructions
149149 // visitor may be a more beautiful way to do this
150- bool HasASCast = false ; // if there exists addrspace cast from non global/generic space
151- bool HasPtoi = false ; // if there exists ptrtoint with global/generic space
152150 for (BasicBlock& B : F) {
153151 for (Instruction& I : B) {
154152 if (auto LI = dyn_cast<LoadInst>(&I)) {
@@ -173,22 +171,8 @@ bool GASResolving::resolveMemoryFromHost(Function& F) const {
173171 return false ;
174172 }
175173 else if (auto PI = dyn_cast<PtrToIntInst>(&I)) {
176- // if we have a ptrtoint we need to check data flow which we don't want to
177- if (PI->getPointerAddressSpace () != ADDRESS_SPACE_GLOBAL &&
178- PI->getPointerAddressSpace () != ADDRESS_SPACE_GENERIC)
179- return false ;
180- else {
181- HasPtoi = true ;
182- }
183-
184174 return false ;
185175 }
186- else if (auto AI = dyn_cast<AddrSpaceCastInst>(&I)) {
187- if (AI->getSrcAddressSpace () != ADDRESS_SPACE_GLOBAL &&
188- AI->getSrcAddressSpace () != ADDRESS_SPACE_GENERIC) {
189- HasASCast = true ;
190- }
191- }
192176 else if (auto SI = dyn_cast<StoreInst>(&I)) {
193177 Value* V = SI->getValueOperand ();
194178 if (isa<PointerType>(V->getType ())) {
@@ -202,8 +186,6 @@ bool GASResolving::resolveMemoryFromHost(Function& F) const {
202186 }
203187 }
204188 }
205- if (HasASCast && HasPtoi)
206- return false ;
207189
208190 if (Loads.empty ())
209191 return false ;
You can’t perform that action at this time.
0 commit comments