Skip to content
  1. May 20, 2013
  2. Apr 11, 2013
  3. Apr 10, 2013
    • Andrew Trick's avatar
      Generalize the PassConfig API and remove addFinalizeRegAlloc(). · e220323c
      Andrew Trick authored
      The target hooks are getting out of hand. What does it mean to run
      before or after regalloc anyway? Allowing either Pass* or AnalysisID
      pass identification should make it much easier for targets to use the
      substitutePass and insertPass APIs, and create less need for badly
      named target hooks.
      
      llvm-svn: 179140
      e220323c
  4. Mar 29, 2013
  5. Mar 05, 2013
  6. Feb 10, 2013
  7. Jan 17, 2013
    • Jakob Stoklund Olesen's avatar
      Provide a place for targets to insert ILP optimization passes. · 213a2f8b
      Jakob Stoklund Olesen authored
      Move the early if-conversion pass into this group.
      
      ILP optimizations usually need to find the right balance between
      register pressure and ILP using the MachineTraceMetrics analysis to
      identify critical paths and estimate other costs. Such passes should run
      together so they can share dominator tree and loop info analyses.
      
      Besides if-conversion, future passes to run here here could include
      expression height reduction and ARM's MLxExpansion pass.
      
      llvm-svn: 172687
      213a2f8b
  8. Jan 07, 2013
    • Chandler Carruth's avatar
      Switch the SCEV expander and LoopStrengthReduce to use · 26c59fa8
      Chandler Carruth authored
      TargetTransformInfo rather than TargetLowering, removing one of the
      primary instances of the layering violation of Transforms depending
      directly on Target.
      
      This is a really big deal because LSR used to be a "special" pass that
      could only be tested fully using llc and by looking at the full output
      of it. It also couldn't run with any other loop passes because it had to
      be created by the backend. No longer is this true. LSR is now just
      a normal pass and we should probably lift the creation of LSR out of
      lib/CodeGen/Passes.cpp and into the PassManagerBuilder. =] I've not done
      this, or updated all of the tests to use opt and a triple, because
      I suspect someone more familiar with LSR would do a better job. This
      change should be essentially without functional impact for normal
      compilations, and only change behvaior of targetless compilations.
      
      The conversion required changing all of the LSR code to refer to the TTI
      interfaces, which fortunately are very similar to TargetLowering's
      interfaces. However, it also allowed us to *always* expect to have some
      implementation around. I've pushed that simplification through the pass,
      and leveraged it to simplify code somewhat. It required some test
      updates for one of two things: either we used to skip some checks
      altogether but now we get the default "no" answer for them, or we used
      to have no information about the target and now we do have some.
      
      I've also started the process of removing AddrMode, as the TTI interface
      doesn't use it any longer. In some cases this simplifies code, and in
      others it adds some complexity, but I think it's not a bad tradeoff even
      there. Subsequent patches will try to clean this up even further and use
      other (more appropriate) abstractions.
      
      Yet again, almost all of the formatting changes brought to you by
      clang-format. =]
      
      llvm-svn: 171735
      26c59fa8
  9. Dec 21, 2012
  10. Dec 03, 2012
    • Chandler Carruth's avatar
      Use the new script to sort the includes of every file under lib. · ed0881b2
      Chandler Carruth authored
      Sooooo many of these had incorrect or strange main module includes.
      I have manually inspected all of these, and fixed the main module
      include to be the nearest plausible thing I could find. If you own or
      care about any of these source files, I encourage you to take some time
      and check that these edits were sensible. I can't have broken anything
      (I strictly added headers, and reordered them, never removed), but they
      may not be the headers you'd really like to identify as containing the
      API being implemented.
      
      Many forward declarations and missing includes were added to a header
      files to allow them to parse cleanly when included first. The main
      module rule does in fact have its merits. =]
      
      llvm-svn: 169131
      ed0881b2
  11. Nov 30, 2012
    • Bill Wendling's avatar
      Replace r168930 with a more reasonable patch. · c786b312
      Bill Wendling authored
      The original patch removed a bunch of code that the SjLjEHPrepare pass placed
      into the entry block if all of the landing pads were removed during the
      CodeGenPrepare class. The more natural way of doing things is to run the CGP
      *before* we run the SjLjEHPrepare pass.
      
      Make it so!
      
      llvm-svn: 169044
      c786b312
  12. Nov 19, 2012
  13. Nov 13, 2012
    • Andrew Trick's avatar
      misched: Allow subtargets to enable misched and dependent options. · 108c88c5
      Andrew Trick authored
      This allows me to begin enabling (or backing out) misched by default
      for one subtarget at a time. To run misched we typically want to:
      - Disable SelectionDAG scheduling (use the source order scheduler)
      - Enable more aggressive coalescing (until we decide to always run the coalescer this way)
      - Enable MachineScheduler pass itself.
      
      Disabling PostRA sched may follow for some subtargets.
      
      llvm-svn: 167826
      108c88c5
  14. Oct 19, 2012
  15. Oct 18, 2012
    • Bob Wilson's avatar
      Temporarily revert the TargetTransform changes. · d6d9ccca
      Bob Wilson authored
      The TargetTransform changes are breaking LTO bootstraps of clang.  I am
      working with Nadav to figure out the problem, but I am reverting it for now
      to get our buildbots working.
      
      This reverts svn commits: 165665 165669 165670 165786 165787 165997
      and I have also reverted clang svn 165741
      
      llvm-svn: 166168
      d6d9ccca
  16. Oct 11, 2012
    • Nadav Rotem's avatar
      · e1032873
      Nadav Rotem authored
      Add a new interface to allow IR-level passes to access codegen-specific information.
      
      llvm-svn: 165665
      e1032873
  17. Oct 03, 2012
    • Jakob Stoklund Olesen's avatar
      The early if conversion pass is ready to be used as an opt-in. · 0f6e8bb5
      Jakob Stoklund Olesen authored
      Enable the pass by default for targets that request it, and change the
      -enable-early-ifcvt to the opposite -disable-early-ifcvt.
      
      There are still some x86 regressions when enabling early if-conversion
      because of the missing machine models. Disable the pass for x86 until
      machine models are added.
      
      llvm-svn: 165075
      0f6e8bb5
  18. Sep 06, 2012
  19. Aug 20, 2012
  20. Aug 04, 2012
    • Jakob Stoklund Olesen's avatar
      Add an experimental -early-live-intervals option. · 1c465892
      Jakob Stoklund Olesen authored
      This option runs LiveIntervals before TwoAddressInstructionPass which
      will eventually learn to exploit and update the analysis.
      
      Eventually, LiveIntervals will run before PHIElimination, and we can get
      rid of LiveVariables.
      
      llvm-svn: 161270
      1c465892
  21. Jul 04, 2012
  22. Jul 03, 2012
    • Chandler Carruth's avatar
      All glory to address sanitizer. ;] · 34263a0c
      Chandler Carruth authored
      It appears to have caught a use-after-free introduced as by r159567
      and/or friends which call 'addPass' from many more places. The bug in
      'addPass' doesn't appear to be new, and was spotted by inspection when
      ASan shown a bright light of a stacktrace at these functions.
      
      Hopefully this will fix the ASan failure -- I have no test case other
      than running an ASan-built clang over the test suite.
      
      llvm-svn: 159614
      34263a0c
  23. Jul 02, 2012
    • Bob Wilson's avatar
      Extend TargetPassConfig to allow running only a subset of the normal passes. · cac3b906
      Bob Wilson authored
      This is still a work in progress but I believe it is currently good enough
      to fix PR13122 "Need unit test driver for codegen IR passes".  For example,
      you can run llc with -stop-after=loop-reduce to have it dump out the IR after
      running LSR.  Serializing machine-level IR is not yet supported but we have
      some patches in progress for that.
      
      The plan is to serialize the IR to a YAML file, containing separate sections
      for the LLVM IR, machine-level IR, and whatever other info is needed.  Chad
      suggested that we stash the stop-after pass in the YAML file and use that
      instead of the start-after option to figure out where to restart the
      compilation.  I think that's a great idea, but since it's not implemented yet
      I put the -start-after option into this patch for testing purposes.
      
      llvm-svn: 159570
      cac3b906
    • Bob Wilson's avatar
      Move assertion with TargetPassConfig's Initialized flag. · a3f9fa71
      Bob Wilson authored
      llvm-svn: 159569
      a3f9fa71
    • Bob Wilson's avatar
      Consistently use AnalysisID types in TargetPassConfig. · b9b69365
      Bob Wilson authored
      This makes it possible to just use a zero value to represent "no pass", so
      the phony NoPassID global variable is no longer needed.
      
      llvm-svn: 159568
      b9b69365
    • Bob Wilson's avatar
      Add all codegen passes to the PassManager via TargetPassConfig. · bbd38dd9
      Bob Wilson authored
      This is a preliminary step toward having TargetPassConfig be able to
      start and stop the compilation at specified passes for unit testing
      and debugging.  No functionality change.
      
      llvm-svn: 159567
      bbd38dd9
  24. Jun 26, 2012
  25. Jun 25, 2012
    • Jakob Stoklund Olesen's avatar
      Run ProcessImplicitDefs on SSA form where it can be much simpler. · eb495664
      Jakob Stoklund Olesen authored
      Implicitly defined virtual registers can simply have the <undef> bit set
      on all uses, and copies can be turned into implicit defs recursively.
      
      Physical registers are a bit trickier. We handle the common case where a
      physreg def is used by a nearby instruction in the same basic block. For
      more complicated cases, just leave the IMPLICIT_DEF instruction in.
      
      llvm-svn: 159149
      eb495664
  26. Jun 09, 2012
    • Jakob Stoklund Olesen's avatar
      Reintroduce VirtRegRewriter. · 1224312f
      Jakob Stoklund Olesen authored
      OK, not really. We don't want to reintroduce the old rewriter hacks.
      
      This patch extracts virtual register rewriting as a separate pass that
      runs after the register allocator. This is possible now that
      CodeGen/Passes.cpp can configure the full optimizing register allocator
      pipeline.
      
      The rewriter pass uses register assignments in VirtRegMap to rewrite
      virtual registers to physical registers, and it inserts kill flags based
      on live intervals.
      
      These finalization steps are the same for the optimizing register
      allocators: RABasic, RAGreedy, and PBQP.
      
      llvm-svn: 158244
      1224312f
  27. May 30, 2012
  28. May 01, 2012
  29. Apr 16, 2012
    • Chandler Carruth's avatar
      Flip the new block-placement pass to be on by default. · 4190b507
      Chandler Carruth authored
      This is mostly to test the waters. I'd like to get results from FNT
      build bots and other bots running on non-x86 platforms.
      
      This feature has been pretty heavily tested over the last few months by
      me, and it fixes several of the execution time regressions caused by the
      inlining work by preventing inlining decisions from radically impacting
      block layout.
      
      I've seen very large improvements in yacr2 and ackermann benchmarks,
      along with the expected noise across all of the benchmark suite whenever
      code layout changes. I've analyzed all of the regressions and fixed
      them, or found them to be impossible to fix. See my email to llvmdev for
      more details.
      
      I'd like for this to be in 3.1 as it complements the inliner changes,
      but if any failures are showing up or anyone has concerns, it is just
      a flag flip and so can be easily turned off.
      
      I'm switching it on tonight to try and get at least one run through
      various folks' performance suites in case SPEC or something else has
      serious issues with it. I'll watch bots and revert if anything shows up.
      
      llvm-svn: 154816
      4190b507
  30. Mar 29, 2012
  31. Mar 28, 2012
  32. Mar 14, 2012
    • Andrew Trick's avatar
      misched: implemented a framework for top-down or bottom-up scheduling. · 8823decd
      Andrew Trick authored
      New flags: -misched-topdown, -misched-bottomup. They can be used with
      the default scheduler or with -misched=shuffle. Without either
      topdown/bottomup flag -misched=shuffle now alternates scheduling
      direction.
      
      LiveIntervals update is unimplemented with bottom-up scheduling, so
      only -misched-topdown currently works.
      
      Capped the ScheduleDAG hierarchy with a concrete ScheduleDAGMI class.
      ScheduleDAGMI is aware of the top and bottom of the unscheduled zone
      within the current region. Scheduling policy can be plugged into
      the ScheduleDAGMI driver by implementing MachineSchedStrategy.
      ConvergingScheduler is now the default scheduling algorithm.
      It exercises the new driver but still does no reordering.
      
      llvm-svn: 152700
      8823decd
Loading