From e9b3fb86034fb4a444f4ad81532a0cde63ac9cb3 Mon Sep 17 00:00:00 2001 From: Artyom Skrobov Date: Mon, 7 Dec 2015 14:22:39 +0000 Subject: [ARM] Generate ABI_optimization_goals build attribute, as described in the ARM ARM. Summary: This reverts r254234, and adds a simple fix for the annoying case of use-after-free. Reviewers: rengolin Subscribers: aemerson, llvm-commits, rengolin Differential Revision: http://reviews.llvm.org/D15236 llvm-svn: 254912 --- .../ARM/build-attributes-optimization-optnone.ll | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 llvm/test/CodeGen/ARM/build-attributes-optimization-optnone.ll (limited to 'llvm/test/CodeGen/ARM/build-attributes-optimization-optnone.ll') diff --git a/llvm/test/CodeGen/ARM/build-attributes-optimization-optnone.ll b/llvm/test/CodeGen/ARM/build-attributes-optimization-optnone.ll new file mode 100644 index 00000000000..cbdb915045c --- /dev/null +++ b/llvm/test/CodeGen/ARM/build-attributes-optimization-optnone.ll @@ -0,0 +1,18 @@ +; RUN: llc < %s -mtriple=arm-none-none-eabi -mcpu=cortex-a7 -O0 | FileCheck %s +; RUN: llc < %s -mtriple=arm-none-none-eabi -mcpu=cortex-a7 -O1 | FileCheck %s +; RUN: llc < %s -mtriple=arm-none-none-eabi -mcpu=cortex-a7 -O3 | FileCheck %s + +; RUN: llc < %s -mtriple=arm-none-none-eabi -mcpu=cortex-a7 -O0 -filetype obj -o - | llvm-readobj -arm-attributes - | FileCheck %s --check-prefix=CHECK-OBJ +; RUN: llc < %s -mtriple=arm-none-none-eabi -mcpu=cortex-a7 -O1 -filetype obj -o - | llvm-readobj -arm-attributes - | FileCheck %s --check-prefix=CHECK-OBJ +; RUN: llc < %s -mtriple=arm-none-none-eabi -mcpu=cortex-a7 -O3 -filetype obj -o - | llvm-readobj -arm-attributes - | FileCheck %s --check-prefix=CHECK-OBJ + +; CHECK: .eabi_attribute 30, 6 @ Tag_ABI_optimization_goals +; CHECK-OBJ: TagName: ABI_optimization_goals +; CHECK-OBJ-NEXT: Description: Best Debugging + +define i32 @f(i64 %z) #0 { + ret i32 0 +} + +attributes #0 = { noinline optnone } + -- cgit v1.2.3