Skip to content
  1. Oct 21, 2013
  2. Oct 20, 2013
    • Michael Gottesman's avatar
      Teach simplify-cfg how to correctly create covered lookup tables for switches on iN with N >= 3. · c024f325
      Michael Gottesman authored
      One optimization simplify-cfg performs is the converting of switches to
      lookup tables if the switch has > 4 cases. This is done by:
      
      1. Finding the max/min case value and calculating the switch case range.
      2. Create a lookup table basic block.
      3. Perform a check in the switch's BB to see if the input value is in
      the switch's case range. If the input value satisfies said predicate
      branch to the lookup table BB, otherwise branch to the switch's default
      destination BB using the default value as the result.
      
      The conditional check consists of subtracting the min case value of the
      table from any input iN value and then ensuring that said value is
      unsigned less than the size of the lookup table represented as an iN
      value.
      
      If the lookup table is a covered lookup table, the size of the table will be N
      which is 0 as an iN value. Thus the comparison will be an `icmp ult` of an iN
      value against 0 which is always false yielding the incorrect result.
      
      This patch fixes this problem by recognizing if we have a covered lookup table
      and if we do, unconditionally jumps to the lookup table BB since the covering
      property of the lookup table implies no input values could not be handled by
      said BB.
      
      rdar://15268442
      
      llvm-svn: 193045
      c024f325
    • Peter Collingbourne's avatar
      Typo. · a5906f06
      Peter Collingbourne authored
      llvm-svn: 193043
      a5906f06
    • Peter Collingbourne's avatar
      Emit prefix data after debug and EH directives. · e9f45e25
      Peter Collingbourne authored
      This ensures that the prefix data is treated as part of the function for
      the purpose of debug info.  This provides a better debugging experience,
      among other things by allowing a debug info client to correctly look up
      a function in debug info given a function pointer.
      
      llvm-svn: 193042
      e9f45e25
    • Peter Collingbourne's avatar
      Emit DWARF line entries for all data in the instruction stream. · 588009e4
      Peter Collingbourne authored
      r182712 attempted to do this, but it failed to handle data emitted via
      EmitBytes.
      
      llvm-svn: 193041
      588009e4
  3. Oct 19, 2013
  4. Oct 18, 2013
Loading