FailedChanges

Summary

  1. [PDB] Support PDB-backed expressions evaluation (+ fix stuck test) Summary: This patch contains several small fixes, which makes it possible to evaluate expressions on Windows using information from PDB. The changes are: - several sanitize checks; - make IRExecutionUnit::MemoryManager::getSymbolAddress to not return a magic value on a failure, because callers wait 0 in this case; - entry point required to be a file address, not RVA, in the ObjectFilePECOFF; - do not crash on a debuggee second chance exception - it may be an expression evaluation crash. Also fix detection of "crushed" threads in tests; - create parameter declarations for functions in AST to make it possible to call debugee functions from expressions; - relax name searching rules for variables, functions, namespaces and types. Now it works just like in the DWARF plugin; - fix endless recursion in SymbolFilePDB::ParseCompileUnitFunctionForPDBFunc. Reviewers: zturner, asmith, stella.stamenova Reviewed By: stella.stamenova, asmith Tags: #lldb Differential Revision: https://reviews.llvm.org/D53759
  2. [CodeComplete] Cleanup access checking in code completion Summary: Also fixes a crash (see the added 'accessibility-crash.cpp' test). Reviewers: ioeric, kadircet Reviewed By: kadircet Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55124
  3. [Sema] Avoid CallExpr::setNumArgs in Sema::BuildCallToObjectOfClassType CallExpr::setNumArgs is the only thing that prevents storing the arguments of a call expression in a trailing array since it might resize the argument array. setNumArgs is only called in 3 places in Sema, and for all of them it is possible to avoid it. This deals with the call to setNumArgs in BuildCallToObjectOfClassType. Instead of constructing the CXXOperatorCallExpr first and later calling setNumArgs if we have default arguments, we first construct a large enough SmallVector, do the promotion/check of the arguments, and then construct the CXXOperatorCallExpr. Incidentally this also avoid reallocating the arguments when the call operator has default arguments but this is not the primary goal. Differential Revision: https://reviews.llvm.org/D54900 Reviewed By: aaron.ballman
  4. [AMDGPU] Add sdwa support for ADD|SUB U64 decomposed Pseudos The introduction of S_{ADD|SUB}_U64_PSEUDO instructions which are decomposed into VOP3 instruction pairs for S_ADD_U64_PSEUDO: V_ADD_I32_e64 V_ADDC_U32_e64 and for S_SUB_U64_PSEUDO V_SUB_I32_e64 V_SUBB_U32_e64 preclude the use of SDWA to encode a constant. SDWA: Sub-Dword addressing is supported on VOP1 and VOP2 instructions, but not on VOP3 instructions. We desire to fold the bit-and operand into the instruction encoding for the V_ADD_I32 instruction. This requires that we transform the VOP3 into a VOP2 form of the instruction (_e32). %19:vgpr_32 = V_AND_B32_e32 255, killed %16:vgpr_32, implicit $exec %47:vgpr_32, %49:sreg_64_xexec = V_ADD_I32_e64 %26.sub0:vreg_64, %19:vgpr_32, implicit $exec %48:vgpr_32, dead %50:sreg_64_xexec = V_ADDC_U32_e64 %26.sub1:vreg_64, %54:vgpr_32, killed %49:sreg_64_xexec, implicit $exec which then allows the SDWA encoding and becomes %47:vgpr_32 = V_ADD_I32_sdwa 0, %26.sub0:vreg_64, 0, killed %16:vgpr_32, 0, 6, 0, 6, 0, implicit-def $vcc, implicit $exec %48:vgpr_32 = V_ADDC_U32_e32 0, %26.sub1:vreg_64, implicit-def $vcc, implicit $vcc, implicit $exec Differential Revision: https://reviews.llvm.org/D54882
  5. [AST] Fix an uninitialized bug in the bits of FunctionDecl FunctionDeclBits.IsCopyDeductionCandidate was not initialized. This caused a warning with valgrind.
  6. Portable Python script across Python version Python3 does not support type destructuring in function parameters. Differential Revision: https://reviews.llvm.org/D55198
  7. [AST][NFC] Pack CXXDeleteExpr Use the newly available space in the bit-fields of Stmt. This saves 8 bytes per CXXDeleteExpr. NFC.
Revision 348136 by aleksandr.urakov:
[PDB] Support PDB-backed expressions evaluation (+ fix stuck test)

Summary:
This patch contains several small fixes, which makes it possible to evaluate
expressions on Windows using information from PDB. The changes are:
- several sanitize checks;
- make IRExecutionUnit::MemoryManager::getSymbolAddress to not return a magic
  value on a failure, because callers wait 0 in this case;
- entry point required to be a file address, not RVA, in the ObjectFilePECOFF;
- do not crash on a debuggee second chance exception - it may be an expression
  evaluation crash. Also fix detection of "crushed" threads in tests;
- create parameter declarations for functions in AST to make it possible to call
  debugee functions from expressions;
- relax name searching rules for variables, functions, namespaces and types. Now
  it works just like in the DWARF plugin;
- fix endless recursion in SymbolFilePDB::ParseCompileUnitFunctionForPDBFunc.

Reviewers: zturner, asmith, stella.stamenova

Reviewed By: stella.stamenova, asmith

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D53759
Change TypePath in RepositoryPath in Workspace
The file was added/lldb/trunk/lit/SymbolFile/PDB/Inputs/ExpressionsTest.cpplldb.src/lit/SymbolFile/PDB/Inputs/ExpressionsTest.cpp
The file was added/lldb/trunk/lit/SymbolFile/PDB/Inputs/ExpressionsTest0.scriptlldb.src/lit/SymbolFile/PDB/Inputs/ExpressionsTest0.script
The file was added/lldb/trunk/lit/SymbolFile/PDB/Inputs/ExpressionsTest1.scriptlldb.src/lit/SymbolFile/PDB/Inputs/ExpressionsTest1.script
The file was added/lldb/trunk/lit/SymbolFile/PDB/Inputs/ExpressionsTest2.scriptlldb.src/lit/SymbolFile/PDB/Inputs/ExpressionsTest2.script
The file was added/lldb/trunk/lit/SymbolFile/PDB/expressions.testlldb.src/lit/SymbolFile/PDB/expressions.test
The file was modified/lldb/trunk/packages/Python/lldbsuite/test/lldbutil.pylldb.src/packages/Python/lldbsuite/test/lldbutil.py
The file was modified/lldb/trunk/source/Expression/IRExecutionUnit.cpplldb.src/source/Expression/IRExecutionUnit.cpp
The file was modified/lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpplldb.src/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
The file was modified/lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.cpplldb.src/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
The file was modified/lldb/trunk/source/Plugins/SymbolFile/PDB/PDBASTParser.cpplldb.src/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
The file was modified/lldb/trunk/source/Plugins/SymbolFile/PDB/PDBASTParser.hlldb.src/source/Plugins/SymbolFile/PDB/PDBASTParser.h
The file was modified/lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpplldb.src/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
Revision 348135 by ibiryukov:
[CodeComplete] Cleanup access checking in code completion

Summary: Also fixes a crash (see the added 'accessibility-crash.cpp' test).

Reviewers: ioeric, kadircet

Reviewed By: kadircet

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D55124
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/Sema/Sema.hclang.src/include/clang/Sema/Sema.h
The file was modified/cfe/trunk/lib/Parse/ParseExprCXX.cppclang.src/lib/Parse/ParseExprCXX.cpp
The file was modified/cfe/trunk/lib/Sema/CodeCompleteConsumer.cppclang.src/lib/Sema/CodeCompleteConsumer.cpp
The file was modified/cfe/trunk/lib/Sema/SemaAccess.cppclang.src/lib/Sema/SemaAccess.cpp
The file was modified/cfe/trunk/lib/Sema/SemaCodeComplete.cppclang.src/lib/Sema/SemaCodeComplete.cpp
The file was added/cfe/trunk/test/CodeCompletion/accessibility-crash.cppclang.src/test/CodeCompletion/accessibility-crash.cpp
The file was added/cfe/trunk/test/CodeCompletion/accessibility.cppclang.src/test/CodeCompletion/accessibility.cpp
Revision 348134 by brunoricci:
[Sema] Avoid CallExpr::setNumArgs in Sema::BuildCallToObjectOfClassType

CallExpr::setNumArgs is the only thing that prevents storing the arguments
of a call expression in a trailing array since it might resize the argument
array. setNumArgs is only called in 3 places in Sema, and for all of them it
is possible to avoid it.

This deals with the call to setNumArgs in BuildCallToObjectOfClassType.
Instead of constructing the CXXOperatorCallExpr first and later calling
setNumArgs if we have default arguments, we first construct a large
enough SmallVector, do the promotion/check of the arguments, and
then construct the CXXOperatorCallExpr.

Incidentally this also avoid reallocating the arguments when the
call operator has default arguments but this is not the primary goal.

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

Reviewed By: aaron.ballman
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/Sema/SemaOverload.cppclang.src/lib/Sema/SemaOverload.cpp
Revision 348132 by ronlieb:
[AMDGPU] Add sdwa support for ADD|SUB U64 decomposed Pseudos

The introduction of S_{ADD|SUB}_U64_PSEUDO instructions which are decomposed
into VOP3 instruction pairs for S_ADD_U64_PSEUDO:
  V_ADD_I32_e64
  V_ADDC_U32_e64
and for S_SUB_U64_PSEUDO
  V_SUB_I32_e64
  V_SUBB_U32_e64
preclude the use of SDWA to encode a constant.
SDWA: Sub-Dword addressing is supported on VOP1 and VOP2 instructions,
but not on VOP3 instructions.

We desire to fold the bit-and operand into the instruction encoding
for the V_ADD_I32 instruction. This requires that we transform the
VOP3 into a VOP2 form of the instruction (_e32).
  %19:vgpr_32 = V_AND_B32_e32 255,
      killed %16:vgpr_32, implicit $exec
  %47:vgpr_32, %49:sreg_64_xexec = V_ADD_I32_e64
      %26.sub0:vreg_64, %19:vgpr_32, implicit $exec
%48:vgpr_32, dead %50:sreg_64_xexec = V_ADDC_U32_e64
      %26.sub1:vreg_64, %54:vgpr_32, killed %49:sreg_64_xexec, implicit $exec

which then allows the SDWA encoding and becomes
  %47:vgpr_32 = V_ADD_I32_sdwa
      0, %26.sub0:vreg_64, 0, killed %16:vgpr_32, 0, 6, 0, 6, 0,
      implicit-def $vcc, implicit $exec
  %48:vgpr_32 = V_ADDC_U32_e32
      0, %26.sub1:vreg_64, implicit-def $vcc, implicit $vcc, implicit $exec


Differential Revision: https://reviews.llvm.org/D54882
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/AMDGPU/SIInstrInfo.cppllvm.src/lib/Target/AMDGPU/SIInstrInfo.cpp
The file was modified/llvm/trunk/lib/Target/AMDGPU/SIPeepholeSDWA.cppllvm.src/lib/Target/AMDGPU/SIPeepholeSDWA.cpp
The file was added/llvm/trunk/test/CodeGen/AMDGPU/sdwa-op64-test.llllvm.src/test/CodeGen/AMDGPU/sdwa-op64-test.ll
The file was added/llvm/trunk/test/CodeGen/AMDGPU/sdwa-ops.mirllvm.src/test/CodeGen/AMDGPU/sdwa-ops.mir
Revision 348131 by brunoricci:
[AST] Fix an uninitialized bug in the bits of FunctionDecl

FunctionDeclBits.IsCopyDeductionCandidate was not initialized.
This caused a warning with valgrind.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/AST/Decl.cppclang.src/lib/AST/Decl.cpp
Revision 348129 by serge_sans_paille:
Portable Python script across Python version

Python3 does not support type destructuring in function parameters.

Differential Revision: https://reviews.llvm.org/D55198
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/utils/ABITest/Enumeration.pyclang.src/utils/ABITest/Enumeration.py
The file was modified/cfe/trunk/utils/ABITest/TypeGen.pyclang.src/utils/ABITest/TypeGen.py
Revision 348128 by brunoricci:
[AST][NFC] Pack CXXDeleteExpr

Use the newly available space in the bit-fields of Stmt.
This saves 8 bytes per CXXDeleteExpr. NFC.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/AST/ExprCXX.hclang.src/include/clang/AST/ExprCXX.h
The file was modified/cfe/trunk/include/clang/AST/Stmt.hclang.src/include/clang/AST/Stmt.h
The file was modified/cfe/trunk/lib/Serialization/ASTReaderStmt.cppclang.src/lib/Serialization/ASTReaderStmt.cpp
The file was modified/cfe/trunk/lib/Serialization/ASTWriterStmt.cppclang.src/lib/Serialization/ASTWriterStmt.cpp