LCOV - code coverage report
Current view: top level - include/llvm/IR - Instruction.def (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 62 64 96.9 %
Date: 2017-09-14 15:23:50 Functions: 2 2 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //===-- llvm/Instruction.def - File that describes Instructions -*- C++ -*-===//
       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 contains descriptions of the various LLVM instructions.  This is
      11             : // used as a central place for enumerating the different instructions and
      12             : // should eventually be the place to put comments about the instructions.
      13             : //
      14             : //===----------------------------------------------------------------------===//
      15             : 
      16             : // NOTE: NO INCLUDE GUARD DESIRED!
      17             : 
      18             : // Provide definitions of macros so that users of this file do not have to
      19             : // define everything to use it...
      20             : //
      21             : #ifndef FIRST_TERM_INST
      22             : #define FIRST_TERM_INST(num)
      23             : #endif
      24             : #ifndef HANDLE_TERM_INST
      25             : #ifndef HANDLE_INST
      26             : #define HANDLE_TERM_INST(num, opcode, Class)
      27             : #else
      28             : #define HANDLE_TERM_INST(num, opcode, Class) HANDLE_INST(num, opcode, Class)
      29             : #endif
      30             : #endif
      31             : #ifndef LAST_TERM_INST
      32             : #define LAST_TERM_INST(num)
      33             : #endif
      34             : 
      35             : #ifndef FIRST_BINARY_INST
      36             : #define FIRST_BINARY_INST(num)
      37             : #endif
      38             : #ifndef HANDLE_BINARY_INST
      39             : #ifndef HANDLE_INST
      40             : #define HANDLE_BINARY_INST(num, opcode, instclass)
      41             : #else
      42             : #define HANDLE_BINARY_INST(num, opcode, Class) HANDLE_INST(num, opcode, Class)
      43             : #endif
      44             : #endif
      45             : #ifndef LAST_BINARY_INST
      46             : #define LAST_BINARY_INST(num)
      47             : #endif
      48             : 
      49             : #ifndef FIRST_MEMORY_INST
      50             : #define FIRST_MEMORY_INST(num)
      51             : #endif
      52             : #ifndef HANDLE_MEMORY_INST
      53             : #ifndef HANDLE_INST
      54             : #define HANDLE_MEMORY_INST(num, opcode, Class)
      55             : #else
      56             : #define HANDLE_MEMORY_INST(num, opcode, Class) HANDLE_INST(num, opcode, Class)
      57             : #endif
      58             : #endif
      59             : #ifndef LAST_MEMORY_INST
      60             : #define LAST_MEMORY_INST(num)
      61             : #endif
      62             : 
      63             : #ifndef FIRST_CAST_INST
      64             : #define FIRST_CAST_INST(num)
      65             : #endif
      66             : #ifndef HANDLE_CAST_INST
      67             : #ifndef HANDLE_INST
      68             : #define HANDLE_CAST_INST(num, opcode, Class)
      69             : #else
      70             : #define HANDLE_CAST_INST(num, opcode, Class) HANDLE_INST(num, opcode, Class)
      71             : #endif
      72             : #endif
      73             : #ifndef LAST_CAST_INST
      74             : #define LAST_CAST_INST(num)
      75             : #endif
      76             : 
      77             : #ifndef FIRST_FUNCLETPAD_INST
      78             : #define FIRST_FUNCLETPAD_INST(num)
      79             : #endif
      80             : #ifndef HANDLE_FUNCLETPAD_INST
      81             : #ifndef HANDLE_INST
      82             : #define HANDLE_FUNCLETPAD_INST(num, opcode, Class)
      83             : #else
      84             : #define HANDLE_FUNCLETPAD_INST(num, opcode, Class) HANDLE_INST(num, opcode, Class)
      85             : #endif
      86             : #endif
      87             : #ifndef LAST_FUNCLETPAD_INST
      88             : #define LAST_FUNCLETPAD_INST(num)
      89             : #endif
      90             : 
      91             : #ifndef FIRST_OTHER_INST
      92             : #define FIRST_OTHER_INST(num)
      93             : #endif
      94             : #ifndef HANDLE_OTHER_INST
      95             : #ifndef HANDLE_INST
      96             : #define HANDLE_OTHER_INST(num, opcode, Class)
      97             : #else
      98             : #define HANDLE_OTHER_INST(num, opcode, Class) HANDLE_INST(num, opcode, Class)
      99             : #endif
     100             : #endif
     101             : #ifndef LAST_OTHER_INST
     102             : #define LAST_OTHER_INST(num)
     103             : #endif
     104             : 
     105             : #ifndef HANDLE_USER_INST
     106             : #define HANDLE_USER_INST(num, opc, Class) HANDLE_OTHER_INST(num, opc, Class)
     107             : #endif
     108             : 
     109             : // Terminator Instructions - These instructions are used to terminate a basic
     110             : // block of the program.   Every basic block must end with one of these
     111             : // instructions for it to be a well formed basic block.
     112             : //
     113             :  FIRST_TERM_INST  ( 1)
     114     2014157 : HANDLE_TERM_INST  ( 1, Ret           , ReturnInst)
     115    89205284 : HANDLE_TERM_INST  ( 2, Br            , BranchInst)
     116     1123204 : HANDLE_TERM_INST  ( 3, Switch        , SwitchInst)
     117       29717 : HANDLE_TERM_INST  ( 4, IndirectBr    , IndirectBrInst)
     118    19999102 : HANDLE_TERM_INST  ( 5, Invoke        , InvokeInst)
     119        5845 : HANDLE_TERM_INST  ( 6, Resume        , ResumeInst)
     120      128156 : HANDLE_TERM_INST  ( 7, Unreachable   , UnreachableInst)
     121        4155 : HANDLE_TERM_INST  ( 8, CleanupRet    , CleanupReturnInst)
     122       12168 : HANDLE_TERM_INST  ( 9, CatchRet      , CatchReturnInst)
     123       17949 : HANDLE_TERM_INST  (10, CatchSwitch   , CatchSwitchInst)
     124             :   LAST_TERM_INST  (10)
     125             : 
     126             : // Standard binary operators...
     127             :  FIRST_BINARY_INST(11)
     128     7456077 : HANDLE_BINARY_INST(11, Add  , BinaryOperator)
     129       76676 : HANDLE_BINARY_INST(12, FAdd , BinaryOperator)
     130      143752 : HANDLE_BINARY_INST(13, Sub  , BinaryOperator)
     131       34893 : HANDLE_BINARY_INST(14, FSub , BinaryOperator)
     132       66562 : HANDLE_BINARY_INST(15, Mul  , BinaryOperator)
     133       53272 : HANDLE_BINARY_INST(16, FMul , BinaryOperator)
     134       12735 : HANDLE_BINARY_INST(17, UDiv , BinaryOperator)
     135       20191 : HANDLE_BINARY_INST(18, SDiv , BinaryOperator)
     136       13442 : HANDLE_BINARY_INST(19, FDiv , BinaryOperator)
     137       11877 : HANDLE_BINARY_INST(20, URem , BinaryOperator)
     138        6970 : HANDLE_BINARY_INST(21, SRem , BinaryOperator)
     139        1092 : HANDLE_BINARY_INST(22, FRem , BinaryOperator)
     140             : 
     141             : // Logical operators (integer operands)
     142       86715 : HANDLE_BINARY_INST(23, Shl  , BinaryOperator) // Shift left  (logical)
     143       66793 : HANDLE_BINARY_INST(24, LShr , BinaryOperator) // Shift right (logical)
     144       43805 : HANDLE_BINARY_INST(25, AShr , BinaryOperator) // Shift right (arithmetic)
     145      178181 : HANDLE_BINARY_INST(26, And  , BinaryOperator)
     146      108858 : HANDLE_BINARY_INST(27, Or   , BinaryOperator)
     147       81072 : HANDLE_BINARY_INST(28, Xor  , BinaryOperator)
     148             :   LAST_BINARY_INST(28)
     149             : 
     150             : // Memory operators...
     151             :  FIRST_MEMORY_INST(29)
     152     4366381 : HANDLE_MEMORY_INST(29, Alloca, AllocaInst)  // Stack management
     153     9456211 : HANDLE_MEMORY_INST(30, Load  , LoadInst  )  // Memory manipulation instrs
     154    10995011 : HANDLE_MEMORY_INST(31, Store , StoreInst )
     155     3243815 : HANDLE_MEMORY_INST(32, GetElementPtr, GetElementPtrInst)
     156        3181 : HANDLE_MEMORY_INST(33, Fence , FenceInst )
     157        8648 : HANDLE_MEMORY_INST(34, AtomicCmpXchg , AtomicCmpXchgInst )
     158       25072 : HANDLE_MEMORY_INST(35, AtomicRMW , AtomicRMWInst )
     159             :   LAST_MEMORY_INST(35)
     160             : 
     161             : // Cast operators ...
     162             : // NOTE: The order matters here because CastInst::isEliminableCastPair
     163             : // NOTE: (see Instructions.cpp) encodes a table based on this ordering.
     164             :  FIRST_CAST_INST(36)
     165      730181 : HANDLE_CAST_INST(36, Trunc   , TruncInst   )  // Truncate integers
     166      238795 : HANDLE_CAST_INST(37, ZExt    , ZExtInst    )  // Zero extend integers
     167       97516 : HANDLE_CAST_INST(38, SExt    , SExtInst    )  // Sign extend integers
     168        8417 : HANDLE_CAST_INST(39, FPToUI  , FPToUIInst  )  // floating point -> UInt
     169       11831 : HANDLE_CAST_INST(40, FPToSI  , FPToSIInst  )  // floating point -> SInt
     170       12155 : HANDLE_CAST_INST(41, UIToFP  , UIToFPInst  )  // UInt -> floating point
     171       19145 : HANDLE_CAST_INST(42, SIToFP  , SIToFPInst  )  // SInt -> floating point
     172        7538 : HANDLE_CAST_INST(43, FPTrunc , FPTruncInst )  // Truncate floating point
     173       12746 : HANDLE_CAST_INST(44, FPExt   , FPExtInst   )  // Extend floating point
     174       86412 : HANDLE_CAST_INST(45, PtrToInt, PtrToIntInst)  // Pointer -> Integer
     175       47618 : HANDLE_CAST_INST(46, IntToPtr, IntToPtrInst)  // Integer -> Pointer
     176     2324196 : HANDLE_CAST_INST(47, BitCast , BitCastInst )  // Type cast
     177        4072 : HANDLE_CAST_INST(48, AddrSpaceCast, AddrSpaceCastInst)  // addrspace cast
     178             :   LAST_CAST_INST(48)
     179             : 
     180             :  FIRST_FUNCLETPAD_INST(49)
     181        1397 : HANDLE_FUNCLETPAD_INST(49, CleanupPad, CleanupPadInst)
     182        1202 : HANDLE_FUNCLETPAD_INST(50, CatchPad  , CatchPadInst)
     183             :   LAST_FUNCLETPAD_INST(50)
     184             : 
     185             : // Other operators...
     186             :  FIRST_OTHER_INST(51)
     187     1389767 : HANDLE_OTHER_INST(51, ICmp   , ICmpInst   )  // Integer comparison instruction
     188       43977 : HANDLE_OTHER_INST(52, FCmp   , FCmpInst   )  // Floating point comparison instr.
     189      999997 : HANDLE_OTHER_INST(53, PHI    , PHINode    )  // PHI node instruction
     190     7292584 : HANDLE_OTHER_INST(54, Call   , CallInst   )  // Call a function
     191      965584 : HANDLE_OTHER_INST(55, Select , SelectInst )  // select instruction
     192           0 : HANDLE_USER_INST (56, UserOp1, Instruction)  // May be used internally in a pass
     193           0 : HANDLE_USER_INST (57, UserOp2, Instruction)  // Internal to passes only
     194        1584 : HANDLE_OTHER_INST(58, VAArg  , VAArgInst  )  // vaarg instruction
     195       91497 : HANDLE_OTHER_INST(59, ExtractElement, ExtractElementInst)// extract from vector
     196      162721 : HANDLE_OTHER_INST(60, InsertElement, InsertElementInst)  // insert into vector
     197      176963 : HANDLE_OTHER_INST(61, ShuffleVector, ShuffleVectorInst)  // shuffle two vectors.
     198      887280 : HANDLE_OTHER_INST(62, ExtractValue, ExtractValueInst)// extract from aggregate
     199       83036 : HANDLE_OTHER_INST(63, InsertValue, InsertValueInst)  // insert into aggregate
     200      581869 : HANDLE_OTHER_INST(64, LandingPad, LandingPadInst)  // Landing pad instruction.
     201             :   LAST_OTHER_INST(64)
     202             : 
     203             : #undef  FIRST_TERM_INST
     204             : #undef HANDLE_TERM_INST
     205             : #undef   LAST_TERM_INST
     206             : 
     207             : #undef  FIRST_BINARY_INST
     208             : #undef HANDLE_BINARY_INST
     209             : #undef   LAST_BINARY_INST
     210             : 
     211             : #undef  FIRST_MEMORY_INST
     212             : #undef HANDLE_MEMORY_INST
     213             : #undef   LAST_MEMORY_INST
     214             : 
     215             : #undef  FIRST_CAST_INST
     216             : #undef HANDLE_CAST_INST
     217             : #undef   LAST_CAST_INST
     218             : 
     219             : #undef  FIRST_FUNCLETPAD_INST
     220             : #undef HANDLE_FUNCLETPAD_INST
     221             : #undef   LAST_FUNCLETPAD_INST
     222             : 
     223             : #undef  FIRST_OTHER_INST
     224             : #undef HANDLE_OTHER_INST
     225             : #undef   LAST_OTHER_INST
     226             : 
     227             : #undef HANDLE_USER_INST
     228             : 
     229             : #ifdef HANDLE_INST
     230             : #undef HANDLE_INST
     231             : #endif

Generated by: LCOV version 1.13