8000 Hunk cherry-pick from 8a2198773e: fix InterceptorEnabled visibility. by MorthimerMcMare · Pull Request #50 · focs-lab/llvm-project · GitHub
[go: up one dir, main page]

Skip to content

Hunk cherry-pick from 8a2198773e: fix InterceptorEnabled visibility. #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from 1 commit
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
9fbf126
Escape Analysis init
apaznikov Oct 14, 2024
312d6bb
Updated GEP aliasing logic
apaznikov Oct 15, 2024
b4d7468
Fixed EA aliasing/GEP/GP logic
apaznikov Oct 18, 2024
11ce82d
Enabling Escape Analysis in TSan
apaznikov Oct 18, 2024
56b5364
Make Alias relation (partly) symmetrical. Refactoring
apaznikov Oct 23, 2024
ed8da00
Added escaping function arguments support
apaznikov Oct 24, 2024
5d97016
Passing value is neither escaping nor aliasing
apaznikov Oct 25, 2024
a837b65
Add mutual (recursive) aliases support
apaznikov Oct 28, 2024
40cb7f6
Make EA BB-wise, update TSan integration
apaznikov Oct 29, 2024
819b16c
Efforts for support of 'already escaped objects' (such as pointer arg…
apaznikov Oct 31, 2024
d432a4b
Considering external 'already escaped' objects, fix aliasing, refacto…
apaznikov Nov 4, 2024
7bbbe09
Fix bugs with external objects
apaznikov Nov 4, 2024
2ebed05
Add global_arrays.ll (ConstExprGEP) test, combine return.ll and simpl…
apaznikov Nov 6, 2024
ab460b0
Make getUnderlyingMayEscapeObjectsNew return the list of object (in p…
apaznikov Nov 6, 2024
28e1f2f
Move to more wide use of ValueTracking infrastructure in getUnderlyin…
apaznikov Nov 7, 2024
f7fe4ca
Migration to getUnderlyingMayEscObjectsNew
apaznikov Nov 8, 2024
2f95b0b
Added inttoptr/ptrtoint tests
apaznikov Nov 11, 2024
348eeb0
Minor refactoring (mostly compOutEscapeState)
apaznikov Nov 12, 2024
1945512
Added GlobalEscapeAnalysis pass infrastructure
apaznikov Nov 13, 2024
9ac70ee
Updated escape/no-escape with passing to calls or aliasing to ptr arg…
apaznikov Nov 15, 2024
4c86254
Starting work on propagation of argument escape info: add argument to…
apaznikov Nov 26, 2024
cefcd9e
Finished IPA EA, refactoring, tests
apaznikov Nov 27, 2024
020af62
Added recursive call conservative algorithm
apaznikov Nov 28, 2024
b155fe5
Fix std::optional<std::reference_wrapper<ArgumentEscapesMap>> ArgsEsc…
apaznikov Nov 29, 2024
bc3186e
Added recursive call conservative algorithm
apaznikov Nov 28, 2024
fbbe19e
Fix std::optional<std::reference_wrapper<ArgumentEscapesMap>> ArgsEsc…
apaznikov Nov 29, 2024
b342f09
Efforts on TSan and IPA EA integration
apaznikov Nov 29, 2024
178fd58
Add Global EA usage to TSan
apaznikov Dec 3, 2024
d0c40d7
Finished support of IPA EA & TSan, fixed bugs
apaznikov Dec 3, 2024
f862a25
Add support of function returning escaped value -- draft
apaznikov Dec 4, 2024
56855b2
Minor fixes for argument escape logic (DBG)
apaznikov Dec 5, 2024
2efb371
Add support of function returning escaped value -- draft 2
apaznikov Dec 5, 2024
2aa25f7
Add EscapeReasonTy
apaznikov Dec 5, 2024
6fbd3bd
Fix addEscapingObject logic for EscReason support
apaznikov Dec 5, 2024
dbc01a3
Fix logic with EscReasons, isEscapeForFunc, etc
apaznikov Dec 6, 2024
24ded0c
Fixed merging escape states, fixed printing, minor fixes, add tests w…
apaznikov Dec 9, 2024
de71362
Support of SCC in IPA - in progress
apaznikov Dec 9, 2024
a03d550
Many fixes for recursive functions, argument, aliasing processing and…
apaznikov Dec 11, 2024
460e60e
Refactoring and debug
apaznikov Dec 12, 2024
ce24c31
Fixed logic mainly with EscapeReason/Argument checks. Add support for…
apaznikov Dec 13, 2024
142270d
Merge branch 'tsan-with-ea-IPA-DBG-rec-calls-TMP' into tsan-with-ea-IPA
apaznikov Dec 13, 2024
781082f
Refactor to simplify and unify logic
apaznikov Dec 13, 2024
2772c1e
Refactor EscapeAnalysis API to improve readability and maintainability
apaznikov Dec 15, 2024
7962dcd
Add support of calls returning pointers (should lead escape)
apaznikov Dec 16, 2024
ed91d09
Use CaptureTracker first, and then EscapeAnalysis
apaznikov Dec 17, 2024
83ca510
Added EscapeReason statistics to TSan. Refactor escape analysis to tr…
apaznikov Dec 18, 2024
01b846c
Add support IPA return info
apaznikov Dec 19, 2024
3f11e06
Try traverse -- DEBUG
apaznikov Dec 19, 2024
87eef69
Argument escape tracking - DEBUG.
apaznikov Dec 20, 2024
408ec0d
Add top-down argument escape analysis (DEBUG)
apaznikov Dec 23, 2024
a69e19e
Add support for detecting functions passed to ObjC selectors
apaznikov Dec 26, 2024
3c7af95
Remove debug logs and enhance escape analysis logic, add test for top…
apaznikov Dec 26, 2024
1d44daa
Fix incorrect assertion in escape analysis.
apaznikov Dec 29, 2024
675f201
Efforts for new pointer escape logic: add UnderlObjInfo, updates in a…
apaznikov Jan 3, 2025
d2329e4
Refactor logic for treating escaping pointers: now pointers (if they …
apaznikov Jan 10, 2025
8eaf60e
Make isEscapedForBBInFuncTSan more optimistic
apaznikov Jan 10, 2025
e6ff26f
Use IPA version `isEscapedForBBIPA` in isEscapedForBBInFuncTSan
apaznikov Jan 10, 2025
b3a7a9a
Fixed IPA escape analysis logic
apaznikov Jan 13, 2025
d9a48f9
Added support of SCCs for TopDownIPA, fixed evalTopDownArgEscStatus (…
apaznikov Jan 14, 2025
006c2d3
Large update for memcpy/memset/memmove
apaznikov Jan 17, 2025
10000 2690475
Enable interceptor toggling via `InterceptorEnabled` global variable …
apaznikov Jan 27, 2025
c946299
Introduce global InterceptorEnabled for interceptor control
apaznikov Feb 4, 2025
f7cfec5
Add intercepted call handling (strlen, strcmp, memchr)
apaznikov Feb 5, 2025
22a26b0
Fixed bug and cleanup debug output
apaznikov Feb 5, 2025
d76f5b0
Enable/disable in sanitizer_common_interceptors.inc
apaznikov Feb 6, 2025
ef66b29
Add __tsan_enable/__tsan_disalbe intrinsics
apaznikov Feb 24, 2025
16216da
Minor fixes
apaznikov Mar 24, 2025
10d6ed8
hunk cherry-pick from 8a2198773e: fix InterceptorEnabled visibility.
MorthimerMcMare Apr 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added inttoptr/ptrtoint tests
  • Loading branch information
apaznikov committed Nov 11, 2024
commit 2f95b0b745bbedb40d1afa63c9d513c186cf7f11
40 changes: 40 additions & 0 deletions llvm/test/Analysis/EscapeAnalysis/casts.ll
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
; RUN: opt < %s -passes='print<escape-analysis>' -disable-output 2>&1 | FileCheck %s

@GPtr = dso_local global ptr null, align 8

; void inttoptr_cast() {
; long int x;
; GPtr = (int *)x;
; }
define void @inttoptr_cast() {
; CHECK: Printing analysis 'Escape Analysis' for function 'inttoptr_cast':
; CHECK-NEXT: Escaping objects for BB entry:
; CHECK-DAG: %x = alloca i64, align 8
entry:
%x = alloca i64, align 8
%0 = load i64, ptr %x, align 8
%1 = inttoptr i64 %0 to ptr
store ptr %1, ptr @GPtr, align 8
ret void
}

; void ptrtoint_and_inttoptr() {
; int y;
; int *x = (int *)(long int)&y;
; GPtr = x;
; }
define void @ptrtoint_and_inttoptr() #0 {
; CHECK: Printing analysis 'Escape Analysis' for function 'ptrtoint_and_inttoptr':
; CHECK-NEXT: Escaping objects for BB entry:
; CHECK-DAG: %x = alloca ptr, align 8
; CHECK-DAG: %y = alloca i32, align 4
entry:
%y = alloca i32, align 4
%x = alloca ptr, align 8
%0 = ptrtoint ptr %y to i64
%1 = inttoptr i64 %0 to ptr
store ptr %1, ptr %x, align 8
%2 = load ptr, ptr %x, align 8
store ptr %2, ptr @GPtr, align 8
ret void
}
0