[all-commits] [llvm/llvm-project] 578ca5: [clang][bytecode] Print jump lines in Function::du...
Timm Baeder via All-commits
all-commits at lists.llvm.org
Sun Apr 13 06:46:22 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 578ca5e469ef1c91a79aa15bc186921ee7faa855
https://github.com/llvm/llvm-project/commit/578ca5e469ef1c91a79aa15bc186921ee7faa855
Author: Timm Baeder <tbaeder at redhat.com>
Date: 2025-04-13 (Sun, 13 Apr 2025)
Changed paths:
M clang/lib/AST/ByteCode/Disasm.cpp
M clang/utils/TableGen/ClangOpcodesEmitter.cpp
Log Message:
-----------
[clang][bytecode] Print jump lines in Function::dump() (#135482)
E.g. for
```c++
constexpr int foo(int b) {
int a = 1+1;
for (int i = 0; i < b; ++i) {
++a;
}
return a;
}
```
we now print:
```
foo 0x7cc8d4bf0580
frame size: 128
arg size: 8
rvo: 0
this arg: 0
0 InitScope 0
16 ConstSint32 1
32 ConstSint32 1
48 AddSint32
56 SetLocalSint32 40
72 ConstSint32 0
88 SetLocalSint32 104
104 GetPtrLocal 104 <-+
120 LoadPopSint32 |
128 GetPtrParam 0 |
144 LoadPopSint32 |
152 LTSint32 |
160 Jf 80 --+ |
176 GetPtrLocal 40 | |
192 IncPopSint32 1 | |
208 GetPtrLocal 104 | |
224 IncPopSint32 1 | |
240 Jmp -152 | --+
256 GetPtrLocal 40 <-+
272 LoadPopSint32
280 Destroy 0
296 RetSint32
304 Destroy 0
320 NoRet
```
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list