summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveRegUnits.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [CodeGen] Don't scavenge non-saved regs in exception throwing functionsOliver Stannard2019-02-011-7/+9
| | | | | | | | | | | | | | | | Previously, LiveRegUnits was assuming that if a block has no successors and does not return, then no registers are live at the end of it (because the end of the block is unreachable). This was causing the register scavenger to use callee-saved registers to materialise stack frame addresses without saving them in the prologue. This would normally be fine, because the end of the block is unreachable, but this is not legal if the block ends by throwing a C++ exception. If this happens, the scratch register will be modified, but its previous value won't be preserved, so it doesn't get restored by the exception unwinder. Differential revision: https://reviews.llvm.org/D57381 llvm-svn: 352844
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [CodeGen] Avoid handling DBG_VALUE in LiveRegUnits::stepBackwardKrzysztof Parzyszek2018-06-211-2/+2
| | | | | | | | Patch by Jesper Antonsson. Differential Revision: https://reviews.llvm.org/D48420 llvm-svn: 335233
* Fix a bunch more layering of CodeGen headers that are in TargetDavid Blaikie2017-11-171-1/+1
| | | | | | | | All these headers already depend on CodeGen headers so moving them into CodeGen fixes the layering (since CodeGen depends on Target, not the other way around). llvm-svn: 318490
* Preserve existing regs when adding pristines to LivePhysRegs/LiveRegUnitsKrzysztof Parzyszek2017-09-081-7/+21
| | | | | | Differential Revision: https://reviews.llvm.org/D37600 llvm-svn: 312797
* LiveRegUnits: Rename accumulateBackward()->accumulate()Matthias Braun2017-07-071-1/+1
| | | | | | | | | Contrary to the stepForward()/stepBackward() method accumulate() doesn't have a direction as defs, uses and clobbers all have the same effect. Also improve the documentation comment. llvm-svn: 307351
* LiveRegUnits: Port recent LivePhysRegs bugfixesMatthias Braun2017-06-031-25/+31
| | | | | | | | Adjust code to look more like the code in LivePhysRegs and port over the fix for LivePhysRegs from r304001 and adapt to the new CSR management in MachineRegisterInfo. llvm-svn: 304622
* [CodeGen] Fix some Clang-tidy modernize and Include What You Use warnings; ↵Eugene Zelenko2017-02-171-1/+6
| | | | | | other minor fixes (NFC). llvm-svn: 295499
* LiveRegUnits: Add accumulateBackward() functionMatthias Braun2017-01-211-0/+24
| | | | | | | | | | | | | | | | | | | Re-Commit r292543 with a fix for the situation when the chain end is MBB.end(). This function can be used to accumulate the set of all read and modified register in a sequence of instructions. Use this code in AArch64A57FPLoadBalancing::scavengeRegister() to prove the concept. - The AArch64A57LoadBalancing code is using a backwards analysis now which is irrespective of kill flags. This is the main motivation for this change. Differential Revision: http://reviews.llvm.org/D22082 llvm-svn: 292705
* Revert "LiveRegUnits: Add accumulateBackward() function"Matthias Braun2017-01-201-24/+0
| | | | | | | | This seems to be breaking some bots. This reverts commit r292543. llvm-svn: 292574
* LiveRegUnits: Add accumulateBackward() functionMatthias Braun2017-01-201-0/+24
| | | | | | | | | | | | | | | | This function can be used to accumulate the set of all read and modified register in a sequence of instructions. Use this code in AArch64A57FPLoadBalancing::scavengeRegister() to prove the concept. - The AArch64A57LoadBalancing code is using a backwards analysis now which is irrespective of kill flags. This is the main motivation for this change. Differential Revision: http://reviews.llvm.org/D22082 llvm-svn: 292543
* CodeGen: Add/Factor out LiveRegUnits class; NFCIMatthias Braun2017-01-201-0/+97
| | | | | | | | | | | | | This is a set of register units intended to track register liveness, it is similar in spirit to LivePhysRegs. You can also think of this as the liveness tracking parts of the RegisterScavenger factored out into an own class. This was proposed in http://llvm.org/PR27609 Differential Revision: http://reviews.llvm.org/D21916 llvm-svn: 292542
* Revert "RegScavenging: Add scavengeRegisterBackwards()"Matthias Braun2016-08-191-97/+0
| | | | | | | | | | | The ppc64 multistage bot fails on this. This reverts commit r279124. Also Revert "CodeGen: Add/Factor out LiveRegUnits class; NFCI" because it depends on the previous change This reverts commit r279171. llvm-svn: 279199
* CodeGen: Add/Factor out LiveRegUnits class; NFCIMatthias Braun2016-08-181-0/+97
| | | | | | | | | | | | | This is a set of register units intended to track register liveness, it is similar in spirit to LivePhysRegs. You can also think of this as the liveness tracking parts of the RegisterScavenger factored out into an own class. This was proposed in http://llvm.org/PR27609 Differential Revision: http://reviews.llvm.org/D21916 llvm-svn: 279171
* Convert register liveness tracking to work on a sub-register level instead ↵Juergen Ributzka2013-12-141-111/+0
| | | | | | | | of just register units. Reviewed by Andy llvm-svn: 197315
* Revert "Convert liveness tracking to work on a sub-register level instead of ↵Andrew Trick2013-12-131-0/+111
| | | | | | | | | | just register units." This reverts commit r197253. This was a great change, but Juergen should be the commit author. llvm-svn: 197262
* Convert liveness tracking to work on a sub-register level instead of just ↵Andrew Trick2013-12-131-111/+0
| | | | | | register units. llvm-svn: 197253
* LiveRegUnits: Use *MBB for consistency and convenience.Andrew Trick2013-10-141-3/+3
| | | | llvm-svn: 192634
* LiveRegUnits::removeRegsInMask safety.Andrew Trick2013-10-141-10/+19
| | | | | | | | | Clobbering is exclusive not inclusive on register units. For liveness, we need to consider all the preserved registers. e.g. A regmask that clobbers YMM0 may preserve XMM0. Units are only clobbered when all super-registers are clobbered. llvm-svn: 192623
* Move LiveRegUnits implementation into .cpp. Comment and format.Andrew Trick2013-10-141-0/+102
llvm-svn: 192621
OpenPOWER on IntegriCloud