[PATCH] D109888: Bitcast wrapped in a call obscures function attributes, pessimizing MemorySSA
Antonio Frighetto via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 16 08:07:01 PDT 2021
antoniofrighetto created this revision.
antoniofrighetto added reviewers: lebedev.ri, jdoerfert.
Herald added subscribers: dexonsmith, okura, kuter, asbirlea, george.burgess.iv, hiraditya.
antoniofrighetto requested review of this revision.
Herald added a reviewer: sstefan1.
Herald added a reviewer: baziotis.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
A logic incompleteness may lead MemorySSA to be too conservative in its results. Specifically,
when dealing with a call of kind `call i32 bitcast (i1 (i1)* @test to i32 (i32)*)(i32 %1)`,
where function call `test` is declared with `readonly` attribute, the bitcast is not wrapped,
obscuring function attributes. Hence, some methods of CallBase (e.g., `doesNotReadMemory`)
could provide incomplete results. This issue was addressed with improved checks.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D109888
Files:
llvm/lib/IR/Instructions.cpp
llvm/test/Analysis/MemorySSA/call-bitcast.ll
llvm/test/Transforms/Attributor/IPConstantProp/arg-count-mismatch.ll
llvm/test/Transforms/Attributor/IPConstantProp/arg-type-mismatch.ll
llvm/test/Transforms/Attributor/liveness.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109888.372924.patch
Type: text/x-patch
Size: 115384 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210916/d2508337/attachment.bin>
More information about the llvm-commits
mailing list