#
74f12d31 |
| 06-May-2016 |
Weiming Zhao <weimingz@codeaurora.org> |
[ARM] Fix Scavenger assert due to underestimated stack size
(this is resubmit of r268529 with minor refactoring. r268529 was reverted at r268536 due a memory sanitizer failure. I have not been abl
[ARM] Fix Scavenger assert due to underestimated stack size
(this is resubmit of r268529 with minor refactoring. r268529 was reverted at r268536 due a memory sanitizer failure. I have not been able to reproduce that failure and I checked all the variable used in my change but I could not spot an issue. I did some refactoring and see if it will give a clearer hint)
Summary: Currently, when checking if a stack is "BigStack" or not, it doesn't count into spills and arguments. Therefore, LLVM won't reserve spill slot for this actually "BigStack". This may cause scavenger failure.
Reviewers: rengolin
Subscribers: vitalybuka, aemerson, rengolin, tberghammer, danalbert, srhines, llvm-commits
Differential Revision: http://reviews.llvm.org/D19896
llvm-svn: 268810
show more ...
|
#
6b5c8926 |
| 04-May-2016 |
Vitaly Buka <vitalybuka@google.com> |
Revert r268529 because it caused use-of-uninitialized-value
Summary: This reverts commit d88cc0862bf7da64850b89e9bb5ea9f95e7f1184.
#0 0xfed467 in llvm::ARMFrameLowering::determineCalleeSaves(llvm::
Revert r268529 because it caused use-of-uninitialized-value
Summary: This reverts commit d88cc0862bf7da64850b89e9bb5ea9f95e7f1184.
#0 0xfed467 in llvm::ARMFrameLowering::determineCalleeSaves(llvm::MachineFunction&, llvm::BitVector&, llvm::RegScavenger*) const /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/Target/ARM/ARMFrameLowering.cpp:1625:52 #1 0x330d4cc in (anonymous namespace)::PEI::runOnMachineFunction(llvm::MachineFunction&) /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/CodeGen/PrologEpilogInserter.cpp:186:3 #2 0x3193e12 in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/CodeGen/MachineFunctionPass.cpp:60:13 #3 0x396237d in llvm::FPPassManager::runOnFunction(llvm::Function&) /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/IR/LegacyPassManager.cpp:1526:23 #4 0x3962a23 in llvm::FPPassManager::runOnModule(llvm::Module&) /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/IR/LegacyPassManager.cpp:1547:16 #5 0x3963d52 in runOnModule /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/IR/LegacyPassManager.cpp:1603:23 #6 0x3963d52 in llvm::legacy::PassManagerImpl::run(llvm::Module&) /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/IR/LegacyPassManager.cpp:1706 #7 0x6bb910 in compileModule(char**, llvm::LLVMContext&) /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/tools/llc/llc.cpp:412:5 #8 0x6b3c25 in main /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/tools/llc/llc.cpp:218:22 #9 0x7fd4a7d37ec4 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21ec4) #10 0x625c93 in _start (/mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm_build_msan/bin/llc+0x625c93)
Reviewers:
Subscribers:
llvm-svn: 268536
show more ...
|
#
2373f769 |
| 04-May-2016 |
Weiming Zhao <weimingz@codeaurora.org> |
[ARM] Fix Scavenger assert due to underestimated stack size
Summary: Currently, when checking if a stack is "BigStack" or not, it doesn't count into spills and arguments. Therefore, LLVM won't reser
[ARM] Fix Scavenger assert due to underestimated stack size
Summary: Currently, when checking if a stack is "BigStack" or not, it doesn't count into spills and arguments. Therefore, LLVM won't reserve spill slot for this actually "BigStack". This may cause scavenger failure.
Reviewers: rengolin
Subscribers: aemerson, rengolin, tberghammer, danalbert, srhines, llvm-commits
Differential Revision: http://reviews.llvm.org/D19896
llvm-svn: 268529
show more ...
|
#
0da99375 |
| 29-Apr-2016 |
Filipe Cabecinhas <me@filcab.net> |
Unify XDEBUG and EXPENSIVE_CHECKS (into the latter), and add an option to the cmake build to enable them.
Summary: Historically, we had a switch in the Makefiles for turning on "expensive checks". T
Unify XDEBUG and EXPENSIVE_CHECKS (into the latter), and add an option to the cmake build to enable them.
Summary: Historically, we had a switch in the Makefiles for turning on "expensive checks". This has never been ported to the cmake build, but the (dead-ish) code is still around.
This will also make it easier to turn it on in buildbots.
Reviewers: chandlerc
Subscribers: jyknight, mzolotukhin, RKSimon, gberry, llvm-commits
Differential Revision: http://reviews.llvm.org/D19723
llvm-svn: 268050
show more ...
|
#
96115186 |
| 24-Apr-2016 |
Saleem Abdulrasool <compnerd@compnerd.org> |
ARM: fix __chkstk Frame Setup on WoA
This corrects the MI annotations for the stack adjustment following the __chkstk invocation. We were marking the original SP usage as a Def rather than Kill. Th
ARM: fix __chkstk Frame Setup on WoA
This corrects the MI annotations for the stack adjustment following the __chkstk invocation. We were marking the original SP usage as a Def rather than Kill. The (new) assigned value is the definition, the original reference is killed.
Adjust the ISelLowering to mark Kills and FrameSetup as well.
This partially resolves PR27480.
llvm-svn: 267361
show more ...
|
#
707e02c2 |
| 13-Apr-2016 |
Matthias Braun <matze@braunis.de> |
ARM: Use a callee save register for the swiftself parameter.
It is very likely that the swiftself parameter is alive throughout most functions function so putting it into a callee save register shou
ARM: Use a callee save register for the swiftself parameter.
It is very likely that the swiftself parameter is alive throughout most functions function so putting it into a callee save register should avoid spills for the callers with only a minimum amount of extra spills in the callees.
Currently the generated code is correct but unnecessarily spills and reloads arguments passed in callee save registers, I will address this in upcoming patches.
This also adds a missing check that for tail calls the preserved value of the caller must be the same as the callees parameter.
Differential Revision: http://reviews.llvm.org/D18901
llvm-svn: 266253
show more ...
|
#
a6dea06f |
| 11-Apr-2016 |
Tim Northover <tnorthover@apple.com> |
ARM: use r7 as the frame-pointer on all MachO targets.
This is better for a few reasons: + It matches the other tooling for iOS. + It matches EABI in more cases (i.e. Thumb-mode, and in practice
ARM: use r7 as the frame-pointer on all MachO targets.
This is better for a few reasons: + It matches the other tooling for iOS. + It matches EABI in more cases (i.e. Thumb-mode, and in practice we don't use ARM mode). + It leads to infinitesimally smaller code (0.2%, yay!).
rdar://25369506
llvm-svn: 266003
show more ...
|
#
e1a2e90f |
| 31-Mar-2016 |
Hans Wennborg <hans@hanshq.net> |
Change eliminateCallFramePseudoInstr() to return an iterator
This will become necessary in a subsequent change to make this method merge adjacent stack adjustments, i.e. it might erase the previous
Change eliminateCallFramePseudoInstr() to return an iterator
This will become necessary in a subsequent change to make this method merge adjacent stack adjustments, i.e. it might erase the previous and/or next instruction.
It also greatly simplifies the calls to this function from Prolog- EpilogInserter. Previously, that had a bunch of logic to resume iteration after the call; now it just continues with the returned iterator.
Note that this changes the behaviour of PEI a little. Previously, it attempted to re-visit the new instruction created by eliminateCallFramePseudoInstr(). That code was added in r36625, but I can't see any reason for it: the new instructions will obviously not be pseudo instructions, they will not have FrameIndex operands, and we have already accounted for the stack adjustment.
Differential Revision: http://reviews.llvm.org/D18627
llvm-svn: 265036
show more ...
|
Revision tags: llvmorg-3.8.0 |
|
#
fd8cc232 |
| 27-Feb-2016 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
CodeGen: Change MachineInstr to use MachineInstr&, NFC
Change MachineInstr API to prefer MachineInstr& over MachineInstr* whenever the parameter is expected to be non-null. Slowly inching toward be
CodeGen: Change MachineInstr to use MachineInstr&, NFC
Change MachineInstr API to prefer MachineInstr& over MachineInstr* whenever the parameter is expected to be non-null. Slowly inching toward being able to fix PR26753.
llvm-svn: 262149
show more ...
|
Revision tags: llvmorg-3.8.0-rc3, llvmorg-3.8.0-rc2, llvmorg-3.8.0-rc1 |
|
#
8072081b |
| 01-Dec-2015 |
Craig Topper <craig.topper@gmail.com> |
[ARM] Use range-based for loops to avoid the need for calculating an array size that I would have otherwise cconverted to array_lengthof. NFC
llvm-svn: 254381
|
Revision tags: llvmorg-3.7.1, llvmorg-3.7.1-rc2, llvmorg-3.7.1-rc1 |
|
#
775aaeb7 |
| 05-Nov-2015 |
Tim Northover <tnorthover@apple.com> |
Remove windows line endings introduced by r252177. NFC.
llvm-svn: 252217
|
#
057c5a6b |
| 05-Nov-2015 |
Oleg Ranevskyy <oranevskyy@accesssoftek.com> |
[DebugInfo] Fix ARM/AArch64 prologue_end position. Related to D11268.
Summary: This review is related to another review request http://reviews.llvm.org/D11268, does the same and merely fixes a coupl
[DebugInfo] Fix ARM/AArch64 prologue_end position. Related to D11268.
Summary: This review is related to another review request http://reviews.llvm.org/D11268, does the same and merely fixes a couple of issues with it.
D11268 is quite old and has merge conflicts against the current trunk. This request - rebases D11268 onto the new trunk; - resolves the merge conflicts; - fixes the prologue_end tests, which do not pass due to the subprogram definitions not marked as distinct.
Reviewers: echristo, rengolin, kubabrecka
Subscribers: aemerson, rengolin, jyknight, dsanders, llvm-commits, asl
Differential Revision: http://reviews.llvm.org/D14338
llvm-svn: 252177
show more ...
|
#
e0ccdc6d |
| 28-Oct-2015 |
Tim Northover <tnorthover@apple.com> |
ARM: add backend support for the ABI used in WatchOS
At the LLVM level this ABI is essentially a minimal modification of AAPCS to support 16-byte alignment for vector types and the stack.
llvm-svn:
ARM: add backend support for the ABI used in WatchOS
At the LLVM level this ABI is essentially a minimal modification of AAPCS to support 16-byte alignment for vector types and the stack.
llvm-svn: 251570
show more ...
|
#
6389dd9f |
| 23-Oct-2015 |
Oleg Ranevskyy <oranevskyy@accesssoftek.com> |
[ARM CodeGen] @llvm.debugtrap call may be removed when restoring callee saved registers
Summary: When ARMFrameLowering::emitPopInst generates a "pop" instruction to restore the callee saved register
[ARM CodeGen] @llvm.debugtrap call may be removed when restoring callee saved registers
Summary: When ARMFrameLowering::emitPopInst generates a "pop" instruction to restore the callee saved registers, it checks if the LR register is among them. If so, the function may decide to remove the basic block's terminator and replace it with a "pop" to the PC register instead of LR.
This leads to a problem when the block's terminator is preceded by a "llvm.debugtrap" call. The MI iterator points to the trap in such a case, which is also a terminator. If the function decides to restore LR to PC, it erroneously removes the trap.
Reviewers: asl, rengolin
Subscribers: aemerson, jfb, rengolin, dschuff, llvm-commits
Differential Revision: http://reviews.llvm.org/D13672
llvm-svn: 251123
show more ...
|
#
9f9559e8 |
| 19-Oct-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
ARM: Remove implicit ilist iterator conversions, NFC
llvm-svn: 250759
|
#
5084e44d |
| 15-Oct-2015 |
Quentin Colombet <qcolombet@apple.com> |
[ARM] Make sure we do not dereference the end iterator when accessing debug information. Although the problem was always here, it would only be exposed when shrink-wrapping is enable.
rdar://problem
[ARM] Make sure we do not dereference the end iterator when accessing debug information. Although the problem was always here, it would only be exposed when shrink-wrapping is enable.
rdar://problem/23110493
llvm-svn: 250352
show more ...
|
#
1825fac3 |
| 09-Oct-2015 |
Saleem Abdulrasool <compnerd@compnerd.org> |
ARM: tweak WoA frame lowering
Accept r11 when targeting Windows on ARM rather than just low registers. Because we are in a thumb-2 only mode, this may be slightly more expensive in code size, but re
ARM: tweak WoA frame lowering
Accept r11 when targeting Windows on ARM rather than just low registers. Because we are in a thumb-2 only mode, this may be slightly more expensive in code size, but results in better code for the environment since it spills the frame register, which is generally desired for fast stack walking as per the ABI.
llvm-svn: 249804
show more ...
|
#
956b008d |
| 02-Oct-2015 |
Tim Northover <tnorthover@apple.com> |
ARM: correctly align constant pool value on Thumb1 targets.
Since we're using tLDRpci to access it, the constant pool's address must be 0 (mod 4).
llvm-svn: 249163
|
#
beb5bccf |
| 23-Sep-2015 |
Tim Northover <tnorthover@apple.com> |
ARM: fix folding stack adjustment (again again again...)
This time, the issue is that we weren't accounting for the possibility that aligned DPRs could have been stored after the final "push" in a p
ARM: fix folding stack adjustment (again again again...)
This time, the issue is that we weren't accounting for the possibility that aligned DPRs could have been stored after the final "push" in a prologue. When that happened we effectively moved a "sub sp, #N" from below the aligned stores to above them, and everything went to pot.
To make it worse, I'd actually committed something testing that we produced wrong code, so the test update is tiny.
llvm-svn: 248437
show more ...
|
#
d9da1627 |
| 09-Sep-2015 |
Matthias Braun <matze@braunis.de> |
Save LaneMask with livein registers
With subregister liveness enabled we can detect the case where only parts of a register are live in, this is expressed as a 32bit lanemask. The current code only
Save LaneMask with livein registers
With subregister liveness enabled we can detect the case where only parts of a register are live in, this is expressed as a 32bit lanemask. The current code only keeps registers in the live-in list and therefore enumerated all subregisters affected by the lanemask. This turned out to be too conservative as the subregister may also cover additional parts of the lanemask which are not live. Expressing a given lanemask by enumerating a minimum set of subregisters is computationally expensive so the best solution is to simply change the live-in list to store the lanemasks as well. This will reduce memory usage for targets using subregister liveness and slightly increase it for other targets
Differential Revision: http://reviews.llvm.org/D12442
llvm-svn: 247171
show more ...
|
Revision tags: llvmorg-3.7.0, llvmorg-3.7.0-rc4 |
|
#
b2b7ef1d |
| 24-Aug-2015 |
Matthias Braun <matze@braunis.de> |
MachineBasicBlock: Add liveins() method returning an iterator_range
llvm-svn: 245895
|
Revision tags: llvmorg-3.7.0-rc3 |
|
#
f66d3844 |
| 17-Aug-2015 |
Guozhi Wei <carrot@google.com> |
Align SP adjustment in function getSPAdjust
This commit adds a new function TargetFrameLowering::alignSPAdjust and calls it from TargetInstrInfo::getSPAdjust. It fixes PR24142.
llvm-svn: 245253
|
#
5567bafe |
| 15-Aug-2015 |
James Y Knight <jyknight@google.com> |
Remove redundant TargetFrameLowering::getFrameIndexOffset virtual function.
This was the same as getFrameIndexReference, but without the FrameReg output.
Differential Revision: http://reviews.llvm.
Remove redundant TargetFrameLowering::getFrameIndexOffset virtual function.
This was the same as getFrameIndexReference, but without the FrameReg output.
Differential Revision: http://reviews.llvm.org/D12042
llvm-svn: 245148
show more ...
|
Revision tags: studio-1.4, llvmorg-3.7.0-rc2 |
|
#
48b77200 |
| 22-Jul-2015 |
Quentin Colombet <qcolombet@apple.com> |
[ARM] Make the frame lowering code ready for shrink-wrapping.
Shrink-wrapping can now be tested on ARM with -enable-shrink-wrap.
Related to <rdar://problem/20821730>
llvm-svn: 242908
|
#
71a71485 |
| 20-Jul-2015 |
Quentin Colombet <qcolombet@apple.com> |
[ARM] Refactor the prologue/epilogue emission to be more robust.
This is the first step toward supporting shrink-wrapping for this target.
The changes could be summarized by these items: - Expand t
[ARM] Refactor the prologue/epilogue emission to be more robust.
This is the first step toward supporting shrink-wrapping for this target.
The changes could be summarized by these items: - Expand the tail-call return as part of the expand pseudo pass. - Get rid of the assumptions that the epilogue is the exit block: * Do not assume which registers are free in the epilogue. (This indirectly improve the lowering of the code for the segmented stacks, see the test cases.) * Take into account that the basic block can be empty.
Related to <rdar://problem/20821730>
llvm-svn: 242714
show more ...
|