Skip to content
  1. Jan 16, 2013
  2. Jan 15, 2013
    • Eli Bendersky's avatar
      Refactor generic Asm directive parsing. · 17233946
      Eli Bendersky authored
      After discussing the refactoring with Jim and Daniel, the following changes were
      made:
      
      * All generic directive parsing is now done by AsmParser itself. The previous
        division between it and GenericAsmParser did not have clear boundaries and
        just produced unnatural code of GenericAsmParser juggling the internals of
        AsmParser through an interface. 
        The division of responsibilities is now clear: target-specific directives,
        other extensions (used by platform-specific parseres), and generic directives.
      * Priority for directive parsing was reshuffled to ask extensions first and
        check the generic directives later.
      
      No change in functionality.
      
      llvm-svn: 172568
      17233946
    • Michael J. Spencer's avatar
      [Object][ELF] Fix -Wenum-compare. · 47811e4b
      Michael J. Spencer authored
      llvm-svn: 172556
      47811e4b
    • Shuxin Yang's avatar
      1. Hoist minus sign as high as possible in an attempt to reveal · e8227452
      Shuxin Yang authored
         some optimization opportunities (in the enclosing supper-expressions).
      
         rule 1. (-0.0 - X ) * Y => -0.0 - (X * Y)
           if expression "-0.0 - X" has only one reference.
      
         rule 2. (0.0 - X ) * Y => -0.0 - (X * Y)
           if expression "0.0 - X" has only one reference, and
              the instruction is marked "noSignedZero".
      
      2. Eliminate negation (The compiler was already able to handle these
          opt if the 0.0s are replaced with -0.0.)
      
         rule 3: (0.0 - X) * (0.0 - Y) => X * Y
         rule 4: (0.0 - X) * C => X * -C
         if the expr is flagged "noSignedZero".
      
      3. 
        Rule 5: (X*Y) * X => (X*X) * Y
         if X!=Y and the expression is flagged with "UnsafeAlgebra".
      
         The purpose of this transformation is two-fold:
          a) to form a power expression (of X).
          b) potentially shorten the critical path: After transformation, the
             latency of the instruction Y is amortized by the expression of X*X,
             and therefore Y is in a "less critical" position compared to what it
            was before the transformation. 
      
      4. Remove the InstCombine code about simplifiying "X * select".
         
         The reasons are following:
          a) The "select" is somewhat architecture-dependent, therefore the
             higher level optimizers are not able to precisely predict if
             the simplification really yields any performance improvement
             or not.
      
          b) The "select" operator is bit complicate, and tends to obscure
             optimization opportunities. It is btter to keep it as low as
             possible in expr tree, and let CodeGen to tackle the optimization.
      
      llvm-svn: 172551
      e8227452
    • Daniel Dunbar's avatar
    • Daniel Dunbar's avatar
      [IR] Add verification for module flags with the "require" behavior. · c36547d4
      Daniel Dunbar authored
      llvm-svn: 172549
      c36547d4
Loading