Page MenuHomePhabricator
Feed Advanced Search

Yesterday

danlark abandoned D102550: [ValueTracking] Mark GEP operand as nonnull if the result was loaded or stored.

I basically agree with @nikic here.
There is a huge number of low-hanging fruit like this,
but the approach just doesn't seem viable to me.

I would instead like to see the Attributor finally enabled,
there such things would be much more straight-forward.

Sorry for a very not helpful feedback.

Sat, May 15, 9:47 AM · Restricted Project
danlark added a comment to D102550: [ValueTracking] Mark GEP operand as nonnull if the result was loaded or stored.

I'm somewhat concerned about the general direction here. This looks through a GEP, but what about bitcasts? What about a bitcast of a GEP? A GEP of a bitcast? A longer chain of GEPs and bitcasts? We can't reasonably walk the whole use graph and this is really pushing the bounds of what it appropriate for a ValueTracking helper.

We have a more principled version of this optimization in LVI, which scans whole blocks for pointer dereferences and records their underlying objects, thus handling this in full generality. The only caveat is that LVI only uses this information to optimize the terminator instruction, because it does not store where exactly inside the block the first dereference occurs. If the motivation here is handling of non-terminator comparisons, then that might be a better avenue to explore?

Sat, May 15, 8:56 AM · Restricted Project
danlark updated the diff for D102550: [ValueTracking] Mark GEP operand as nonnull if the result was loaded or stored.

Fix compilation issues

Sat, May 15, 8:45 AM · Restricted Project
danlark updated the diff for D102550: [ValueTracking] Mark GEP operand as nonnull if the result was loaded or stored.

Remove unnecessary checks

Sat, May 15, 8:44 AM · Restricted Project
danlark updated the diff for D102550: [ValueTracking] Mark GEP operand as nonnull if the result was loaded or stored.

Fix clang-tidy warning

Sat, May 15, 6:13 AM · Restricted Project
danlark added inline comments to D102550: [ValueTracking] Mark GEP operand as nonnull if the result was loaded or stored.
Sat, May 15, 4:32 AM · Restricted Project
danlark updated the diff for D102550: [ValueTracking] Mark GEP operand as nonnull if the result was loaded or stored.

Don't compute the isKnownNonZero for operand

Sat, May 15, 4:31 AM · Restricted Project
danlark added inline comments to D102550: [ValueTracking] Mark GEP operand as nonnull if the result was loaded or stored.
Sat, May 15, 4:20 AM · Restricted Project
danlark added inline comments to D102550: [ValueTracking] Mark GEP operand as nonnull if the result was loaded or stored.
Sat, May 15, 4:18 AM · Restricted Project
danlark updated the diff for D102550: [ValueTracking] Mark GEP operand as nonnull if the result was loaded or stored.

Add gep after check test to test DominatorTree

Sat, May 15, 4:15 AM · Restricted Project
danlark updated the summary of D102550: [ValueTracking] Mark GEP operand as nonnull if the result was loaded or stored.
Sat, May 15, 4:04 AM · Restricted Project
danlark requested review of D102550: [ValueTracking] Mark GEP operand as nonnull if the result was loaded or stored.
Sat, May 15, 4:03 AM · Restricted Project
danlark abandoned D83547: [builtins] Optimize the 128-bit division according to "Improved division by invariant integers" paper.
Sat, May 15, 2:48 AM · Restricted Project
danlark abandoned D84497: [builtins][NFC] Replace the constants better matching readability in udivmodti4.
Sat, May 15, 2:36 AM · Restricted Project
danlark updated the summary of D96946: [libcxx][RFC] Unspecified behavior randomization in libcxx.
Sat, May 15, 2:05 AM · Restricted Project

Fri, May 14

danlark added a comment to D102502: [clang] Fix ternary operator in the second for loop statement.

Failure looks unrelated, please submit on your behalf as I don't have commit rights

Fri, May 14, 4:16 PM · Restricted Project
danlark updated the diff for D102502: [clang] Fix ternary operator in the second for loop statement.
  • Address comment from Richard
Fri, May 14, 2:37 PM · Restricted Project
danlark added a comment to D102502: [clang] Fix ternary operator in the second for loop statement.

Thanks, nice catch!

Can we also add an assert when parsing a for statement that we actually find a range if the tentative parse said we were expecting one?

Fri, May 14, 2:15 PM · Restricted Project
danlark updated the diff for D102502: [clang] Fix ternary operator in the second for loop statement.
  • Add assert of finding a for range declaration
Fri, May 14, 2:15 PM · Restricted Project
danlark added inline comments to D102502: [clang] Fix ternary operator in the second for loop statement.
Fri, May 14, 1:02 PM · Restricted Project
danlark updated the diff for D102502: [clang] Fix ternary operator in the second for loop statement.
  • Add codegen and AST tests
Fri, May 14, 1:02 PM · Restricted Project
danlark retitled D102502: [clang] Fix ternary operator in the second for loop statement from [clang] Fix ternary operator in second for loop statement to [clang] Fix ternary operator in the second for loop statement.
Fri, May 14, 1:02 PM · Restricted Project
danlark retitled D102502: [clang] Fix ternary operator in the second for loop statement from [clang] Fix ternary operator in second for loop argument to [clang] Fix ternary operator in second for loop statement.
Fri, May 14, 1:02 PM · Restricted Project
danlark added a reviewer for D102502: [clang] Fix ternary operator in the second for loop statement: lebedev.ri.
Fri, May 14, 9:15 AM · Restricted Project
danlark added a comment to D102502: [clang] Fix ternary operator in the second for loop statement.

Done, please, take a look

Fri, May 14, 9:15 AM · Restricted Project
danlark updated the diff for D102502: [clang] Fix ternary operator in the second for loop statement.
  • Add codegen and AST tests
Fri, May 14, 9:15 AM · Restricted Project
danlark updated the diff for D102502: [clang] Fix ternary operator in the second for loop statement.
  • Add codegen test
Fri, May 14, 9:07 AM · Restricted Project
danlark added a comment to D102502: [clang] Fix ternary operator in the second for loop statement.

This should have codegen, and maybe AST, tests.

Fri, May 14, 8:45 AM · Restricted Project
danlark requested review of D102502: [clang] Fix ternary operator in the second for loop statement.
Fri, May 14, 8:30 AM · Restricted Project

Tue, May 4

danlark added a comment to D96946: [libcxx][RFC] Unspecified behavior randomization in libcxx.

Sorry for not pinging for so long

Tue, May 4, 2:50 PM · Restricted Project

Feb 19 2021

danlark abandoned D97000: [clang] Increase the bitness of data length in ASTDeclContextNameLookup.

Thanks!

Feb 19 2021, 12:17 AM · Restricted Project

Feb 18 2021

danlark updated the summary of D97000: [clang] Increase the bitness of data length in ASTDeclContextNameLookup.
Feb 18 2021, 2:57 PM · Restricted Project
danlark requested review of D97000: [clang] Increase the bitness of data length in ASTDeclContextNameLookup.
Feb 18 2021, 2:53 PM · Restricted Project
danlark added a comment to D96946: [libcxx][RFC] Unspecified behavior randomization in libcxx.

First of all, thanks for writing a design document and explaining the purpose of your patch. Let me try to understand the use case a bit better.

So basically, let's say you're trying to adopt a new implementation of std::sort internally. You change that, but then you realize that a bunch of tests break because they were relying on the exact order of equal elements after std::sort, which is really unspecified. But since those tests are failing, you can't use the new std::sort implementation until all the tests have been fixed. So, in order to make that transition easier and allow fixing tests one by one, you add this feature. You then turn it on locally for some projects/tests inside your organization, and you fix them one by one. Once you're done, you can switch the algorithm implementation, and turn off the randomization. Is that the idea?

Feb 18 2021, 9:23 AM · Restricted Project
danlark updated the diff for D96946: [libcxx][RFC] Unspecified behavior randomization in libcxx.

Address comments

Feb 18 2021, 9:23 AM · Restricted Project
danlark updated the diff for D96946: [libcxx][RFC] Unspecified behavior randomization in libcxx.

Fix unused parameters

Feb 18 2021, 3:27 AM · Restricted Project
danlark updated the summary of D96946: [libcxx][RFC] Unspecified behavior randomization in libcxx.
Feb 18 2021, 2:28 AM · Restricted Project
danlark requested review of D96946: [libcxx][RFC] Unspecified behavior randomization in libcxx.
Feb 18 2021, 2:25 AM · Restricted Project

Feb 4 2021

danlark added inline comments to D93661: [libc++] [P0879] constexpr std::sort, and add new tests for it.
Feb 4 2021, 11:27 AM · Restricted Project
danlark added inline comments to D93661: [libc++] [P0879] constexpr std::sort, and add new tests for it.
Feb 4 2021, 9:28 AM · Restricted Project

Jul 24 2020

danlark updated the diff for D84497: [builtins][NFC] Replace the constants better matching readability in udivmodti4.

Correctness

Jul 24 2020, 1:03 AM · Restricted Project
Herald added a project to D84497: [builtins][NFC] Replace the constants better matching readability in udivmodti4: Restricted Project.
Jul 24 2020, 12:58 AM · Restricted Project

Jul 10 2020

danlark planned changes to D83547: [builtins] Optimize the 128-bit division according to "Improved division by invariant integers" paper.

I need to double check the cold cache performance, it may happen that it is slower in that case

Jul 10 2020, 6:38 AM · Restricted Project
danlark added a reviewer for D83547: [builtins] Optimize the 128-bit division according to "Improved division by invariant integers" paper: howard.hinnant.
Jul 10 2020, 5:57 AM · Restricted Project
danlark updated the diff for D83547: [builtins] Optimize the 128-bit division according to "Improved division by invariant integers" paper.

Provide better names than in paper

Jul 10 2020, 5:55 AM · Restricted Project
danlark added a comment to D83547: [builtins] Optimize the 128-bit division according to "Improved division by invariant integers" paper.

I have no idea what the policy is WRT size for compiler-rt. How big is the diff if you take code size into consideration ?

Jul 10 2020, 5:46 AM · Restricted Project
danlark updated the summary of D83547: [builtins] Optimize the 128-bit division according to "Improved division by invariant integers" paper.
Jul 10 2020, 5:35 AM · Restricted Project
Herald added a project to D83547: [builtins] Optimize the 128-bit division according to "Improved division by invariant integers" paper: Restricted Project.
Jul 10 2020, 5:34 AM · Restricted Project
danlark updated the diff for D81809: [builtins] Optimize udivmodti4 for many platforms..

Fix clang format

Jul 10 2020, 12:55 AM · Restricted Project
danlark updated the diff for D81809: [builtins] Optimize udivmodti4 for many platforms..

Fix comments

Jul 10 2020, 12:43 AM · Restricted Project

Jul 9 2020

danlark added a comment to D81809: [builtins] Optimize udivmodti4 for many platforms..

Please, take a look

Jul 9 2020, 2:06 PM · Restricted Project

Jul 8 2020

danlark updated the diff for D81809: [builtins] Optimize udivmodti4 for many platforms..

Update the real reference

Jul 8 2020, 11:45 AM · Restricted Project
danlark closed D83027: Add benchmarks for 128 bit division and create a directory for all builtins benchmarks.

879f4962e83f98863c83e385e956d579e131791f

Jul 8 2020, 12:56 AM

Jul 7 2020

danlark updated the diff for D81809: [builtins] Optimize udivmodti4 for many platforms..

Fix comments

Jul 7 2020, 11:33 PM · Restricted Project
danlark updated the diff for D83027: Add benchmarks for 128 bit division and create a directory for all builtins benchmarks.

Fix

Jul 7 2020, 5:25 PM
danlark added inline comments to D83027: Add benchmarks for 128 bit division and create a directory for all builtins benchmarks.
Jul 7 2020, 10:14 AM
danlark updated the diff for D83027: Add benchmarks for 128 bit division and create a directory for all builtins benchmarks.

Fix comments

Jul 7 2020, 10:14 AM
danlark added a comment to D83027: Add benchmarks for 128 bit division and create a directory for all builtins benchmarks.

Could you submit it for me? I don't have commit rights for now. danilak@google.com

Jul 7 2020, 7:55 AM
danlark updated the diff for D81809: [builtins] Optimize udivmodti4 for many platforms..

Fix clang-tidy readability warnings more

Jul 7 2020, 3:15 AM · Restricted Project
danlark updated the diff for D81809: [builtins] Optimize udivmodti4 for many platforms..

clang-format

Jul 7 2020, 3:11 AM · Restricted Project
danlark updated the diff for D81809: [builtins] Optimize udivmodti4 for many platforms..

Fix non x86-mode

Jul 7 2020, 3:10 AM · Restricted Project
danlark updated the diff for D81809: [builtins] Optimize udivmodti4 for many platforms..

Fix clang-tidy warnings

Jul 7 2020, 3:08 AM · Restricted Project
danlark added a comment to D81809: [builtins] Optimize udivmodti4 for many platforms..

Ping

Jul 7 2020, 2:36 AM · Restricted Project

Jul 2 2020

danlark updated the diff for D83027: Add benchmarks for 128 bit division and create a directory for all builtins benchmarks.

Fix comments

Jul 2 2020, 3:43 AM
danlark added inline comments to D83027: Add benchmarks for 128 bit division and create a directory for all builtins benchmarks.
Jul 2 2020, 3:43 AM
danlark updated the summary of D81809: [builtins] Optimize udivmodti4 for many platforms..
Jul 2 2020, 2:38 AM · Restricted Project
danlark updated the summary of D81809: [builtins] Optimize udivmodti4 for many platforms..
Jul 2 2020, 2:38 AM · Restricted Project
danlark updated the diff for D83027: Add benchmarks for 128 bit division and create a directory for all builtins benchmarks.

Remove unnecessary header

Jul 2 2020, 2:38 AM
danlark added a comment to D81809: [builtins] Optimize udivmodti4 for many platforms..

Nice. I have not looked at the code yet, but I think it would make sense to add your benchmark to the compiler-rt unit tests.

Jul 2 2020, 2:38 AM · Restricted Project
danlark created D83027: Add benchmarks for 128 bit division and create a directory for all builtins benchmarks.
Jul 2 2020, 2:38 AM

Jul 1 2020

danlark updated the summary of D81809: [builtins] Optimize udivmodti4 for many platforms..
Jul 1 2020, 4:13 PM · Restricted Project
danlark updated the diff for D81809: [builtins] Optimize udivmodti4 for many platforms..

CHAR_BIT instead of 8

Jul 1 2020, 3:40 PM · Restricted Project
danlark updated the summary of D81809: [builtins] Optimize udivmodti4 for many platforms..
Jul 1 2020, 3:09 PM · Restricted Project
danlark updated the summary of D81809: [builtins] Optimize udivmodti4 for many platforms..
Jul 1 2020, 3:09 PM · Restricted Project
danlark updated the diff for D81809: [builtins] Optimize udivmodti4 for many platforms..

Style

Jul 1 2020, 3:09 PM · Restricted Project
danlark added a reviewer for D81809: [builtins] Optimize udivmodti4 for many platforms.: MaskRay.
Jul 1 2020, 2:36 PM · Restricted Project
danlark added a comment to D81809: [builtins] Optimize udivmodti4 for many platforms..

Ping and maybe I need some help in introducing benchmarks (if we really need to) for this because I don't quite understand how and where it should be best located.

Jul 1 2020, 2:36 PM · Restricted Project

Jun 15 2020

danlark updated the diff for D81809: [builtins] Optimize udivmodti4 for many platforms..

Style

Jun 15 2020, 1:36 AM · Restricted Project

Jun 14 2020

danlark updated the diff for D81809: [builtins] Optimize udivmodti4 for many platforms..

Clang format

Jun 14 2020, 11:58 PM · Restricted Project
danlark updated the summary of D81809: [builtins] Optimize udivmodti4 for many platforms..
Jun 14 2020, 11:58 PM · Restricted Project
danlark updated the diff for D81809: [builtins] Optimize udivmodti4 for many platforms..

Use native division when high is zero.

Jun 14 2020, 3:28 PM · Restricted Project
danlark updated the summary of D81809: [builtins] Optimize udivmodti4 for many platforms..
Jun 14 2020, 10:08 AM · Restricted Project
danlark retitled D81809: [builtins] Optimize udivmodti4 for many platforms. from Optimize udivmodti4 for many platforms. to [builtins] Optimize udivmodti4 for many platforms..
Jun 14 2020, 10:08 AM · Restricted Project
danlark created D81809: [builtins] Optimize udivmodti4 for many platforms..
Jun 14 2020, 10:08 AM · Restricted Project
danlark added a reviewer for D81809: [builtins] Optimize udivmodti4 for many platforms.: courbet.
Jun 14 2020, 10:08 AM · Restricted Project

May 28 2020

danlark abandoned D58025: [libcxx] MSVC fails to compile `operator valarray<template>`.
May 28 2020, 7:34 AM
danlark abandoned D58021: Win32 does not have popcnt64 function and fix bug with defines in ctz function.
May 28 2020, 7:34 AM
danlark abandoned D58022: __builtin_strlen is not supported for MSVC e.g and it is not correct to use it without knowledge of this "builtin" in advance.
May 28 2020, 7:34 AM
danlark abandoned D44823: [libcxx] Improving std::vector<char> and std::deque<char> perfomance.
May 28 2020, 7:34 AM

May 27 2020

danlark added inline comments to D44823: [libcxx] Improving std::vector<char> and std::deque<char> perfomance.
May 27 2020, 2:46 PM

Jan 20 2020

danlark added a comment to D71568: [InstCombine] `select + mul` -> `select + shl` with power of twos..

@spatel @lebedev.ri Ping

Jan 20 2020, 4:07 AM · Restricted Project

Jan 14 2020

danlark added a comment to D71568: [InstCombine] `select + mul` -> `select + shl` with power of twos..

@lebedev.ri Friendly ping and see message from spatel@ above :)

Jan 14 2020, 9:55 AM · Restricted Project

Jan 9 2020

danlark added a comment to D71568: [InstCombine] `select + mul` -> `select + shl` with power of twos..

There's a lot going on here, and the patch doesn't apply cleanly to current source. Can you pre-commit any NFC changes/tests to make this patch smaller? For example, the udiv change/tests are not affected by the mul code?

Sorry - I didn't see earlier that this patch is part of a sequence.
I'm a bit skeptical about the need to extend the "udiv action" machine. Are the motivating cases really that complicated or could we get away with a simpler pattern match of mul(select...)?

I am not sure but I just reused the code for both division and multiplication -- from my perspective the idea is the same.

Also, I rebased a bit and made the patch smaller as you asked.

Jan 9 2020, 10:14 AM · Restricted Project
danlark added a comment to D71568: [InstCombine] `select + mul` -> `select + shl` with power of twos..

There's a lot going on here, and the patch doesn't apply cleanly to current source. Can you pre-commit any NFC changes/tests to make this patch smaller? For example, the udiv change/tests are not affected by the mul code?

Sorry - I didn't see earlier that this patch is part of a sequence.
I'm a bit skeptical about the need to extend the "udiv action" machine. Are the motivating cases really that complicated or could we get away with a simpler pattern match of mul(select...)?

Jan 9 2020, 9:45 AM · Restricted Project
danlark updated the diff for D71568: [InstCombine] `select + mul` -> `select + shl` with power of twos..

Rebase and make tests committed before

Jan 9 2020, 9:36 AM · Restricted Project
danlark updated the diff for D71567: [InstCombine] Add tests for `select + mul` for power of twos. NFC.

Rebase

Jan 9 2020, 9:36 AM · Restricted Project
danlark updated the diff for D71567: [InstCombine] Add tests for `select + mul` for power of twos. NFC.

Update tests

Jan 9 2020, 9:36 AM · Restricted Project
danlark updated the diff for D71568: [InstCombine] `select + mul` -> `select + shl` with power of twos..

Removing div tests, we don't need them

Jan 9 2020, 9:36 AM · Restricted Project
danlark added a comment to D71568: [InstCombine] `select + mul` -> `select + shl` with power of twos..

@spatel You are doing a lot of stuff around this code, PTAL.

Jan 9 2020, 7:34 AM · Restricted Project
danlark updated the diff for D71568: [InstCombine] `select + mul` -> `select + shl` with power of twos..

Applying m_ZExtOrSelf

Jan 9 2020, 7:34 AM · Restricted Project