Skip to content
  1. Jan 22, 2014
    • Venkatraman Govindaraju's avatar
      f52927fb
    • Chandler Carruth's avatar
      [SROA] Fix a bug which could cause the common type finding to return · 4de31543
      Chandler Carruth authored
      inconsistent results for different orderings of alloca slices. The
      fundamental issue is that it is just always a mistake to return early
      from this function. There is no effective early exit to leverage. This
      patch stops trynig to do so and simplifies the code a bit as
      a consequence.
      
      Original diagnosis and patch by James Molloy with some name tweaks by me
      in part reflecting feedback from Duncan Smith on the mailing list.
      
      llvm-svn: 199771
      4de31543
    • Rafael Espindola's avatar
      Be a bit more consistent about using ErrorOr when constructing Binary objects. · 692410ef
      Rafael Espindola authored
      The constructors of classes deriving from Binary normally take an error_code
      as an argument to the constructor. My original intent was to change them
      to have a trivial constructor and move the initial parsing logic to a static
      method returning an ErrorOr. I changed my mind because:
      
      * A constructor with an error_code out parameter is extremely convenient from
        the implementation side. We can incrementally construct the object and give
        up when we find an error.
      * It is very efficient when constructing on the stack or when there is no
        error. The only inefficient case is where heap allocating and an error is
        found (we have to free the memory).
      
      The result is that this is a much smaller patch. It just standardizes the
      create* helpers to return an ErrorOr.
      
      Almost no functionality change: The only difference is that this found that
      we were trying to read past the end of COFF import library but ignoring the
      error.
      
      llvm-svn: 199770
      692410ef
  2. Jan 21, 2014
  3. Jan 20, 2014
    • Hal Finkel's avatar
      Update StackProtector when coloring merges stack slots · a69e5b8b
      Hal Finkel authored
      StackProtector keeps a ValueMap of alloca instructions to layout kind tags for
      use by PEI and other later passes. When stack coloring replaces one alloca with
      a bitcast to another one, the key replacement in this map does not work.
      Instead, provide an interface to manage this updating directly. This seems like
      an improvement over the old behavior, where the layout map would not get
      updated at all when the stack slots were merged. In practice, however, there is
      likely no observable difference because PEI only did anything special with
      'large array' kinds, and if one large array is merged with another, than the
      replacement should already have been a large array.
      
      This is an attempt to unbreak the clang-x86_64-darwin11-RA builder.
      
      llvm-svn: 199684
      a69e5b8b
Loading