diff options
| author | Vedant Kumar <vsk@apple.com> | 2020-10-05 13:41:12 -0700 |
|---|---|---|
| committer | Vedant Kumar <vsk@apple.com> | 2020-10-05 14:10:25 -0700 |
| commit | 9afb1c566e8cb396da495e2fbbbc53e1814cc3a1 (patch) | |
| tree | 2170c5bcd20d44fec3311da77218faf242a4924c /llvm/lib/CodeGen/CallingConvLower.cpp | |
| parent | 6bec45e2558566e10be71280a3e2c1b144f1b236 (diff) | |
Revert "Outline non returning functions unless a longjmp"
This reverts commit 20797989ea190f2ef22d13c5a7a0535fe9afa58b.
This patch (https://reviews.llvm.org/D69257) cannot complete a stage2
build due to the change:
```
CI->getCalledFunction()->getName().contains("longjmp")
```
There are several concrete issues here:
- The callee may not be a function, so `getCalledFunction` can assert.
- The called value may not have a name, so `getName` can assert.
- There's no distinction made between "my_longjmp_test_helper" and the
actual longjmp libcall.
At a higher level, there's a serious layering problem here. The
splitting pass makes policy decisions in a general way (e.g. based on
attributes or profile data). Special-casing certain names breaks the
layering. It subverts the work of library maintainers (who may now need
to opt-out of unexpected optimization behavior for any affected
functions) and can lead to inconsistent optimization behavior (as not
all llvm passes special-case ".*longjmp.*" in the same way).
The patch may need significant revision to address these issues.
But the immediate issue is that this crashes while compiling llvm's unit
tests in a stage2 build (due to the `getName` problem).
Diffstat (limited to 'llvm/lib/CodeGen/CallingConvLower.cpp')
0 files changed, 0 insertions, 0 deletions
