Skip to content
  1. Jul 22, 2015
  2. Jul 15, 2015
  3. Jul 14, 2015
    • Reid Kleckner's avatar
      Update enforceKnownAlignment after the isWeakForLinker semantic change · 486fa397
      Reid Kleckner authored
      Previously we would refrain from attempting to increase the linkage of
      available_externally globals because they were considered weak for the
      linker. Now they are treated more like a declaration instead of a weak
      definition.
      
      This was causing SSE alignment faults in Chromuim, when some code
      assumed it could increase the alignment of a dllimported global that it
      didn't control.  http://crbug.com/509256
      
      llvm-svn: 242091
      486fa397
  4. Jul 11, 2015
    • Chandler Carruth's avatar
      [PM/AA] Completely remove the AliasAnalysis::copyValue interface. · 00ebdbcc
      Chandler Carruth authored
      No in-tree alias analysis used this facility, and it was not called in
      any particularly rigorous way, so it seems unlikely to be correct.
      
      Note that one of the only stateful AA implementations in-tree,
      GlobalsModRef is completely broken currently (and any AA passes like it
      are equally broken) because Module AA passes are not effectively
      invalidated when a function pass that fails to update the AA stack runs.
      
      Ultimately, it doesn't seem like we know how we want to build stateful
      AA, and until then trying to support and maintain correctness for an
      untested API is essentially impossible. To that end, I'm planning to rip
      out all of the update API. It can return if and when we need it and know
      how to build it on top of the new pass manager and as part of *tested*
      stateful AA implementations in the tree.
      
      Differential Revision: http://reviews.llvm.org/D10889
      
      llvm-svn: 241975
      00ebdbcc
  5. Jul 10, 2015
  6. Jul 01, 2015
  7. Jun 29, 2015
    • Alexey Samsonov's avatar
      [LoopSimplify] Set proper debug location in loop backedge blocks. · b7724b95
      Alexey Samsonov authored
      Set debug location for terminator instruction in loop backedge block
      (which is an unconditional jump to loop header). We can't copy debug
      location from original backedges, as there can be several of them,
      with different debug info locations. So, we follow the approach of
      SplitBlockPredecessors, and copy the debug info from first non-PHI
      instruction in the header (i.e. destination block).
      
      This is yet another change for PR23837.
      
      llvm-svn: 240999
      b7724b95
  8. Jun 26, 2015
  9. Jun 24, 2015
  10. Jun 23, 2015
  11. Jun 20, 2015
    • Benjamin Kramer's avatar
      [SwitchLowering] Remove quadratic vector removal. · 00a477f2
      Benjamin Kramer authored
      This can be triggered with giant switches. No functionality change
      intended.
      
      llvm-svn: 240221
      00a477f2
    • Justin Bogner's avatar
      LowerSwitch: Avoid some undefined behaviour · e46d3796
      Justin Bogner authored
      When a case of INT64_MIN was followed by a case that was greater than
      zero, we were overflowing a signed integer here. Since we've sorted
      the cases here anyway (and thus currentValue must be greater than
      nextValue) it's simple enough to avoid this by using addition rather
      than subtraction.
      
      Found by UBSAN on existing tests.
      
      llvm-svn: 240201
      e46d3796
  12. Jun 19, 2015
  13. Jun 18, 2015
  14. Jun 17, 2015
    • David Majnemer's avatar
      Move the personality function from LandingPadInst to Function · 7fddeccb
      David Majnemer authored
      The personality routine currently lives in the LandingPadInst.
      
      This isn't desirable because:
      - All LandingPadInsts in the same function must have the same
        personality routine.  This means that each LandingPadInst beyond the
        first has an operand which produces no additional information.
      
      - There is ongoing work to introduce EH IR constructs other than
        LandingPadInst.  Moving the personality routine off of any one
        particular Instruction and onto the parent function seems a lot better
        than have N different places a personality function can sneak onto an
        exceptional function.
      
      Differential Revision: http://reviews.llvm.org/D10429
      
      llvm-svn: 239940
      7fddeccb
    • Tyler Nowicki's avatar
      Refactor RecurrenceInstDesc · 27b2c39e
      Tyler Nowicki authored
      Moved RecurrenceInstDesc into RecurrenceDescriptor to simplify the namespaces.
      
      llvm-svn: 239862
      27b2c39e
  15. Jun 16, 2015
  16. Jun 11, 2015
    • Alexey Samsonov's avatar
      [LoopUnroll] Use IRBuilder to create branch instructions. · ea20199b
      Alexey Samsonov authored
      Use IRBuilder::Create(Cond)?Br instead of constructing instructions
      manually with BranchInst::Create(). It's consistent with other
      uses of IRBuilder in this pass, and has an additional important
      benefit:
      
      Using IRBuilder will ensure that new branch instruction will get
      the same debug location as original terminator instruction it will
      eventually replace.
      
      For now I'm not adding a testcase, as currently original terminator
      instruction also lack debug location due to missing debug location
      propagation in BasicBlock::splitBasicBlock. That is, the testcase
      will accompany the fix for the latter I'm going to mail soon.
      
      llvm-svn: 239550
      ea20199b
  17. Jun 10, 2015
  18. Jun 05, 2015
  19. Jun 01, 2015
  20. May 29, 2015
    • Benjamin Kramer's avatar
      Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types · f5e2fc47
      Benjamin Kramer authored
      If the type isn't trivially moveable emplace can skip a potentially
      expensive move. It also saves a couple of characters.
      
      
      Call sites were found with the ASTMatcher + some semi-automated cleanup.
      
      memberCallExpr(
          argumentCountIs(1), callee(methodDecl(hasName("push_back"))),
          on(hasType(recordDecl(has(namedDecl(hasName("emplace_back")))))),
          hasArgument(0, bindTemporaryExpr(
                             hasType(recordDecl(hasNonTrivialDestructor())),
                             has(constructExpr()))),
          unless(isInTemplateInstantiation()))
      
      No functional change intended.
      
      llvm-svn: 238602
      f5e2fc47
  21. May 23, 2015
    • Philip Reames's avatar
      Extend EarlyCSE to handle basic cases from JumpThreading and CVP · 7c78ef7d
      Philip Reames authored
      This patch extends EarlyCSE to take advantage of the information that a controlling branch gives us about the value of a Value within this and dominated basic blocks. If the current block has a single predecessor with a controlling branch, we can infer what the branch condition must have been to execute this block. The actual change to support this is downright simple because EarlyCSE's existing scoped hash table logic deals with most of the complexity around merging.
      
      The patch actually implements two optimizations.
      1) The first is analogous to JumpThreading in that it enables EarlyCSE's CSE handling to fold branches which are exactly redundant due to a previous branch to branches on constants. (It doesn't actually replace the branch or change the CFG.) This is pretty clearly a win since it enables substantial CFG simplification before we start trying to inline.
      2) The second is analogous to CVP in that it exploits the knowledge gained to replace dominated *uses* of the original value. EarlyCSE does not otherwise reason about specific uses, so this is the more arguable one. It does enable further simplication and constant folding within the rest of the visit by EarlyCSE.
      
      In both cases, the added code only handles the easy dominance based case of each optimization. The general case is deferred to the existing passes.
      
      Differential Revision: http://reviews.llvm.org/D9763
      
      llvm-svn: 238071
      7c78ef7d
  22. May 20, 2015
  23. May 19, 2015
  24. May 18, 2015
  25. May 13, 2015
    • Pete Cooper's avatar
      Change LoadAndStorePromoter to take ArrayRef instead of SmallVectorImpl&. · 41e0ee30
      Pete Cooper authored
      The array passed to LoadAndStorePromoter's constructor was a constant reference to a SmallVectorImpl, which is just the same as passing an ArrayRef.
      
      Also, the data in the array can be 'const Instruction*' instead of 'Instruction*'.  Its not possible to convert a SmallVectorImpl<T*> to SmallVectorImpl<const T*>, but ArrayRef does provide such a method.
      
      Currently this added calls to makeArrayRef which should be a nop, but i'm going to kick off a discussion about improving ArrayRef to not need these.
      
      llvm-svn: 237226
      41e0ee30
  26. May 12, 2015
  27. May 06, 2015
  28. May 05, 2015
  29. Apr 30, 2015
Loading