Changes

Summary

  1. Revert "[clang][Fuchsia] Add relative-vtables multilib" (details)
  2. Add help text for -nogpuinc (details)
  3. [lldb] Refactor GetDeviceSupportDirectoryNames and GetPlatformName (NFC) (details)
  4. Add MachineModuleInfo constructor with external MCContext (details)
  5. [RISCV] Rename RISCVGenSystemOperands.inc to RISCVGenSearchableTables.inc to prepare for more tables. NFC (details)
  6. Initial commit of mktime. (details)
  7. [DSE] Remove a redundant call to getLocForWriteEx() (details)
  8. [Remarks][1/2] Expand remarks hotness threshold option support in more tools (details)
  9. [Remarks][2/2] Expand remarks hotness threshold option support in more tools (details)
  10. [CodeView] Remove unused declaration collectInlineSiteChildren (NFC) (details)
Commit 7bc944c102c2bdb009da4fe7d53dda15ea19ee71 by leonardchan
Revert "[clang][Fuchsia] Add relative-vtables multilib"

This reverts commit fdbd84c6c819d4462546961f6086c1524d5d5ae8.

Reverting due to failing CI builders for Fuchsia's toolchain:
https://luci-milo.appspot.com/p/fuchsia/builders/ci/clang-linux-x64/b8862150211240186992?
The file was removedclang/test/Driver/Inputs/basic_fuchsia_tree/lib/aarch64-fuchsia/c++/relative-vtables+noexcept/libc++.so
The file was modifiedclang/test/Driver/fuchsia.cpp
The file was removedclang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/c++/relative-vtables/libc++.so
The file was modifiedclang/cmake/caches/Fuchsia-stage2.cmake
The file was modifiedclang/lib/Driver/ToolChains/Fuchsia.cpp
The file was removedclang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/c++/relative-vtables+noexcept/libc++.so
The file was removedclang/test/Driver/Inputs/basic_fuchsia_tree/lib/aarch64-fuchsia/c++/relative-vtables/libc++.so
Commit 011bf4f55630858111e5f0504b3f7390eaf41e09 by Yaxun.Liu
Add help text for -nogpuinc

Differential Revision: https://reviews.llvm.org/D92339
The file was modifiedclang/include/clang/Driver/Options.td
Commit 173bb3c2eb094920708ab8f61dae2fe22d331773 by Jonas Devlieghere
[lldb] Refactor GetDeviceSupportDirectoryNames and GetPlatformName (NFC)

Both functions are effectively returning a single string literal. Change
the interface to return a llvm::StringRef instead of populating a vector
of std::strings or returning a std::string respectively.
The file was modifiedlldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.h
The file was modifiedlldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.h
The file was modifiedlldb/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp
The file was modifiedlldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
The file was modifiedlldb/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.h
The file was modifiedlldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleBridge.h
The file was modifiedlldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp
The file was modifiedlldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.h
The file was modifiedlldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp
The file was modifiedlldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleBridge.cpp
Commit d4ba5e15f4f2f41f13625cc10e4df74b44620803 by hgreving
Add MachineModuleInfo constructor with external MCContext

Adds a constructor to MachineModuleInfo and MachineModuleInfoWapperPass that
takes an external MCContext. If provided, the external context will be used
throughout codegen instead of MMI's default one.

This enables external drivers to take ownership of data put on the MMI's context
during codegen. The internal context is used otherwise and destroyed upon
finish.

Differential Revision: https://reviews.llvm.org/D91313
The file was modifiedllvm/include/llvm/CodeGen/MachineModuleInfo.h
The file was modifiedllvm/lib/CodeGen/MachineModuleInfo.cpp
Commit 40659cd2c6f4347650d477a16e0cf60ce4401fa6 by craig.topper
[RISCV] Rename RISCVGenSystemOperands.inc to RISCVGenSearchableTables.inc to prepare for more tables. NFC

D89449 adds more tables so renaming as a pre-commit for that.
The file was modifiedllvm/lib/Target/RISCV/Utils/RISCVBaseInfo.h
The file was modifiedllvm/lib/Target/RISCV/Utils/RISCVBaseInfo.cpp
The file was modifiedllvm/lib/Target/RISCV/CMakeLists.txt
Commit 6f0f844e9af98dc935f80d8149f6e4fcebddf8f1 by rtenneti
Initial commit of mktime.

This introduces mktime to LLVM libc, based on C99/C2X/Single Unix Spec.

Co-authored-by: Jeff Bailey <jeffbailey@google.com>

This change doesn't handle TIMEZONE,  tm_isdst and leap seconds.  It returns -1 for invalid dates. I have verified the return results for all the possible dates with glibc's mktime.

TODO:
+ Handle leap seconds.
+ Handle out of range time and date values that don't overflow or underflow.
+ Implement the following suggestion Siva - As we start accumulating the seconds, we should be able to check if the next amount of seconds to be added can lead to an overflow. If it does, return the overflow value.  If not keep accumulating. The benefit is that, we don't have to validate every input, and also do not need the special cases for sizeof(time_t) == 4.
+ Handle timezone and update of tm_isdst

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D91551
The file was addedlibc/src/time/mktime.h
The file was addedlibc/src/time/mktime.cpp
The file was modifiedlibc/config/linux/x86_64/entrypoints.txt
The file was addedlibc/src/time/CMakeLists.txt
The file was modifiedlibc/config/linux/x86_64/headers.txt
The file was addedlibc/test/src/time/mktime_test.cpp
The file was modifiedlibc/config/linux/api.td
The file was modifiedlibc/spec/stdc.td
The file was addedlibc/include/time.h.def
The file was modifiedlibc/src/CMakeLists.txt
The file was modifiedlibc/test/src/CMakeLists.txt
The file was modifiedlibc/spec/spec.td
The file was modifiedlibc/include/CMakeLists.txt
The file was addedlibc/test/src/time/CMakeLists.txt
Commit bcc802fa3624ac8cc98b8a11f5315b07fc7bffc4 by gparker-github
[DSE] Remove a redundant call to getLocForWriteEx()

Differential Revision: https://reviews.llvm.org/D92263
The file was modifiedllvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
Commit 3acda91742b7e995af87f1afaca5e0fa78669819 by apollo.mobility
[Remarks][1/2] Expand remarks hotness threshold option support in more tools

This is the #1 of 2 changes that make remarks hotness threshold option
available in more tools. The changes also allow the threshold to sync with
hotness threshold from profile summary with special value 'auto'.

This change modifies the interface of lto::setupLLVMOptimizationRemarks() to
accept remarks hotness threshold. Update all the tools that use it with remarks
hotness threshold options:

* lld: '--opt-remarks-hotness-threshold='
* llvm-lto2: '--pass-remarks-hotness-threshold='
* llvm-lto: '--lto-pass-remarks-hotness-threshold='
* gold plugin: '-plugin-opt=opt-remarks-hotness-threshold='

Differential Revision: https://reviews.llvm.org/D85809
The file was addedllvm/include/llvm/Remarks/HotnessThresholdParser.h
The file was modifiedllvm/lib/LTO/LTOCodeGenerator.cpp
The file was modifiedllvm/tools/llc/llc.cpp
The file was modifiedlld/ELF/Options.td
The file was modifiedllvm/lib/IR/LLVMRemarkStreamer.cpp
The file was modifiedllvm/test/LTO/X86/diagnostic-handler-remarks-with-hotness.ll
The file was modifiedllvm/lib/IR/LLVMContextImpl.h
The file was modifiedlld/ELF/Config.h
The file was modifiedllvm/test/tools/gold/X86/opt-remarks.ll
The file was modifiedllvm/lib/IR/LLVMContext.cpp
The file was modifiedllvm/tools/opt/opt.cpp
The file was modifiedllvm/include/llvm/IR/LLVMRemarkStreamer.h
The file was modifiedlld/test/ELF/lto/opt-remarks.ll
The file was modifiedllvm/tools/gold/gold-plugin.cpp
The file was modifiedllvm/lib/LTO/LTOBackend.cpp
The file was modifiedlld/ELF/LTO.cpp
The file was modifiedllvm/include/llvm/Support/CommandLine.h
The file was modifiedllvm/lib/LTO/LTO.cpp
The file was modifiedllvm/test/LTO/Resolution/X86/diagnostic-handler-remarks-with-hotness.ll
The file was modifiedlld/ELF/Driver.cpp
The file was modifiedllvm/include/llvm/LTO/LTO.h
The file was modifiedllvm/lib/LTO/ThinLTOCodeGenerator.cpp
The file was modifiedllvm/tools/llvm-lto2/llvm-lto2.cpp
The file was modifiedllvm/include/llvm/IR/LLVMContext.h
The file was modifiedllvm/include/llvm/LTO/Config.h
Commit 93dc1b5b8cb2f85d0d347f39e49a7150accd4e70 by apollo.mobility
[Remarks][2/2] Expand remarks hotness threshold option support in more tools

This is the #2 of 2 changes that make remarks hotness threshold option
available in more tools. The changes also allow the threshold to sync with
hotness threshold from profile summary with special value 'auto'.

This change expands remarks hotness threshold option
-fdiagnostics-hotness-threshold in clang and *-remarks-hotness-threshold in
other tools to utilize hotness threshold from profile summary.

Remarks hotness filtering relies on several driver options. Table below lists
how different options are correlated and affect final remarks outputs:

| profile | hotness | threshold | remarks printed |
|---------|---------|-----------|-----------------|
| No      | No      | No        | All             |
| No      | No      | Yes       | None            |
| No      | Yes     | No        | All             |
| No      | Yes     | Yes       | None            |
| Yes     | No      | No        | All             |
| Yes     | No      | Yes       | None            |
| Yes     | Yes     | No        | All             |
| Yes     | Yes     | Yes       | >=threshold     |

In the presence of profile summary, it is often more desirable to directly use
the hotness threshold from profile summary. The new argument value 'auto'
indicates threshold will be synced with hotness threshold from profile summary
during compilation. The "auto" threshold relies on the availability of profile
summary. In case of missing such information, no remarks will be generated.

Differential Revision: https://reviews.llvm.org/D85808
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was addedllvm/test/Transforms/SampleProfile/Inputs/remarks-hotness.prof
The file was modifiedllvm/lib/IR/Module.cpp
The file was modifiedclang/test/Driver/opt-record.c
The file was modifiedclang/include/clang/Basic/CodeGenOptions.def
The file was addedllvm/test/Transforms/SampleProfile/remarks-hotness.ll
The file was modifiedllvm/lib/IR/LLVMContext.cpp
The file was addedllvm/test/Other/optimization-remarks-auto.ll
The file was addedclang/test/Frontend/Inputs/remarks-hotness.prof
The file was modifiedllvm/lib/IR/LLVMRemarkStreamer.cpp
The file was modifiedllvm/include/llvm/IR/Module.h
The file was modifiedllvm/lib/Analysis/OptimizationRemarkEmitter.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticDriverKinds.td
The file was modifiedllvm/include/llvm/Analysis/ProfileSummaryInfo.h
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedclang/include/clang/Basic/CodeGenOptions.h
The file was addedclang/test/Frontend/remarks-hotness.cpp
The file was modifiedllvm/include/llvm/IR/LLVMContext.h
Commit e785379afff8dc256fc72a0f74677b43defa2059 by kazu
[CodeView] Remove unused declaration collectInlineSiteChildren (NFC)

The function definition was removed on Sep 7, 2016 in commit
a9f4cc9510546f5728258524d344a3e03e43500b.  The declaration seems to be
unused since then.
The file was modifiedllvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h