diff options
author | Juneyoung Lee <aqjune@gmail.com> | 2020-09-09 20:31:51 +0900 |
---|---|---|
committer | Juneyoung Lee <aqjune@gmail.com> | 2020-09-09 20:33:35 +0900 |
commit | 36c8621638d18c830efe2c6a2a6d0a0338b0f79d (patch) | |
tree | 20050ce1f9b0577566524db47db0061975371c85 /llvm/tools/llvm-objdump/llvm-objdump.cpp | |
parent | 0fd425af071a9bc5c0891a4db09f4d9a466b7be9 (diff) | |
download | llvm-36c8621638d18c830efe2c6a2a6d0a0338b0f79d.zip llvm-36c8621638d18c830efe2c6a2a6d0a0338b0f79d.tar.gz llvm-36c8621638d18c830efe2c6a2a6d0a0338b0f79d.tar.bz2 |
[BuildLibCalls] Add more noundef to library functions
This patch follows D85345 and adds more noundef attributes to return values/arguments of library functions
that are mostly about accessing the file system or processes.
A few functions like `chmod` or `times` use typedef `mode_t` and `clock_t`.
They are neither struct nor union, so they cannot contain undef even if they're lowered to iN in IR. So, it is fine to add noundef to them.
- clock_t's actual type is size_t (C17, 7.27.1.3), so it isn't struct or union.
- For mode_t, either int or long is used in practice because programmers use bit manipulation. So, I think it is okay that it's never aggregate in practice.
After this patch, the remaining library functions are those that eagerly participate in optimizations: they can be removed, reordered, or
introduced by a transformation from primitive IR operations.
For them, a few testings is needed, since it may not be valid to add noundef anymore even if C standard says it's okay.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D85894
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
0 files changed, 0 insertions, 0 deletions