[PATCH] D139254: Enhance stack protector
Xiang Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 6 22:53:24 PST 2022
xiangzhangllvm added inline comments.
================
Comment at: llvm/test/CodeGen/X86/stack-protector-weight.ll:13
; DARWIN-IR: # Machine code for function test_branch_weights:
-; DARWIN-IR: successors: %bb.[[SUCCESS:[0-9]+]](0x7fffffff), %bb.[[FAILURE:[0-9]+]]
+; DARWIN-IR: successors: %bb.[[SUCCESS:[0-9]+]](0x7ffff800), %bb.[[FAILURE:[0-9]+]]
; DARWIN-IR: bb.[[SUCCESS]]{{[0-9a-zA-Z_.]+}}:
----------------
The condition branch identify the branch probability at StackProtector.cpp: line 572
And BB calculate from SelectionDAGBuilder::visitBr by visit BR with following metedata:
```
!{!"branch_weights", i32 2147481600, i32 2048}
(0x7ffff800) (0x800)
```
The previous data is incorrect. (should be same with line 7)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139254/new/
https://reviews.llvm.org/D139254
More information about the llvm-commits
mailing list