Skip to content

Commit

Permalink
[LLVM16] Add --typed-pointer flag which will force typed pointers fo…
Browse files Browse the repository at this point in the history
…r LLVM 16 Typed-to-Opaque pointer transition v2

Porting IGC code to LLVM16

* Add --typed-pointer flag which will force typed pointers for LLVM 16 Typed-to-Opaque pointer transition
The purpose of it is to allow "typed" LITs to work fine on LLVM 16
  • Loading branch information
bokrzesi authored and igcbot committed Feb 21, 2025
1 parent 36a58d7 commit 50cfccf
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
;============================ end_copyright_notice =============================

; REQUIRES: regkeys
; RUN: igc_opt --regkey=EnableGEPLSRUnknownConstantStep=0 --regkey=EnableGEPLSRMulExpr=1 -debugify --igc-gep-loop-strength-reduction -check-debugify -S < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-MUL-ENABLED
; RUN: igc_opt --regkey=EnableGEPLSRUnknownConstantStep=0 --regkey=EnableGEPLSRMulExpr=0 -debugify --igc-gep-loop-strength-reduction -check-debugify -S < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-MUL-DISABLED
; RUN: igc_opt --typed-pointers --regkey=EnableGEPLSRUnknownConstantStep=0 --regkey=EnableGEPLSRMulExpr=1 -debugify --igc-gep-loop-strength-reduction -check-debugify -S < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-MUL-ENABLED
; RUN: igc_opt --typed-pointers --regkey=EnableGEPLSRUnknownConstantStep=0 --regkey=EnableGEPLSRMulExpr=0 -debugify --igc-gep-loop-strength-reduction -check-debugify -S < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-MUL-DISABLED

; Reduced index is expressed with SCEVMulExpr.

Expand Down
2 changes: 1 addition & 1 deletion IGC/Compiler/tests/PrivateMemoryResolution/opt-enabled.ll
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
; UNSUPPORTED: system-windows
;
; REQUIRES: regkeys
; RUN: igc_opt --regkey EnablePrivMemNewSOATranspose=0 --igc-private-mem-resolution -S %s | FileCheck %s
; RUN: igc_opt --typed-pointers --regkey EnablePrivMemNewSOATranspose=0 --igc-private-mem-resolution -S %s | FileCheck %s
; ------------------------------------------------
; PrivateMemoryResolution
; ------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
;
;============================ end_copyright_notice =============================

; RUN: igc_opt -igc-programscope-constant-analysis -igc-serialize-metadata \
; RUN: igc_opt --typed-pointers -igc-programscope-constant-analysis -igc-serialize-metadata \
; RUN: -S < %s | FileCheck %s
; ------------------------------------------------
; ProgramScopeConstantAnalysis
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
;
;============================ end_copyright_notice =============================

; RUN: igc_opt -igc-programscope-constant-analysis -igc-serialize-metadata \
; RUN: igc_opt --typed-pointers -igc-programscope-constant-analysis -igc-serialize-metadata \
; RUN: -S < %s | FileCheck %s
; ------------------------------------------------
; ProgramScopeConstantAnalysis
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; UNSUPPORTED: system-windows
; REQUIRES: regkeys
; RUN: igc_opt --igc-pressure-printer -S --disable-output --regkey=RegPressureVerbocity=1 < %s 2>&1 | FileCheck %s
; RUN: igc_opt --typed-pointers --igc-pressure-printer -S --disable-output --regkey=RegPressureVerbocity=1 < %s 2>&1 | FileCheck %s

define spir_func void @baz() nounwind {
entry:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; UNSUPPORTED: system-windows
; REQUIRES: regkeys
; RUN: igc_opt --igc-pressure-printer -S --disable-output --regkey=RegPressureVerbocity=5 < %s 2>&1 | FileCheck %s
; RUN: igc_opt --typed-pointers --igc-pressure-printer -S --disable-output --regkey=RegPressureVerbocity=5 < %s 2>&1 | FileCheck %s

define void @main() {
entry:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

; REQUIRES: regkeys
; UNSUPPORTED: system-windows
; RUN: igc_opt %s -S -o - -igc-clone-address-arithmetic --regkey=RematChainLimit=10 --regkey=RematFlowThreshold=100 --regkey=RematRPELimit=0 --dce | FileCheck %s
; RUN: igc_opt --typed-pointers %s -S -o - -igc-clone-address-arithmetic --regkey=RematChainLimit=10 --regkey=RematFlowThreshold=100 --regkey=RematRPELimit=0 --dce | FileCheck %s

define spir_kernel void @main(double addrspace(1)* %base, i64 %offset, i64 %I, i64 %J) {
; CHECK: define spir_kernel void @main(double addrspace(1)* [[BASE:%.*]], i64 [[OFFSET:%.*]], i64 %I, i64 %J)
Expand Down

0 comments on commit 50cfccf

Please sign in to comment.