Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Phabricator shutdown timeline

DaniilSuchkov (Daniil Suchkov)
User

Projects

User does not belong to any projects.

User Details

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

Recent Activity

Aug 2 2023

DaniilSuchkov accepted D156908: [NFC][GuardWidening] Remove dead code.

LGTM

Aug 2 2023, 9:48 AM · Restricted Project, Restricted Project

Jul 18 2023

DaniilSuchkov committed rG6fa66acfad3b: [AArch64] NFC. Add a test exposing a bug in FixupStatepointCallerSaved pass (authored by DaniilSuchkov).
[AArch64] NFC. Add a test exposing a bug in FixupStatepointCallerSaved pass
Jul 18 2023, 2:04 PM · Restricted Project, Restricted Project

Jun 22 2023

DaniilSuchkov added a comment to D141712: [GVN] Improve PRE on load instructions.

@uabelho Thanks for the report, should be fixed by https://github.com/llvm/llvm-project/commit/282324aa4a6c29d5ce31c66f8def15d9bd8e84e4.

(I did not add an additional test, because plenty of other tests already fail if we don't require -debug for this.)

Jun 22 2023, 10:14 AM · Restricted Project, Restricted Project

Jun 14 2023

DaniilSuchkov added a comment to rGe47b76a82a03: ValueTracking: Delete body of isKnownNeverNaN.

This change causes a miscompile. Here's an example: https://alive2.llvm.org/ce/z/5rPFgH
With this change opt -passes=instcombine transforms the following IR:

define i1 @test(i64 %arg) {
  %sitofp = sitofp i64 %arg to float
  %fmul = fmul float %sitofp, 0x7FF0000000000000
  %fcmp = fcmp uno float %fmul, 0.000000e+00
  ret i1 %fcmp
}

into

define i1 @test(i64 %arg) {
  ret i1 false
}

That's not correct because fcmp uno returns true if either argument is NaN and by IEEE-754 multiplication of infinity (aka 0x7FF0000000000000) and 0 (sitofp i64 %arg to float with %arg == 0) is NaN. Alive2 points out exactly this case.
Please fix or revert ASAP.

Jun 14 2023, 11:46 AM · Restricted Project, Restricted Project

May 12 2023

DaniilSuchkov added a comment to D149423: [ValueTracking] Use knownbits interface for determining if `div`/`rem` are safe to speculate.

Maybe a new API is inorder? isSafeToSpeculativelyExecuteConst so that things like hoisting (which don't change the operands) can use the improve analysis but not things like GuardWidening or CVP.

May 12 2023, 2:26 PM · Restricted Project, Restricted Project

May 11 2023

DaniilSuchkov added a comment to D149423: [ValueTracking] Use knownbits interface for determining if `div`/`rem` are safe to speculate.

Short term fix is obviously revert (still building), but longer term
I guess we need an API for "is always speculatively executable"?
or something like that.
@nikic, any thoughts on how best to proceed in trying to safely
strengthen the isSpeculativelyExecutable case?

I think strengthening the 'isSpeculativlyExecutable' is a bit conservative. I found that this bug is only exposed in CVP's narrowUDivOrURem, we can add some checks to avoid it.

I tend to agree that this issue leans more on narrowUDivOrURem but are these implicit assumptions elsewhere in the project? If the common usage of isSpeculativelyExecutable has come to mean that its speculatively executable even if the non-const operands change then it is a bug in the change to isSpeculativelyExecutable, not with narrowUDivOrURem

May 11 2023, 5:47 PM · Restricted Project, Restricted Project

Feb 27 2023

DaniilSuchkov added a comment to D140580: [SLP]Do not emit many extractelements, reuse the single one emitted..

@ABataev thank you!

Feb 27 2023, 10:35 AM · Restricted Project, Restricted Project

Feb 24 2023

DaniilSuchkov added a comment to D140580: [SLP]Do not emit many extractelements, reuse the single one emitted..

This patch is causing a crash even after the 26fec4e845a833214d2b0036ea90f1b1c2418d50
IR:

target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128-ni:1-p2:32:8:8:32-ni:2"
target triple = "x86_64-unknown-linux-gnu"
Feb 24 2023, 3:37 PM · Restricted Project, Restricted Project

Jul 30 2022

DaniilSuchkov added a comment to D129643: [SCEV] Use context to strengthen flags of BinOps.

The change seems reasonable.

Jul 30 2022, 3:23 PM · Restricted Project, Restricted Project

Jun 28 2022

DaniilSuchkov added inline comments to rGd08f34b592ff: [llvm] Don't use Optional::hasValue (NFC).
Jun 28 2022, 12:29 PM · Restricted Project, Restricted Project

Jun 2 2022

DaniilSuchkov added a reverting change for rG006334470d8d: [LoopInterchange] New cost model for loop interchange: rGf1940a589516: Revert "[LoopInterchange] New cost model for loop interchange".
Jun 2 2022, 5:56 PM · Restricted Project, Restricted Project
DaniilSuchkov committed rGf1940a589516: Revert "[LoopInterchange] New cost model for loop interchange" (authored by DaniilSuchkov).
Revert "[LoopInterchange] New cost model for loop interchange"
Jun 2 2022, 5:56 PM · Restricted Project, Restricted Project
DaniilSuchkov added a reverting change for D124926: [LoopInterchange] New cost model for loop interchange: rGf1940a589516: Revert "[LoopInterchange] New cost model for loop interchange".
Jun 2 2022, 5:56 PM · Restricted Project, Restricted Project, Restricted Project

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