Skip to content
  1. Sep 28, 2015
  2. Sep 27, 2015
    • Yaron Keren's avatar
      Silence clang warning: variable ‘Status’ set but not used. · e5a9dc2f
      Yaron Keren authored
      llvm-svn: 248691
      e5a9dc2f
    • Sanjoy Das's avatar
      [SCEV] identical instructions don't compute equal values · f1090b60
      Sanjoy Das authored
      Before this change `HasSameValue` would return true for distinct
      `alloca` instructions if they happened to be allocating the same
      type (`alloca` instructions are not specified as reading memory).  This
      change adds an explicit whitelist of instruction types for which
      "identical" instructions compute the same value.
      
      Fixes PR24952.
      
      llvm-svn: 248690
      f1090b60
    • Sanjay Patel's avatar
      [InstCombine] fold zexts and constants into a phi (PR24766) · 95334075
      Sanjay Patel authored
      This is one step towards solving PR24766:
      https://llvm.org/bugs/show_bug.cgi?id=24766
      
      We were not producing the same IR for these two C functions because the store
      to the temp bool causes extra zexts:
      
      #include <stdbool.h>
      
      bool switchy(char x1, char x2, char condition) {
         bool conditionMet = false;
         switch (condition) {
         case 0: conditionMet = (x1 == x2); break;
         case 1: conditionMet = (x1 <= x2); break;
         }
         return conditionMet;
      }
      
      bool switchy2(char x1, char x2, char condition) {
         switch (condition) {
         case 0: return (x1 == x2);
         case 1: return (x1 <= x2);
         }
        return false;
      }
      
      As noted in the code comments, this test case manages to avoid the more general existing
      phi optimizations where there are only 2 phi inputs or where there are no constant phi 
      args mixed in with the casts ops. It seems like a corner case, but if we don't catch it, 
      then I don't think we can get SimplifyCFG to further optimize towards the canonical form
      for this function shown in the bug report.
      
      Differential Revision: http://reviews.llvm.org/D12866
      
      llvm-svn: 248689
      95334075
    • Tobias Grosser's avatar
      BlockGenerator: Be less agressive with deleting dead instructions · 0722a1e5
      Tobias Grosser authored
      We now only delete trivially dead instructions in the BB we copy (copyBB), but
      not in any other BB.  Only for copyBB we know that there will _never_ be any
      future uses of instructions that have no use after copyBB has been generated.
      Other instructions in the AST that have been generated by IslNodeBuilder may
      look dead at the moment, but may possibly still be referenced by GlobalMaps. If
      we delete them now, later uses would break surprisingly.
      
      We do not have a test case that breaks due to us deleting too many instructions.
      This issue was found by inspection.
      
      llvm-svn: 248688
      0722a1e5
Loading