[PATCH] D70496: [AArch64] Fix issues with large arrays on stack

Kiran Chandramohan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 25 04:23:33 PST 2019


kiranchandramohan marked 2 inline comments as done.
kiranchandramohan added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64FrameLowering.cpp:1395
+  int64_t NumBytes = IsFunclet ? getWinEHFuncletFrameSize(MF)
                            : MFI.getStackSize();
   AArch64FunctionInfo *AFI = MF.getInfo<AArch64FunctionInfo>();
----------------
kiranchandramohan wrote:
> efriedma wrote:
> > Indentation here needs to be fixed.
> Will fix, thanks.
Done.


================
Comment at: llvm/test/CodeGen/AArch64/large-stack.ll:24
+
+attributes #0 = { noinline nounwind optnone uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="generic" "target-features"="+neon" "unsafe-fp-math"="false" "use-soft-float"="false" }
+attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="generic" "target-features"="+neon" "unsafe-fp-math"="false" "use-soft-float"="false" }
----------------
fpetrogalli wrote:
> kiranchandramohan wrote:
> > fpetrogalli wrote:
> > > Do you need attribute #0 and #1?
> > Maybe not. But these attributes are by default generated by clang and hence matches the IR that clang generates. 
> > 
> > Also, the test will need updating since the attribute specified uses some attributes (no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf") which can change the assembly code generated.
> > 
> > What is the standard for these tests do you omit attributes?
> If you need attributes, you should reduce them to the minimal set needed for the test. If `no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf"` is all you need, remove the rest (and merge the two attributes in a single attribute). less is always better! :)
Have now updated the test to have only the necessary attributes and also removed prefixes.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70496/new/

https://reviews.llvm.org/D70496





More information about the llvm-commits mailing list