FailedChanges

Summary

  1. [TargetLowering] Change getOptimalMemOpType to take a function attribute list The MachineFunction wasn't used in getOptimalMemOpType, but more importantly, this allows reuse of findOptimalMemOpLowering that is calling getOptimalMemOpType. This is the groundwork for the changes in D59766 and D59787, that allows implementation of TTI::getMemcpyCost. Differential Revision: https://reviews.llvm.org/D59785
  2. MSan: handle llvm.lifetime.start intrinsic Summary: When a variable goes into scope several times within a single function or when two variables from different scopes share a stack slot it may be incorrect to poison such scoped locals at the beginning of the function. In the former case it may lead to false negatives (see https://github.com/google/sanitizers/issues/590), in the latter - to incorrect reports (because only one origin remains on the stack). If Clang emits lifetime intrinsics for such scoped variables we insert code poisoning them after each call to llvm.lifetime.start(). If for a certain intrinsic we fail to find a corresponding alloca, we fall back to poisoning allocas for the whole function, as it's now impossible to tell which alloca was missed. The new instrumentation may slow down hot loops containing local variables with lifetime intrinsics, so we allow disabling it with -mllvm -msan-handle-lifetime-intrinsics=false. Reviewers: eugenis, pcc Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60617
  3. [DebugInfo] DW_OP_deref_size in PrologEpilogInserter. The PrologEpilogInserter need to insert a DW_OP_deref_size before prepending a memory location expression to an already implicit expression to avoid having the existing expression act on the memory address instead of the value behind it. The reason for using DW_OP_deref_size and not plain DW_OP_deref is that big-endian targets need to read the right size as simply truncating a larger read would yield the wrong result (LSB bytes are not at the lower address). This re-commit fixes issues reported in the first one. Namely deref was inserted under wrong conditions and additionally the deref_size argument was incorrectly encoded. Differential Revision: https://reviews.llvm.org/D59687
Revision 359537 by sjoerdmeijer:
[TargetLowering] Change getOptimalMemOpType to take a function attribute list

The MachineFunction wasn't used in getOptimalMemOpType, but more importantly,
this allows reuse of findOptimalMemOpLowering that is calling getOptimalMemOpType.

This is the groundwork for the changes in D59766 and D59787, that allows
implementation of TTI::getMemcpyCost.

Differential Revision: https://reviews.llvm.org/D59785
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/CodeGen/TargetLowering.htrunk/include/llvm/CodeGen/TargetLowering.h
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpptrunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
The file was modified/llvm/trunk/lib/Target/AArch64/AArch64ISelLowering.cpptrunk/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was modified/llvm/trunk/lib/Target/AArch64/AArch64ISelLowering.htrunk/lib/Target/AArch64/AArch64ISelLowering.h
The file was modified/llvm/trunk/lib/Target/AMDGPU/SIISelLowering.cpptrunk/lib/Target/AMDGPU/SIISelLowering.cpp
The file was modified/llvm/trunk/lib/Target/AMDGPU/SIISelLowering.htrunk/lib/Target/AMDGPU/SIISelLowering.h
The file was modified/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpptrunk/lib/Target/ARM/ARMISelLowering.cpp
The file was modified/llvm/trunk/lib/Target/ARM/ARMISelLowering.htrunk/lib/Target/ARM/ARMISelLowering.h
The file was modified/llvm/trunk/lib/Target/BPF/BPFISelLowering.htrunk/lib/Target/BPF/BPFISelLowering.h
The file was modified/llvm/trunk/lib/Target/Hexagon/HexagonISelLowering.cpptrunk/lib/Target/Hexagon/HexagonISelLowering.cpp
The file was modified/llvm/trunk/lib/Target/Hexagon/HexagonISelLowering.htrunk/lib/Target/Hexagon/HexagonISelLowering.h
The file was modified/llvm/trunk/lib/Target/Mips/MipsISelLowering.cpptrunk/lib/Target/Mips/MipsISelLowering.cpp
The file was modified/llvm/trunk/lib/Target/Mips/MipsISelLowering.htrunk/lib/Target/Mips/MipsISelLowering.h
The file was modified/llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpptrunk/lib/Target/PowerPC/PPCISelLowering.cpp
The file was modified/llvm/trunk/lib/Target/PowerPC/PPCISelLowering.htrunk/lib/Target/PowerPC/PPCISelLowering.h
The file was modified/llvm/trunk/lib/Target/X86/X86ISelLowering.cpptrunk/lib/Target/X86/X86ISelLowering.cpp
The file was modified/llvm/trunk/lib/Target/X86/X86ISelLowering.htrunk/lib/Target/X86/X86ISelLowering.h
Revision 359536 by glider:
MSan: handle llvm.lifetime.start intrinsic

Summary:
When a variable goes into scope several times within a single function
or when two variables from different scopes share a stack slot it may
be incorrect to poison such scoped locals at the beginning of the
function.
In the former case it may lead to false negatives (see
https://github.com/google/sanitizers/issues/590), in the latter - to
incorrect reports (because only one origin remains on the stack).

If Clang emits lifetime intrinsics for such scoped variables we insert
code poisoning them after each call to llvm.lifetime.start().
If for a certain intrinsic we fail to find a corresponding alloca, we
fall back to poisoning allocas for the whole function, as it's now
impossible to tell which alloca was missed.

The new instrumentation may slow down hot loops containing local
variables with lifetime intrinsics, so we allow disabling it with
-mllvm -msan-handle-lifetime-intrinsics=false.

Reviewers: eugenis, pcc

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D60617
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/Instrumentation/MemorySanitizer.cpptrunk/lib/Transforms/Instrumentation/MemorySanitizer.cpp
The file was modified/llvm/trunk/test/Instrumentation/MemorySanitizer/alloca.lltrunk/test/Instrumentation/MemorySanitizer/alloca.ll
Revision 359535 by markus:
[DebugInfo] DW_OP_deref_size in PrologEpilogInserter.

The PrologEpilogInserter need to insert a DW_OP_deref_size before
prepending a memory location expression to an already implicit
expression to avoid having the existing expression act on the memory
address instead of the value behind it.

The reason for using DW_OP_deref_size and not plain DW_OP_deref is that
big-endian targets need to read the right size as simply truncating a
larger read would yield the wrong result (LSB bytes are not at the lower
address).

This re-commit fixes issues reported in the first one. Namely deref was
inserted under wrong conditions and additionally the deref_size argument
was incorrectly encoded.

Differential Revision: https://reviews.llvm.org/D59687
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/IR/DebugInfoMetadata.htrunk/include/llvm/IR/DebugInfoMetadata.h
The file was modified/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpptrunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
The file was modified/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfExpression.cpptrunk/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
The file was modified/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfExpression.htrunk/lib/CodeGen/AsmPrinter/DwarfExpression.h
The file was modified/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpptrunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
The file was modified/llvm/trunk/lib/CodeGen/MIRParser/MIParser.cpptrunk/lib/CodeGen/MIRParser/MIParser.cpp
The file was modified/llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpptrunk/lib/CodeGen/PrologEpilogInserter.cpp
The file was modified/llvm/trunk/lib/IR/DebugInfoMetadata.cpptrunk/lib/IR/DebugInfoMetadata.cpp
The file was added/llvm/trunk/test/CodeGen/X86/prologepilog_deref_size.mirtrunk/test/CodeGen/X86/prologepilog_deref_size.mir