Changes

Summary

  1. [profile][test] Delete profraw directory so that tests are immune to format version upgrade (details)
  2. [flang] Recode a switch() to dodge a sketchy warning (details)
  3. [InstrProfiling][ELF] Make __profd_ private if the function does not use value profiling (details)
  4. Revert "[lld-macho] Avoid force-loading the same archive twice" (details)
Commit 5540470f642a3118439996cbcde7d90530588eb5 by i
[profile][test] Delete profraw directory so that tests are immune to format version upgrade
The file was modifiedcompiler-rt/test/profile/instrprof-lto-pgogen.c
The file was modifiedcompiler-rt/test/profile/instrprof-gc-sections.c
Commit b3c1f53c989f6aefad581955e3add222cfb5d890 by pklausler
[flang] Recode a switch() to dodge a sketchy warning

One of the buildbots uses a compiler (can't tell which) that
doesn't approve of a "default:" in a switch statement whose
cases appear to completely cover all possible values of an
enum class.  But this switch is in raw data dumping code that
needs to allow for incorrect values in memory.  So rewrite it
as a cascade of if statements; performance doesn't matter here.
The file was modifiedflang/runtime/type-info.cpp
Commit 3307240f057b856bfb01c1e42e260aa3f896c592 by i
[InstrProfiling][ELF] Make __profd_ private if the function does not use value profiling

On ELF, the D1003372 optimization can apply to more cases. There are two
prerequisites for making `__profd_` private:

* `__profc_` keeps `__profd_` live under compiler/linker GC
* `__profd_` is not referenced by code

The first is satisfied because all counters/data are in a section group (either
`comdat any` or `comdat noduplicates`). The second requires that the function
does not use value profiling.

Regarding the second point: `__profd_` may be referenced by other text sections
due to inlining. There will be a linker error if a prevailing text section
references the non-prevailing local symbol.

With this change, a stage 2 (`-DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_BUILD_INSTRUMENTED=IR`)
clang is 4.2% smaller (1-169620032/177066968).
`stat -c %s **/*.o | awk '{s+=$1}END{print s}' is 2.5% smaller.

Reviewed By: davidxl, rnk

Differential Revision: https://reviews.llvm.org/D103717
The file was modifiedllvm/test/Transforms/PGOProfile/indirect_call_profile.ll
The file was modifiedllvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
Commit c9b241efd68c5a0f1f67e9250960ade454f3bc11 by thakis
Revert "[lld-macho] Avoid force-loading the same archive twice"

This reverts commit 24706cd73cd150543753a2e169c68a2c68da46a1.
Test seems to fail flakily. See comments on https://reviews.llvm.org/D104353
for a hypothesis for why.
The file was modifiedlld/MachO/Driver.cpp
The file was modifiedlld/test/MachO/force-load.s
The file was modifiedlld/test/MachO/archive.s