summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [cleanup] Re-sort all the #include lines in LLVM usingChandler Carruth2015-01-141-1/+0
| | | | | | | | | | | utils/sort_includes.py. I clearly haven't done this in a while, so more changed than usual. This even uncovered a missing include from the InstrProf library that I've added. No functionality changed here, just mechanical cleanup of the include order. llvm-svn: 225974
* Debug Info: Emitting a register in DwarfExpression may fail. Report theAdrian Prantl2015-01-141-12/+16
| | | | | | | | status in a bool and let the users deal with the error. NFC. llvm-svn: 225899
* Revert "Debug Info: Bail out of AddMachineRegPiece() if MachineReg is not a"Adrian Prantl2015-01-141-6/+0
| | | | | | | | | This reverts commit r225852, it was a bad idea. MachineReg should always be a physical register. If it isn't this DebugLoc shouldn't have been created in the first place. llvm-svn: 225857
* Debug Info: Bail out of AddMachineRegPiece() if MachineReg is not aAdrian Prantl2015-01-131-0/+6
| | | | | | | physical register. The call to getMinimalPhysRegClass() later on asserts on this condition. llvm-svn: 225852
* Debug Info: Move the complex expression handling (=the remainder) ofAdrian Prantl2015-01-131-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | emitDebugLocValue() into DwarfExpression. Ought to be NFC, but it actually uncovered a bug in the debug-loc-asan.ll testcase. The testcase checks that the address of variable "y" is stored at [RSP+16], which also lines up with the comment. It also check(ed) that the *value* of "y" is stored in RDI before that, but that is actually incorrect, since RDI is the very value that is stored in [RSP+16]. Here's the assembler output: movb 2147450880(%rcx), %r8b #DEBUG_VALUE: bar:y <- RDI cmpb $0, %r8b movq %rax, 32(%rsp) # 8-byte Spill movq %rsi, 24(%rsp) # 8-byte Spill movq %rdi, 16(%rsp) # 8-byte Spill .Ltmp3: #DEBUG_VALUE: bar:y <- [RSP+16] Fixed the comment to spell out the correct register and the check to expect an address rather than a value. Note that the range that is emitted for the RDI location was and is still wrong, it claims to begin at the function prologue, but really it should start where RDI is first assigned. llvm-svn: 225851
* Debug Info: Turn DIExpression::getFrameRegister() into an isFrameRegister()Adrian Prantl2015-01-131-1/+1
| | | | | | | | function. NFC. llvm-svn: 225846
* Debug Info: Move support for constants into DwarfExpression.Adrian Prantl2015-01-131-4/+31
| | | | | | | | | Move the declaration of DebugLocDwarfExpression into DwarfExpression.h because it needs to be accessed from AsmPrinterDwarf.cpp and DwarfDebug.cpp NFC. llvm-svn: 225734
* Make DwarfExpression store the AsmPrinter instead of the TargetMachine.Adrian Prantl2015-01-121-3/+9
| | | | | | NFC. llvm-svn: 225731
* Debug Info: Implement DwarfUnit::addRegisterOpPiece() using DwarfExpression.Adrian Prantl2015-01-121-1/+2
| | | | | | NFC. llvm-svn: 225717
* Debug Info: Implement DwarfUnit::addRegisterOffset using DwarfExpression.Adrian Prantl2015-01-121-0/+16
| | | | | | No functional change. llvm-svn: 225707
* Debug info: Factor out the creation of DWARF expressions from AsmPrinterAdrian Prantl2015-01-121-0/+143
into a new class DwarfExpression that can be shared between AsmPrinter and DwarfUnit. This is the first step towards unifying the two entirely redundant implementations of dwarf expression emission in DwarfUnit and AsmPrinter. Almost no functional change — Testcases were updated because asm comments that used to be on two lines now appear on the same line, which is actually preferable. llvm-svn: 225706
OpenPOWER on IntegriCloud