1. Dec 28, 2016
  2. Dec 27, 2016
    • Piotr Padlewski's avatar
      [MemDep] Operand visited twice bugfix · 2202aa97
      Piotr Padlewski authored
      Because operand was not marked as seen it was visited twice.
      It doesn't change behavior of optimization, it just saves redudant
      visit, so no test changes.
      
      llvm-svn: 290607
      2202aa97
    • Eugene Leviant's avatar
      RuntimeDyldELF: refactor AArch64 relocations. NFC. · 5240a305
      Eugene Leviant authored
      llvm-svn: 290606
      5240a305
    • Gabor Horvath's avatar
      Attempt to fix non-determinism in tests. · de1f4a44
      Gabor Horvath authored
      llvm-svn: 290605
      de1f4a44
    • Eugene Leviant's avatar
      Fix unit test in NDEBUG build · c2f5408e
      Eugene Leviant authored
      llvm-svn: 290604
      c2f5408e
    • Chandler Carruth's avatar
      [PM] Teach BasicAA how to invalidate its result object. · aa351675
      Chandler Carruth authored
      This requires custom handling because BasicAA caches handles to other
      analyses and so it needs to trigger indirect invalidation.
      
      This fixes one of the common crashes when using the new PM in real
      pipelines. I've also tweaked a regression test to check that we are at
      least handling the most immediate case.
      
      I'm going to work at re-structuring this test some to both scale better
      (rather than all being in one file) and check more invalidation paths in
      a follow-up commit, but I wanted to get the basic bug fix in place.
      
      llvm-svn: 290603
      aa351675
    • Eugene Leviant's avatar
      Attempt to fix build bot after r290597 · 687d4024
      Eugene Leviant authored
      llvm-svn: 290602
      687d4024
    • Chandler Carruth's avatar
      [PM] Disable more of the loop passes -- LCSSA and LoopSimplify are also · 81c8edaf
      Chandler Carruth authored
      not really wired into the loop pass manager in a way that will let us
      productively use these passes yet.
      
      This lets the new PM get farther in basic testing which is useful for
      establishing a good baseline of "doesn't explode". There are still
      plenty of crashers in basic testing though, this just gets rid of some
      noise that is well understood and not representing a specific or narrow
      bug.
      
      llvm-svn: 290601
      81c8edaf
    • Gabor Horvath's avatar
      [clang-tidy] Add enum misuse check. · 2953b42a
      Gabor Horvath authored
      The checker detects various cases when an enum is probably misused
      (as a bitmask).
      
      Patch by: Peter Szecsi!
      
      Differential Revision: https://reviews.llvm.org/D22507
      
      llvm-svn: 290600
      2953b42a
    • Sam Kolton's avatar
      [AMDGPU] Assembler: support SDWA and DPP for VOP2b instructions · e66365e0
      Sam Kolton authored
      Reviewers: nhaustov, artem.tamazov, vpykhtin, tstellarAMD
      
      Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, tony-tye
      
      Differential Revision: https://reviews.llvm.org/D28051
      
      llvm-svn: 290599
      e66365e0
    • Eugene Leviant's avatar
      RuntimeDyldELF: add R_AARCH64_ADD_ABS_LO12_NC reloc · 92090835
      Eugene Leviant authored
      Differential revision: https://reviews.llvm.org/D28115
      
      llvm-svn: 290598
      92090835
    • Eugene Leviant's avatar
      Allow setting multiple debug types · c089e406
      Eugene Leviant authored
      Differential revision: https://reviews.llvm.org/D28109
      
      llvm-svn: 290597
      c089e406
    • Daniel Berlin's avatar
      Change a std::vector to SmallVector in NewGVN · 1f31fe52
      Daniel Berlin authored
      llvm-svn: 290596
      1f31fe52
    • Chandler Carruth's avatar
      [PM] Teach the AAManager and AAResults layer (the worst offender for · 17c630a0
      Chandler Carruth authored
      inter-analysis dependencies) to use the new invalidation infrastructure.
      
      This teaches it to invalidate itself when any of the peer function
      AA results that it uses become invalid. We do this by just tracking the
      originating IDs. I've kept it in a somewhat clunky API since some users
      of AAResults are outside the new PM right now. We can clean this API up
      if/when those users go away.
      
      Secondly, it uses the registration on the outer analysis manager proxy
      to trigger deferred invalidation when a module analysis result becomes
      invalid.
      
      I've included test cases that specifically try to trigger use-after-free
      in both of these cases and they would crash or hang pretty horribly for
      me even without ASan. Now they work nicely.
      
      The `InvalidateAnalysis` utility pass required some tweaking to be
      useful in this context and it still is pretty garbage. I'd like to
      switch it back to the previous implementation and teach the explicit
      invalidate method on the AnalysisManager to take care of correctly
      triggering indirect invalidation, but I wanted to go ahead and send this
      out so folks could see how all of this stuff works together in practice.
      And, you know, that it does actually work. =]
      
      Differential Revision: https://reviews.llvm.org/D27205
      
      llvm-svn: 290595
      17c630a0
    • Chandler Carruth's avatar
      [PM] Introduce the facilities for registering cross-IR-unit dependencies · ba90ae96
      Chandler Carruth authored
      that require deferred invalidation.
      
      This handles the other real-world invalidation scenario that we have
      cases of: a function analysis which caches references to a module
      analysis. We currently do this in the AA aggregation layer and might
      well do this in other places as well.
      
      Since this is relative rare, the technique is somewhat more cumbersome.
      Analyses need to register themselves when accessing the outer analysis
      manager's proxy. This proxy is already necessarily present to allow
      access to the outer IR unit's analyses. By registering here we can track
      and trigger invalidation when that outer analysis goes away.
      
      To make this work we need to enhance the PreservedAnalyses
      infrastructure to support a (slightly) more explicit model for "sets" of
      analyses, and allow abandoning a single specific analyses even when
      a set covering that analysis is preserved. That allows us to describe
      the scenario of preserving all Function analyses *except* for the one
      where deferred invalidation has triggered.
      
      We also need to teach the invalidator API to support direct ID calls
      instead of always going through a template to dispatch so that we can
      just record the ID mapping.
      
      I've introduced testing of all of this both for simple module<->function
      cases as well as for more complex cases involving a CGSCC layer.
      
      Much like the previous patch I've not tried to fully update the loop
      pass management layer because that layer is due to be heavily reworked
      to use similar techniques to the CGSCC to handle updates. As that
      happens, we'll have a better testing basis for adding support like this.
      
      Many thanks to both Justin and Sean for the extensive reviews on this to
      help bring the API design and documentation into a better state.
      
      Differential Revision: https://reviews.llvm.org/D27198
      
      llvm-svn: 290594
      ba90ae96
    • Richard Smith's avatar
      DR1495: A partial specialization is ill-formed if it is not (strictly) more · 0e617ecd
      Richard Smith authored
      specialized than the primary template. (Put another way, if we imagine there
      were a partial specialization matching the primary template, we should never
      select it if some other partial specialization also matches.)
      
      llvm-svn: 290593
      0e617ecd
    • Chandler Carruth's avatar
      [PM] Turn on the new PM's inliner in addition to the current one for · 625038d5
      Chandler Carruth authored
      most of the inliner test cases.
      
      The inliner involves a bunch of interesting code and tends to be where
      most of the issues I've seen experimenting with the new PM lie. All of
      these test cases pass, but I'd like to keep some more thorough coverage
      here so doing a fairly blanket enabling.
      
      There are a handful of interesting tests I've not enabled yet because
      they're focused on the always inliner, or on functionality that doesn't
      (yet) exist in the inliner.
      
      llvm-svn: 290592
      625038d5
    • Craig Topper's avatar
    • Chandler Carruth's avatar
      [PM] Add one of the features left out of the initial inliner patch: · 141bf5d1
      Chandler Carruth authored
      skipping indirectly recursive inline chains.
      
      To do this, we implicitly build an inline stack for each callsite and
      check prior to inlining that doing so would not form a cycle. This uses
      the exact same technique and even shares some code with the legacy PM
      inliner.
      
      This solution remains deeply unsatisfying to me because it means we
      cannot actually iterate the inliner externally. Doing so would not be
      able to easily detect and avoid such cycles. Some day I would very much
      like to have a solution that works without this internal state to detect
      cycles, but this is not that day.
      
      llvm-svn: 290590
      141bf5d1
    • Chandler Carruth's avatar
      [PM] Wire up another test to the new pass manager. · db6ced84
      Chandler Carruth authored
      Nothing really interesting here, but I had to improve the test to use
      variables rather than hard coding value names as we happen to end up
      with different value names in the new PM.
      
      llvm-svn: 290589
      db6ced84
    • George Burgess IV's avatar
      [Analysis] Ignore `nobuiltin` on `allocsize` function calls. · ed16024a
      George Burgess IV authored
      We currently ignore the `allocsize` attribute on functions calls with
      the `nobuiltin` attribute when trying to lower `@llvm.objectsize`. We
      shouldn't care about `nobuiltin` here: `allocsize` is explicitly added
      by the user, not inferred based on a function's symbol.
      
      llvm-svn: 290588
      ed16024a
    • Richard Smith's avatar
      Add reference/non-reference mismatch test. · f0071ccd
      Richard Smith authored
      llvm-svn: 290587
      f0071ccd