Skip to content
  1. Jan 21, 2011
  2. Jan 20, 2011
    • Evan Cheng's avatar
      Sorry, several patches in one. · b8b0ad80
      Evan Cheng authored
      TargetInstrInfo:
      Change produceSameValue() to take MachineRegisterInfo as an optional argument.
      When in SSA form, targets can use it to make more aggressive equality analysis.
      
      Machine LICM:
      1. Eliminate isLoadFromConstantMemory, use MI.isInvariantLoad instead.
      2. Fix a bug which prevent CSE of instructions which are not re-materializable.
      3. Use improved form of produceSameValue.
      
      ARM:
      1. Teach ARM produceSameValue to look pass some PIC labels.
      2. Look for operands from different loads of different constant pool entries
         which have same values.
      3. Re-implement PIC GA materialization using movw + movt. Combine the pair with
         a "add pc" or "ldr [pc]" to form pseudo instructions. This makes it possible
         to re-materialize the instruction, allow machine LICM to hoist the set of
         instructions out of the loop and make it possible to CSE them. It's a bit
         hacky, but it significantly improve code quality.
      4. Some minor bug fixes as well.
      
      With the fixes, using movw + movt to materialize GAs significantly outperform the
      load from constantpool method. 186.crafty and 255.vortex improved > 20%, 254.gap
      and 176.gcc ~10%.
      
      llvm-svn: 123905
      b8b0ad80
  3. Jan 08, 2011
    • Evan Cheng's avatar
      Do not model all INLINEASM instructions as having unmodelled side effects. · 6eb516db
      Evan Cheng authored
      Instead encode llvm IR level property "HasSideEffects" in an operand (shared
      with IsAlignStack). Added MachineInstrs::hasUnmodeledSideEffects() to check
      the operand when the instruction is an INLINEASM.
      
      This allows memory instructions to be moved around INLINEASM instructions.
      
      llvm-svn: 123044
      6eb516db
  4. Dec 24, 2010
    • Andrew Trick's avatar
      Various bits of framework needed for precise machine-level selection · 10ffc2b6
      Andrew Trick authored
      DAG scheduling during isel. Most new functionality is currently
      guarded by -enable-sched-cycles and -enable-sched-hazard.
      
      Added InstrItineraryData::IssueWidth field, currently derived from
      ARM itineraries, but could be initialized differently on other targets.
      
      Added ScheduleHazardRecognizer::MaxLookAhead to indicate whether it is
      active, and if so how many cycles of state it holds.
      
      Added SchedulingPriorityQueue::HasReadyFilter to allowing gating entry
      into the scheduler's available queue.
      
      ScoreboardHazardRecognizer now accesses the ScheduleDAG in order to
      get information about it's SUnits, provides RecedeCycle for bottom-up
      scheduling, correctly computes scoreboard depth, tracks IssueCount, and
      considers potential stall cycles when checking for hazards.
      
      ScheduleDAGRRList now models machine cycles and hazards (under
      flags). It tracks MinAvailableCycle, drives the hazard recognizer and
      priority queue's ready filter, manages a new PendingQueue, properly
      accounts for stall cycles, etc.
      
      llvm-svn: 122541
      10ffc2b6
  5. Dec 08, 2010
  6. Sep 21, 2010
  7. Sep 10, 2010
    • Evan Cheng's avatar
      Teach if-converter to be more careful with predicating instructions that would · bf407075
      Evan Cheng authored
      take multiple cycles to decode.
      For the current if-converter clients (actually only ARM), the instructions that
      are predicated on false are not nops. They would still take machine cycles to
      decode. Micro-coded instructions such as LDM / STM can potentially take multiple
      cycles to decode. If-converter should take treat them as non-micro-coded
      simple instructions.
      
      llvm-svn: 113570
      bf407075
  8. Jul 22, 2010
  9. Jul 13, 2010
  10. Jul 11, 2010
  11. Jul 09, 2010
  12. Jul 08, 2010
  13. Jun 22, 2010
  14. Jun 19, 2010
    • Evan Cheng's avatar
      Allow ARM if-converter to be run after post allocation scheduling. · 2d51c7c5
      Evan Cheng authored
      - This fixed a number of bugs in if-converter, tail merging, and post-allocation
        scheduler. If-converter now runs branch folding / tail merging first to
        maximize if-conversion opportunities.
      - Also changed the t2IT instruction slightly. It now defines the ITSTATE
        register which is read by instructions in the IT block.
      - Added Thumb2 specific hazard recognizer to ensure the scheduler doesn't
        change the instruction ordering in the IT block (since IT mask has been
        finalized). It also ensures no other instructions can be scheduled between
        instructions in the IT block.
      
      This is not yet enabled.
      
      llvm-svn: 106344
      2d51c7c5
  15. Jun 14, 2010
  16. Jun 12, 2010
  17. Jun 03, 2010
    • Jakob Stoklund Olesen's avatar
      Slightly change the meaning of the reMaterialize target hook when the original · a8ad9774
      Jakob Stoklund Olesen authored
      instruction defines subregisters.
      
      Any existing subreg indices on the original instruction are preserved or
      composed with the new subreg index.
      
      Also substitute multiple operands mentioning the original register by using the
      new MachineInstr::substituteRegister() function. This is necessary because there
      will soon be <imp-def> operands added to non read-modify-write partial
      definitions. This instruction:
      
        %reg1234:foo = FLAP %reg1234<imp-def>
      
      will reMaterialize(%reg3333, bar) like this:
      
        %reg3333:bar-foo = FLAP %reg333:bar<imp-def>
      
      Finally, replace the TargetRegisterInfo pointer argument with a reference to
      indicate that it cannot be NULL.
      
      llvm-svn: 105358
      a8ad9774
  18. Apr 08, 2010
  19. Mar 03, 2010
    • Evan Cheng's avatar
      - Change MachineInstr::isIdenticalTo to take a new option that determines... · e9c46c25
      Evan Cheng authored
      - Change MachineInstr::isIdenticalTo to take a new option that determines whether it should skip checking defs or at least virtual register defs. This subsumes part of the TargetInstrInfo::isIdentical functionality.
      - Eliminate TargetInstrInfo::isIdentical and replace it with produceSameValue. In the default case, produceSameValue just checks whether two machine instructions are identical (except for virtual register defs). But targets may override it to check for unusual cases (e.g. ARM pic loads from constant pools).
      
      llvm-svn: 97628
      e9c46c25
  20. Jan 07, 2010
  21. Dec 03, 2009
  22. Nov 16, 2009
  23. Nov 14, 2009
  24. Nov 07, 2009
    • Evan Cheng's avatar
      - Add TargetInstrInfo::isIdentical(). It's similar to MachineInstr::isIdentical · 7ff83196
      Evan Cheng authored
        except it doesn't care if the definitions' virtual registers differ. This is
        used by machine LICM and other MI passes to perform CSE.
      - Teach Thumb2InstrInfo::isIdentical() to check two t2LDRpci_pic are identical.
        Since pc relative constantpool entries are always different, this requires it
        it check if the values can actually the same.
      
      llvm-svn: 86328
      7ff83196
  25. Oct 18, 2009
  26. Oct 17, 2009
  27. Oct 12, 2009
  28. Oct 10, 2009
    • Dan Gohman's avatar
      Factor out LiveIntervalAnalysis' code to determine whether an instruction · 87b02d5b
      Dan Gohman authored
      is trivially rematerializable and integrate it into
      TargetInstrInfo::isTriviallyReMaterializable. This way, all places that
      need to know whether an instruction is rematerializable will get the
      same answer.
      
      This enables the useful parts of the aggressive-remat option by
      default -- using AliasAnalysis to determine whether a memory location
      is invariant, and removes the questionable parts -- rematting operations
      with virtual register inputs that may not be live everywhere.
      
      llvm-svn: 83687
      87b02d5b
  29. Sep 25, 2009
    • Dan Gohman's avatar
      Improve MachineMemOperand handling. · 48b185d6
      Dan Gohman authored
       - Allocate MachineMemOperands and MachineMemOperand lists in MachineFunctions.
         This eliminates MachineInstr's std::list member and allows the data to be
         created by isel and live for the remainder of codegen, avoiding a lot of
         copying and unnecessary translation. This also shrinks MemSDNode.
       - Delete MemOperandSDNode. Introduce MachineSDNode which has dedicated
         fields for MachineMemOperands.
       - Change MemSDNode to have a MachineMemOperand member instead of its own
         fields with the same information. This introduces some redundancy, but
         it's more consistent with what MachineInstr will eventually want.
       - Ignore alignment when searching for redundant loads for CSE, but remember
         the greatest alignment.
      
      Target-specific code which previously used MemOperandSDNodes with generic
      SDNodes now use MemIntrinsicSDNodes, with opcodes in a designated range
      so that the SelectionDAG framework knows that MachineMemOperand information
      is available.
      
      llvm-svn: 82794
      48b185d6
  30. Sep 21, 2009
  31. Jul 22, 2009
    • Evan Cheng's avatar
      Let each target determines whether a machine instruction is dead. If true,... · 4dc848f3
      Evan Cheng authored
      Let each target determines whether a machine instruction is dead. If true, that allows late codeine passes to delete it.
      
      This is considered a workaround. The problem is some targets are not modeling side effects correctly. PPC is apparently one of those. This patch allows ppc llvm-gcc to bootstrap on Darwin. Once we find out which instruction definitions are wrong, we can remove the PPCInstrInfo workaround.
      
      llvm-svn: 76703
      4dc848f3
  32. Jul 16, 2009
  33. Jul 11, 2009
  34. Jul 10, 2009
  35. Jul 01, 2009
  36. May 13, 2009
    • Bill Wendling's avatar
      Change MachineInstrBuilder::addReg() to take a flag instead of a list of · f7b83c7a
      Bill Wendling authored
      booleans. This gives a better indication of what the "addReg()" is
      doing. Remembering what all of those booleans mean isn't easy, especially if you
      aren't spending all of your time in that code.
      
      I took Jakob's suggestion and made it illegal to pass in "true" for the
      flag. This should hopefully prevent any unintended misuse of this (by reverting
      to the old way of using addReg()).
      
      llvm-svn: 71722
      f7b83c7a
  37. Feb 03, 2009
Loading