FailedChanges

Summary

  1. [doc] Give a workaround for a FileCheck regex that ends in a brace. Addresses PR42864.
  2. Use llvm-nm instead of nm in new test to unbreak Windows bot New test added in r367679 used nm and should use llvm-nm.
  3. [ORC] Change the locking scheme for ThreadSafeModule. ThreadSafeModule/ThreadSafeContext are used to manage lifetimes and locking for LLVMContexts in ORCv2. Prior to this patch contexts were locked as soon as an associated Module was emitted (to be compiled and linked), and were not unlocked until the emit call returned. This could lead to deadlocks if interdependent modules that shared contexts were compiled on different threads: when, during emission of the first module, the dependence was discovered the second module (which would provide the required symbol) could not be emitted as the thread emitting the first module still held the lock. This patch eliminates this possibility by moving to a finer-grained locking scheme. Each client holds the module lock only while they are actively operating on it. To make this finer grained locking simpler/safer to implement this patch removes the explicit lock method, 'getContextLock', from ThreadSafeModule and replaces it with a new method, 'withModuleDo', that implicitly locks the context, calls a user-supplied function object to operate on the Module, then implicitly unlocks the context before returning the result. ThreadSafeModule TSM = getModule(...); size_t NumFunctions = TSM.withModuleDo( [](Module &M) { // <- context locked before entry to lambda. return M.size(); }); Existing ORCv2 layers that operate on ThreadSafeModules are updated to use the new method. This method is used to introduce Module locking into each of the existing layers.
  4. [NFC] Test commit, corrected some spelling in comment Test commit, corrected some spelling in comment. Differential Revision: https://reviews.llvm.org/D65516
  5. GlobalISel: support swiftself attribute
  6. Fix new test try 2 Fix second (and last) instance of wrong Input file name in new test added in r367679.
  7. Fix new test Thew new test added in r367679 was using the wrong copy of the Input file.
  8. [ThinLTO] Implement index-based WPD This patch adds support to the WholeProgramDevirt pass to perform index-based WPD, which is invoked from ThinLTO during the thin link. The ThinLTO backend (WPD import phase) behaves the same regardless of whether the WPD decisions were made with the index-based or (the existing) IR-based analysis. Depends on D54815. Reviewers: pcc Subscribers: mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, arphaman, dang, llvm-commits Differential Revision: https://reviews.llvm.org/D55153
Revision 367689 by probinson:
[doc] Give a workaround for a FileCheck regex that ends in a brace.

Addresses PR42864.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/docs/CommandGuide/FileCheck.rstllvm.src/docs/CommandGuide/FileCheck.rst
Revision 367688 by tejohnson:
Use llvm-nm instead of nm in new test to unbreak Windows bot

New test added in r367679 used nm and should use llvm-nm.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/ThinLTO/X86/devirt2.llllvm.src/test/ThinLTO/X86/devirt2.ll
Revision 367686 by Lang Hames:
[ORC] Change the locking scheme for ThreadSafeModule.

ThreadSafeModule/ThreadSafeContext are used to manage lifetimes and locking
for LLVMContexts in ORCv2. Prior to this patch contexts were locked as soon
as an associated Module was emitted (to be compiled and linked), and were not
unlocked until the emit call returned. This could lead to deadlocks if
interdependent modules that shared contexts were compiled on different threads:
when, during emission of the first module, the dependence was discovered the
second module (which would provide the required symbol) could not be emitted as
the thread emitting the first module still held the lock.

This patch eliminates this possibility by moving to a finer-grained locking
scheme. Each client holds the module lock only while they are actively operating
on it. To make this finer grained locking simpler/safer to implement this patch
removes the explicit lock method, 'getContextLock', from ThreadSafeModule and
replaces it with a new method, 'withModuleDo', that implicitly locks the context,
calls a user-supplied function object to operate on the Module, then implicitly
unlocks the context before returning the result.

ThreadSafeModule TSM = getModule(...);
size_t NumFunctions = TSM.withModuleDo(
    [](Module &M) { // <- context locked before entry to lambda.
      return M.size();
    });

Existing ORCv2 layers that operate on ThreadSafeModules are updated to use the
new method.

This method is used to introduce Module locking into each of the existing
layers.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/docs/ORCv2.rstllvm.src/docs/ORCv2.rst
The file was modified/llvm/trunk/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.hllvm.src/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h
The file was modified/llvm/trunk/include/llvm/ExecutionEngine/Orc/IRTransformLayer.hllvm.src/include/llvm/ExecutionEngine/Orc/IRTransformLayer.h
The file was modified/llvm/trunk/include/llvm/ExecutionEngine/Orc/ThreadSafeModule.hllvm.src/include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h
The file was modified/llvm/trunk/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cppllvm.src/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp
The file was modified/llvm/trunk/lib/ExecutionEngine/Orc/IRCompileLayer.cppllvm.src/lib/ExecutionEngine/Orc/IRCompileLayer.cpp
The file was modified/llvm/trunk/lib/ExecutionEngine/Orc/IRTransformLayer.cppllvm.src/lib/ExecutionEngine/Orc/IRTransformLayer.cpp
The file was modified/llvm/trunk/lib/ExecutionEngine/Orc/LLJIT.cppllvm.src/lib/ExecutionEngine/Orc/LLJIT.cpp
The file was modified/llvm/trunk/lib/ExecutionEngine/Orc/Layer.cppllvm.src/lib/ExecutionEngine/Orc/Layer.cpp
The file was modified/llvm/trunk/lib/ExecutionEngine/Orc/ThreadSafeModule.cppllvm.src/lib/ExecutionEngine/Orc/ThreadSafeModule.cpp
The file was modified/llvm/trunk/tools/lli/lli.cppllvm.src/tools/lli/lli.cpp
The file was modified/llvm/trunk/unittests/ExecutionEngine/Orc/ThreadSafeModuleTest.cppllvm.src/unittests/ExecutionEngine/Orc/ThreadSafeModuleTest.cpp
Revision 367685 by dcandler:
[NFC] Test commit, corrected some spelling in comment

Test commit, corrected some spelling in comment.

Differential Revision: https://reviews.llvm.org/D65516
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Object/WasmObjectFile.cppllvm.src/lib/Object/WasmObjectFile.cpp
Revision 367683 by Tim Northover:
GlobalISel: support swiftself attribute
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/CodeGen/GlobalISel/CallLowering.cppllvm.src/lib/CodeGen/GlobalISel/CallLowering.cpp
The file was modified/llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cppllvm.src/lib/CodeGen/GlobalISel/IRTranslator.cpp
The file was modified/llvm/trunk/lib/Target/AArch64/AArch64CallLowering.cppllvm.src/lib/Target/AArch64/AArch64CallLowering.cpp
The file was modified/llvm/trunk/lib/Target/ARM/ARMCallLowering.cppllvm.src/lib/Target/ARM/ARMCallLowering.cpp
The file was modified/llvm/trunk/lib/Target/Mips/MipsCallLowering.cppllvm.src/lib/Target/Mips/MipsCallLowering.cpp
The file was modified/llvm/trunk/lib/Target/X86/X86CallLowering.cppllvm.src/lib/Target/X86/X86CallLowering.cpp
The file was modified/llvm/trunk/test/CodeGen/AArch64/GlobalISel/arm64-fallback.llllvm.src/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll
The file was added/llvm/trunk/test/CodeGen/AArch64/GlobalISel/swiftself.llllvm.src/test/CodeGen/AArch64/GlobalISel/swiftself.ll
Revision 367682 by tejohnson:
Fix new test try 2

Fix second (and last) instance of wrong Input file name in new test
added in r367679.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/ThinLTO/X86/devirt2.llllvm.src/test/ThinLTO/X86/devirt2.ll
Revision 367680 by tejohnson:
Fix new test

Thew new test added in r367679 was using the wrong copy of the Input
file.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/ThinLTO/X86/devirt2.llllvm.src/test/ThinLTO/X86/devirt2.ll
Revision 367679 by tejohnson:
[ThinLTO] Implement index-based WPD

This patch adds support to the WholeProgramDevirt pass to perform
index-based WPD, which is invoked from ThinLTO during the thin link.

The ThinLTO backend (WPD import phase) behaves the same regardless of
whether the WPD decisions were made with the index-based or (the
existing) IR-based analysis.

Depends on D54815.

Reviewers: pcc

Subscribers: mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, arphaman, dang, llvm-commits

Differential Revision: https://reviews.llvm.org/D55153
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/IR/ModuleSummaryIndex.hllvm.src/include/llvm/IR/ModuleSummaryIndex.h
The file was modified/llvm/trunk/include/llvm/Transforms/IPO/WholeProgramDevirt.hllvm.src/include/llvm/Transforms/IPO/WholeProgramDevirt.h
The file was modified/llvm/trunk/lib/LTO/LTO.cppllvm.src/lib/LTO/LTO.cpp
The file was modified/llvm/trunk/lib/Transforms/IPO/WholeProgramDevirt.cppllvm.src/lib/Transforms/IPO/WholeProgramDevirt.cpp
The file was added/llvm/trunk/test/ThinLTO/X86/Inputs/devirt2.llllvm.src/test/ThinLTO/X86/Inputs/devirt2.ll
The file was modified/llvm/trunk/test/ThinLTO/X86/devirt.llllvm.src/test/ThinLTO/X86/devirt.ll
The file was added/llvm/trunk/test/ThinLTO/X86/devirt2.llllvm.src/test/ThinLTO/X86/devirt2.ll
The file was added/llvm/trunk/test/ThinLTO/X86/nodevirt-nonpromoted-typeid.llllvm.src/test/ThinLTO/X86/nodevirt-nonpromoted-typeid.ll
The file was modified/llvm/trunk/tools/llvm-lto2/llvm-lto2.cppllvm.src/tools/llvm-lto2/llvm-lto2.cpp