[PATCH] [test-suite] Add test for basic correctness of frame lowering

Kristof Beyls kristof.beyls at arm.com
Thu Apr 9 06:53:33 PDT 2015


As part of developing http://reviews.llvm.org/D8876 (adding dynamic stack alignment support
for AArch64), I needed a run-time test to check the basic correctness of frame lowering.
There didn't seem to be a test already that aims to check basic correct generation of
frame setup/prologue code & accesses to objects on the stack.

The added test in this patch uses a template function, so that depending on the
template parameters, the different areas on the stack (arguments, locals, VLAs, alignment
spacing, spill slots, ...) are either present or not present. By instantiating this function
for all combination of its template parameters, the basic correct setup of the frame for
all combinations of frame areas being present or not, is being tested.

I'm afraid the test case needs some C++11 features - so this is the first test added to
the test suite that relies on C++11. I've created a separate sub-directory for tests needing
C++11 features, so hopefully it'll be possible for people to still use the test-suite with
compilers not supporting C++11, if that would be needed.

I think it would be useful to add this to the test-suite, so buildbots running LNT will
detect correctness regressions in frame layout code quickly.

Is adding a test case like this OK? Any review comments on the code?

Thanks,

Kristof

http://reviews.llvm.org/D8922

Files:
  MultiSource/Makefile
  MultiSource/UnitTests/C++11/Makefile
  MultiSource/UnitTests/C++11/frame_layout/Makefile
  MultiSource/UnitTests/C++11/frame_layout/frame_layout-2.cpp
  MultiSource/UnitTests/C++11/frame_layout/frame_layout.cpp
  MultiSource/UnitTests/C++11/frame_layout/frame_layout.reference_output
  MultiSource/UnitTests/Makefile

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8922.23488.patch
Type: text/x-patch
Size: 27233 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150409/7482cf89/attachment.bin>


More information about the llvm-commits mailing list