Page MenuHomePhabricator

DaniilSuchkov (Daniil Suchkov)
User

Projects

User does not belong to any projects.

User Details

User Since
Sep 5 2017, 3:03 AM (246 w, 3 d)

Recent Activity

Feb 17 2022

DaniilSuchkov committed rG7c3e2b92cf66: [RewriteStatepointsForGC] Fix an incorrect assertion (authored by DaniilSuchkov).
[RewriteStatepointsForGC] Fix an incorrect assertion
Feb 17 2022, 10:45 AM
DaniilSuchkov closed D119994: [RewriteStatepointsForGC] Fix an incorrect assertion.
Feb 17 2022, 10:45 AM · Restricted Project
DaniilSuchkov added inline comments to D119994: [RewriteStatepointsForGC] Fix an incorrect assertion.
Feb 17 2022, 10:17 AM · Restricted Project

Feb 16 2022

DaniilSuchkov requested review of D119994: [RewriteStatepointsForGC] Fix an incorrect assertion.
Feb 16 2022, 4:53 PM · Restricted Project
DaniilSuchkov committed rGa99989529eac: [RewriteStatepointsForGC] Add a test exposing an incorrect assertion (authored by DaniilSuchkov).
[RewriteStatepointsForGC] Add a test exposing an incorrect assertion
Feb 16 2022, 4:24 PM

Jan 5 2022

DaniilSuchkov committed rG524abc68f231: Introduce NewPM .dot printers for DomTree (authored by DaniilSuchkov).
Introduce NewPM .dot printers for DomTree
Jan 5 2022, 3:29 PM
DaniilSuchkov closed D116629: Introduce NewPM DOT printers for DomTree.
Jan 5 2022, 3:29 PM · Restricted Project
DaniilSuchkov added inline comments to D116629: Introduce NewPM DOT printers for DomTree.
Jan 5 2022, 2:05 PM · Restricted Project
DaniilSuchkov updated the diff for D116629: Introduce NewPM DOT printers for DomTree.

Fixed lint checks, added a couple of tests and addressed a comment.

Jan 5 2022, 12:15 PM · Restricted Project

Jan 4 2022

DaniilSuchkov updated the diff for D116629: Introduce NewPM DOT printers for DomTree.

Fixed formatting.

Jan 4 2022, 4:30 PM · Restricted Project
DaniilSuchkov requested review of D116629: Introduce NewPM DOT printers for DomTree.
Jan 4 2022, 3:18 PM · Restricted Project

Oct 1 2021

DaniilSuchkov added a comment to D86657: Add new hidden option -print-on-crash that prints out IR that caused opt pipeline to crash.

D110752 is not corrupting IR, it happened because we were looking at a constant's users, which is not a thing that makes sense to do (e.g. look at all users of the constant false).

Oct 1 2021, 4:45 PM · Restricted Project, Restricted Project
DaniilSuchkov added a comment to D110751: [DomTree] Assert that blocks in queries aren't from another function.

nice find, looks like Addr might be a global with type i8*, might need a similar fix to the unswitch one like

--- a/llvm/lib/Transforms/Scalar/LICM.cpp
+++ b/llvm/lib/Transforms/Scalar/LICM.cpp
@@ -1068,6 +1068,8 @@ static bool isLoadInvariantInLoop(LoadInst *LI, DominatorTree *DT,
       return false;
     Addr = BC->getOperand(0);
   }
+  if (isa<Constant>(Addr))
+    return false;
 
   unsigned UsesVisited = 0;
   // Traverse all uses of the load operand value, to see if invariant.start is

I managed to repro the stage2 failure and this fix does fix the crash, just need to come up with a reduced test case

Oct 1 2021, 4:10 PM · Restricted Project
DaniilSuchkov added a comment to D86657: Add new hidden option -print-on-crash that prints out IR that caused opt pipeline to crash.

The title needs updating for the option name

Btw I just tried this on a very large file with a (real) LLVM crash and it was very slow and I gave up. It's probably from printing the IR after every pass. Perhaps cloning the module via CloneModule() and keeping that around might be faster?

Oct 1 2021, 4:06 PM · Restricted Project, Restricted Project
DaniilSuchkov added a comment to D110751: [DomTree] Assert that blocks in queries aren't from another function.

And another one: https://lab.llvm.org/buildbot/#/builders/5/builds/12562/steps/13/logs/stdio

******************** TEST 'LLVM :: CodeGen/X86/misched-new.ll' FAILED ********************
Script:
--
: 'RUN: at line 1';   /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/llc < /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/CodeGen/X86/misched-new.ll -mtriple=x86_64-- -mcpu=core2 -x86-early-ifcvt -enable-misched           -misched=shuffle -misched-bottomup -verify-machineinstrs      | /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/FileCheck /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/CodeGen/X86/misched-new.ll
: 'RUN: at line 4';   /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/llc < /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/CodeGen/X86/misched-new.ll -mtriple=x86_64-- -mcpu=core2 -x86-early-ifcvt -enable-misched           -misched=shuffle -misched-topdown -verify-machineinstrs      | /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/FileCheck /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/CodeGen/X86/misched-new.ll --check-prefix TOPDOWN
--
Exit Code: 2
Command Output (stderr):
--
=================================================================
==632==ERROR: AddressSanitizer: use-after-poison on address 0x62100006ab10 at pc 0x0000096c272a bp 0x7ffcd29574b0 sp 0x7ffcd29574a8
READ of size 8 at 0x62100006ab10 thread T0
    #0 0x96c2729 in getParent /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/MachineBasicBlock.h:225:53
    #1 0x96c2729 in llvm::DominatorTreeBase<llvm::MachineBasicBlock, false>::getNode(llvm::MachineBasicBlock const*) const /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/Support/GenericDomTree.h:352:5
    #2 0x93d9b32 in getNode /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/MachineDominators.h:171:16
    #3 0x93d9b32 in (anonymous namespace)::updateDomTree(llvm::MachineDominatorTree*, (anonymous namespace)::SSAIfConv const&, llvm::ArrayRef<llvm::MachineBasicBlock*>) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/EarlyIfConversion.cpp:814:41
    #4 0x93d1e95 in tryConvertIf /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/EarlyIfConversion.cpp:1037:5
    #5 0x93d1e95 in (anonymous namespace)::EarlyIfConverter::runOnMachineFunction(llvm::MachineFunction&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/EarlyIfConversion.cpp:1071:9
    #6 0x970dd68 in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:72:13
    #7 0xa54710c in llvm::FPPassManager::runOnFunction(llvm::Function&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1439:27
    #8 0xa562670 in llvm::FPPassManager::runOnModule(llvm::Module&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1485:16
    #9 0xa549328 in runOnModule /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1554:27
    #10 0xa549328 in llvm::legacy::PassManagerImpl::run(llvm::Module&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:542:44
    #11 0x4ca65a0 in compileModule /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llc/llc.cpp:687:8
    #12 0x4ca65a0 in main /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llc/llc.cpp:388:22
    #13 0x7f16128a009a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
    #14 0x4be6899 in _start (/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/llc+0x4be6899)

The use-after-poison makes me think they're making a query about a block that is already deleted.

Oct 1 2021, 3:19 PM · Restricted Project
DaniilSuchkov added a comment to D110751: [DomTree] Assert that blocks in queries aren't from another function.

It looks like it has found an actual bug: https://lab.llvm.org/buildbot/#/builders/70/builds/12409/steps/10/logs/stdio

clang++: /b/sanitizer-x86_64-linux-autoconf/build/llvm-project/llvm/include/llvm/Support/GenericDomTree.h:353: llvm::DomTreeNodeBase<NodeT>* llvm::DominatorTreeBase<NodeT, IsPostDom>::getNode(const NodeT*) const [with NodeT = llvm::BasicBlock; bool IsPostDom = false]: Assertion `(!BB || !BB->getParent() || BB->getParent() == Parent) && "A node from another function!"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /b/sanitizer-x86_64-linux-autoconf/build/tsan_debug_build/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib/Transforms/Instrumentation -I/b/sanitizer-x86_64-linux-autoconf/build/llvm-project/llvm/lib/Transforms/Instrumentation -Iinclude -I/b/sanitizer-x86_64-linux-autoconf/build/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O2 -g -DNDEBUG -fno-exceptions -fno-rtti -UNDEBUG -std=c++14 -MD -MT lib/Transforms/Instrumentation/CMakeFiles/LLVMInstrumentation.dir/DataFlowSanitizer.cpp.o -MF lib/Transforms/Instrumentation/CMakeFiles/LLVMInstrumentation.dir/DataFlowSanitizer.cpp.o.d -o lib/Transforms/Instrumentation/CMakeFiles/LLVMInstrumentation.dir/DataFlowSanitizer.cpp.o -c /b/sanitizer-x86_64-linux-autoconf/build/llvm-project/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
1.	<eof> parser at end of file
2.	Optimizer
 #0 0x00005654354a733c llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /b/sanitizer-x86_64-linux-autoconf/build/llvm-project/llvm/lib/Support/Unix/Signals.inc:569:3
 #1 0x00005654354a53d4 llvm::sys::RunSignalHandlers() /b/sanitizer-x86_64-linux-autoconf/build/llvm-project/llvm/lib/Support/Signals.cpp:97:20
 #2 0x00005654354a5949 llvm::sys::CleanupOnSignal(unsigned long) /b/sanitizer-x86_64-linux-autoconf/build/llvm-project/llvm/lib/Support/Unix/Signals.inc:361:31
 #3 0x000056543540d3a8 HandleCrash /b/sanitizer-x86_64-linux-autoconf/build/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:74:27
 #4 0x000056543540d3a8 CrashRecoverySignalHandler(int) /b/sanitizer-x86_64-linux-autoconf/build/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:389:62
 #5 0x00007fbbaaebd730 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12730)
 #6 0x00007fbbaa7a37bb raise (/lib/x86_64-linux-gnu/libc.so.6+0x377bb)
 #7 0x00007fbbaa78e535 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22535)
 #8 0x00007fbbaa78e40f (/lib/x86_64-linux-gnu/libc.so.6+0x2240f)
 #9 0x00007fbbaa79c102 (/lib/x86_64-linux-gnu/libc.so.6+0x30102)
#10 0x0000565434c0f580 llvm::DominatorTreeBase<llvm::BasicBlock, false>::operator[](llvm::BasicBlock const*) const /b/sanitizer-x86_64-linux-autoconf/build/llvm-project/llvm/include/llvm/Support/GenericDomTree.h:363:22
#11 0x0000565434c0fec5 llvm::DominatorTreeBase<llvm::BasicBlock, false>::properlyDominates(llvm::BasicBlock const*, llvm::BasicBlock const*) const /b/sanitizer-x86_64-linux-autoconf/build/llvm-project/llvm/include/llvm/Support/GenericDomTree.h:947:51
#12 0x0000565434c0fec5 llvm::DominatorTreeBase<llvm::BasicBlock, false>::properlyDominates(llvm::BasicBlock const*, llvm::BasicBlock const*) const /b/sanitizer-x86_64-linux-autoconf/build/llvm-project/llvm/include/llvm/Support/GenericDomTree.h:938:6
#13 0x0000565435235a9d isLoadInvariantInLoop /b/sanitizer-x86_64-linux-autoconf/build/llvm-project/llvm/lib/Transforms/Scalar/LICM.cpp:1095:61
#14 0x0000565435235a9d llvm::canSinkOrHoistInst(llvm::Instruction&, llvm::AAResults*, llvm::DominatorTree*, llvm::Loop*, llvm::AliasSetTracker*, llvm::MemorySSAUpdater*, bool, llvm::SinkAndHoistLICMFlags*, llvm::OptimizationRemarkEmitter*) (.part.845) /b/sanitizer-x86_64-linux-autoconf/build/llvm-project/llvm/lib/Transforms/Scalar/LICM.cpp:1187:30
#15 0x000056543523bf29 llvm::hoistRegion(llvm::DomTreeNodeBase<llvm::BasicBlock>*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::BlockFrequencyInfo*, llvm::TargetLibraryInfo*, llvm::Loop*, llvm::MemorySSAUpdater*, llvm::ScalarEvolution*, llvm::ICFLoopSafetyInfo*, llvm::SinkAndHoistLICMFlags&, llvm::OptimizationRemarkEmitter*, bool) /b/sanitizer-x86_64-linux-autoconf/build/llvm-project/llvm/lib/Transforms/Scalar/LICM.cpp:909:49
#16 0x0000565435240e04 (anonymous namespace)::LoopInvariantCodeMotion::runOnLoop(llvm::Loop*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::BlockFrequencyInfo*, llvm::TargetLibraryInfo*, llvm::TargetTransformInfo*, llvm::ScalarEvolution*, llvm::MemorySSA*, llvm::OptimizationRemarkEmitter*, bool) (.part.877) /b/sanitizer-x86_64-linux-autoconf/build/llvm-project/llvm/lib/Transforms/Scalar/LICM.cpp:436:38
#17 0x00005654352424c0 llvm::LICMPass::run(llvm::Loop&, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>&, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&) /b/sanitizer-x86_64-linux-autoconf/build/llvm-project/llvm/lib/Transforms/Scalar/LICM.cpp:274:3
<...>
Oct 1 2021, 2:56 PM · Restricted Project
DaniilSuchkov added a reverting change for rG86046516e4f4: [DomTree] Assert that blocks in queries aren't from another function: rGa67c7deae72a: Revert "[DomTree] Assert that blocks in queries aren't from another function".
Oct 1 2021, 2:52 PM
DaniilSuchkov committed rGa67c7deae72a: Revert "[DomTree] Assert that blocks in queries aren't from another function" (authored by DaniilSuchkov).
Revert "[DomTree] Assert that blocks in queries aren't from another function"
Oct 1 2021, 2:52 PM
DaniilSuchkov added a reverting change for D110751: [DomTree] Assert that blocks in queries aren't from another function: rGa67c7deae72a: Revert "[DomTree] Assert that blocks in queries aren't from another function".
Oct 1 2021, 2:52 PM · Restricted Project
DaniilSuchkov committed rG86046516e4f4: [DomTree] Assert that blocks in queries aren't from another function (authored by DaniilSuchkov).
[DomTree] Assert that blocks in queries aren't from another function
Oct 1 2021, 2:32 PM
DaniilSuchkov committed rG45bd8d947780: [SimpleLoopUnswitch] Don't unswitch constant conditions (authored by DaniilSuchkov).
[SimpleLoopUnswitch] Don't unswitch constant conditions
Oct 1 2021, 2:32 PM
DaniilSuchkov committed rGbdd52e8baedd: [Test] Add a test exposing a miscompile in SimpleLoopUnswitch. (authored by DaniilSuchkov).
[Test] Add a test exposing a miscompile in SimpleLoopUnswitch.
Oct 1 2021, 2:31 PM
DaniilSuchkov closed D110751: [DomTree] Assert that blocks in queries aren't from another function.
Oct 1 2021, 2:31 PM · Restricted Project
DaniilSuchkov closed D110752: [SimpleLoopUnswitch] Don't unswitch constant conditions.
Oct 1 2021, 2:31 PM · Restricted Project

Sep 30 2021

DaniilSuchkov added inline comments to D110752: [SimpleLoopUnswitch] Don't unswitch constant conditions.
Sep 30 2021, 3:38 PM · Restricted Project
DaniilSuchkov updated the diff for D110752: [SimpleLoopUnswitch] Don't unswitch constant conditions.

Now D110751 is on top of this change.

Sep 30 2021, 3:27 PM · Restricted Project
DaniilSuchkov updated the diff for D110751: [DomTree] Assert that blocks in queries aren't from another function.

Rebased it on top of D110752.

Sep 30 2021, 3:24 PM · Restricted Project
DaniilSuchkov added inline comments to D110751: [DomTree] Assert that blocks in queries aren't from another function.
Sep 30 2021, 3:12 PM · Restricted Project
DaniilSuchkov added a comment to D110752: [SimpleLoopUnswitch] Don't unswitch constant conditions.

rebasing this on D110751 is confusing, especially since the test is XFAIL in that patch
I'd just add the test and run update_test_checks.py on it in this patch

then just add the asserts in D110751 in don't touch any test cases in that patch

Sep 30 2021, 2:44 PM · Restricted Project
DaniilSuchkov added a comment to D110751: [DomTree] Assert that blocks in queries aren't from another function.

adding the test here is confusing, I think just adding the assert is good enough. so D110752 would have to land first

Sep 30 2021, 2:41 PM · Restricted Project
DaniilSuchkov updated the diff for D110752: [SimpleLoopUnswitch] Don't unswitch constant conditions.

Rebased on top of new version of D110751. Now it should be easier to understand what's going on with the test.

Sep 30 2021, 12:27 PM · Restricted Project
DaniilSuchkov updated the diff for D110751: [DomTree] Assert that blocks in queries aren't from another function.

That was wrong diff.

Sep 30 2021, 12:23 PM · Restricted Project
DaniilSuchkov updated the diff for D110751: [DomTree] Assert that blocks in queries aren't from another function.

Updated testcase to make it clearer how this patch impacts it.

Sep 30 2021, 12:20 PM · Restricted Project
DaniilSuchkov added a comment to D110752: [SimpleLoopUnswitch] Don't unswitch constant conditions.

Is this falling into the traditional trap of the fact that constants and constant expressions are both represented by the Constant class?
Presumably while we obviously shouldn't unswitch immediate constants, constant expressions are a fair game still?

Sep 30 2021, 12:04 PM · Restricted Project
DaniilSuchkov added inline comments to D110752: [SimpleLoopUnswitch] Don't unswitch constant conditions.
Sep 30 2021, 11:46 AM · Restricted Project

Sep 29 2021

DaniilSuchkov added a comment to D110752: [SimpleLoopUnswitch] Don't unswitch constant conditions.

can you add the motivation for this change to the description?

Sep 29 2021, 3:52 PM · Restricted Project
DaniilSuchkov updated the summary of D110752: [SimpleLoopUnswitch] Don't unswitch constant conditions.
Sep 29 2021, 3:51 PM · Restricted Project
DaniilSuchkov added inline comments to D110751: [DomTree] Assert that blocks in queries aren't from another function.
Sep 29 2021, 2:46 PM · Restricted Project
DaniilSuchkov added a comment to D110751: [DomTree] Assert that blocks in queries aren't from another function.

Since SimpleLoopUnswitch is known to break this assertion, I'm going to land this patch only together with D110752.

Sep 29 2021, 1:46 PM · Restricted Project
DaniilSuchkov added inline comments to rG6b4b1dc6ec6f: [LoopUnswitch] Simplify branch condition if it is select with constant operands.
Sep 29 2021, 12:30 PM
DaniilSuchkov requested review of D110752: [SimpleLoopUnswitch] Don't unswitch constant conditions.
Sep 29 2021, 12:10 PM · Restricted Project
DaniilSuchkov requested review of D110751: [DomTree] Assert that blocks in queries aren't from another function.
Sep 29 2021, 11:58 AM · Restricted Project

Sep 23 2021

DaniilSuchkov added inline comments to D109855: [LoopPredication] Report changes correctly when attempting loop exit predication.
Sep 23 2021, 9:03 AM · Restricted Project

Sep 16 2021

DaniilSuchkov committed rGfe950cba8f46: Update LoopPredication test to fix buildbot failure. (authored by DaniilSuchkov).
Update LoopPredication test to fix buildbot failure.
Sep 16 2021, 4:38 PM
DaniilSuchkov committed rG5f2b7879f16a: NFC. Add tests exposing missing analysis invalidation in LoopPredication. (authored by DaniilSuchkov).
NFC. Add tests exposing missing analysis invalidation in LoopPredication.
Sep 16 2021, 3:51 PM
DaniilSuchkov committed rG0e362883182d: [LoopPredication] Report changes correctly when attempting loop exit predication (authored by DaniilSuchkov).
[LoopPredication] Report changes correctly when attempting loop exit predication
Sep 16 2021, 3:51 PM
DaniilSuchkov closed D109855: [LoopPredication] Report changes correctly when attempting loop exit predication.
Sep 16 2021, 3:50 PM · Restricted Project
DaniilSuchkov added a comment to D109855: [LoopPredication] Report changes correctly when attempting loop exit predication.

From what I can tell, the changes being missed were strictly mutations/moves of instructions, not manipulations of the CFG. As a result, the CFG analysis you're testing being invalidated could actually be preserved with a bit of extra work.

Sep 16 2021, 10:03 AM · Restricted Project

Sep 15 2021

DaniilSuchkov updated the diff for D109855: [LoopPredication] Report changes correctly when attempting loop exit predication.

Removed the pair of {} that became unnecessary.

Sep 15 2021, 2:52 PM · Restricted Project
DaniilSuchkov requested review of D109855: [LoopPredication] Report changes correctly when attempting loop exit predication.
Sep 15 2021, 2:35 PM · Restricted Project

Sep 13 2021

DaniilSuchkov committed rGb39f6a79ee88: [ADT] Extend EnableIfCallable for callables with incomplete returns (authored by math-fehr).
[ADT] Extend EnableIfCallable for callables with incomplete returns
Sep 13 2021, 12:17 PM
DaniilSuchkov closed D104703: [ADT] Extend EnableIfCallable for callables with incomplete returns.
Sep 13 2021, 12:17 PM · Restricted Project
DaniilSuchkov added a comment to D104703: [ADT] Extend EnableIfCallable for callables with incomplete returns.

I'll commit it.

Sep 13 2021, 9:09 AM · Restricted Project

Sep 2 2021

DaniilSuchkov committed rG5c97507e2b67: [InlineCost] Introduce attributes to override InlineCost for inliner testing (authored by DaniilSuchkov).
[InlineCost] Introduce attributes to override InlineCost for inliner testing
Sep 2 2021, 10:35 AM
DaniilSuchkov closed D109033: [InlineCost] Introduce attributes to override InlineCost for inliner testing.
Sep 2 2021, 10:35 AM · Restricted Project

Sep 1 2021

DaniilSuchkov updated the diff for D109033: [InlineCost] Introduce attributes to override InlineCost for inliner testing.

Merged stringAttrAsInt into getStringFnAttrAsInt.

Sep 1 2021, 4:36 PM · Restricted Project
DaniilSuchkov updated the diff for D109033: [InlineCost] Introduce attributes to override InlineCost for inliner testing.

Addressed the comments:

  1. Got rid of CallBase::getFnAttr change, moved that part into a local helper function.
  2. stringAttrAsInt isn't a template now.
Sep 1 2021, 2:11 PM · Restricted Project
DaniilSuchkov added inline comments to D109033: [InlineCost] Introduce attributes to override InlineCost for inliner testing.
Sep 1 2021, 1:03 PM · Restricted Project

Aug 31 2021

DaniilSuchkov requested review of D109033: [InlineCost] Introduce attributes to override InlineCost for inliner testing.
Aug 31 2021, 5:00 PM · Restricted Project

Jul 13 2021

DaniilSuchkov accepted D104703: [ADT] Extend EnableIfCallable for callables with incomplete returns.

LGTM

Jul 13 2021, 3:51 PM · Restricted Project

Jul 12 2021

DaniilSuchkov requested changes to D104703: [ADT] Extend EnableIfCallable for callables with incomplete returns.
  1. Since you're replacing an OR chain you need to re-implement std::disjunction, not std::conjunction (no s at the end), which you mostly did, except for the name and the (2).
  2. According to the specification std::disjunction should return std::false_type for an empty argument list. I.e. here you should use std::false_type instead:
template <typename... Conds> struct conjunctions : std::true_type {};

Also please add a couple of tests for your llvm::disjunction implementation to llvm/unittests/Support/TypeTraitsTest.cpp.

Jul 12 2021, 2:44 PM · Restricted Project

Jul 7 2021

DaniilSuchkov accepted D104703: [ADT] Extend EnableIfCallable for callables with incomplete returns.

LGTM

Jul 7 2021, 5:09 PM · Restricted Project

Jun 7 2021

DaniilSuchkov committed rGd32cc150feb7: [BasicAA] Handle PHIs without incoming values gracefully (authored by DaniilSuchkov).
[BasicAA] Handle PHIs without incoming values gracefully
Jun 7 2021, 2:41 PM
DaniilSuchkov closed D103831: [BasicAA] Handle PHIs without incoming values gracefully.
Jun 7 2021, 2:41 PM · Restricted Project
DaniilSuchkov committed rGe72f16b7e662: [Test] Add a JumpThreading test exposing a bug in BasicAA. (authored by DaniilSuchkov).
[Test] Add a JumpThreading test exposing a bug in BasicAA.
Jun 7 2021, 2:41 PM
DaniilSuchkov requested review of D103831: [BasicAA] Handle PHIs without incoming values gracefully.
Jun 7 2021, 11:11 AM · Restricted Project

May 20 2021

DaniilSuchkov accepted D102631: Allow incomplete template types in unique_function arguments.

LGTM

May 20 2021, 8:16 AM · Restricted Project

May 18 2021

DaniilSuchkov added inline comments to D102631: Allow incomplete template types in unique_function arguments.
May 18 2021, 9:57 PM · Restricted Project
DaniilSuchkov added inline comments to D102631: Allow incomplete template types in unique_function arguments.
May 18 2021, 9:44 PM · Restricted Project

Mar 30 2021

DaniilSuchkov added a comment to rG5bb38e84d3d0: [LoopUnswitch] unswitch if cond is in select form of and/or as well.

I made a fix to keep the main branch in a good state, but not sure this is a real solution because there might be a hidden problem. I'm investigating it.

Mar 30 2021, 8:15 AM

Mar 29 2021

DaniilSuchkov added a comment to rG5bb38e84d3d0: [LoopUnswitch] unswitch if cond is in select form of and/or as well.

Hi! This commit causes miscompilation.
Here's the test:

define i32 @foo(i32* %arg1, i1 %arg2, i1* %arg3, i1* %arg4) {
bb:
  %tmp7 = icmp ne i1 %arg2, 0
  %tmp9 = xor i1 %tmp7, true
  %tmp10 = or i1 %tmp7, %tmp9
  br label %bb11
Mar 29 2021, 6:04 PM

Sep 9 2020

DaniilSuchkov added a comment to rG5ec2b757cc7d: [Instruction] Speculatively undo isIdenticalToWhenDefined() PHI handling changes.

Hi Roman!
I don't know if this information will help you, but after c9dc627331992b01b962103fad813810cba00696 on internal testing we started hitting following assertion at very low rate

llvm/include/llvm/ADT/DenseMap.h:408 assert(!FoundVal && "Key already in new map?");
Sep 9 2020, 4:04 AM

Aug 11 2020

DaniilSuchkov accepted D81554: [ADT] Allow IsSizeLessThanThresholdT for incomplete types. NFC.

I checked it and it looks like if it compiles, everything should work just fine in presence of incomplete types.
LGTM

Aug 11 2020, 4:23 AM · Restricted Project

Jul 22 2020

DaniilSuchkov resigned from D81554: [ADT] Allow IsSizeLessThanThresholdT for incomplete types. NFC.
Jul 22 2020, 10:43 PM · Restricted Project

May 27 2020

DaniilSuchkov committed rG706b22e3e446: [SimpleLoopUnswitch] Drop uses of instructions before block deletion (authored by DaniilSuchkov).
[SimpleLoopUnswitch] Drop uses of instructions before block deletion
May 27 2020, 4:50 AM
DaniilSuchkov closed D80551: [SimpleLoopUnswitch] Drop uses of instructions before block deletion.
May 27 2020, 4:49 AM · Restricted Project
DaniilSuchkov committed rGfc44da746faa: Add test exposing a bug in SimpleLoopUnswitch. (authored by DaniilSuchkov).
Add test exposing a bug in SimpleLoopUnswitch.
May 27 2020, 1:35 AM

May 26 2020

DaniilSuchkov created D80551: [SimpleLoopUnswitch] Drop uses of instructions before block deletion.
May 26 2020, 6:27 AM · Restricted Project

Mar 6 2020

DaniilSuchkov committed rGb313897b3e9b: [BFI] Use CallbackVH to notify BFI about deletion of basic blocks (authored by DaniilSuchkov).
[BFI] Use CallbackVH to notify BFI about deletion of basic blocks
Mar 6 2020, 4:59 AM

Mar 5 2020

DaniilSuchkov added a comment to rG8975aa6ea817: [BFI] Use CallbackVH to notify BFI about deletion of basic blocks.

Apparently, it breaks MSVC buildbots too, but it does it in a way I can't comprehend: looks like after my change MSVC instantiates all methods of BlockFrequencyInfoImpl, including ones that weren't instantiated before and which are incorrect for <MachineBasicBlock> instantiation. I don't have access to MSVC, so there's no way I'll figure out what's wrong with it and fix it.

Mar 5 2020, 4:56 AM
DaniilSuchkov added a comment to rG408349a25d0f: [BFI] Use CallbackVH to notify BFI about deletion of basic blocks.

Following resubmission of this patch:

commit 8975aa6ea8172963d6532caa8ed2a6f6e0074a02
Author: Daniil Suchkov <suc-daniil@yandex.ru>
Date:   Thu Mar 5 18:32:50 2020 +0700
Mar 5 2020, 4:56 AM
DaniilSuchkov committed rG8975aa6ea817: [BFI] Use CallbackVH to notify BFI about deletion of basic blocks (authored by DaniilSuchkov).
[BFI] Use CallbackVH to notify BFI about deletion of basic blocks
Mar 5 2020, 4:24 AM
DaniilSuchkov added a reverting change for rG408349a25d0f: [BFI] Use CallbackVH to notify BFI about deletion of basic blocks: rG53dceb50ed97: Revert "[BFI] Use CallbackVH to notify BFI about deletion of basic blocks".
Mar 5 2020, 3:52 AM
DaniilSuchkov committed rG53dceb50ed97: Revert "[BFI] Use CallbackVH to notify BFI about deletion of basic blocks" (authored by DaniilSuchkov).
Revert "[BFI] Use CallbackVH to notify BFI about deletion of basic blocks"
Mar 5 2020, 3:52 AM
DaniilSuchkov committed rG408349a25d0f: [BFI] Use CallbackVH to notify BFI about deletion of basic blocks (authored by DaniilSuchkov).
[BFI] Use CallbackVH to notify BFI about deletion of basic blocks
Mar 5 2020, 3:19 AM
DaniilSuchkov closed D75341: [BFI] Use CallbackVH to notify BFI about deletion of basic blocks.
Mar 5 2020, 3:19 AM · Restricted Project
DaniilSuchkov added a comment to rG952ad4701cf0: [ValueTracking] Let isGuaranteedNotToBeUndefOrPoison look into branch….

Hi! I had to revert this patch because following test results in SIGSEGV and passes with the patch reverted (you can find it at llvm/test/Transforms/LoopRotate/freeze-crash.ll):

; RUN: opt -loop-rotate -disable-output %s
Mar 5 2020, 2:14 AM
DaniilSuchkov added a comment to D75401: [ValueTracking] Let isGuaranteedNotToBeUndefOrPoison look into branch conditions of dominating blocks' terminators.

Hi! Unfortunately I had to revert this patch, see my comment here: https://reviews.llvm.org/rG952ad4701cf0d8da79789f6b83ddaa386c60d535

Mar 5 2020, 2:14 AM · Restricted Project
DaniilSuchkov committed rG3db48f93248f: Revert "[ValueTracking] Let isGuaranteedNotToBeUndefOrPoison look into branch… (authored by DaniilSuchkov).
Revert "[ValueTracking] Let isGuaranteedNotToBeUndefOrPoison look into branch…
Mar 5 2020, 1:41 AM
DaniilSuchkov committed rGf35a898f5f1e: [Test] Add a regression test for failure introduced by… (authored by DaniilSuchkov).
[Test] Add a regression test for failure introduced by…
Mar 5 2020, 1:41 AM
DaniilSuchkov added a reverting change for rG952ad4701cf0: [ValueTracking] Let isGuaranteedNotToBeUndefOrPoison look into branch…: rG3db48f93248f: Revert "[ValueTracking] Let isGuaranteedNotToBeUndefOrPoison look into branch….
Mar 5 2020, 1:41 AM

Mar 4 2020

DaniilSuchkov added a comment to D75341: [BFI] Use CallbackVH to notify BFI about deletion of basic blocks.

Actually, this change will even help CheckBFIUnknownBlockQueries: since every missed update will result in a missing NodesMap entry, without exclusion of cases when new BB happens to be in the same address where some old BB was.

Mar 4 2020, 1:46 AM · Restricted Project
DaniilSuchkov added a comment to D75341: [BFI] Use CallbackVH to notify BFI about deletion of basic blocks.

I think we should explicitly fix the real problems that new blocks are not updated frequency information instead of just letting them get a known default value. Doing it later can make it harder to find those problems, right?

Mar 4 2020, 1:46 AM · Restricted Project

Mar 3 2020

DaniilSuchkov added a comment to D75341: [BFI] Use CallbackVH to notify BFI about deletion of basic blocks.

You mean we don't need to update BFI in non-asserting mode? It's not just for verification, it's required for correctness.

Mar 3 2020, 9:47 PM · Restricted Project
DaniilSuchkov added a comment to D75341: [BFI] Use CallbackVH to notify BFI about deletion of basic blocks.

This looks good, but it does have implications on memory consumption for BFI. To avoid that, gate the data structure change on #ifndef NDEBUG.

Mar 3 2020, 8:42 PM · Restricted Project

Mar 1 2020

DaniilSuchkov updated the diff for D75341: [BFI] Use CallbackVH to notify BFI about deletion of basic blocks.

Got rid of all const_casts except one, which was moved into CallbackVH's constructor.

Mar 1 2020, 11:24 PM · Restricted Project

Feb 28 2020

DaniilSuchkov planned changes to D75341: [BFI] Use CallbackVH to notify BFI about deletion of basic blocks.
Feb 28 2020, 10:01 PM · Restricted Project
DaniilSuchkov added a comment to D75341: [BFI] Use CallbackVH to notify BFI about deletion of basic blocks.

One thing I don't understand is why three out of four kinds of VHs perform the const_cast, not the ValueHandleBase. I think it's time to change that (and by doing so, allow CallbackVH accept const pointers too).
Given that three out of four VH kinds already perform const_cast inside, I think it makes sense to add one to CallbackVH too.

Feb 28 2020, 9:18 PM · Restricted Project
DaniilSuchkov added a comment to D75341: [BFI] Use CallbackVH to notify BFI about deletion of basic blocks.

Do you mean it does not work well for const pointers? There are existing uses of AssertingVH<const BasicBlock> or AssertingVH<const Value>?

Feb 28 2020, 9:15 PM · Restricted Project
DaniilSuchkov added a comment to D75341: [BFI] Use CallbackVH to notify BFI about deletion of basic blocks.

Alternatively I think it would be reasonable to expect the passes claiming to preserve BFI to notify BFI about deleted/added blocks, like we do for many other analysis. Do you have any idea of how much effort that would take?

Feb 28 2020, 9:01 PM · Restricted Project