Skip to content
  1. Aug 29, 2012
  2. Aug 28, 2012
    • Jakob Stoklund Olesen's avatar
      Add a MachineOperand::isTied() flag. · e56c60c5
      Jakob Stoklund Olesen authored
      While in SSA form, a MachineInstr can have pairs of tied defs and uses.
      The tied operands are used to represent read-modify-write operands that
      must be assigned the same physical register.
      
      Previously, tied operand pairs were computed from fixed MCInstrDesc
      fields, or by using black magic on inline assembly instructions.
      
      The isTied flag makes it possible to add tied operands to any
      instruction while getting rid of (some of) the inlineasm magic.
      
      Tied operands on normal instructions are needed to represent predicated
      individual instructions in SSA form. An extra <tied,imp-use> operand is
      required to represent the output value when the instruction predicate is
      false.
      
      Adding a predicate to:
      
        %vreg0<def> = ADD %vreg1, %vreg2
      
      Will look like:
      
        %vreg0<tied,def> = ADD %vreg1, %vreg2, pred:3, %vreg7<tied,imp-use>
      
      The virtual register %vreg7 is the value given to %vreg0 when the
      predicate is false. It will be assigned the same physreg as %vreg0.
      
      This commit adds the isTied flag and sets it based on MCInstrDesc when
      building an instruction. The flag is not used for anything yet.
      
      llvm-svn: 162774
      e56c60c5
    • Jakob Stoklund Olesen's avatar
      Don't allow TargetFlags on MO_Register MachineOperands. · dba99d0d
      Jakob Stoklund Olesen authored
      Register operands are manipulated by a lot of target-independent code,
      and it is not always possible to preserve target flags. That means it is
      not safe to use target flags on register operands.
      
      None of the targets in the tree are using register operand target flags.
      External targets should be using immediate operands to annotate
      instructions with operand modifiers.
      
      llvm-svn: 162770
      dba99d0d
  3. Aug 10, 2012
  4. Aug 07, 2012
    • Jakob Stoklund Olesen's avatar
      Add a new kind of MachineOperand: MO_TargetIndex. · 84689b0d
      Jakob Stoklund Olesen authored
      A target index operand looks a lot like a constant pool reference, but
      it is completely target-defined. It contains the 8-bit TargetFlags, a
      32-bit index, and a 64-bit offset. It is preserved by all code generator
      passes.
      
      TargetIndex operands can be used to carry target-specific information in
      cases where immediate operands won't suffice.
      
      llvm-svn: 161441
      84689b0d
  5. Jul 05, 2012
    • Chandler Carruth's avatar
      Finish fixing the MachineOperand hashing, providing a nice modern · 264854f9
      Chandler Carruth authored
      hash_value overload for MachineOperands. This addresses a FIXME
      sufficient for me to remove it, and cleans up the code nicely too.
      
      The important changes to the hashing logic:
      - TargetFlags are now included in all of the hashes. These were complete
        missed.
      - Register operands have their subregisters and whether they are a def
        included in the hash.
      - We now actually hash all of the operand types. Previously, many
        operand types were simply *dropped on the floor*. For example:
        - Floating point immediates
        - Large integer immediates (>64-bit)
        - External globals!
        - Register masks
        - Metadata operands
      - It removes the offset from the block-address hash; I'm a bit
        suspicious of this, but isIdenticalTo doesn't consider the offset for
        black addresses.
      
      Any patterns involving these entities could have triggered extreme
      slowdowns in MachineCSE or PHIElimination. Let me know if there are PRs
      you think might be closed now... I'm looking myself, but I may miss
      them.
      
      llvm-svn: 159743
      264854f9
    • Chandler Carruth's avatar
      The hash function for MI expressions, used by MachineCSE, is really · 1d5d2310
      Chandler Carruth authored
      broken. This patch fixes the superficial problems which lead to the
      intractably slow compile times reported in PR13225.
      
      The specific issue is that we were failing to include the *offset* of
      a global variable in the hash code. Oops. This would in turn cause all
      MIs which were only distinguishable due to operating on different
      offsets of a global variable to produce identical hash functions. In
      some of the test cases attached to the PR I saw hash table activity
      where there were O(1000) probes-per-lookup *on average*. A very few
      entries were responsible for most of these probes.
      
      There is still quite a bit more to do here. The ad-hoc layering of data
      in MachineOperands makes them *extremely* brittle to hash correctly.
      We're missing quite a few other cases, the only ones I've fixed here are
      the specific MO types which were allowed through the assert() in
      getOffset().
      
      llvm-svn: 159741
      1d5d2310
    • Jakob Stoklund Olesen's avatar
      Allow trailing physreg RegisterSDNode operands on non-variadic instructions. · c300ef0e
      Jakob Stoklund Olesen authored
      Also allow trailing register mask operands on non-variadic both
      MachineSDNodes and MachineInstrs.
      
      The extra physreg RegisterSDNode operands are added to the MI as
      <imp-use> operands. This makes it possible to have non-variadic call
      instructions.
      
      Call and return instructions really are non-variadic, the argument
      registers should only be used implicitly - they are not part of the
      encoding.
      
      llvm-svn: 159727
      c300ef0e
  6. Jun 28, 2012
  7. Jun 05, 2012
  8. Jun 02, 2012
    • Jakob Stoklund Olesen's avatar
      Switch all register list clients to the new MC*Iterator interface. · 54038d79
      Jakob Stoklund Olesen authored
      No functional change intended.
      
      Sorry for the churn. The iterator classes are supposed to help avoid
      giant commits like this one in the future. The TableGen-produced
      register lists are getting quite large, and it may be necessary to
      change the table representation.
      
      This makes it possible to do so without changing all clients (again).
      
      llvm-svn: 157854
      54038d79
  9. May 30, 2012
  10. May 08, 2012
    • Jakob Stoklund Olesen's avatar
      Add an MF argument to TRI::getPointerRegClass() and TII::getRegClass(). · 3c52f028
      Jakob Stoklund Olesen authored
      The getPointerRegClass() hook can return register classes that depend on
      the calling convention of the current function (ptr_rc_tailcall).
      
      So far, we have been able to infer the calling convention from the
      subtarget alone, but as we add support for multiple calling conventions
      per target, that no longer works.
      
      Patch by Yiannis Tsiouris!
      
      llvm-svn: 156328
      3c52f028
  11. May 05, 2012
  12. Apr 20, 2012
  13. Mar 31, 2012
  14. Mar 17, 2012
  15. Mar 16, 2012
  16. Mar 08, 2012
  17. Mar 07, 2012
    • Chandler Carruth's avatar
      Try to clarify this comment some. · 636ee38a
      Chandler Carruth authored
      llvm-svn: 152221
      636ee38a
    • Chandler Carruth's avatar
      Remove another outbreak of customized (and completely broken) hashing. · 962152ca
      Chandler Carruth authored
      This one is particularly annoying because the hashing algorithm is
      highly specialized, with a strange "equivalence" definition that subsets
      the fields involved.
      
      Still, this looks at the exact same set of data as the old code, but
      without bitwise or-ing over parts of it and other mixing badness. No
      functionality changed here. I've left a substantial fixme about the fact
      that there is a cleaner and more principled way to do this, but it
      requires making the equality definition actual stable for particular
      types...
      
      llvm-svn: 152218
      962152ca
  18. Mar 04, 2012
  19. Mar 01, 2012
  20. Feb 17, 2012
  21. Feb 16, 2012
  22. Feb 15, 2012
    • Jakob Stoklund Olesen's avatar
      Handle regmasks in findRegisterDefOperandIdx(). · e7d3f441
      Jakob Stoklund Olesen authored
      Only accept register masks when looking for an 'overlapping' def. When
      Overlap is not set, the function searches for a proper definition of
      Reg.
      
      This means MI->modifiesRegister() considers register masks, but
      MI->definesRegister() doesn't.
      
      llvm-svn: 150529
      e7d3f441
  23. Feb 10, 2012
  24. Feb 08, 2012
  25. Feb 03, 2012
  26. Jan 26, 2012
  27. Jan 16, 2012
    • Jakob Stoklund Olesen's avatar
      Add a new kind of MachineOperand: MO_RegisterMask. · 374ed322
      Jakob Stoklund Olesen authored
      Register masks will be used as a compact representation of large clobber
      lists.  Currently, an x86 call instruction has some 40 operands
      representing call-clobbered registers.  That's more than 1kB of useless
      operands per call site.
      
      A register mask operand references a bit mask of call-preserved
      registers, everything else is clobbered.  The bit mask will typically
      come from TargetRegisterInfo::getCallPreservedMask().
      
      By abandoning ImplicitDefs for call-clobbered registers, it also becomes
      possible to share call instruction descriptions between calling
      conventions, and we can get rid of the WINCALL* instructions.
      
      This patch introduces the new operand kind.  Future patches will add
      RegMask support to target-independent passes before finally the fixed
      clobber lists can be removed from call instruction descriptions.
      
      llvm-svn: 148250
      374ed322
  28. Jan 10, 2012
  29. Dec 14, 2011
    • Evan Cheng's avatar
      - Add MachineInstrBundle.h and MachineInstrBundle.cpp. This includes a function · 7fae11b2
      Evan Cheng authored
        to finalize MI bundles (i.e. add BUNDLE instruction and computing register def
        and use lists of the BUNDLE instruction) and a pass to unpack bundles.
      - Teach more of MachineBasic and MachineInstr methods to be bundle aware.
      - Switch Thumb2 IT block to MI bundles and delete the hazard recognizer hack to
        prevent IT blocks from being broken apart.
      
      llvm-svn: 146542
      7fae11b2
Loading