User Details
- User Since
- Oct 17 2014, 4:45 PM (441 w, 1 d)
Mar 2 2023
Feb 28 2023
Nov 15 2021
Hi Quentin, unfortunately I've not had the time to upstream this or think about cleaning this up and upstreaming it.
Should I just take over at this point?
If you have the cycles, please go for it. I don't want to hold up progress here. Thanks
Cheers,
-Quenitn
Jul 28 2021
If CSE is not enabled, then I think the verifier should not complain (CSEs). The main contract is to notify Observers of mutations (technically not necessary if there's nothing observing, but still better to notify).
On the other other hand, the AMDGPU legalizer probably should use CSEMIRBuilder. The main problem I saw last time I tried this was with MRI->setRegClass(Reg, RC). As I understand it, this counts as a mutation of not just the instruction that defines Reg, but every instruction that uses Reg too. Is that correct? Is there a way to report that kind of widespread mutation to the observers?
Yes there is.
if (GISelChangeObserver *Observer = MF.getObserver()) { Register Reg = ...; Observer->changingAllUsesOfReg(MRI, Reg); // change it. Observer->finishedChangingAllUsesOfReg(); }
Jul 27 2021
Jul 20 2021
Jul 15 2021
Jul 10 2021
Mar 31 2021
Feb 5 2021
Dec 16 2020
If slot indexes are preserved and used in other passes that use CSE, do you think the compile time impact is amortized/minimized?
Oct 28 2020
Oct 22 2020
Updates as requested.
Oct 15 2020
Oct 14 2020
I attempted this in the past but abandoned it due to infinite loops in legalization like mentioned earlier. Constant folding during legalization seems okay as long as it operates on legal types (ie fold an operation of constants (which are already legal) to the same type.
Address Jay's comments.
Oct 13 2020
Committed in ef3d17482ff
Sep 29 2020
Address latest comments by Matt
Sep 23 2020
Also missed some unstaged changes locally
s/push_back/emplace_back
s/std::sort/llvm::sort
Insert undef during the apply phase instead of the match as mentioned in the feedback.
Updated to handle the missing index as well duplicate indices cases.
Sep 22 2020
Updated to abandon combine if index is out of bounds.
Sep 21 2020
Sep 15 2020
Pushed in 97203cfd6ba
Sep 14 2020
Committed in 46f9137e43f
I can commit on your behalf.
Also we'll need to figure out how to get you access.
Sep 10 2020
Sep 9 2020
Sep 8 2020
Sep 1 2020
My thought on this Observer ownership is as follows (which I think I mentioned in another review).
- Each pass will setup an observer(wrapper) and install it to the MF. The MF at this point has the reference to the observer, and the pass owns each observer as it decides what it needs to observe and how.
- At the end of each pass, just reset the observer (there are RAII helpers for this).
- Remove the observer in MachineIRBuilder (is there a need for this?).
- No need to thread observer through APIs. Instead we get it through MF.getObserver().
Aug 27 2020
I can commit for you if no one has gotten to it yet.
Aug 26 2020
Aug 24 2020
It's a fine balance in how much the builders should do compared to DAG. I also personally found SDAG's getNode to be doing too much (and some of that code was replicated in the DAGCombines).
CSEMIRBuilder builds on the other builders by adding CSE. ConstantFoldingBuilder was POC on how to extend/customize builders. While I'm not sure where the balance on how much the builders should do, assuming we wanted to fold copies, it should be structured to be in one of the base builders (as the change seems unrelated to CSEing in general).
Jul 31 2020
Committed in 2144a3bdbba4
Jul 30 2020
I can commit it for you.
Jul 29 2020
Silly bug. Thanks for fixing.
Jul 17 2020
Add G_EXTRACT to CSEConfigFull, and add unit test.
Jul 7 2020
Jun 18 2020
Jun 16 2020
This looks much better. Looks good to me.
To enable rules {x,y}, you'd need to disable the universe, and specify rules you want to enable with !, all in a command called disable-rule*. This sounds inverse of what's necessary and is far from ergonomic.
I see this as similar to if opt/llc run-pass invocation was done by disable universe of passes, and enable some passes with !.
Additionally for the most common and immediately useful case of writing tests, I don't expect any need to both enable and disable rules in the same invocation. IOW, for testing purposes, only use the enable opt, and for bisecting and other tools (for future), use the disable opt. Perhaps we should rename the opt to make it explicit that it's used for testing only and perhaps even we assert that both are not used simultaneously (or make it abundantly clear in the docs).
TLDR; I'm suggesting we optimize the interface for the most common and immediately useful case of testing, and worry about enabling and disabling simultaneously later on?
Jun 15 2020
Doesn't https://reviews.llvm.org/D81863 make this unnecessary?
Jun 11 2020
Jun 10 2020
Is there any interest in me checking in the above unit test? I initially didn't check it in as I thought this was more of a side effect of how things are implemented and not really how the APIs should be used.
Jun 9 2020
I think this is with the same MI pointer.
I'd lean towards the MachineFunction ones too although admittedly I haven't dug into the details there
Jun 8 2020
The construction APIs for MachineIRBuilder don't make much sense,
What exactly do you mean by this? I agree with the latter about these trivial methods getting in the way.
Looks good.
Apr 22 2020
Apr 17 2020
Apr 12 2020
I'm beginning to wonder if maybe it makes sense to put all of these individual tests, in one place instead of being scattered across many tests (considering they're all testing the same thing) so it's easier to find.
Not related to this, but this patch LTGM.
Feb 18 2020
Committed in b91d9ec0bb8
I'll go ahead and get this in (as it already received a LGTM before) - just posted an updated patch since it's been a while since received updates.
Updated based on feedback.
CSEInfo::verify now returns Error which we can assert.