[PATCH] D19410: [scan-build] fix warnings emitted on LLVM ARM code base
Weiming Zhao via llvm-commits
llvm-commits at lists.llvm.org
Thu May 5 10:52:53 PDT 2016
weimingz added inline comments.
================
Comment at: lib/Target/ARM/ARMFrameLowering.cpp:1610
@@ -1609,4 +1609,3 @@
// worth the effort and added fragility?
- bool BigStack = (RS && (MFI->estimateStackSize(MF) +
- ((hasFP(MF) && AFI->hasStackFrame()) ? 4 : 0) >=
- estimateRSStackSizeLimit(MF, this))) ||
+ bool BigStack = ((MFI->estimateStackSize(MF) +
+ ((hasFP(MF) && AFI->hasStackFrame()) ? 4 : 0) >=
----------------
compnerd wrote:
> rengolin wrote:
> > Better ask @weimingz about this one.
> Ugh, this is *subtle*. If we are going to simplify this, please add a couple of asserts.
>
> assert(requiresRegisterScavenging() && "ARM requires register scavenging");
> assert(RS && "Target requiring register scavenging not provided register scavenger");
Agree. We need to simplify the BigStack test. It's hard to read.
It would be better if we refactor it to:
unsigned EstimatedStackSize = MFI->estimateStackSize(MF) + ...
bool BgsTack = EstimatedStackSize >= estimatedRSStackSizeLImit() || ... || ...
http://reviews.llvm.org/D19410
More information about the llvm-commits
mailing list