LCOV - code coverage report
Current view: top level - lib/CodeGen - TargetOptionsImpl.cpp (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 6 6 100.0 %
Date: 2017-09-14 15:23:50 Functions: 2 2 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //===-- TargetOptionsImpl.cpp - Options that apply to all targets ----------==//
       2             : //
       3             : //                     The LLVM Compiler Infrastructure
       4             : //
       5             : // This file is distributed under the University of Illinois Open Source
       6             : // License. See LICENSE.TXT for details.
       7             : //
       8             : //===----------------------------------------------------------------------===//
       9             : //
      10             : // This file implements the methods in the TargetOptions.
      11             : //
      12             : //===----------------------------------------------------------------------===//
      13             : 
      14             : #include "llvm/CodeGen/MachineFrameInfo.h"
      15             : #include "llvm/CodeGen/MachineFunction.h"
      16             : #include "llvm/IR/Function.h"
      17             : #include "llvm/IR/Module.h"
      18             : #include "llvm/Target/TargetFrameLowering.h"
      19             : #include "llvm/Target/TargetOptions.h"
      20             : #include "llvm/Target/TargetSubtargetInfo.h"
      21             : using namespace llvm;
      22             : 
      23             : /// DisableFramePointerElim - This returns true if frame pointer elimination
      24             : /// optimization should be disabled for the given machine function.
      25     1847357 : bool TargetOptions::DisableFramePointerElim(const MachineFunction &MF) const {
      26             :   // Check to see if we should eliminate all frame pointers.
      27     1847357 :   if (MF.getSubtarget().getFrameLowering()->noFramePointerElim(MF))
      28             :     return true;
      29             : 
      30             :   // Check to see if we should eliminate non-leaf frame pointers.
      31     3533008 :   if (MF.getFunction()->hasFnAttribute("no-frame-pointer-elim-non-leaf"))
      32        1584 :     return MF.getFrameInfo().hasCalls();
      33             : 
      34             :   return false;
      35             : }
      36             : 
      37             : /// HonorSignDependentRoundingFPMath - Return true if the codegen must assume
      38             : /// that the rounding mode of the FPU can change from its default.
      39       28495 : bool TargetOptions::HonorSignDependentRoundingFPMath() const {
      40       28495 :   return !UnsafeFPMath && HonorSignDependentRoundingFPMathOption;
      41             : }

Generated by: LCOV version 1.13