[all-commits] [llvm/llvm-project] 965ed1: [AArch64] Fix issues with large arrays on stack

kiranchandramohan via All-commits all-commits at lists.llvm.org
Tue Dec 10 03:54:29 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 965ed1e974e80e0b96ac3921e8a915e8e46baa5c
      https://github.com/llvm/llvm-project/commit/965ed1e974e80e0b96ac3921e8a915e8e46baa5c
  Author: Kiran Chandramohan <kiran.chandramohan at arm.com>
  Date:   2019-12-10 (Tue, 10 Dec 2019)

  Changed paths:
    M llvm/include/llvm/CodeGen/MachineFrameInfo.h
    M llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
    M llvm/lib/CodeGen/MachineFrameInfo.cpp
    M llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
    M llvm/lib/Target/AArch64/AArch64FrameLowering.h
    M llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
    M llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h
    M llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp
    A llvm/test/CodeGen/AArch64/large-stack.ll

  Log Message:
  -----------
  [AArch64] Fix issues with large arrays on stack

Summary:
This patch fixes a few issues when large arrays are allocated on the
stack. Currently, clang has inconsistent behaviour, for debug builds
there is an assertion failure when the array size on stack is around 2GB
but there is no assertion when the stack is around 8GB. For release
builds there is no assertion, the compilation succeeds but generates
incorrect code. The incorrect code generated is due to using
int/unsigned int instead of their 64-bit counterparts. This patch,
1) Removes the assertion in frame legality check.
2) Converts int/unsigned int in some places to the 64-bit variants. This
helps in generating correct code and removes the inconsistent behaviour.
3) Adds a test which runs without optimisations.

Reviewers: sdesmalen, efriedma, fhahn, aemerson

Reviewed By: efriedma

Subscribers: eli.friedman, fpetrogalli, kristof.beyls, hiraditya,
llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70496




More information about the All-commits mailing list