1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/include/llvm/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
..
Argument.h IR: make getParamByValType Just Work. NFC. 2019-06-05 20:37:47 +00:00
AssemblyAnnotationWriter.h
Attributes.h Reapply: IR: add optional type to 'byval' function parameters 2019-05-30 18:48:23 +00:00
Attributes.td [Attr] Add "willreturn" function attribute 2019-06-27 15:51:40 +00:00
AutoUpgrade.h [IR] Disallow llvm.global_ctors and llvm.global_dtors of the 2-field form in textual format 2019-05-15 02:35:32 +00:00
BasicBlock.h [NFC] BasicBlock: generalize replaceSuccessorsPhiUsesWith(), take Old bb 2019-05-05 18:59:45 +00:00
CallingConv.h
CallSite.h Reapply: IR: add optional type to 'byval' function parameters 2019-05-30 18:48:23 +00:00
CFG.h
CFGDiff.h
CMakeLists.txt
Comdat.h
Constant.h [InstCombine] canonicalize funnel shift constant shift amount to be modulo bitwidth 2019-03-14 19:22:08 +00:00
ConstantFolder.h [IRBuilder] Add CreateUnOp(...) to the IRBuilder to support unary FNeg 2019-05-28 13:00:52 +00:00
ConstantRange.h [ConstantRange] Add sdiv() support 2019-06-03 18:19:54 +00:00
Constants.h
DataLayout.h [DSE] Bugfix to avoid PartialStoreMerging involving non byte-sized stores 2019-05-24 08:32:02 +00:00
DebugInfo.h
DebugInfoFlags.def [IR/DIVar] Add the flag for params that have unmodified value 2019-06-26 11:19:26 +00:00
DebugInfoMetadata.h [DebugInfo] Avoid adding too much indirection to pointer-valued variables 2019-07-01 09:38:23 +00:00
DebugLoc.h
DerivedTypes.h Revert r363658 "[SVE][IR] Scalable Vector IR Type with pr42210 fix" 2019-06-27 13:55:02 +00:00
DerivedUser.h
DiagnosticHandler.h
DiagnosticInfo.h [Remarks][NFC] Move the serialization to lib/Remarks 2019-05-30 21:45:59 +00:00
DiagnosticPrinter.h
DIBuilder.h Fix Wdocumentation warning. NFCI. 2019-04-09 09:38:25 +00:00
Dominators.h
Function.h IR: make getParamByValType Just Work. NFC. 2019-06-05 20:37:47 +00:00
GetElementPtrTypeIterator.h
GlobalAlias.h
GlobalIFunc.h
GlobalIndirectSymbol.h
GlobalObject.h
GlobalValue.h Add IR support, ELF section and user documentation for partitioning feature. 2019-05-29 03:29:01 +00:00
GlobalVariable.h
GVMaterializer.h
InlineAsm.h
InstIterator.h
InstrTypes.h [IR] Add UnaryOperator::CreateFNegFMF(...) 2019-06-07 18:59:51 +00:00
Instruction.def Implementation of asm-goto support in LLVM 2019-02-08 20:48:56 +00:00
Instruction.h [NFC] Instruction: introduce replaceSuccessorWith() function, use it 2019-05-05 18:59:22 +00:00
Instructions.h [NFC] Update documentation for AtomicCmpXchgInst 2019-06-20 09:37:52 +00:00
InstVisitor.h Implementation of asm-goto support in LLVM 2019-02-08 20:48:56 +00:00
IntrinsicInst.h [IR] Add SaturatingInst and BinaryOpIntrinsic classes 2019-05-28 18:08:06 +00:00
Intrinsics.h Improve reduction intrinsics by overloading result value. 2019-06-13 09:37:38 +00:00
Intrinsics.td [HardwareLoops] Loop counter guard intrinsic 2019-06-28 07:38:16 +00:00
IntrinsicsAArch64.td Test forward references in IntrinsicEmitter on Neon LD(2|3|4) 2019-06-17 12:01:53 +00:00
IntrinsicsAMDGPU.td AMDGPU: Make amdgcn.s.get.waveid.in.workgroup inaccessiblememonly 2019-06-25 13:03:06 +00:00
IntrinsicsARM.td [ARM][CMSE] Add cmse intrinsics for TT instructions 2019-05-14 16:14:24 +00:00
IntrinsicsBPF.td
IntrinsicsHexagon.td Hexagon: Add ImmArg to intrinsics 2019-03-13 19:46:33 +00:00
IntrinsicsMips.td Mips: Add ImmArg to intrinsics 2019-03-13 19:07:59 +00:00
IntrinsicsNVVM.td Revert "[NVPTX][NFC] Fix documentation for shfl instructions." The 2019-06-24 23:29:20 +00:00
IntrinsicsPowerPC.td Add __builtin_dcbf support for PPC 2019-04-29 23:25:33 +00:00
IntrinsicsRISCV.td [RISCV] Add ImmArg to intrinsics 2019-03-18 06:01:27 +00:00
IntrinsicsSystemZ.td SystemZ: Add ImmArg to intrinsics 2019-03-13 19:46:32 +00:00
IntrinsicsWebAssembly.td [WebAssembly] Add immarg attribute to intrinsics 2019-03-19 05:02:30 +00:00
IntrinsicsX86.td [X86] Add missing properties on llvm.x86.sse.{st,ld}mxcsr 2019-06-19 08:44:31 +00:00
IntrinsicsXCore.td
IRBuilder.h [NFC][IR] Move CreateFNegFMF(...) next to CreateFNeg(...). 2019-06-19 16:35:15 +00:00
IRPrintingPasses.h
LegacyPassManager.h
LegacyPassManagers.h
LegacyPassNameParser.h
LLVMContext.h Reland "[Remarks] Refactor remark diagnostic emission in a RemarkStreamer" 2019-03-06 15:20:13 +00:00
Mangler.h
MDBuilder.h
Metadata.def Add LLVM IR debug info support for Fortran COMMON blocks 2019-04-08 19:13:55 +00:00
Metadata.h
Module.h [PGO] Remove the default parameter in ProfileSummary API. NFC 2019-03-01 18:36:24 +00:00
ModuleSlotTracker.h
ModuleSummaryIndex.h [ThinLTO] Auto-hide prevailing linkonce_odr only when all copies eligible 2019-05-10 20:08:24 +00:00
ModuleSummaryIndexYAML.h [ThinLTO] Auto-hide prevailing linkonce_odr only when all copies eligible 2019-05-10 20:08:24 +00:00
NoFolder.h [IRBuilder] Add CreateUnOp(...) to the IRBuilder to support unary FNeg 2019-05-28 13:00:52 +00:00
OperandTraits.h
Operator.h Reland "Relax constraints for reduction vectorization" 2019-03-12 01:31:44 +00:00
OptBisect.h Fix IR/Analysis layering issue with OptBisect 2019-02-28 04:00:55 +00:00
PassInstrumentation.h
PassManager.h [AliasAnalysis/NewPassManager] Invalidate AAManager less often. 2019-04-30 22:15:47 +00:00
PassManagerInternal.h
PassTimingInfo.h [Legacy][TimePasses] allow -time-passes reporting into a custom stream 2019-03-22 23:11:08 +00:00
PatternMatch.h [IR][Patternmatch] Add m_SpecificInt_ULT() predicate 2019-06-29 11:51:37 +00:00
PredIteratorCache.h
ProfileSummary.h [PGO] Context sensitive PGO (part 2) 2019-02-28 19:55:07 +00:00
RemarkStreamer.h [Remarks] Extend -fsave-optimization-record to specify the format 2019-06-17 16:06:00 +00:00
RuntimeLibcalls.def [CodeGen] Add lrint/llrint builtins 2019-05-28 20:47:44 +00:00
SafepointIRVerifier.h SafepointIRVerifier port to new Pass Manager 2019-03-31 10:15:39 +00:00
Statepoint.h Fix uninitialized value warnings in StatepointBase constructors. NFCI. 2019-05-09 12:21:00 +00:00
SymbolTableListTraits.h
TrackingMDRef.h
Type.h Revert r363658 "[SVE][IR] Scalable Vector IR Type with pr42210 fix" 2019-06-27 13:55:02 +00:00
TypeFinder.h
Use.h
UseListOrder.h
User.h
Value.def
Value.h Introduce Value::stripPointerCastsSameRepresentation 2019-06-04 20:21:46 +00:00
ValueHandle.h
ValueMap.h
ValueSymbolTable.h
Verifier.h