Skip to content
  1. Jan 17, 2013
  2. Jan 16, 2013
    • Daniel Dunbar's avatar
      [IR] Add 'Append' and 'AppendUnique' module flag behaviors. · d77d9fb0
      Daniel Dunbar authored
      llvm-svn: 172659
      d77d9fb0
    • Renato Golin's avatar
      Change CostTable model to be global to all targets · f104c4c4
      Renato Golin authored
      Moving the X86CostTable to a common place, so that other back-ends
      can share the code. Also simplifying it a bit and commoning up
      tables with one and two types on operations.
      
      llvm-svn: 172658
      f104c4c4
    • Eli Bendersky's avatar
      Some small (and mostly cosmetic) fixes. · 88024714
      Eli Bendersky authored
      llvm-svn: 172640
      88024714
    • Eli Bendersky's avatar
      Now that GenericAsmParser was folded into AsmParser, some methods and types can · a313ae6c
      Eli Bendersky authored
      return into the safe harbor of AsmParser's private areas.
      
      llvm-svn: 172637
      a313ae6c
    • Daniel Dunbar's avatar
      [Linker] Change module flag linking to be more extensible. · 0ec72bbc
      Daniel Dunbar authored
       - Instead of computing a bunch of buckets of different flag types, just do an
         incremental link resolving conflicts as they arise.
      
       - This also has the advantage of making the link result deterministic and not
         dependent on map iteration order.
      
      llvm-svn: 172634
      0ec72bbc
    • Kevin Enderby's avatar
      We want the dwarf AT_producer for assembly source files to match clang's · e82ada69
      Kevin Enderby authored
      AT_producer.  Which includes clang's version information so we can tell
      which version of the compiler was used.
      
      This is the first of two steps to allow us to do that.  This is the llvm-mc
      change to provide a method to set the AT_producer string.  The second step,
      coming soon to a clang near you, will have the clang driver pass the value
      of getClangFullVersion() via an flag when invoking the integrated assembler
      on assembly source files.
      
      rdar://12955296
      
      llvm-svn: 172630
      e82ada69
    • Peter Collingbourne's avatar
      Introduce llvm::sys::getProcessTriple() function. · a51c6ed6
      Peter Collingbourne authored
      In r143502, we renamed getHostTriple() to getDefaultTargetTriple()
      as part of work to allow the user to supply a different default
      target triple at configure time.  This change also affected the JIT.
      However, it is inappropriate to use the default target triple in the
      JIT in most circumstances because this will not necessarily match
      the current architecture used by the process, leading to illegal
      instruction and other such errors at run time.
      
      Introduce the getProcessTriple() function for use in the JIT and
      its clients, and cause the JIT to use it.  On architectures with a
      single bitness, the host and process triples are identical.  On other
      architectures, the host triple represents the architecture of the
      host CPU, while the process triple represents the architecture used
      by the host CPU to interpret machine code within the current process.
      For example, when executing 32-bit code on a 64-bit Linux machine,
      the host triple may be 'x86_64-unknown-linux-gnu', while the process
      triple may be 'i386-unknown-linux-gnu'.
      
      This fixes JIT for the 32-on-64-bit (and vice versa) build on non-Apple
      platforms.
      
      Differential Revision: http://llvm-reviews.chandlerc.com/D254
      
      llvm-svn: 172627
      a51c6ed6
    • Evgeniy Stepanov's avatar
      Allow vectors in CreatePointerCast of constants. · 2338264a
      Evgeniy Stepanov authored
      llvm-svn: 172615
      2338264a
    • Alexey Samsonov's avatar
      ASan: wrap mapping scale and offset in a struct and make it a member of ASan... · 1345d35e
      Alexey Samsonov authored
      ASan: wrap mapping scale and offset in a struct and make it a member of ASan passes. Add test for non-default mapping scale and offset. No functionality change
      
      llvm-svn: 172610
      1345d35e
    • Michael Gottesman's avatar
      [ObjCARC] Turn off ignoring unwind edges in ObjCARC when... · 6a9355f8
      Michael Gottesman authored
      [ObjCARC] Turn off ignoring unwind edges in ObjCARC when -fno-objc-arc-exception is enabled due to it's affect on correctness.
      
      Specifically according to the semantics of ARC -fno-objc-arc-exception simply
      states that it is expected that the unwind path out of a call *MAY* not release
      objects. Thus we can have the situation where a release gets moved into a catch
      block which we ignore when we remove a retain/release pair resulting in (even
      though we assume the program is exiting anyways) the cleanup code path
      potentially blowing up before program exit.
      
      llvm-svn: 172599
      6a9355f8
    • Jack Carter's avatar
      reverting 172579 · 5619f91b
      Jack Carter authored
      llvm-svn: 172594
      5619f91b
    • Eric Christopher's avatar
      Define metadata interfaces for describing a static data member · 4d23a4ae
      Eric Christopher authored
      of a class. Emit static data member declarations and definitions
      through correctly.
      
      Part of PR14471.
      
      Patch by Paul Robinson!
      
      llvm-svn: 172590
      4d23a4ae
    • Eli Bendersky's avatar
      Use the ExtensionDirectiveHandler type in other places where it makes sense. · 29b9f477
      Eli Bendersky authored
      Since we already have this type it's a shame to keep dragging a pair of object
      and method around explicitly.
      
      llvm-svn: 172584
      29b9f477
    • Jack Carter's avatar
      Akira, · e0c1e1a4
      Jack Carter authored
      Hope you are feeling better.
      
      The Mips RDHWR (Read Hardware Register) instruction was not 
      tested for assembler or dissassembler consumption. This patch
      adds that functionality.
      
      Contributer: Vladimir Medic
       
      llvm-svn: 172579
      e0c1e1a4
    • Eric Christopher's avatar
      Split address information for DWARF5 split dwarf proposal. This involves · 962c9089
      Eric Christopher authored
      using the DW_FORM_GNU_addr_index and a separate .debug_addr section which
      stays in the executable and is fully linked.
      
      Sneak in two other small changes:
      
      a) Print out the debug_str_offsets.dwo section.
      b) Change form we're expecting the entries in the debug_str_offsets.dwo
         section to take from ULEB128 to U32.
      
      Add tests for all of this in the fission-cu.ll test.
      
      llvm-svn: 172578
      962c9089
    • Nadav Rotem's avatar
    • Eli Bendersky's avatar
      Optimize the memory usage of MC bundling, by creating a new type of fragment · cf6009b9
      Eli Bendersky authored
      into which we can emit single instructions without fixups (which is most
      instructions). This is an optimization required because MCDataFragment
      is prety large (240 bytes on x64), with no change in functionality.
      
      For large programs, this reduces memory usage overhead required for bundling
      by 40%.
      
      To make the code as palatable as possible, the MCEncodedFragment interface was
      further fragmented (no pun intended) and MCEncodedFragmentWithFixups is used
      as the interface to work against when the user expects fixups. MCDataFragment
      and MCRelaxableFragment implement this interface, while the new
      MCCompactEncodedInstFragment implements MCEncodeFragment.
      
      llvm-svn: 172572
      cf6009b9
    • Chad Rosier's avatar
      [ms-inline asm] Address the FIXME in AsmParser.cpp. · 7245033a
      Chad Rosier authored
      // FIXME: Constraints are hard coded to 'm', but we need an 'r'
      // constraint for addressof.  This needs to be cleaned up!
      
      Test cases are already in place.  Specifically,
      clang/test/CodeGen/ms-inline-asm.c t15(), t16(), and t24().
      
      llvm-svn: 172569
      7245033a
  3. 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
    • 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
    • Nadav Rotem's avatar
      LoopVectorizer cost model. Honor the user command line flag that selects the... · d33ce6f1
      Nadav Rotem authored
      LoopVectorizer cost model. Honor the user command line flag that selects the vectorization factor even if the target machine does not have any vector registers.
      
      llvm-svn: 172544
      d33ce6f1
    • Evgeniy Stepanov's avatar
      [msan] Fix handling of equality comparison of pointer vectors. · d14e47b1
      Evgeniy Stepanov authored
      Also improve test coveration of the handling of relational comparisons.
      
      llvm-svn: 172539
      d14e47b1
    • Evgeniy Stepanov's avatar
      Allow vectors in CreatePointerCast. · c9bd35b1
      Evgeniy Stepanov authored
      Both underlying IR operations support vectors of pointers already.
      
      llvm-svn: 172538
      c9bd35b1
    • Michael J. Spencer's avatar
      [Object][ELF] Simplify ELFObjectFile by using ELFType. · 1a79161f
      Michael J. Spencer authored
      This simplifies the usage and implementation of ELFObjectFile by using ELFType
      to replace:
      
      <endianness target_endianness, std::size_t max_alignment, bool is64Bits>
      
      This does complicate the base ELF types as they must now use template template
      parameters to partially specialize for the 32 and 64bit cases. However these
      are only defined once.
      
      llvm-svn: 172515
      1a79161f
    • Daniel Dunbar's avatar
      [IR] Add verifier support for llvm.module.flags. · 25c4b571
      Daniel Dunbar authored
       - Also, update the LangRef documentation on module flags to match the
         implementation.
      
      llvm-svn: 172498
      25c4b571
    • Jack Carter's avatar
      This patch fixes a Mips specific bug where · f238510c
      Jack Carter authored
      we need to generate a N64 compound relocation
      R_MIPS_GPREL_32/R_MIPS_64/R_MIPS_NONE.
      
      The bug was exposed by the SingleSourcetest case 
      DuffsDevice.c.
      
      Contributer: Jack Carter
      llvm-svn: 172496
      f238510c
    • Eli Bendersky's avatar
      Now GenericAsmParser and AsmParser are no longer friends, GenericAsmParser can · e6f4c683
      Eli Bendersky authored
      simply use the getParser method from MCAsmParserExtension, working through the
      MCAsmParser interface. There's no longer a need to overload that method to
      cast it to the concrete AsmParser.
      
      llvm-svn: 172491
      e6f4c683
    • Eli Bendersky's avatar
      Properly encapsulate additional methods and data from AsmParser. · 38274128
      Eli Bendersky authored
      This finally allows AsmParser to no longer list GenericAsmParser as a friend.
      All member vars directly accessed by GenericAsmParser have been properly
      encapsulated and exposed through the MCAsmParser interface. This reduces the
      coupling between AsmParser and GenericAsmParser.
      
      llvm-svn: 172490
      38274128
    • Jakub Staszak's avatar
      Remove trailing spaces. · 190db2f2
      Jakub Staszak authored
      llvm-svn: 172489
      190db2f2
  4. Jan 14, 2013
    • Shuxin Yang's avatar
      This change is to implement following rules under the condition C_A and/or C_R · 320f52a4
      Shuxin Yang authored
       
       ---------------------------------------------------------------------------
       C_A: reassociation is allowed
       C_R: reciprocal of a constant C is appropriate, which means 
          - 1/C is exact, or 
          - reciprocal is allowed and 1/C is neither a special value nor a denormal.
       -----------------------------------------------------------------------------
      
       rule1:  (X/C1) / C2 => X / (C2*C1)  (if C_A)
                           => X * (1/(C2*C1))  (if C_A && C_R)
       rule 2:  X*C1 / C2 => X * (C1/C2)  if C_A
       rule 3: (X/Y)/Z = > X/(Y*Z)  (if C_A && at least one of Y and Z is symbolic value)
       rule 4: Z/(X/Y) = > (Z*Y)/X  (similar to rule3)
      
       rule 5: C1/(X*C2) => (C1/C2) / X (if C_A)
       rule 6: C1/(X/C2) => (C1*C2) / X (if C_A)
       rule 7: C1/(C2/X) => (C1/C2) * X (if C_A)
      
      llvm-svn: 172488
      320f52a4
    • Chad Rosier's avatar
      [ms-inline asm] Extend support for parsing Intel bracketed memory operands that · 5c118fd2
      Chad Rosier authored
      have an arbitrary ordering of the base register, index register and displacement.
      rdar://12527141
      
      llvm-svn: 172484
      5c118fd2
    • Dmitri Gribenko's avatar
      Improve r172468: const_cast is not needed here · f24e57f2
      Dmitri Gribenko authored
      llvm-svn: 172483
      f24e57f2
    • Dmitri Gribenko's avatar
      Improve r172471: avoid all those extra casts on the lines nearby · 2e1df0e3
      Dmitri Gribenko authored
      llvm-svn: 172481
      2e1df0e3
    • Bill Schmidt's avatar
      This patch addresses an incorrect transformation in the DAG combiner. · d006c693
      Bill Schmidt authored
      The included test case is derived from one of the GCC compatibility tests.
      The problem arises after the selection DAG has been converted to type-legalized
      form.  The combiner first sees a 64-bit load that can be converted into a
      pre-increment form.  The original load feeds into a SRL that isolates the
      upper 32 bits of the loaded doubleword.  This looks like an opportunity for
      DAGCombiner::ReduceLoadWidth() to replace the 64-bit load with a 32-bit load.
      
      However, this transformation is not valid, as the replacement load is not
      a pre-increment load.  The pre-increment load produces an extra result,
      which feeds a subsequent add instruction.  The replacement load only has
      one result value, and this value is propagated to all uses of the pre-
      increment load, including the add.  Because the add is looking for the
      second result value as its operand, it ends up attempting to add a constant
      to a token chain, resulting in a crash.
      
      So the patch simply disables this transformation for any load with more than
      two result values.
      
      llvm-svn: 172480
      d006c693
Loading