1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00
llvm-mirror/lib/IR
Jeremy Morse 75cb40612e [DebugInfo] Avoid adding too much indirection to pointer-valued variables
This patch addresses PR41675, where a stack-pointer variable is dereferenced
too many times by its location expression, presenting a value on the stack as
the pointer to the stack.

The difference between a stack *pointer* DBG_VALUE and one that refers to a
value on the stack, is currently the indirect flag. However the DWARF backend
will also try to guess whether something is a memory location or not, based
on whether there is any computation in the location expression. By simply
prepending the stack offset to existing expressions, we can accidentally
convert a register location into a memory location, which introduces a
suprise (and unintended) dereference.

The solution is to add DW_OP_stack_value whenever we add a DIExpression
computation to a stack *pointer*. It's an implicit location computed on the
expression stack, thus needs to be flagged as a stack_value.

For the edge case where the offset is zero and the location could be a register
location, DIExpression::prepend will still generate opcodes, and thus
DW_OP_stack_value must still be added.

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

llvm-svn: 364736
2019-07-01 09:38:23 +00:00
..
AbstractCallSite.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AsmWriter.cpp Revert r363658 "[SVE][IR] Scalable Vector IR Type with pr42210 fix" 2019-06-27 13:55:02 +00:00
AttributeImpl.h Reapply: IR: add optional type to 'byval' function parameters 2019-05-30 18:48:23 +00:00
Attributes.cpp [Attr] Add "willreturn" function attribute 2019-06-27 15:51:40 +00:00
AttributesCompatFunc.td
AutoUpgrade.cpp Change semantics of fadd/fmul vector reductions. 2019-06-11 08:22:10 +00:00
BasicBlock.cpp [NFC] BasicBlock: generalize replaceSuccessorsPhiUsesWith(), take Old bb 2019-05-05 18:59:45 +00:00
CMakeLists.txt Reland "[Remarks] Refactor remark diagnostic emission in a RemarkStreamer" 2019-03-06 15:20:13 +00:00
Comdat.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ConstantFold.cpp Add FNeg IR constant folding support 2019-05-05 16:07:09 +00:00
ConstantFold.h Add FNeg IR constant folding support 2019-05-05 16:07:09 +00:00
ConstantRange.cpp [ConstantRange] Add sdiv() support 2019-06-03 18:19:54 +00:00
Constants.cpp [Constants] Simplify type checking switch in ConstantExpr::get. 2019-05-05 17:19:16 +00:00
ConstantsContext.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Core.cpp [LLVM-C] Deprecate the LLVMValueRef-returning metadata creation functions 2019-04-24 17:05:08 +00:00
DataLayout.cpp Cleanup: llvm::bsearch -> llvm::partition_point after r364719 2019-06-30 11:19:56 +00:00
DebugInfo.cpp [DebugInfo] Delete TypedDINodeRef 2019-05-07 02:06:37 +00:00
DebugInfoMetadata.cpp [DebugInfo] Avoid adding too much indirection to pointer-valued variables 2019-07-01 09:38:23 +00:00
DebugLoc.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DiagnosticHandler.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DiagnosticInfo.cpp [Remarks][NFC] Move the serialization to lib/Remarks 2019-05-30 21:45:59 +00:00
DiagnosticPrinter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DIBuilder.cpp [DebugInfo] Delete TypedDINodeRef 2019-05-07 02:06:37 +00:00
Dominators.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Function.cpp Cleanup: llvm::bsearch -> llvm::partition_point after r364719 2019-06-30 11:19:56 +00:00
Globals.cpp Add IR support, ELF section and user documentation for partitioning feature. 2019-05-29 03:29:01 +00:00
GVMaterializer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InlineAsm.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Instruction.cpp [NFC] Instruction: introduce replaceSuccessorWith() function, use it 2019-05-05 18:59:22 +00:00
Instructions.cpp Silenced a warning "implicit conversion turns string literal into bool" introduced in r362473 2019-06-04 09:31:07 +00:00
IntrinsicInst.cpp [IR] Add SaturatingInst and BinaryOpIntrinsic classes 2019-05-28 18:08:06 +00:00
IRBuilder.cpp Improve reduction intrinsics by overloading result value. 2019-06-13 09:37:38 +00:00
IRPrintingPasses.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LegacyPassManager.cpp ftime-trace: Trace the name of the currently active pass as well. 2019-04-20 23:22:45 +00:00
LLVMBuild.txt [Remarks] Add string deduplication using a string table 2019-04-24 00:06:24 +00:00
LLVMContext.cpp Reland "[Remarks] Refactor remark diagnostic emission in a RemarkStreamer" 2019-03-06 15:20:13 +00:00
LLVMContextImpl.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LLVMContextImpl.h Revert r363658 "[SVE][IR] Scalable Vector IR Type with pr42210 fix" 2019-06-27 13:55:02 +00:00
Mangler.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MDBuilder.cpp Use llvm::stable_sort 2019-04-23 14:51:27 +00:00
Metadata.cpp Use llvm::stable_sort 2019-04-23 14:51:27 +00:00
MetadataImpl.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Module.cpp [PGO] Context sensitive PGO (part 2) 2019-02-28 19:55:07 +00:00
ModuleSummaryIndex.cpp [ThinLTO] Auto-hide prevailing linkonce_odr only when all copies eligible 2019-05-10 20:08:24 +00:00
Operator.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
OptBisect.cpp Fix IR/Analysis layering issue with OptBisect 2019-02-28 04:00:55 +00:00
Pass.cpp [IR] Refactor attribute methods in Function class (NFC) 2019-04-04 22:40:06 +00:00
PassInstrumentation.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PassManager.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PassRegistry.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PassTimingInfo.cpp [Legacy][TimePasses] allow -time-passes reporting into a custom stream 2019-03-22 23:11:08 +00:00
ProfileSummary.cpp [PGO] Context sensitive PGO (part 2) 2019-02-28 19:55:07 +00:00
RemarkStreamer.cpp [Remarks] Extend -fsave-optimization-record to specify the format 2019-06-17 16:06:00 +00:00
SafepointIRVerifier.cpp SafepointIRVerifier port to new Pass Manager 2019-03-31 10:15:39 +00:00
Statepoint.cpp [CallSite removal] Migrate the statepoint GC infrastructure to use the 2019-02-11 07:42:30 +00:00
SymbolTableListTraitsImpl.h [ADT] Notify ilist traits about in-list transfers 2019-01-23 22:59:52 +00:00
Type.cpp Revert r363658 "[SVE][IR] Scalable Vector IR Type with pr42210 fix" 2019-06-27 13:55:02 +00:00
TypeFinder.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Use.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
User.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Value.cpp Introduce Value::stripPointerCastsSameRepresentation 2019-06-04 20:21:46 +00:00
ValueSymbolTable.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Verifier.cpp [Attr] Add "willreturn" function attribute 2019-06-27 15:51:40 +00:00