SuccessChanges

Summary

  1. [COFF] Fix /export:foo=bar when bar is a weak alias Summary: When handling exports from the command line or from .def files, the linker does a "fuzzy" string lookup to allow finding mangled symbols. However, when the symbol is re-exported under a new name, the linker has to transfer the decorations from the exported symbol over to the new name. This is implemented by taking the mangled symbol that was found in the object and replacing the original symbol name with the export name. Before this patch, LLD implemented the fuzzy search by adding an undefined symbol with the unmangled name, and then during symbol resolution, checking if similar mangled symbols had been added after the last round of symbol resolution. If so, LLD makes the original symbol a weak alias of the mangled symbol. Later, to get the original symbol name, LLD would look through the weak alias and forward it on to the import library writer, which copies the symbol decorations. This approach doesn't work when bar is itself a weak alias, as is the case in asan. It's especially bad when the aliasee of bar contains the string "bar", consider "bar_default". In this case, we would end up exporting the symbol "foo_default" when we should've exported just "foo". To fix this, don't look through weak aliases to find the mangled name. Save the mangled name earlier during fuzzy symbol lookup. Fixes PR42074 Reviewers: mstorsjo, ruiu Subscribers: thakis, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62984
  2. [llvm-lipo] Add docs for llvm-lipo Add docs (llvm-lipo.rst) for llvm-lipo. Test plan: make -j8 sphinx check that ./docs/html/CommandGuide/llvm-lipo.html is built correctly and looks okay. Differential revision: https://reviews.llvm.org/D62706
  3. [llvm-objdump] Fix Bugzilla ID 41862 to support checking addresses of disassembled object Summary: This fixes the bugzilla id,41862 to support dealing with checking stop address against start address to support this not being a proper object to check the disasembly against like gnu objdump currently does. Reviewers: jakehehrlich, rupprecht, echristo, jhenderson, grimar Reviewed By: jhenderson Subscribers: MaskRay, smeenai, rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61969 Patch by Nicholas Krause!
  4. Fix string literals to avoid deprecation warnings in regexp patterns In LLDB, where tests run with the debug version of Python, we get a series of deprecation warnings because escape sequences like `\(` are being treated as part of the string literal rather than an escape for the regexp pattern. NFC intended. Differential Revision: https://reviews.llvm.org/D62882
  5. [GWP-ASan] Removed unittests from Android build. Summary: Longstanding issues in the Android test runner means that compiler-rt unit tests don't work on Android due to libc++ link-time issues. Looks like the exported libc++ from the Android NDK is x86-64, even though it's part of the ARM[64] toolchain... See similar measures for ASan and sanitizer-common that disable unit tests for Android. Should fully fix the Android bots (@vlad.tsyrklevich). Reviewers: vitalybuka Reviewed By: vitalybuka Subscribers: srhines, kubamracek, mgorny, javed.absar, kristof.beyls, #sanitizers, llvm-commits, vlad.tsyrklevich Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D63019
  6. [llvm-lipo] Drop unneeded braces. NFC
  7. [llvm-lipo] Implement -archs Displays the architecture names of an input file. Unknown architectures are represented by unknown(cputype,cpusubtype). Patch by Anusha Basana <anusha.basana@gmail.com> Differential Revision: https://reviews.llvm.org/D62753
  8. [DomTreeUpdater] Add all insert before all delete updates to reduce compile time. Summary: The cleanup in D62751 introduced a compile-time regression due to the way DT updates are performed. Add all insert edges then all delete edges in DTU to match the previous compile time. Compile time on the test provided by @mstorsjo before and after this patch on my machine: 113.046s vs 35.649s Repro: clang -target x86_64-w64-mingw32 -c -O3 glew-preproc.c; on https://martin.st/temp/glew-preproc.c. Reviewers: kuhar, NutshellySima, mstorsjo Subscribers: jlebar, mstorsjo, dmgreen, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62981
  9. [llvm-objdump] Add warning if --disassemble-functions specifies an unknown symbol Summary: Fixes Bug 41904 https://bugs.llvm.org/show_bug.cgi?id=41904 Re-land r362768 after it was reverted in r362826. Reviewers: jhenderson, rupprecht, grimar, MaskRay Reviewed By: jhenderson, rupprecht, MaskRay Subscribers: dexonsmith, rupprecht, kristina, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62275
  10. [X86] Remove unnecessary new line escape from the end of a macro. NFC
  11. Relax test so that the clang binary doesn't need to be named "clang".
  12. [ADT] Enable set_difference() to be used on StringSet Summary: Re-land r362766 after it was reverted in r362823. Reviewers: jhenderson, dsanders, aaron.ballman, MatzeB, lhames, dblaikie Reviewed By: dblaikie Subscribers: smeenai, mgrang, mgorny, dexonsmith, kristina, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62369
  13. [GlobalISel] IRTranslator: Translate the intrinsics ignored by CodeGen Summary: Translate `llvm.assume`, `llvm.var.annotation` and `llvm.sideeffect` to nothing as they have no effect on CodeGen. Reviewers: qcolombet, aditya_nandakumar, dsanders, paquette, aemerson, arsenm Reviewed By: arsenm Subscribers: hiraditya, wdng, rovka, kristof.beyls, javed.absar, Petar.Avramovic, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63022
  14. [APFloat] APFloat::Storage::Storage - refix use after move Summary: Re-land r360675 after it was reverted in r360770. This was reported in: https://llvm.org/reports/scan-build/ Based on feedback in: https://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20190513/652286.html Reviewers: RKSimon, efriedma Reviewed By: RKSimon, efriedma Subscribers: eli.friedman, hiraditya, llvm-commits, srhines Tags: #llvm Differential Revision: https://reviews.llvm.org/D62767
  15. [ORC] Update symbol lookup to use a single callback with a required symbol state rather than two callbacks. The asynchronous lookup API (which the synchronous lookup API wraps for convenience) used to take two callbacks: OnResolved (called once all requested symbols had an address assigned) and OnReady to be called once all requested symbols were safe to access). This patch updates the asynchronous lookup API to take a single 'OnComplete' callback and a required state (SymbolState) to determine when the callback should be made. This simplifies the common use case (where the client is interested in a specific state) and will generalize neatly as new states are introduced to track runtime initialization of symbols. Clients who were making use of both callbacks in a single query will now need to issue two queries (one for SymbolState::Resolved and another for SymbolState::Ready). Synchronous lookup API clients who were explicitly passing the WaitOnReady argument will now need neeed to pass a SymbolState instead (for 'WaitOnReady == true' use SymbolState::Ready, for 'WaitOnReady == false' use SymbolState::Resolved). Synchronous lookup API clients who were using default arugment values should see no change.
Revision 362849 by rnk:
[COFF] Fix /export:foo=bar when bar is a weak alias

Summary:
When handling exports from the command line or from .def files, the
linker does a "fuzzy" string lookup to allow finding mangled symbols.
However, when the symbol is re-exported under a new name, the linker has
to transfer the decorations from the exported symbol over to the new
name. This is implemented by taking the mangled symbol that was found in
the object and replacing the original symbol name with the export name.

Before this patch, LLD implemented the fuzzy search by adding an
undefined symbol with the unmangled name, and then during symbol
resolution, checking if similar mangled symbols had been added after the
last round of symbol resolution. If so, LLD makes the original symbol a
weak alias of the mangled symbol. Later, to get the original symbol
name, LLD would look through the weak alias and forward it on to the
import library writer, which copies the symbol decorations. This
approach doesn't work when bar is itself a weak alias, as is the case in
asan. It's especially bad when the aliasee of bar contains the string
"bar", consider "bar_default". In this case, we would end up exporting
the symbol "foo_default" when we should've exported just "foo".

To fix this, don't look through weak aliases to find the mangled name.
Save the mangled name earlier during fuzzy symbol lookup.

Fixes PR42074

Reviewers: mstorsjo, ruiu

Subscribers: thakis, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62984
Change TypePath in RepositoryPath in Workspace
The file was modified/lld/trunk/COFF/Driver.cpp (diff)N/A
The file was modified/lld/trunk/COFF/Driver.h (diff)N/A
The file was modified/lld/trunk/COFF/DriverUtils.cpp (diff)N/A
The file was modified/lld/trunk/COFF/SymbolTable.cpp (diff)N/A
The file was modified/lld/trunk/COFF/SymbolTable.h (diff)N/A
The file was added/lld/trunk/test/COFF/export-stdcall.sN/A
The file was added/lld/trunk/test/COFF/export-weak-alias.sN/A
The file was modified/llvm/trunk/include/llvm/Object/COFFImportFile.h (diff)llvm.src/include/llvm/Object/COFFImportFile.h
Revision 362848 by alexshap:
[llvm-lipo] Add docs for llvm-lipo

Add docs (llvm-lipo.rst) for llvm-lipo.

Test plan:
make -j8 sphinx
check that ./docs/html/CommandGuide/llvm-lipo.html is built correctly and looks okay.

Differential revision: https://reviews.llvm.org/D62706
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/docs/CommandGuide/index.rst (diff)llvm.src/docs/CommandGuide/index.rst
The file was added/llvm/trunk/docs/CommandGuide/llvm-lipo.rstllvm.src/docs/CommandGuide/llvm-lipo.rst
Revision 362847 by rupprecht:
[llvm-objdump] Fix Bugzilla ID 41862 to support checking addresses of disassembled object

Summary:
This fixes the bugzilla id,41862 to support dealing with checking
stop address against start address to support this not being a
proper object to check the disasembly against like gnu objdump
currently does.

Reviewers: jakehehrlich, rupprecht, echristo, jhenderson, grimar

Reviewed By: jhenderson

Subscribers: MaskRay, smeenai, rupprecht, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D61969

Patch by Nicholas Krause!
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/tools/llvm-objdump/X86/start-stop-address.test (diff)llvm.src/test/tools/llvm-objdump/X86/start-stop-address.test
The file was modified/llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp (diff)llvm.src/tools/llvm-objdump/llvm-objdump.cpp
Revision 362846 by amccarth:
Fix string literals to avoid deprecation warnings in regexp patterns

In LLDB, where tests run with the debug version of Python, we get a
series of deprecation warnings because escape sequences like `\(` are
being treated as part of the string literal rather than an escape for
the regexp pattern.

NFC intended.

Differential Revision: https://reviews.llvm.org/D62882
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/utils/lit/lit/TestRunner.py (diff)llvm.src/utils/lit/lit/TestRunner.py
Revision 362842 by hctim:
[GWP-ASan] Removed unittests from Android build.

Summary:
Longstanding issues in the Android test runner means that compiler-rt unit
tests don't work on Android due to libc++ link-time issues. Looks like the
exported libc++ from the Android NDK is x86-64, even though it's part of the
ARM[64] toolchain... See similar measures for ASan and sanitizer-common that
disable unit tests for Android.

Should fully fix the Android bots (@vlad.tsyrklevich).

Reviewers: vitalybuka

Reviewed By: vitalybuka

Subscribers: srhines, kubamracek, mgorny, javed.absar, kristof.beyls, #sanitizers, llvm-commits, vlad.tsyrklevich

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D63019
Change TypePath in RepositoryPath in Workspace
The file was modified/compiler-rt/trunk/test/gwp_asan/CMakeLists.txt (diff)compiler-rt.src/test/gwp_asan/CMakeLists.txt
Revision 362841 by smeenai:
[llvm-lipo] Drop unneeded braces. NFC
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/tools/llvm-lipo/llvm-lipo.cpp (diff)llvm.src/tools/llvm-lipo/llvm-lipo.cpp
Revision 362840 by smeenai:
[llvm-lipo] Implement -archs

Displays the architecture names of an input file.
Unknown architectures are represented by unknown(cputype,cpusubtype).

Patch by Anusha Basana <anusha.basana@gmail.com>

Differential Revision: https://reviews.llvm.org/D62753
Change TypePath in RepositoryPath in Workspace
The file was added/llvm/trunk/test/tools/llvm-lipo/archs-macho-binary-unknown.testllvm.src/test/tools/llvm-lipo/archs-macho-binary-unknown.test
The file was added/llvm/trunk/test/tools/llvm-lipo/archs-macho-binary.testllvm.src/test/tools/llvm-lipo/archs-macho-binary.test
The file was added/llvm/trunk/test/tools/llvm-lipo/archs-universal-binary-arm.testllvm.src/test/tools/llvm-lipo/archs-universal-binary-arm.test
The file was added/llvm/trunk/test/tools/llvm-lipo/archs-universal-binary-unknown.testllvm.src/test/tools/llvm-lipo/archs-universal-binary-unknown.test
The file was added/llvm/trunk/test/tools/llvm-lipo/archs-universal-binary-x86.testllvm.src/test/tools/llvm-lipo/archs-universal-binary-x86.test
The file was added/llvm/trunk/test/tools/llvm-lipo/help-error-messages.testllvm.src/test/tools/llvm-lipo/help-error-messages.test
The file was removed/llvm/trunk/test/tools/llvm-lipo/help-message.testllvm.src/test/tools/llvm-lipo/help-message.test
The file was modified/llvm/trunk/test/tools/llvm-lipo/verify-arch-universal-binary.test (diff)llvm.src/test/tools/llvm-lipo/verify-arch-universal-binary.test
The file was modified/llvm/trunk/tools/llvm-lipo/LipoOpts.td (diff)llvm.src/tools/llvm-lipo/LipoOpts.td
The file was modified/llvm/trunk/tools/llvm-lipo/llvm-lipo.cpp (diff)llvm.src/tools/llvm-lipo/llvm-lipo.cpp
Revision 362839 by asbirlea:
[DomTreeUpdater] Add all insert before all delete updates to reduce compile time.

Summary:
The cleanup in D62751 introduced a compile-time regression due to the way DT updates are performed.
Add all insert edges then all delete edges in DTU to match the previous compile time.
Compile time on the test provided by @mstorsjo before and after this patch on my machine:
113.046s vs 35.649s
Repro: clang -target x86_64-w64-mingw32 -c -O3 glew-preproc.c; on https://martin.st/temp/glew-preproc.c.

Reviewers: kuhar, NutshellySima, mstorsjo

Subscribers: jlebar, mstorsjo, dmgreen, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62981
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/Utils/BasicBlockUtils.cpp (diff)llvm.src/lib/Transforms/Utils/BasicBlockUtils.cpp
Revision 362838 by pozulp:
[llvm-objdump] Add warning if --disassemble-functions specifies an unknown symbol

Summary:
Fixes Bug 41904 https://bugs.llvm.org/show_bug.cgi?id=41904

Re-land r362768 after it was reverted in r362826.

Reviewers: jhenderson, rupprecht, grimar, MaskRay

Reviewed By: jhenderson, rupprecht, MaskRay

Subscribers: dexonsmith, rupprecht, kristina, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62275
Change TypePath in RepositoryPath in Workspace
The file was added/llvm/trunk/test/tools/llvm-objdump/X86/warn-missing-disasm-func.testllvm.src/test/tools/llvm-objdump/X86/warn-missing-disasm-func.test
The file was modified/llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp (diff)llvm.src/tools/llvm-objdump/llvm-objdump.cpp
Revision 362837 by ctopper:
[X86] Remove unnecessary new line escape from the end of a macro. NFC
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/X86/X86InstrFMA3Info.cpp (diff)llvm.src/lib/Target/X86/X86InstrFMA3Info.cpp
Revision 362836 by pcc:
Relax test so that the clang binary doesn't need to be named "clang".
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/test/Driver/symbol-partition.c (diff)clang.src/test/Driver/symbol-partition.c
Revision 362835 by pozulp:
[ADT] Enable set_difference() to be used on StringSet

Summary: Re-land r362766 after it was reverted in r362823.

Reviewers: jhenderson, dsanders, aaron.ballman, MatzeB, lhames, dblaikie

Reviewed By: dblaikie

Subscribers: smeenai, mgrang, mgorny, dexonsmith, kristina, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62369
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/ADT/StringMap.h (diff)llvm.src/include/llvm/ADT/StringMap.h
The file was modified/llvm/trunk/include/llvm/ADT/StringSet.h (diff)llvm.src/include/llvm/ADT/StringSet.h
The file was modified/llvm/trunk/unittests/ADT/CMakeLists.txt (diff)llvm.src/unittests/ADT/CMakeLists.txt
The file was modified/llvm/trunk/unittests/ADT/StringMapTest.cpp (diff)llvm.src/unittests/ADT/StringMapTest.cpp
The file was added/llvm/trunk/unittests/ADT/StringSetTest.cppllvm.src/unittests/ADT/StringSetTest.cpp
Revision 362834 by volkan:
[GlobalISel] IRTranslator: Translate the intrinsics ignored by CodeGen

Summary:
Translate `llvm.assume`, `llvm.var.annotation` and `llvm.sideeffect` to nothing
as they have no effect on CodeGen.

Reviewers: qcolombet, aditya_nandakumar, dsanders, paquette, aemerson, arsenm

Reviewed By: arsenm

Subscribers: hiraditya, wdng, rovka, kristof.beyls, javed.absar, Petar.Avramovic, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D63022
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp (diff)llvm.src/lib/CodeGen/GlobalISel/IRTranslator.cpp
The file was modified/llvm/trunk/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll (diff)llvm.src/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
Revision 362833 by nickdesaulniers:
[APFloat] APFloat::Storage::Storage - refix use after move

Summary:
Re-land r360675 after it was reverted in r360770.

This was reported in:
https://llvm.org/reports/scan-build/

Based on feedback in:
https://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20190513/652286.html

Reviewers: RKSimon, efriedma

Reviewed By: RKSimon, efriedma

Subscribers: eli.friedman, hiraditya, llvm-commits, srhines

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62767
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Support/APFloat.cpp (diff)llvm.src/lib/Support/APFloat.cpp
Revision 362832 by Lang Hames:
[ORC] Update symbol lookup to use a single callback with a required symbol state
rather than two callbacks.

The asynchronous lookup API (which the synchronous lookup API wraps for
convenience) used to take two callbacks: OnResolved (called once all requested
symbols had an address assigned) and OnReady to be called once all requested
symbols were safe to access). This patch updates the asynchronous lookup API to
take a single 'OnComplete' callback and a required state (SymbolState) to
determine when the callback should be made. This simplifies the common use case
(where the client is interested in a specific state) and will generalize neatly
as new states are introduced to track runtime initialization of symbols.

Clients who were making use of both callbacks in a single query will now need to
issue two queries (one for SymbolState::Resolved and another for
SymbolState::Ready). Synchronous lookup API clients who were explicitly passing
the WaitOnReady argument will now need neeed to pass a SymbolState instead (for
'WaitOnReady == true' use SymbolState::Ready, for 'WaitOnReady == false' use
SymbolState::Resolved). Synchronous lookup API clients who were using default
arugment values should see no change.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/ExecutionEngine/Orc/Core.h (diff)llvm.src/include/llvm/ExecutionEngine/Orc/Core.h
The file was modified/llvm/trunk/include/llvm/ExecutionEngine/Orc/Legacy.h (diff)llvm.src/include/llvm/ExecutionEngine/Orc/Legacy.h
The file was modified/llvm/trunk/lib/ExecutionEngine/Orc/Core.cpp (diff)llvm.src/lib/ExecutionEngine/Orc/Core.cpp
The file was modified/llvm/trunk/lib/ExecutionEngine/Orc/ExecutionUtils.cpp (diff)llvm.src/lib/ExecutionEngine/Orc/ExecutionUtils.cpp
The file was modified/llvm/trunk/lib/ExecutionEngine/Orc/LazyReexports.cpp (diff)llvm.src/lib/ExecutionEngine/Orc/LazyReexports.cpp
The file was modified/llvm/trunk/lib/ExecutionEngine/Orc/Legacy.cpp (diff)llvm.src/lib/ExecutionEngine/Orc/Legacy.cpp
The file was modified/llvm/trunk/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp (diff)llvm.src/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp
The file was modified/llvm/trunk/lib/ExecutionEngine/Orc/OrcCBindingsStack.h (diff)llvm.src/lib/ExecutionEngine/Orc/OrcCBindingsStack.h
The file was modified/llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h (diff)llvm.src/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h
The file was modified/llvm/trunk/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp (diff)llvm.src/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp
The file was modified/llvm/trunk/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp (diff)llvm.src/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp
The file was modified/llvm/trunk/unittests/ExecutionEngine/Orc/LegacyAPIInteropTest.cpp (diff)llvm.src/unittests/ExecutionEngine/Orc/LegacyAPIInteropTest.cpp
The file was modified/llvm/trunk/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp (diff)llvm.src/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp