SuccessChanges

Summary

  1. Revert rL309320 - "[OCaml] Respect CMAKE_C_FLAGS for OCaml C files" This causes buildbot breakage for systems where OCaml files are built with a different compiler.
  2. test: require x86 backend Ensure that the target is registered before using it. Should fix the hexagon Bots.
  3. Support libc++abi in addition to libstdc++ This change adds sanitizer support for LLVM's libunwind and libc++abi as an alternative to libstdc++. This allows using the in tree version of libunwind and libc++abi which is useful when building a toolchain for different target. Differential Revision: https://reviews.llvm.org/D34501
  4. Support compiler-rt builtins This change adds support for compiler-rt builtins as an alternative compiler runtime to libgcc. Differential Revision: https://reviews.llvm.org/D35165
  5. MC: add support for cfi_return_column This adds support for the CFI pseudo-op return_column. This specifies the frame table column which contains the return address. Addresses PR33953!
  6. MC: clang-format enumeration (NFC) This was hard to insert elements into. clang-format it so that it is easier. NFC.
  7. Revert "[SCEV] Cache results of computeExitLimit" This reverts commit r309080. The patch needs to clear out the ScalarEvolution::ExitLimits cache in forgetMemoizedResults. I've replied on the commit thread for the patch with more details.
  8. [MachineOutliner] NFC: Split up getOutliningBenefit This is some more cleanup in preparation for some actual functional changes. This splits getOutliningBenefit into two cost functions: getOutliningCallOverhead and getOutliningFrameOverhead. These functions return the number of instructions that would be required to call a specific function and the number of instructions that would be required to construct a frame for a specific funtion. The actual outlining benefit logic is moved into the outliner, which calls these functions. The goal of refactoring getOutliningBenefit is to: - Get us closer to getting rid of the IsTailCall flag - Further split up "target-specific" things and "general algorithm" things
  9. [JumpThreading] Stop falsely preserving LazyValueInfo. JumpThreading claims to preserve LVI, but it doesn't preserve the analyses which LVI holds a reference to (e.g. the Dominator). In the current pass manager infrastructure, after JT runs, the PM frees these analyses (including DominatorTree) but preserves LVI. CorrelatedValuePropagation runs immediately after and queries a corrupted domtree, causing weird miscompiles. This commit disables the preservation of LVI for the time being. Eventually, we should either move LVI to a proper dependency tracking mechanism (i.e. an analyses shouldn't hold references to other analyses and compute them on demand if needed), or we should teach all the passes preserving LVI to preserve the analyses LVI depends on. The new pass manager has a mechanism to invalidate LVI in case one of the analyses it depends on becomes invalid, so this problem shouldn't exist (at least not in this immediate form), but handling of analyses holding references is still a very delicate subject. Fixes PR33917 (and rustc).
  10. DebugInfo: Consider a CU containing only local imported entities to be 'empty' This can come up in ThinLTO & wastes space & makes degenerate IR. As per the added FIXME, ultimately, local imported entities should hang off the function and that way the imported entity list on the CU can be tested for emptiness like all the other CU lists. (function-attached local imported entities are probably also the best path forward for fixing how imported entities are handled both in cross-module use (currently, while ThinLTO preserves the imported entities, they would not get used at the imported inlined location - only in the abstract origin that appears in the partial CU created by the import (which isn't emitted under Fission due to cross-CU limitations there)) and to reduce the number of points where imported entities are emitted (they're currently emitted into every inlined instance, concrete instance, and abstract origin - they should only go in teh abstract origin if there is one, otherwise in the concrete instance - but this requires lots of delayed handling and wiring up, same as abstract variables & subprograms))
  11. [JumpThreading] Add an option to dump LazyValueInfo after the run. Differential Revision: https://reviews.llvm.org/D35973
  12. Update comment in test case after r309308.
  13. [sanitizer-coverage] add a run-time test for -fsanitize-coverage=inline-8bit-counters,pc-table
  14. ARMFrameLowering: Only set ExtraCSSpill for actually unused registers. The code assumed that unclobbered/unspilled callee saved registers are unused in the function. This is not true for callee saved registers that are also used to pass parameters such as swiftself. rdar://33401922
Revision 309364 by mgorny:
Revert rL309320 - "[OCaml] Respect CMAKE_C_FLAGS for OCaml C files"

This causes buildbot breakage for systems where OCaml files are built
with a different compiler.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/cmake/modules/AddOCaml.cmakellvm.src/cmake/modules/AddOCaml.cmake
Revision 309363 by Saleem Abdulrasool:
test: require x86 backend

Ensure that the target is registered before using it.  Should fix the
hexagon Bots.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/Assembler/return-column.sllvm.src/test/Assembler/return-column.s
Revision 309362 by phosek:
Support libc++abi in addition to libstdc++

This change adds sanitizer support for LLVM's libunwind and libc++abi
as an alternative to libstdc++. This allows using the in tree version
of libunwind and libc++abi which is useful when building a toolchain
for different target.

Differential Revision: https://reviews.llvm.org/D34501
Change TypePath in RepositoryPath in Workspace
The file was modified/compiler-rt/trunk/CMakeLists.txtcompiler-rt.src/CMakeLists.txt
The file was modified/compiler-rt/trunk/lib/asan/CMakeLists.txtcompiler-rt.src/lib/asan/CMakeLists.txt
The file was modified/compiler-rt/trunk/lib/tsan/dd/CMakeLists.txtcompiler-rt.src/lib/tsan/dd/CMakeLists.txt
The file was modified/compiler-rt/trunk/lib/ubsan/CMakeLists.txtcompiler-rt.src/lib/ubsan/CMakeLists.txt
Revision 309361 by phosek:
Support compiler-rt builtins

This change adds support for compiler-rt builtins as an alternative
compiler runtime to libgcc.

Differential Revision: https://reviews.llvm.org/D35165
Change TypePath in RepositoryPath in Workspace
The file was modified/compiler-rt/trunk/CMakeLists.txtcompiler-rt.src/CMakeLists.txt
The file was added/compiler-rt/trunk/cmake/Modules/HandleCompilerRT.cmakecompiler-rt.src/cmake/Modules/HandleCompilerRT.cmake
The file was modified/compiler-rt/trunk/cmake/config-ix.cmakecompiler-rt.src/cmake/config-ix.cmake
The file was modified/compiler-rt/trunk/lib/asan/CMakeLists.txtcompiler-rt.src/lib/asan/CMakeLists.txt
The file was modified/compiler-rt/trunk/lib/lsan/CMakeLists.txtcompiler-rt.src/lib/lsan/CMakeLists.txt
The file was modified/compiler-rt/trunk/lib/stats/CMakeLists.txtcompiler-rt.src/lib/stats/CMakeLists.txt
The file was modified/compiler-rt/trunk/lib/tsan/CMakeLists.txtcompiler-rt.src/lib/tsan/CMakeLists.txt
The file was modified/compiler-rt/trunk/lib/tsan/dd/CMakeLists.txtcompiler-rt.src/lib/tsan/dd/CMakeLists.txt
The file was modified/compiler-rt/trunk/lib/ubsan/CMakeLists.txtcompiler-rt.src/lib/ubsan/CMakeLists.txt
Revision 309360 by Saleem Abdulrasool:
MC: add support for cfi_return_column

This adds support for the CFI pseudo-op return_column.  This specifies
the frame table column which contains the return address.

Addresses PR33953!
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/MC/MCDwarf.hllvm.src/include/llvm/MC/MCDwarf.h
The file was modified/llvm/trunk/include/llvm/MC/MCStreamer.hllvm.src/include/llvm/MC/MCStreamer.h
The file was modified/llvm/trunk/lib/MC/MCAsmStreamer.cppllvm.src/lib/MC/MCAsmStreamer.cpp
The file was modified/llvm/trunk/lib/MC/MCDwarf.cppllvm.src/lib/MC/MCDwarf.cpp
The file was modified/llvm/trunk/lib/MC/MCParser/AsmParser.cppllvm.src/lib/MC/MCParser/AsmParser.cpp
The file was modified/llvm/trunk/lib/MC/MCStreamer.cppllvm.src/lib/MC/MCStreamer.cpp
The file was added/llvm/trunk/test/Assembler/return-column.sllvm.src/test/Assembler/return-column.s
Revision 309359 by Saleem Abdulrasool:
MC: clang-format enumeration (NFC)

This was hard to insert elements into.  clang-format it so that it is
easier.  NFC.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/MC/MCParser/AsmParser.cppllvm.src/lib/MC/MCParser/AsmParser.cpp
Revision 309357 by sanjoy:
Revert "[SCEV] Cache results of computeExitLimit"

This reverts commit r309080.  The patch needs to clear out the
ScalarEvolution::ExitLimits cache in forgetMemoizedResults.

I've replied on the commit thread for the patch with more details.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/Analysis/ScalarEvolution.hllvm.src/include/llvm/Analysis/ScalarEvolution.h
The file was modified/llvm/trunk/lib/Analysis/ScalarEvolution.cppllvm.src/lib/Analysis/ScalarEvolution.cpp
The file was removed/llvm/trunk/test/Analysis/ScalarEvolution/cache_loop_exit_limit.llllvm.src/test/Analysis/ScalarEvolution/cache_loop_exit_limit.ll
Revision 309356 by paquette:
[MachineOutliner] NFC: Split up getOutliningBenefit

This is some more cleanup in preparation for some actual
functional changes. This splits getOutliningBenefit into
two cost functions: getOutliningCallOverhead and
getOutliningFrameOverhead. These functions return the
number of instructions that would be required to call
a specific function and the number of instructions
that would be required to construct a frame for a
specific funtion. The actual outlining benefit logic
is moved into the outliner, which calls these functions.

The goal of refactoring getOutliningBenefit is to:

- Get us closer to getting rid of the IsTailCall flag

- Further split up "target-specific" things and
"general algorithm" things
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/Target/TargetInstrInfo.hllvm.src/include/llvm/Target/TargetInstrInfo.h
The file was modified/llvm/trunk/lib/CodeGen/MachineOutliner.cppllvm.src/lib/CodeGen/MachineOutliner.cpp
The file was modified/llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.cppllvm.src/lib/Target/AArch64/AArch64InstrInfo.cpp
The file was modified/llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.hllvm.src/lib/Target/AArch64/AArch64InstrInfo.h
The file was modified/llvm/trunk/lib/Target/X86/X86InstrInfo.cppllvm.src/lib/Target/X86/X86InstrInfo.cpp
The file was modified/llvm/trunk/lib/Target/X86/X86InstrInfo.hllvm.src/lib/Target/X86/X86InstrInfo.h
Revision 309355 by davide:
[JumpThreading] Stop falsely preserving LazyValueInfo.

JumpThreading claims to preserve LVI, but it doesn't preserve
the analyses which LVI holds a reference to (e.g. the Dominator).
In the current pass manager infrastructure, after JT runs, the
PM frees these analyses (including DominatorTree) but preserves
LVI.

CorrelatedValuePropagation runs immediately after and queries
a corrupted domtree, causing weird miscompiles.

This commit disables the preservation of LVI for the time being.
Eventually, we should either move LVI to a proper dependency
tracking mechanism (i.e. an analyses shouldn't hold references
to other analyses and compute them on demand if needed), or
we should teach all the passes preserving LVI to preserve the
analyses LVI depends on.

The new pass manager has a mechanism to invalidate LVI in case
one of the analyses it depends on becomes invalid, so this problem
shouldn't exist (at least not in this immediate form), but handling
of analyses holding references is still a very delicate subject.

Fixes PR33917 (and rustc).
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/Scalar/JumpThreading.cppllvm.src/lib/Transforms/Scalar/JumpThreading.cpp
The file was added/llvm/trunk/test/Transforms/JumpThreading/pr33917.llllvm.src/test/Transforms/JumpThreading/pr33917.ll
Revision 309354 by dblaikie:
DebugInfo: Consider a CU containing only local imported entities to be 'empty'

This can come up in ThinLTO & wastes space & makes degenerate IR.

As per the added FIXME, ultimately, local imported entities should hang
off the function and that way the imported entity list on the CU can be
tested for emptiness like all the other CU lists.

(function-attached local imported entities are probably also the best
path forward for fixing how imported entities are handled both in
cross-module use (currently, while ThinLTO preserves the imported
entities, they would not get used at the imported inlined location -
only in the abstract origin that appears in the partial CU created by
the import (which isn't emitted under Fission due to cross-CU
limitations there)) and to reduce the number of points where imported
entities are emitted (they're currently emitted into every inlined
instance, concrete instance, and abstract origin - they should only go
in teh abstract origin if there is one, otherwise in the concrete
instance - but this requires lots of delayed handling and wiring up,
same as abstract variables & subprograms))
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/IR/Metadata.hllvm.src/include/llvm/IR/Metadata.h
The file was modified/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cppllvm.src/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
The file was modified/llvm/trunk/test/DebugInfo/omit-empty.llllvm.src/test/DebugInfo/omit-empty.ll
Revision 309353 by davide:
[JumpThreading] Add an option to dump LazyValueInfo after the run.

Differential Revision:  https://reviews.llvm.org/D35973
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/Scalar/JumpThreading.cppllvm.src/lib/Transforms/Scalar/JumpThreading.cpp
The file was modified/llvm/trunk/test/Analysis/LazyValueAnalysis/lvi-after-jumpthreading.llllvm.src/test/Analysis/LazyValueAnalysis/lvi-after-jumpthreading.ll
Revision 309352 by ahatanak:
Update comment in test case after r309308.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/test/CodeGenCXX/eh.cppclang.src/test/CodeGenCXX/eh.cpp
Revision 309351 by kcc:
[sanitizer-coverage] add a run-time test for  -fsanitize-coverage=inline-8bit-counters,pc-table
Change TypePath in RepositoryPath in Workspace
The file was modified/compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cccompiler-rt.src/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cc
Revision 309350 by matze:
ARMFrameLowering: Only set ExtraCSSpill for actually unused registers.

The code assumed that unclobbered/unspilled callee saved registers are
unused in the function. This is not true for callee saved registers that are
also used to pass parameters such as swiftself.

rdar://33401922
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/ARM/ARMFrameLowering.cppllvm.src/lib/Target/ARM/ARMFrameLowering.cpp
The file was added/llvm/trunk/test/CodeGen/ARM/pei-swiftself.mirllvm.src/test/CodeGen/ARM/pei-swiftself.mir