Skip to content
  1. Jan 28, 2017
    • Taewook Oh's avatar
      [InstCombine] Merge DebugLoc when speculatively hoisting store instruction · 505a25ae
      Taewook Oh authored
      Summary: Along with https://reviews.llvm.org/D27804, debug locations need to be merged when hoisting store instructions as well. Not sure if just dropping debug locations would make more sense for this case, but as the branch instruction will have at least different discriminator with the hoisted store instruction, I think there will be no difference in practice.
      
      Reviewers: aprantl, andreadb, danielcdh
      
      Reviewed By: aprantl
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D29062
      
      llvm-svn: 293372
      505a25ae
    • Matthias Braun's avatar
      Use print() instead of dump() in code · 194ded55
      Matthias Braun authored
      llvm-svn: 293371
      194ded55
    • Richard Trieu's avatar
      [WebAssembly] Use print instead of dump method. · 3de487b2
      Richard Trieu authored
      This fixes non-debug non-assert builds after r293359.
      
      llvm-svn: 293368
      3de487b2
    • Matthias Braun's avatar
      Use print() instead of dump() in code · 25bcaba5
      Matthias Braun authored
      The dump() functions are meant to be used in a debugger, code should
      typically use something like print(errs());
      
      llvm-svn: 293365
      25bcaba5
    • Daniel Berlin's avatar
      MemorySSA: Allow movement to arbitrary places · ee6e3a59
      Daniel Berlin authored
      Summary: Extend the MemorySSAUpdater API to allow movement to arbitrary places
      
      Reviewers: davide, george.burgess.iv
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D29239
      
      llvm-svn: 293363
      ee6e3a59
    • Quentin Colombet's avatar
      [RegisterBankInfo] Emit proper type for remapped registers. · 8cf1163c
      Quentin Colombet authored
      When the OperandsMapper creates virtual registers, it used to just create
      plain scalar register with the right size. This may confuse the
      instruction selector because we lose the information of the instruction
      using those registers what supposed to do. The MachineVerifier complains
      about that already.
      
      With this patch, the OperandsMapper still creates plain scalar register,
      but the expectation is for the mapping function to remap the type
      properly. The default mapping function has been updated to do that.
      
      rdar://problem/30231850
      
      llvm-svn: 293362
      8cf1163c
    • Daniel Berlin's avatar
    • Matthias Braun's avatar
      Cleanup dump() functions. · 8c209aa8
      Matthias Braun authored
      We had various variants of defining dump() functions in LLVM. Normalize
      them (this should just consistently implement the things discussed in
      http://lists.llvm.org/pipermail/cfe-dev/2014-January/034323.html
      
      For reference:
      - Public headers should just declare the dump() method but not use
        LLVM_DUMP_METHOD or #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
      - The definition of a dump method should look like this:
        #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
        LLVM_DUMP_METHOD void MyClass::dump() {
          // print stuff to dbgs()...
        }
        #endif
      
      llvm-svn: 293359
      8c209aa8
    • Daniel Berlin's avatar
      MemorySSA: Move updater to its own file · ae6b8b69
      Daniel Berlin authored
      llvm-svn: 293357
      ae6b8b69
    • Daniel Berlin's avatar
      Introduce a basic MemorySSA updater, that supports insertDef, · 60ead05f
      Daniel Berlin authored
      insertUse, moveBefore and moveAfter operations.
      
      Summary:
      This creates a basic MemorySSA updater that handles arbitrary
      insertion of uses and defs into MemorySSA, as well as arbitrary
      movement around the CFG. It replaces the current splice API.
      
      It can be made to handle arbitrary control flow changes.
      Currently, it uses the same updater algorithm from D28934.
      
      The main difference is because MemorySSA is single variable, we have
      the complete def and use list, and don't need anyone to give it to us
      as part of the API.  We also have to rename stores below us in some
      cases.
      
      If we go that direction in that patch, i will merge all the updater
      implementations (using an updater_traits or something to provide the
      get* functions we use, called read*/write* in that patch).
      
      Sadly, the current SSAUpdater algorithm is way too slow to use for
      what we are doing here.
      
      I have updated the tests we have to basically build memoryssa
      incrementally using the updater api, and make sure it still comes out
      the same.
      
      Reviewers: george.burgess.iv
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D29047
      
      llvm-svn: 293356
      60ead05f
    • Quentin Colombet's avatar
      [RegisterCoalescing] Recommit the patch "Remove partial redundent copy". · 35109902
      Quentin Colombet authored
      In r292621, the recommit fixes a bug related with live interval update
      after the partial redundent copy is moved.
      
      This recommit solves an additional bug related to the lack of update of
      subranges.
      
      The original patch is to solve the performance problem described in
      PR27827. Register coalescing sometimes cannot remove a copy because of
      interference. But if we can find a reverse copy in one of the predecessor
      block of the copy, the copy is partially redundent and we may remove the
      copy partially by moving it to the predecessor block without the
      reverse copy.
      
      Differential Revision: https://reviews.llvm.org/D28585
      
      Re-apply r292621
      
      Revert "Revert rL292621. Caused some internal build bot failures in apple."
      
      This reverts commit r292984.
      
      Original patch: Wei Mi <wmi@google.com>
      Subrange fix: Mostly Matthias Braun <matze@braunis.de>
      
      llvm-svn: 293353
      35109902
    • Evgeniy Stepanov's avatar
      Fix memory leak in globalisel. · d0852873
      Evgeniy Stepanov authored
          #0 0x89cdeb in operator new[](unsigned long) /code/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:84:37
          #1 0x4ec87c4 in llvm::RegisterBankInfo::ValueMapping const* llvm::RegisterBankInfo::getOperandsMapping<llvm::RegisterBankInfo::ValueMapping const* const*>(llvm::RegisterBankInfo::ValueMapping const* const*, llvm::RegisterBankInfo::ValueMapping const* const*) const /code/llvm/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp:297:9
          #2 0x9327ee in llvm::AArch64RegisterBankInfo::getInstrMapping(llvm::MachineInstr const&) const /code/llvm/lib/Target/AArch64/AArch64RegisterBankInfo.cpp:540:30
          #3 0x4eb8d07 in llvm::RegBankSelect::assignInstr(llvm::MachineInstr&) /code/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp:546:24
          #4 0x4eb9dd2 in llvm::RegBankSelect::runOnMachineFunction(llvm::MachineFunction&) /code/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp:624:12
          #5 0x3141875 in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /code/llvm/lib/CodeGen/MachineFunctionPass.cpp:62:13
          #6 0x396128d in llvm::FPPassManager::runOnFunction(llvm::Function&) /code/llvm/lib/IR/LegacyPassManager.cpp:1513:27
          #7 0x3961832 in llvm::FPPassManager::runOnModule(llvm::Module&) /code/llvm/lib/IR/LegacyPassManager.cpp:1534:16
          #8 0x3962540 in runOnModule /code/llvm/lib/IR/LegacyPassManager.cpp:1590:27
          #9 0x3962540 in llvm::legacy::PassManagerImpl::run(llvm::Module&) /code/llvm/lib/IR/LegacyPassManager.cpp:1693
          #10 0x8ae368 in compileModule(char**, llvm::LLVMContext&) /code/llvm/tools/llc/llc.cpp:562:8
          #11 0x8a7a1b in main /code/llvm/tools/llc/llc.cpp:316:22
      
      llvm-svn: 293351
      d0852873
    • Vadim Chugunov's avatar
      Test commit. · 8079692c
      Vadim Chugunov authored
      llvm-svn: 293349
      8079692c
    • Eugene Zelenko's avatar
    • Tim Northover's avatar
      GlobalISel: don't leak super-entry BB when merging with IR-level one. · 12bd22fb
      Tim Northover authored
      We have to delete the block manually or it leaks. That triggers failures in
      -fsanitize=leak bots (unsurprisingly), which should be fixed by this patch.
      
      llvm-svn: 293347
      12bd22fb
    • Sanjay Patel's avatar
      [InstCombine] move icmp transforms that might be recognized as min/max and inf-loop (PR31751) · febcb9ce
      Sanjay Patel authored
      This is a minimal patch to avoid the infinite loop in:
      https://llvm.org/bugs/show_bug.cgi?id=31751
      
      But the general problem is bigger: we're not canonicalizing all of the min/max forms reported
      by value tracking's matchSelectPattern(), and we don't define min/max consistently. Some code
      uses matchSelectPattern(), other code uses matchers like m_Umax, and others have their own
      inline definitions which may be subtly different from any of the above.
      
      The reason that the test cases in this patch need a cast op to trigger is because we don't
      (yet) canonicalize all min/max forms based on matchSelectPattern() in 
      canonicalizeMinMaxWithConstant(), but we do make min/max+cast transforms based on 
      matchSelectPattern() in visitSelectInst().
      
      The location of the icmp transforms that trigger the inf-loop seems arbitrary at best, so
      I'm moving those behind the min/max fence in visitICmpInst() as the quick fix.
      
      llvm-svn: 293345
      febcb9ce
  2. Jan 27, 2017
Loading