[all-commits] [llvm/llvm-project] 1076b6: [Analysis] use better version of getLibFunc to che...
RotateRight via All-commits
all-commits at lists.llvm.org
Fri Jun 25 09:19:20 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1076b6c4f022a024a54af9e6a0e9997472cb89ef
https://github.com/llvm/llvm-project/commit/1076b6c4f022a024a54af9e6a0e9997472cb89ef
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2021-06-25 (Fri, 25 Jun 2021)
Changed paths:
M llvm/lib/Analysis/MemoryBuiltins.cpp
Log Message:
-----------
[Analysis] use better version of getLibFunc to check for alloc/free calls
There's no reason to use the weaker name-only analysis when we
have a function prototype to check (in fact, we probably should
not even have that name-only function exposed for general use,
but removing it requires auditing all of the callers).
The version of getLibFunc that takes a Function argument also
does some prototype checking to make sure the arguments/return
type match the expected signature of a real library call.
This is NFC-intended because the code in MemoryBuiltins does its
own function signature checking. For now, that means there may
be some redundancy in the checking, but that should not be above
the noise for compile-time. Ideally, we can move the checks to
a single location.
There's still a hole in the logic that allows the example in
https://llvm.org/PR50846 to cause a compiler crash.
More information about the All-commits
mailing list