@@ -18,6 +18,7 @@ SPDX-License-Identifier: MIT
18
18
#include " common/LLVMWarningsPop.hpp"
19
19
#include " Probe/Assertion.h"
20
20
#include " visa/include/visa_igc_common_header.h"
21
+ #include " llvmWrapper/IR/Function.h"
21
22
22
23
typedef union _gfxResourceAddressSpace
23
24
{
@@ -2831,7 +2832,7 @@ inline SampleD_DC_FromCubeParams LLVM3DBuilder<preserveNames, T, Inserter>::Prep
2831
2832
}
2832
2833
this ->CreateCondBr (int1_tgesr, block_major_t , block_not_t );
2833
2834
this ->SetInsertPoint (block_major_t );
2834
- parentFunc-> getBasicBlockList (). push_back ( block_major_t );
2835
+ IGCLLVM::pushBackBasicBlock (parentFunc, block_major_t );
2835
2836
2836
2837
// Normalize coordinates and gradients.
2837
2838
llvm::Value* float_tnorm_r = this ->CreateFDiv (float_src_r, float_abs_t , VALUE_NAME (" tnorm_r" ));
@@ -2847,7 +2848,7 @@ inline SampleD_DC_FromCubeParams LLVM3DBuilder<preserveNames, T, Inserter>::Prep
2847
2848
llvm::Value* int1_cmpx_t = this ->CreateFCmp (llvm::FCmpInst::FCMP_OGE, float_src_t , zero, VALUE_NAME (" cmpx_t" ));
2848
2849
this ->CreateCondBr (int1_cmpx_t , block_zp, block_zm);
2849
2850
this ->SetInsertPoint (block_zp);
2850
- parentFunc-> getBasicBlockList (). push_back ( block_zp);
2851
+ IGCLLVM::pushBackBasicBlock (parentFunc, block_zp);
2851
2852
2852
2853
// Face +Z,
2853
2854
// major = neg T
@@ -2882,7 +2883,7 @@ inline SampleD_DC_FromCubeParams LLVM3DBuilder<preserveNames, T, Inserter>::Prep
2882
2883
2883
2884
this ->CreateBr (block_final);
2884
2885
this ->SetInsertPoint (block_zm);
2885
- parentFunc-> getBasicBlockList (). push_back ( block_zm);
2886
+ IGCLLVM::pushBackBasicBlock (parentFunc, block_zm);
2886
2887
2887
2888
// Face -Z,
2888
2889
// major = T
@@ -2915,15 +2916,15 @@ inline SampleD_DC_FromCubeParams LLVM3DBuilder<preserveNames, T, Inserter>::Prep
2915
2916
2916
2917
this ->CreateBr (block_final);
2917
2918
this ->SetInsertPoint (block_not_t );
2918
- parentFunc-> getBasicBlockList (). push_back ( block_not_t );
2919
+ IGCLLVM::pushBackBasicBlock (parentFunc, block_not_t );
2919
2920
2920
2921
// Choose major S or R.
2921
2922
llvm::Value* int1_cmp_sger = this ->CreateFCmp (llvm::FCmpInst::FCMP_OGE, float_abs_s, float_abs_r, VALUE_NAME (" cmp_sger" ));
2922
2923
2923
2924
// Major coordinate is S, faces could be +Y or -Y
2924
2925
this ->CreateCondBr (int1_cmp_sger, block_major_s, block_major_r);
2925
2926
this ->SetInsertPoint (block_major_s);
2926
- parentFunc-> getBasicBlockList (). push_back ( block_major_s);
2927
+ IGCLLVM::pushBackBasicBlock (parentFunc, block_major_s);
2927
2928
2928
2929
// Normalize coordinates and gradients.
2929
2930
llvm::Value* float_snorm_r = this ->CreateFDiv (float_src_r, float_abs_s, VALUE_NAME (" snorm_r" ));
@@ -2939,7 +2940,7 @@ inline SampleD_DC_FromCubeParams LLVM3DBuilder<preserveNames, T, Inserter>::Prep
2939
2940
llvm::Value* int1_cmpx_s = this ->CreateFCmp (llvm::FCmpInst::FCMP_OGE, float_src_s, zero, VALUE_NAME (" cmpx_s" ));
2940
2941
this ->CreateCondBr (int1_cmpx_s, block_yp, block_ym);
2941
2942
this ->SetInsertPoint (block_yp);
2942
- parentFunc-> getBasicBlockList (). push_back ( block_yp);
2943
+ IGCLLVM::pushBackBasicBlock (parentFunc, block_yp);
2943
2944
2944
2945
// Face +Y,
2945
2946
// major = neg S
@@ -2974,7 +2975,7 @@ inline SampleD_DC_FromCubeParams LLVM3DBuilder<preserveNames, T, Inserter>::Prep
2974
2975
2975
2976
this ->CreateBr (block_final);
2976
2977
this ->SetInsertPoint (block_ym);
2977
- parentFunc-> getBasicBlockList (). push_back ( block_ym);
2978
+ IGCLLVM::pushBackBasicBlock (parentFunc, block_ym);
2978
2979
2979
2980
// Face -Y,
2980
2981
// major = S
@@ -3007,7 +3008,7 @@ inline SampleD_DC_FromCubeParams LLVM3DBuilder<preserveNames, T, Inserter>::Prep
3007
3008
3008
3009
this ->CreateBr (block_final);
3009
3010
this ->SetInsertPoint (block_major_r);
3010
- parentFunc-> getBasicBlockList (). push_back ( block_major_r);
3011
+ IGCLLVM::pushBackBasicBlock (parentFunc, block_major_r);
3011
3012
3012
3013
// Major coordinate is R, faces could be +X or -X
3013
3014
@@ -3025,7 +3026,7 @@ inline SampleD_DC_FromCubeParams LLVM3DBuilder<preserveNames, T, Inserter>::Prep
3025
3026
llvm::Value* int1_cmpx_r = this ->CreateFCmp (llvm::FCmpInst::FCMP_OGE, float_src_r, zero, VALUE_NAME (" cmpx_r" ));
3026
3027
this ->CreateCondBr (int1_cmpx_r, block_xp, block_xm);
3027
3028
this ->SetInsertPoint (block_xp);
3028
- parentFunc-> getBasicBlockList (). push_back ( block_xp);
3029
+ IGCLLVM::pushBackBasicBlock (parentFunc, block_xp);
3029
3030
3030
3031
// Face +X,
3031
3032
// major = neg R
@@ -3058,7 +3059,7 @@ inline SampleD_DC_FromCubeParams LLVM3DBuilder<preserveNames, T, Inserter>::Prep
3058
3059
3059
3060
this ->CreateBr (block_final);
3060
3061
this ->SetInsertPoint (block_xm);
3061
- parentFunc-> getBasicBlockList (). push_back ( block_xm);
3062
+ IGCLLVM::pushBackBasicBlock (parentFunc, block_xm);
3062
3063
3063
3064
// Face -X,
3064
3065
// major = R
@@ -3091,7 +3092,7 @@ inline SampleD_DC_FromCubeParams LLVM3DBuilder<preserveNames, T, Inserter>::Prep
3091
3092
3092
3093
this ->CreateBr (block_final);
3093
3094
this ->SetInsertPoint (block_final);
3094
- parentFunc-> getBasicBlockList (). push_back ( block_final);
3095
+ IGCLLVM::pushBackBasicBlock (parentFunc, block_final);
3095
3096
3096
3097
llvm::PHINode* phi_u = this ->CreatePHI (coordType, 6 , VALUE_NAME (" phi_u" ));
3097
3098
phi_u->addIncoming (float_face_xp_u, block_xp);
0 commit comments