Commit e1395ac
[Autobackout][FuncReg]Revert of change: e2d4d33
remove dead instructions with debug info enabled.
This change removes IGC backend pattern match dependency setting on arguments to debug instructions.
call void @llvm.dbg.value(metadata float %8, metadata !903, metadata !DIExpression()), !dbg !901 ; visa id: 20
This forces generation of instruction producing %8. However, if that instruction is not used, it will be generated in dead code.
For example,
%8 = load float, float addrspace(1)* %7, align 4, !dbg !902 ; visa id: 18
...
%simdShuffle = call float @llvm.genx.GenISA.WaveShuffleIndex.f32(float %8, i32 0, i32 0), !dbg !981 ; visa id: 23
...
call void @llvm.dbg.value(metadata float %simdShuffle, metadata !904, metadata !DIExpression()), !dbg !901 ; visa id: 26
...
%9 = fadd fast float %simdShuffle, %simdShuffle.1, !dbg !982 ; visa id: 30
The pattern matcher will link out %simdShuffle and directly use %8 (regioning),
However, llvm.dbg.value creates a false dependency on %simdShuffle and causes the shuffle
to emit a dead broadcast mov in vISA.
This change wouldn't impact in -O0 debug mode, and just impact -O2 debug mode.1 parent 4ec5f04 commit e1395ac
File tree
2 files changed
+34
-1
lines changed- IGC/Compiler/CISACodeGen
2 files changed
+34
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1515 | 1515 | | |
1516 | 1516 | | |
1517 | 1517 | | |
1518 | | - | |
| 1518 | + | |
1519 | 1519 | | |
1520 | 1520 | | |
1521 | 1521 | | |
| |||
4970 | 4970 | | |
4971 | 4971 | | |
4972 | 4972 | | |
| 4973 | + | |
| 4974 | + | |
| 4975 | + | |
| 4976 | + | |
| 4977 | + | |
| 4978 | + | |
| 4979 | + | |
| 4980 | + | |
| 4981 | + | |
| 4982 | + | |
| 4983 | + | |
| 4984 | + | |
| 4985 | + | |
| 4986 | + | |
| 4987 | + | |
| 4988 | + | |
| 4989 | + | |
| 4990 | + | |
| 4991 | + | |
| 4992 | + | |
| 4993 | + | |
| 4994 | + | |
| 4995 | + | |
| 4996 | + | |
| 4997 | + | |
| 4998 | + | |
| 4999 | + | |
| 5000 | + | |
| 5001 | + | |
| 5002 | + | |
| 5003 | + | |
| 5004 | + | |
4973 | 5005 | | |
4974 | 5006 | | |
4975 | 5007 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| 227 | + | |
227 | 228 | | |
228 | 229 | | |
229 | 230 | | |
| |||
0 commit comments