Skip to content
  1. Aug 31, 2012
  2. Aug 30, 2012
    • Chad Rosier's avatar
      Whitespace. · 7578a47f
      Chad Rosier authored
      llvm-svn: 162946
      7578a47f
    • Chad Rosier's avatar
      Whitespace. · c19f8823
      Chad Rosier authored
      llvm-svn: 162945
      c19f8823
    • Chad Rosier's avatar
      Hoist a check to eliminate obvious mismatches as early as possible. Also, fix · eac13a36
      Chad Rosier authored
      an 80-column violation in the generated code.  No functional change intended.
      
      llvm-svn: 162944
      eac13a36
    • Chad Rosier's avatar
      [ms-inline asm] Add a new function, GetMCInstOperandNum, to the · 738ea259
      Chad Rosier authored
      AsmMatcherEmitter.  This function maps inline assembly operands to MCInst
      operands.
      
      For example, '__asm mov j, eax' is represented by the follow MCInst:
      
      <MCInst 1460 <MCOperand Reg:0> <MCOperand Imm:1> <MCOperand Reg:0> 
                   <MCOperand Expr:(j)> <MCOperand Reg:0> <MCOperand Reg:43>>
      
      The first 5 MCInst operands are a result of j matching as a memory operand
      consisting of a BaseReg (Reg:0), MemScale (Imm:1), MemIndexReg(Reg:0), 
      Expr (Expr:(j), and a MemSegReg (Reg:0).  The 6th MCInst operand represents
      the eax register (Reg:43).
      
      This translation is necessary to determine the Input and Output Exprs.  If a
      single asm operand maps to multiple MCInst operands, the index of the first
      MCInst operand is returned.  Ideally, it would return the operand we really
      care out (i.e., the Expr:(j) in this case), but I haven't found an easy way
      of doing this yet.
      
      llvm-svn: 162920
      738ea259
  3. Aug 29, 2012
    • Andrew Trick's avatar
      Fix a nondeterminism in the ARM assembler. · 818f5ac5
      Andrew Trick authored
      Adding arbitrary records to ARM.td would break
      basic-arm-instructions.s because selection of nop vs mov r0,r0 was
      ambiguous (this will be tested by a subsequent addition to ARM.td).
      An imperfect but sensible fix is to give precedence to match rules
      that have more constraints.
      
      llvm-svn: 162824
      818f5ac5
  4. Aug 28, 2012
  5. Aug 25, 2012
    • Richard Smith's avatar
      Fix integer undefined behavior due to signed left shift overflow in LLVM. · 228e6d4c
      Richard Smith authored
      Reviewed offline by chandlerc.
      
      llvm-svn: 162623
      228e6d4c
    • Jakob Stoklund Olesen's avatar
      Infer instruction properties from single-instruction patterns. · c2272df1
      Jakob Stoklund Olesen authored
      Previously, instructions without a primary patterns wouldn't get their
      properties inferred. Now, we use all single-instruction patterns for
      inference, including 'def : Pat<>' instances.
      
      This causes a lot of instruction flags to change.
      
      - Many instructions no longer have the UnmodeledSideEffects flag because
        their flags are now inferred from a pattern.
      
      - Instructions with intrinsics will get a mayStore flag if they already
        have UnmodeledSideEffects and a mayLoad flag if they already have
        mayStore. This is because intrinsics properties are linear.
      
      - Instructions with atomic_load patterns get a mayStore flag because
        atomic loads can't be reordered. The correct workaround is to create
        pseudo-instructions instead of using normal loads. PR13693.
      
      llvm-svn: 162614
      c2272df1
  6. Aug 24, 2012
    • Jakob Stoklund Olesen's avatar
      Stop inferring isVariadic from instruction patterns. · f5dc1bcf
      Jakob Stoklund Olesen authored
      Instructions are now only marked as variadic if they use variable_ops in
      their ins list.
      
      A variadic SDNode is typically used for call nodes that have the call
      arguments as operands.
      
      A variadic MachineInstr can actually encode a variable number of
      operands, for example ARM's stm/ldm instructions. A call instruction
      does not have to be variadic. The call argument registers are added as
      implicit operands.
      
      This change remove the MCID::Variadic flags from most call and return
      instructions, allowing us to better verify their operands.
      
      llvm-svn: 162599
      f5dc1bcf
    • Jakob Stoklund Olesen's avatar
      Verify explicit instruction properties when they can be inferred. · 8a276c26
      Jakob Stoklund Olesen authored
      It is now allowed to explicitly set hasSideEffects, mayStore, and
      mayLoad on instructions with patterns.
      
      Verify that the patterns are consistent with the explicit flags.
      
      llvm-svn: 162569
      8a276c26
    • Jakob Stoklund Olesen's avatar
      Heed guessInstructionProperties, and stop warning on redundant flags. · 94ed4d42
      Jakob Stoklund Olesen authored
      Emit TableGen errors if guessInstructionProperties is 0 and
      instruction properties can't be inferred from patterns.
      
      Allow explicit instruction properties even when they can be inferred.
      
      This patch doesn't change the TableGen output. Redundant properties
      are not yet verified because the tree has errors.
      
      llvm-svn: 162516
      94ed4d42
  7. Aug 23, 2012
    • Jakob Stoklund Olesen's avatar
      Tristate mayLoad, mayStore, and hasSideEffects. · af507bf4
      Jakob Stoklund Olesen authored
      Keep track of the set/unset state of these bits along with their
      true/false values, but treat '?' as '0' for now.
      
      llvm-svn: 162461
      af507bf4
    • Jakob Stoklund Olesen's avatar
      Add CodeGenTarget::guessInstructionProperties. · 9dc03bba
      Jakob Stoklund Olesen authored
      Currently, TableGen just guesses instruction properties when it can't
      infer them form patterns.
      
      This adds a guessInstructionProperties flag to the instruction set
      definition that will be used to disable guessing. The flag is intended
      as a migration aid. It will be removed again when no more targets need
      their properties guessed.
      
      llvm-svn: 162460
      9dc03bba
    • Dmitri Gribenko's avatar
      Fix a bunch of -Wdocumentation warnings. · 65340a69
      Dmitri Gribenko authored
      llvm-svn: 162446
      65340a69
    • Jakob Stoklund Olesen's avatar
      Print out the location of expanded multiclass defs in TableGen errors. · d7b66968
      Jakob Stoklund Olesen authored
      When reporting an error for a defm, we would previously only report the
      location of the outer defm, which is not always where the error is.
      
      Now we also print the location of the expanded multiclass defs:
      
      lib/Target/X86/X86InstrSSE.td:2902:12: error: foo
        defm ADD : basic_sse12_fp_binop_s<0x58, "add", fadd, SSE_ALU_ITINS_S>,
                   ^
      lib/Target/X86/X86InstrSSE.td:2801:11: note: instantiated from multiclass
        defm PD : sse12_fp_packed<opc, !strconcat(OpcodeStr, "pd"), OpNode, VR128,
                  ^
      lib/Target/X86/X86InstrSSE.td:194:5: note: instantiated from multiclass
          def rm : PI<opc, MRMSrcMem, (outs RC:$dst), (ins RC:$src1, x86memop:$src2),
              ^
      
      llvm-svn: 162409
      d7b66968
  8. Aug 22, 2012
    • Jim Grosbach's avatar
      TblGen: Make asm-matcher ConvertToMCInst() table driven. · c93f6c7e
      Jim Grosbach authored
      No change in interface or functionality. Purely under-the-hood
      details of the generated function that change.
      
      The X86 assembly parser is reduced in size by over 15% and ARM by
      over 10%.
      
      No performance change by my measurements.
      
      llvm-svn: 162337
      c93f6c7e
  9. Aug 21, 2012
  10. Aug 17, 2012
  11. Aug 15, 2012
  12. Aug 14, 2012
    • Jim Grosbach's avatar
      Switch the fixed-length disassembler to be table-driven. · ecaef49f
      Jim Grosbach authored
      Refactor the TableGen'erated fixed length disassemblmer to use a
      table-driven state machine rather than a massive set of nested
      switch() statements.
      
      As a result, the ARM Disassembler (ARMDisassembler.cpp) builds much more
      quickly and generates a smaller end result. For a Release+Asserts build on
      a 16GB 3.4GHz i7 iMac w/ SSD:
      
      Time to compile at -O2 (averaged w/ hot caches):
        Previous: 35.5s
        New:       8.9s
      
      TEXT size:
        Previous: 447,251
        New:      297,661
      
      Builds in 25% of the time previously required and generates code 66% of
      the size.
      
      Execution time of the disassembler is only slightly slower (7% disassembling
      10 million ARM instructions, 19.6s vs 21.0s). The new implementation has
      not yet been tuned, however, so the performance should almost certainly
      be recoverable should it become a concern.
      
      llvm-svn: 161888
      ecaef49f
  13. Aug 10, 2012
  14. Aug 08, 2012
  15. Aug 04, 2012
  16. Aug 01, 2012
  17. Jul 31, 2012
  18. Jul 30, 2012
Loading