Page MenuHomePhabricator

dsanders (Daniel Sanders)
User

Projects

User does not belong to any projects.

User Details

User Since
Aug 19 2013, 3:30 PM (296 w, 2 d)

Recent Activity

Tue, Apr 16

dsanders accepted D60799: Add a getSizeInBits() accessor to MachineMemOperand. NFC..

LGTM

Tue, Apr 16, 3:41 PM · Restricted Project

Fri, Apr 5

dsanders committed rGab8c60867b6d: [globalisel] Allow combiners to query legality (authored by dsanders).
[globalisel] Allow combiners to query legality
Fri, Apr 5, 2:23 PM
dsanders committed rL357820: [globalisel] Allow combiners to query legality.
[globalisel] Allow combiners to query legality
Fri, Apr 5, 2:23 PM
dsanders committed rGd7489c38f96d: [globalisel] Support 3-type legalForCartesianProduct() (authored by dsanders).
[globalisel] Support 3-type legalForCartesianProduct()
Fri, Apr 5, 1:46 PM
dsanders committed rL357815: [globalisel] Support 3-type legalForCartesianProduct().
[globalisel] Support 3-type legalForCartesianProduct()
Fri, Apr 5, 1:45 PM

Wed, Mar 27

dsanders committed rG495156dc6acf: test/CodeGen/X86/codegen-prepare-replacephi.mir requires a default triple (authored by dsanders).
test/CodeGen/X86/codegen-prepare-replacephi.mir requires a default triple
Wed, Mar 27, 1:46 PM
dsanders committed rL357122: test/CodeGen/X86/codegen-prepare-replacephi.mir requires a default triple.
test/CodeGen/X86/codegen-prepare-replacephi.mir requires a default triple
Wed, Mar 27, 1:43 PM

Mar 25 2019

dsanders added inline comments to D59716: [ConstantRange] Add full() + empty() named constructors (NFC).
Mar 25 2019, 6:51 PM · Restricted Project

Mar 22 2019

dsanders committed rGef8761fd3b0f: Fix non-determinism in Reassociate caused by address coincidences (authored by dsanders).
Fix non-determinism in Reassociate caused by address coincidences
Mar 22 2019, 1:17 PM
dsanders committed rL356803: Fix non-determinism in Reassociate caused by address coincidences.
Fix non-determinism in Reassociate caused by address coincidences
Mar 22 2019, 1:15 PM
dsanders closed D59401: Fix non-determinism in Reassociate caused by address coincidences.
Mar 22 2019, 1:15 PM · Restricted Project
dsanders updated the summary of D59401: Fix non-determinism in Reassociate caused by address coincidences.
Mar 22 2019, 12:55 PM · Restricted Project

Mar 14 2019

dsanders created D59401: Fix non-determinism in Reassociate caused by address coincidences.
Mar 14 2019, 6:11 PM · Restricted Project

Mar 13 2019

dsanders accepted D59285: [ResetMachineFunctionPass] Add visited functions statistics info.

LGTM

Mar 13 2019, 11:13 AM · Restricted Project

Mar 1 2019

dsanders committed rGc365cee6582c: [tblgen] Track CodeInit origins when possible (authored by dsanders).
[tblgen] Track CodeInit origins when possible
Mar 1 2019, 4:16 PM
dsanders committed rL355245: [tblgen] Track CodeInit origins when possible.
[tblgen] Track CodeInit origins when possible
Mar 1 2019, 4:12 PM
dsanders closed D58141: [tblgen] Track CodeInit origins when possible.
Mar 1 2019, 4:12 PM · Restricted Project

Feb 22 2019

dsanders committed rG6ac16e91f6df: Try again to fix memory leak in r354692 (authored by dsanders).
Try again to fix memory leak in r354692
Feb 22 2019, 7:25 PM
dsanders committed rL354719: Try again to fix memory leak in r354692.
Try again to fix memory leak in r354692
Feb 22 2019, 7:25 PM
dsanders committed rGf250cf8b4106: Fix memory leak in r354692 (authored by dsanders).
Fix memory leak in r354692
Feb 22 2019, 5:16 PM
dsanders committed rL354712: Fix memory leak in r354692.
Fix memory leak in r354692
Feb 22 2019, 5:16 PM
dsanders committed rG07cda257f84b: Restore ability for C++ API users to Enable IPRA. (authored by dsanders).
Restore ability for C++ API users to Enable IPRA.
Feb 22 2019, 12:59 PM
dsanders committed rL354692: Restore ability for C++ API users to Enable IPRA..
Restore ability for C++ API users to Enable IPRA.
Feb 22 2019, 12:59 PM
dsanders closed D38043: Restore ability for C++ API users to Enable IPRA..
Feb 22 2019, 12:58 PM · Restricted Project

Feb 21 2019

dsanders added a comment to D58088: [adt] Add raw_pointer_iterator to iterate over std::unique_ptr<> collections.

That looks simple enough. I haven't gone through the spec but something as simple as:

namespace llvm {
template<class Ptr>
auto to_address(const Ptr &P) noexcept { return P.operator->(); }
template<class T>
constexpr T* to_address(T* P) noexcept { return P; }
}

seems to cover the majority of it (and definitely the bits I need). It's just the std::pointer_traits<Ptr>::to_address(p) based implementation of the fancy pointer overload that's missing.

If it is named to_address and intended to convert any pointer to a raw pointer then it should be:

namespace llvm {
template<class T>
constexpr T* to_address(T* p) noexcept { return p; }
template<class Ptr>
typename std::pointer_traits<Ptr>::element_type* to_address(const Ptr &p) noexcept { return llvm::to_address(p.operator->()); }
}
Feb 21 2019, 1:29 PM · Restricted Project
dsanders added a comment to D58088: [adt] Add raw_pointer_iterator to iterate over std::unique_ptr<> collections.

I just noticed a big simplification that doesn't need C++20 features or new classes. This:

template <typename WrappedIteratorT,
          typename T1 = typename std::remove_reference<decltype(**std::declval<WrappedIteratorT>())>::type,
          typename T2 = typename std::add_pointer<T1>::type>
using raw_pointer_iterator = pointer_iterator<pointee_iterator<WrappedIteratorT, T1>, T2>;

is functionally equivalent to the raw_pointer_iterator in this patch. pointee_iterator derefs the unique_ptr, while pointer_iterator produces the raw_pointer. If that version sounds good to you then I think it makes sense to revert the llvm::to_address() patch, switch to this implementation and fold this into the GISel Combiner patch as at that point it's too trivial to warrant a dedicated patch. Does that sound good?

Beyond probably some annoying compile-time complexity/overhead (& maybe similar debugging confusion with the extra layers of abstraction) - I'm guessing this wouldn't support null pointers (because pointee_iterator probably dereferences unconditionally?) which would be a bit problematic, I'd reckon?

Feb 21 2019, 1:25 PM · Restricted Project

Feb 20 2019

dsanders added a comment to D58088: [adt] Add raw_pointer_iterator to iterate over std::unique_ptr<> collections.

I just noticed a big simplification that doesn't need C++20 features or new classes. This:

template <typename WrappedIteratorT,
          typename T1 = typename std::remove_reference<decltype(**std::declval<WrappedIteratorT>())>::type,
          typename T2 = typename std::add_pointer<T1>::type>
using raw_pointer_iterator = pointer_iterator<pointee_iterator<WrappedIteratorT, T1>, T2>;

is functionally equivalent to the raw_pointer_iterator in this patch. pointee_iterator derefs the unique_ptr, while pointer_iterator produces the raw_pointer. If that version sounds good to you then I think it makes sense to revert the llvm::to_address() patch, switch to this implementation and fold this into the GISel Combiner patch as at that point it's too trivial to warrant a dedicated patch. Does that sound good?

Feb 20 2019, 1:11 PM · Restricted Project
dsanders committed rG9e302c6231ea: Add partial implementation of std::to_address() as llvm::to_address() (authored by dsanders).
Add partial implementation of std::to_address() as llvm::to_address()
Feb 20 2019, 10:09 AM
dsanders committed rL354491: Add partial implementation of std::to_address() as llvm::to_address().
Add partial implementation of std::to_address() as llvm::to_address()
Feb 20 2019, 10:08 AM
dsanders closed D58421: Add partial implementation of std::to_address() as llvm::to_address().
Feb 20 2019, 10:08 AM · Restricted Project
dsanders added inline comments to D58421: Add partial implementation of std::to_address() as llvm::to_address().
Feb 20 2019, 10:01 AM · Restricted Project
dsanders updated the diff for D58421: Add partial implementation of std::to_address() as llvm::to_address().

Late bound return, remove noexcept, and update comments to match

Feb 20 2019, 10:01 AM · Restricted Project

Feb 19 2019

dsanders added a comment to D58088: [adt] Add raw_pointer_iterator to iterate over std::unique_ptr<> collections.

The std::to_address implementation is in https://reviews.llvm.org/D58421. I had to add another limitation to it as it accidentally used C++14 which prevents the deduction of the return type.

Feb 19 2019, 5:55 PM · Restricted Project
dsanders created D58421: Add partial implementation of std::to_address() as llvm::to_address().
Feb 19 2019, 5:55 PM · Restricted Project
dsanders committed rGee95e8782df9: Fix builds with llvm/runtimes/compiler-rt after r354365 (authored by dsanders).
Fix builds with llvm/runtimes/compiler-rt after r354365
Feb 19 2019, 2:03 PM
dsanders committed rL354389: Fix builds with llvm/runtimes/compiler-rt after r354365.
Fix builds with llvm/runtimes/compiler-rt after r354365
Feb 19 2019, 2:02 PM
dsanders committed rGdaf777b20646: Fix builds for older macOS deployment targets after r354365 (authored by dsanders).
Fix builds for older macOS deployment targets after r354365
Feb 19 2019, 11:45 AM
dsanders committed rL354374: Fix builds for older macOS deployment targets after r354365.
Fix builds for older macOS deployment targets after r354365
Feb 19 2019, 11:44 AM
dsanders committed rGe1414d176048: Annotate timeline in Instruments with passes and other timed regions. (authored by dsanders).
Annotate timeline in Instruments with passes and other timed regions.
Feb 19 2019, 10:19 AM
dsanders committed rL354365: Annotate timeline in Instruments with passes and other timed regions..
Annotate timeline in Instruments with passes and other timed regions.
Feb 19 2019, 10:18 AM
dsanders closed D52954: Annotate timeline in Instruments with passes and other timed regions..
Feb 19 2019, 10:18 AM · Restricted Project
dsanders added inline comments to D52954: Annotate timeline in Instruments with passes and other timed regions..
Feb 19 2019, 10:18 AM · Restricted Project

Feb 18 2019

dsanders added a comment to D58088: [adt] Add raw_pointer_iterator to iterate over std::unique_ptr<> collections.

Hmm, It might be nice to have this as a specialization of pointer_iterator if possible.

I think it might be a source of confusion/frustration to have both a raw_pointer_iterator and a pointer_iterator, where raw_pointer_iterator is specifically used for only unique_ptr.

I can see a way to achieve that (std::to_address()) but it requires C++20. Without that, the closest I've been able to get is a raw_pointer_iterator alias to pointer_iterator that has specializations based on whether a third optional argument is true_type or false_type. The main thing I'm missing to fold the alias in is a way to specify the default value of T in a way that resolves to either pointer_iterator's default type T or raw_pointer_iterators default type T depending on whether *Iter is a std::unique_ptr<X>& or not. I can detect the type easily enough but selecting between the two defaults is proving troublesome as it resolves the true and false cases too early and ends up trying to do int::pointer and failing because int isn't a class type.

Would it be difficult to have LLVM's own version of std::to_address (LLVM has had/does have various type traits implmented in-tree when they aren't available in the standard LLVM's using at the moment) or similar to use here?

Feb 18 2019, 5:41 PM · Restricted Project
dsanders added a comment to D52954: Annotate timeline in Instruments with passes and other timed regions..

Is there a more generic term for this than "signpost"? If so, it might be nice to use that to avoid confusion when/if other implementations show up. If not, that's fine.

Feb 18 2019, 2:49 PM · Restricted Project
dsanders updated the diff for D52954: Annotate timeline in Instruments with passes and other timed regions..

Updated before commit

Feb 18 2019, 2:47 PM · Restricted Project

Feb 15 2019

dsanders added a comment to D58232: GlobalISel: Don't materialize immarg arguments to intrinsics.
In D58232#1399984, @ab wrote:

On second thought, what happens to the tablegen emitter? That needs to be taught about these as well, right? That might not trigger on anything right now though.

Feb 15 2019, 2:48 PM

Feb 14 2019

dsanders accepted D57449: GlobalISel: Add alignment to LegalityQuery MMOs.

LGTM

Feb 14 2019, 2:16 PM

Feb 13 2019

dsanders committed rGdfa0f556bf26: [globalisel][combine] Split existing rules into a match and apply step (authored by dsanders).
[globalisel][combine] Split existing rules into a match and apply step
Feb 13 2019, 4:16 PM
dsanders committed rL353996: [globalisel][combine] Split existing rules into a match and apply step.
[globalisel][combine] Split existing rules into a match and apply step
Feb 13 2019, 4:15 PM
dsanders closed D58150: [globalisel][combine] Split existing rules into a match and apply step.
Feb 13 2019, 4:15 PM · Restricted Project
dsanders added a comment to D58088: [adt] Add raw_pointer_iterator to iterate over std::unique_ptr<> collections.

Hmm, It might be nice to have this as a specialization of pointer_iterator if possible.

I think it might be a source of confusion/frustration to have both a raw_pointer_iterator and a pointer_iterator, where raw_pointer_iterator is specifically used for only unique_ptr.

Feb 13 2019, 12:49 PM · Restricted Project

Feb 12 2019

dsanders created D58150: [globalisel][combine] Split existing rules into a match and apply step.
Feb 12 2019, 2:55 PM · Restricted Project
dsanders created D58141: [tblgen] Track CodeInit origins when possible.
Feb 12 2019, 11:52 AM · Restricted Project
dsanders committed rGdff673bb5250: [tablegen] Add locations to many PrintFatalError() calls (authored by dsanders).
[tablegen] Add locations to many PrintFatalError() calls
Feb 12 2019, 9:37 AM
dsanders committed rL353862: [tablegen] Add locations to many PrintFatalError() calls.
[tablegen] Add locations to many PrintFatalError() calls
Feb 12 2019, 9:37 AM
dsanders closed D58077: [tablegen] Add locations to many PrintFatalError() calls.
Feb 12 2019, 9:37 AM · Restricted Project

Feb 11 2019

dsanders created D58088: [adt] Add raw_pointer_iterator to iterate over std::unique_ptr<> collections.
Feb 11 2019, 4:36 PM · Restricted Project
dsanders committed rG6cbc92915ae8: [tblgen] Add a timer covering the time spent reading the Instruction defs (authored by dsanders).
[tblgen] Add a timer covering the time spent reading the Instruction defs
Feb 11 2019, 3:03 PM
dsanders committed rL353763: [tblgen] Add a timer covering the time spent reading the Instruction defs.
[tblgen] Add a timer covering the time spent reading the Instruction defs
Feb 11 2019, 3:03 PM
dsanders created D58077: [tablegen] Add locations to many PrintFatalError() calls.
Feb 11 2019, 2:34 PM · Restricted Project
dsanders committed rG24e0af69066e: [globalisel] Correct string emitted by GISelChangeObserver::erasingInstr() (authored by dsanders).
[globalisel] Correct string emitted by GISelChangeObserver::erasingInstr()
Feb 11 2019, 12:46 PM
dsanders committed rL353746: [globalisel] Correct string emitted by GISelChangeObserver::erasingInstr().
[globalisel] Correct string emitted by GISelChangeObserver::erasingInstr()
Feb 11 2019, 12:46 PM
Herald added a project to D52954: Annotate timeline in Instruments with passes and other timed regions.: Restricted Project.

ping

Feb 11 2019, 12:21 PM · Restricted Project
dsanders committed rGb31180d0de2d: [globalisel] Restore comment explaining the nits of GISelChangeObserver… (authored by dsanders).
[globalisel] Restore comment explaining the nits of GISelChangeObserver…
Feb 11 2019, 12:07 PM
dsanders committed rL353741: [globalisel] Restore comment explaining the nits of GISelChangeObserver….
[globalisel] Restore comment explaining the nits of GISelChangeObserver…
Feb 11 2019, 12:05 PM

Feb 8 2019

dsanders accepted D57980: [GlobalISel] Skip patterns that define complex suboperands twice instead of dying.

LGTM. Thanks for fixing this

Feb 8 2019, 4:21 PM · Restricted Project

Feb 7 2019

dsanders added a comment to D57449: GlobalISel: Add alignment to LegalityQuery MMOs.

I'm not sure why the MMO alignment is uint64_t in the first place. The maximum supported alignment is 1 << 29 (which I guess when converted to bits is 1 too many for uint32)

Feb 7 2019, 4:07 PM
dsanders added a comment to D57449: GlobalISel: Add alignment to LegalityQuery MMOs.

@dsanders does this look ok to you?

Feb 7 2019, 2:52 PM

Feb 5 2019

dsanders added a comment to D57243: GlobalISel: Allow bitcount ops to have different result type.

The legalizer is already done the way I'm talking about on the rule matching side and performance was marginally better on average than the old setAction() interface.

Got it.
That said, to me the legalizer is no different than ISel or a sort of InstCombine, thus I would expect we eventually use the same engine/automaton for selecting/lowering what goes through. The same goes with the way we represent them, although admittedly legalization is a bit more complicated because we have to come up with a way of representing the constraints on the unbound input types.

Feb 5 2019, 10:29 AM
dsanders added a comment to D57243: GlobalISel: Allow bitcount ops to have different result type.
Personally, I'd like to replace the LegalizationAction with a function pointer that just performs the desired change and have a standard library of actions that can be called for the common changes.

@dsanders didn't we try something like that for ISel and the performance was terrible?

Feb 5 2019, 10:06 AM

Feb 4 2019

dsanders added inline comments to D57243: GlobalISel: Allow bitcount ops to have different result type.
Feb 4 2019, 4:17 PM
dsanders added a comment to D57484: [GlobalISel] Introduce a generic floating point floor opcode, G_FFLOOR.

@arsenm, adding this opcode breaks AMDGPU somehow. Do you have any idea why that might be?

Breaks what?

Here's an example:
http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/24100/steps/build%20stage%201/logs/stdio

Some tablegen seems unhappy?

I have no idea. I haven't looked at the DAG compatibility stuff

Feb 4 2019, 2:33 PM · Restricted Project

Jan 28 2019

dsanders added a comment to D57029: GlobalISel: Fix narrowScalar for load/store with different mem size.

In what situations can these kinds of loads be generated?

At least for AArch64, the extending loads combiner only runs before legalisation, so it wouldn't have a chance to combine these. In the absence of a G_ANYEXTLOAD opcode, I think having an explicit G_ZEXTLOAD is preferable here even though it's slightly pessimistic.

@dsanders thoughts?

Jan 28 2019, 11:55 AM

Jan 22 2019

dsanders added a comment to D55914: [GlobalISel][InstructionSelect] Add support for selecting pointer types with TableGen.

You can actually use iPTR types in patterns already, but the GlobalISel backend converts it to a scalar integer when generating the ISel code.

Jan 22 2019, 10:40 AM
dsanders accepted D55814: GlobalISel: Support narrowing zextload/sextload.

LGTM

Jan 22 2019, 9:42 AM

Jan 18 2019

dsanders committed rL351572: [adt] Twine(nullptr) derefs the nullptr. Add a deleted Twine(std::nullptr_t).
[adt] Twine(nullptr) derefs the nullptr. Add a deleted Twine(std::nullptr_t)
Jan 18 2019, 10:44 AM
dsanders closed D56870: [adt] Twine(nullptr) derefs the nullptr. Add a deleted Twine(std::nullptr_t).
Jan 18 2019, 10:44 AM
dsanders added inline comments to D55814: GlobalISel: Support narrowing zextload/sextload.
Jan 18 2019, 10:42 AM
dsanders accepted D55809: GlobalISel: Verify g_zextload and g_sextload.

LGTM

Jan 18 2019, 10:31 AM

Jan 17 2019

dsanders created D56870: [adt] Twine(nullptr) derefs the nullptr. Add a deleted Twine(std::nullptr_t).
Jan 17 2019, 11:35 AM

Jan 7 2019

dsanders accepted D55946: [MachineVerifier] Include offending register in allocatable live-in error msg..

LGTM

Jan 7 2019, 2:13 PM

Jan 4 2019

dsanders added a comment to D55842: Let TableGen write output only if it changed, instead of doing so in cmake, attempt 2.

I'm not sure this is a significant problem at the moment (I'll find out the next time I'm debugging :-)), but just to mention it. One unfortunate consequence of this is presumably that no output is written to a file when tblgen crashes because the output was only written to memory and that was lost in the crash. FWIW, being able to see the successfully-produced output has been fairly handy for me in the past as it helps to establish the context which I can then use to minimize the input or determine a strategy for debugging it. This can be particularly helpful when lldb fails to print important variables (which seems to happen often for me), and the same stack trace occurs frequently during execution. We might want to consider an option that makes it write directly to a file if that does become a problem.

Jan 4 2019, 11:17 AM

Jan 2 2019

dsanders committed rL350277: [tblgen][disasm] Emit record names again when decoder conflicts occur..
[tblgen][disasm] Emit record names again when decoder conflicts occur.
Jan 2 2019, 4:18 PM

Dec 14 2018

dsanders accepted D53728: [GlobalISel] LegalizerHelper: Implement fewerElementsVector for G_LOAD/G_STORE.

LGTM

Dec 14 2018, 2:12 PM
dsanders committed rL349174: [globalisel][combiner] Fix r349167 for release mode bots.
[globalisel][combiner] Fix r349167 for release mode bots
Dec 14 2018, 10:29 AM
dsanders committed rL349167: [globalisel][combiner] Make the CombinerChangeObserver a MachineFunction….
[globalisel][combiner] Make the CombinerChangeObserver a MachineFunction…
Dec 14 2018, 9:53 AM
dsanders closed D52947: [globalisel][combiner] Make the CombinerChangeObserver a MachineFunction::Delegate.
Dec 14 2018, 9:53 AM

Dec 13 2018

dsanders added inline comments to D52947: [globalisel][combiner] Make the CombinerChangeObserver a MachineFunction::Delegate.
Dec 13 2018, 1:05 PM
dsanders committed rL349055: Recommit r349041: [tblgen][disasm] Separate encodings from instructions.
Recommit r349041: [tblgen][disasm] Separate encodings from instructions
Dec 13 2018, 8:21 AM
dsanders committed rL349046: Revert r349041: [tblgen][disasm] Separate encodings from instructions.
Revert r349041: [tblgen][disasm] Separate encodings from instructions
Dec 13 2018, 7:17 AM
dsanders committed rL349043: [mir] Fix uninitialized variable in r349035 noticed by clang-atom-d525-fedora….
[mir] Fix uninitialized variable in r349035 noticed by clang-atom-d525-fedora…
Dec 13 2018, 7:08 AM
dsanders committed rL349041: [tblgen][disasm] Separate encodings from instructions.
[tblgen][disasm] Separate encodings from instructions
Dec 13 2018, 6:59 AM
dsanders closed D52366: [tblgen][disasm] Separate encodings from instructions.
Dec 13 2018, 6:59 AM
dsanders committed rL349035: [mir] Serialize DILocation inline when not possible to use a metadata reference.
[mir] Serialize DILocation inline when not possible to use a metadata reference
Dec 13 2018, 6:28 AM
dsanders closed D55243: [mir] Serialize DILocation inline when not possible to use a metadata reference.
Dec 13 2018, 6:28 AM · debug-info
dsanders updated the diff for D52947: [globalisel][combiner] Make the CombinerChangeObserver a MachineFunction::Delegate.

Rebase and fix the remaining issue about documenting the right-to-modify
MachineInstrs within the specified function and making the non-const ptr
scheduling have consistent requirements with the const ptr scheduling.

Dec 13 2018, 5:59 AM
dsanders accepted D53728: [GlobalISel] LegalizerHelper: Implement fewerElementsVector for G_LOAD/G_STORE.

LGTM. The only comment I have is an observation that odd-length vectors generally don't fit well into fewerElements at the moment but that's not for this patch

Dec 13 2018, 4:20 AM

Dec 12 2018

dsanders committed rL348992: [globalisel] Add GISelChangeObserver::changingInstr().
[globalisel] Add GISelChangeObserver::changingInstr()
Dec 12 2018, 3:51 PM
dsanders closed D55623: [globalisel] Add GISelChangeObserver::changingInstr().
Dec 12 2018, 3:51 PM
dsanders created D55623: [globalisel] Add GISelChangeObserver::changingInstr().
Dec 12 2018, 2:33 PM