llvm-project/llvm/test/Transforms/HotColdSplit
Vedant Kumar 9afb1c566e Revert "Outline non returning functions unless a longjmp"
This reverts commit 20797989ea.

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).
2020-10-05 14:10:25 -07:00
..
X86
addr-taken.ll
apply-noreturn-bonus.ll
apply-penalty-for-inputs.ll
apply-penalty-for-outputs.ll
apply-successor-penalty.ll
assumption-cache-invalidation.ll
coldentrycount.ll [HotColdSplit] Add test case for unlikely attribute in outlined function 2020-08-04 13:16:33 -07:00
delete-use-without-def-dbg-val.ll
duplicate-phi-preds-crash.ll
eh-pads.ll
eh-typeid-for.ll
forward-dfs-reaches-marked-block.ll
lifetime-markers-on-inputs-1.ll [CodeExtractor] Don't create bitcasts when inserting lifetime markers (NFCI) 2020-09-29 16:34:36 -07:00
lifetime-markers-on-inputs-2.ll [CodeExtractor] Don't create bitcasts when inserting lifetime markers (NFCI) 2020-09-29 16:34:36 -07:00
mark-the-whole-func-cold.ll
minsize.ll
multiple-exits.ll
noreturn.ll
outline-cold-asm.ll
outline-disjoint-diamonds.ll
outline-if-then-else.ll
outline-multiple-entry-region.ll
outline-while-loop.ll
phi-with-distinct-outlined-values.ll
region-overlap.ll
resume.ll
retain-section.ll
section-splitting-custom.ll [HotColdSplit] Add options for splitting cold functions in separate section 2020-08-09 08:48:12 -07:00
section-splitting-default.ll [HotColdSplit] Add options for splitting cold functions in separate section 2020-08-09 08:48:12 -07:00
sink-multiple-bitcasts-of-allocas-pr42451.ll
split-cold-2.ll
split-out-dbg-label.ll
split-out-dbg-val-of-arg.ll
split-phis-in-exit-blocks.ll [CodeExtractor] Don't create bitcasts when inserting lifetime markers (NFCI) 2020-09-29 16:34:36 -07:00
stale-assume-in-original-func.ll
succ-block-with-self-edge.ll
swifterror.ll
transfer-debug-info.ll
unwind.ll
update-split-loop-metadata.ll