LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 41328 - Readonly/readnone are derived after pointer escapes
Summary: Readonly/readnone are derived after pointer escapes
Status: NEW
Alias: None
Product: libraries
Classification: Unclassified
Component: Interprocedural Optimizations (show other bugs)
Version: trunk
Hardware: PC Linux
: P enhancement
Assignee: Unassigned LLVM Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-31 20:24 PDT by Johannes Doerfert
Modified: 2019-03-31 20:25 PDT (History)
2 users (show)

See Also:
Fixed By Commit(s):


Attachments
problematic inputs (1.03 KB, text/plain)
2019-03-31 20:24 PDT, Johannes Doerfert
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Doerfert 2019-03-31 20:24:13 PDT
Created attachment 21714 [details]
problematic inputs

Readnone/only pointer attribute detection ignores uses in calls if they are themselves marked as readnon/only. Though, even a readnone pointer use allows the pointer to escape. The test case shows how the wrong attributes are derived when optimized with -functionattrs.