Mercurial > hg > CbC > CbC_llvm
comparison lib/CodeGen/TargetOptionsImpl.cpp @ 134:3a76565eade5 LLVM5.0.1
update 5.0.1
author | mir3636 |
---|---|
date | Sat, 17 Feb 2018 09:57:20 +0900 |
parents | 803732b1fca8 |
children | c2174574ed3a |
comparison
equal
deleted
inserted
replaced
133:c60214abe0e8 | 134:3a76565eade5 |
---|---|
11 // | 11 // |
12 //===----------------------------------------------------------------------===// | 12 //===----------------------------------------------------------------------===// |
13 | 13 |
14 #include "llvm/CodeGen/MachineFrameInfo.h" | 14 #include "llvm/CodeGen/MachineFrameInfo.h" |
15 #include "llvm/CodeGen/MachineFunction.h" | 15 #include "llvm/CodeGen/MachineFunction.h" |
16 #include "llvm/CodeGen/TargetFrameLowering.h" | |
17 #include "llvm/CodeGen/TargetSubtargetInfo.h" | |
16 #include "llvm/IR/Function.h" | 18 #include "llvm/IR/Function.h" |
17 #include "llvm/IR/Module.h" | 19 #include "llvm/IR/Module.h" |
18 #include "llvm/Target/TargetFrameLowering.h" | |
19 #include "llvm/Target/TargetOptions.h" | 20 #include "llvm/Target/TargetOptions.h" |
20 #include "llvm/Target/TargetSubtargetInfo.h" | |
21 using namespace llvm; | 21 using namespace llvm; |
22 | 22 |
23 /// DisableFramePointerElim - This returns true if frame pointer elimination | 23 /// DisableFramePointerElim - This returns true if frame pointer elimination |
24 /// optimization should be disabled for the given machine function. | 24 /// optimization should be disabled for the given machine function. |
25 bool TargetOptions::DisableFramePointerElim(const MachineFunction &MF) const { | 25 bool TargetOptions::DisableFramePointerElim(const MachineFunction &MF) const { |
26 // Check to see if we should eliminate all frame pointers. | 26 // Check to see if we should eliminate all frame pointers. |
27 if (MF.getSubtarget().getFrameLowering()->noFramePointerElim(MF)) | 27 if (MF.getSubtarget().getFrameLowering()->noFramePointerElim(MF)) |
28 return true; | 28 return true; |
29 | 29 |
30 // Check to see if we should eliminate non-leaf frame pointers. | 30 // Check to see if we should eliminate non-leaf frame pointers. |
31 if (MF.getFunction()->hasFnAttribute("no-frame-pointer-elim-non-leaf")) | 31 if (MF.getFunction().hasFnAttribute("no-frame-pointer-elim-non-leaf")) |
32 return MF.getFrameInfo().hasCalls(); | 32 return MF.getFrameInfo().hasCalls(); |
33 | 33 |
34 return false; | 34 return false; |
35 } | 35 } |
36 | 36 |