diff options
author | Dávid Bolvanský <david.bolvansky@gmail.com> | 2021-01-15 23:07:29 +0100 |
---|---|---|
committer | Dávid Bolvanský <david.bolvansky@gmail.com> | 2021-01-15 23:53:43 +0100 |
commit | a1500105ee6074f992f376c916dcfa3a54acb717 (patch) | |
tree | 534f84a79b0a42c9b5fbf2784db8eb426b2f1d90 /llvm/lib/MC/WasmObjectWriter.cpp | |
parent | 76f5c5a7b059929f0e0352ad4ff5ec1b78511868 (diff) | |
download | llvm-a1500105ee6074f992f376c916dcfa3a54acb717.zip llvm-a1500105ee6074f992f376c916dcfa3a54acb717.tar.gz llvm-a1500105ee6074f992f376c916dcfa3a54acb717.tar.bz2 |
[SimplifyCFG] Optimize CFG when null is passed to a function with nonnull argument
Example:
```
__attribute__((nonnull,noinline)) char * pinc(char *p) {
return ++p;
}
char * foo(bool b, char *a) {
return pinc(b ? 0 : a);
}
```
optimize to
```
char * foo(bool b, char *a) {
return pinc(a);
}
```
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D94180
Diffstat (limited to 'llvm/lib/MC/WasmObjectWriter.cpp')
0 files changed, 0 insertions, 0 deletions