Page MenuHomePhabricator

mcberg2017 (Michael Berg)
User

Projects

User does not belong to any projects.

User Details

User Since
Jul 18 2017, 1:54 PM (95 w, 6 d)

Recent Activity

Wed, May 1

mcberg2017 accepted D61331: [SelectionDAG] remove constant folding limitations based on FP exceptions.

LGTM, thanks Sanjay

Wed, May 1, 1:32 PM · Restricted Project

Tue, Apr 30

mcberg2017 added a reviewer for D61331: [SelectionDAG] remove constant folding limitations based on FP exceptions: scanon.
Tue, Apr 30, 1:49 PM · Restricted Project

Apr 18 2019

mcberg2017 committed rGd573aa0156b6: [NFC] FMF propagation for GlobalIsel (authored by mcberg2017).
[NFC] FMF propagation for GlobalIsel
Apr 18 2019, 11:49 AM
mcberg2017 committed rL358702: [NFC] FMF propagation for GlobalIsel.
[NFC] FMF propagation for GlobalIsel
Apr 18 2019, 11:48 AM

Feb 6 2019

mcberg2017 committed rGf0d81a31b628: Move IR flag handling directly into builder calls for cases translated from… (authored by mcberg2017).
Move IR flag handling directly into builder calls for cases translated from…
Feb 6 2019, 11:58 AM
mcberg2017 committed rL353336: Move IR flag handling directly into builder calls for cases translated from….
Move IR flag handling directly into builder calls for cases translated from…
Feb 6 2019, 11:57 AM
mcberg2017 closed D57630: Move IR flag handling directly into builder calls for cases translated from Instructions in GlobalIsel.
Feb 6 2019, 11:57 AM · Restricted Project

Feb 5 2019

mcberg2017 updated the diff for D57630: Move IR flag handling directly into builder calls for cases translated from Instructions in GlobalIsel.

Migrated flag copy utility function to MachineInstr as a static function.

Feb 5 2019, 7:30 PM · Restricted Project

Feb 4 2019

mcberg2017 added a reviewer for D57630: Move IR flag handling directly into builder calls for cases translated from Instructions in GlobalIsel: volkan.
Feb 4 2019, 12:32 PM · Restricted Project

Feb 1 2019

mcberg2017 created D57630: Move IR flag handling directly into builder calls for cases translated from Instructions in GlobalIsel.
Feb 1 2019, 4:23 PM · Restricted Project

Jan 28 2019

mcberg2017 committed rL352396: [NFC] TLI query with default(on) behavior wrt DAG combines for fmin/fmax target….
[NFC] TLI query with default(on) behavior wrt DAG combines for fmin/fmax target…
Jan 28 2019, 10:04 AM

Dec 18 2018

mcberg2017 committed rL349514: Add FMF management to common fp intrinsics in GlobalIsel.
Add FMF management to common fp intrinsics in GlobalIsel
Dec 18 2018, 9:58 AM
mcberg2017 closed D55668: Add FMF management to common fp intrinsics in GlobalIsel.
Dec 18 2018, 9:58 AM

Dec 17 2018

mcberg2017 updated the diff for D55668: Add FMF management to common fp intrinsics in GlobalIsel.

Updated for posterity with the post review changes...

Dec 17 2018, 8:24 PM

Dec 16 2018

mcberg2017 added a reviewer for D55668: Add FMF management to common fp intrinsics in GlobalIsel: bogner.
Dec 16 2018, 12:06 PM
mcberg2017 updated the diff for D55668: Add FMF management to common fp intrinsics in GlobalIsel.

As requested, add one more component for copy ir flags in to this review

Dec 16 2018, 12:06 PM

Dec 13 2018

mcberg2017 retitled D55668: Add FMF management to common fp intrinsics in GlobalIsel from Add FMF management to common fp intrinsics to Add FMF management to common fp intrinsics in GlobalIsel.
Dec 13 2018, 1:02 PM
mcberg2017 created D55668: Add FMF management to common fp intrinsics in GlobalIsel.
Dec 13 2018, 1:01 PM

Oct 30 2018

mcberg2017 accepted D53874: [InstSimplify] fold 'fcmp nnan oge X, 0.0' when X is not negative.
Oct 30 2018, 1:17 PM
mcberg2017 added inline comments to D53874: [InstSimplify] fold 'fcmp nnan oge X, 0.0' when X is not negative.
Oct 30 2018, 1:17 PM
mcberg2017 added inline comments to D53874: [InstSimplify] fold 'fcmp nnan oge X, 0.0' when X is not negative.
Oct 30 2018, 11:21 AM

Sep 19 2018

mcberg2017 added a comment to rL342576: Copy utilities updated and added for MI flags.

The fixed test for WebAssembly is in rL342598.

Sep 19 2018, 3:59 PM
mcberg2017 committed rL342598: [WEB] add new flags to a DebugInfo lit test.
[WEB] add new flags to a DebugInfo lit test
Sep 19 2018, 3:58 PM
mcberg2017 added a comment to rL342576: Copy utilities updated and added for MI flags.

Ok, looking into it now.

Sep 19 2018, 2:47 PM
mcberg2017 committed rL342576: Copy utilities updated and added for MI flags.
Copy utilities updated and added for MI flags
Sep 19 2018, 11:53 AM
mcberg2017 closed D52006: Copy utilities updated and added for MI flags.
Sep 19 2018, 11:53 AM

Sep 13 2018

mcberg2017 updated the diff for D52006: Copy utilities updated and added for MI flags.

Changed copyIRFlags as suggested...

Sep 13 2018, 12:05 PM

Sep 12 2018

mcberg2017 created D52006: Copy utilities updated and added for MI flags.
Sep 12 2018, 3:40 PM
mcberg2017 committed rL342081: Guard FMF context by excluding some FP operators from FPMathOperator.
Guard FMF context by excluding some FP operators from FPMathOperator
Sep 12 2018, 2:11 PM
mcberg2017 closed D51145: Guard FMF context by excluding some FP operators from FPMathOperator.
Sep 12 2018, 2:11 PM

Sep 11 2018

mcberg2017 committed rL341996: add IR flags to MI.
add IR flags to MI
Sep 11 2018, 2:37 PM
mcberg2017 closed D51738: add IR flags to MI.
Sep 11 2018, 2:37 PM
mcberg2017 retitled D51145: Guard FMF context by excluding some FP operators from FPMathOperator from make copyFMF consistent with AnyDefined for detection of any FMF flag set to true to Guard FMF context by excluding some FP operators from FPMathOperator.
Sep 11 2018, 2:31 PM
mcberg2017 updated the diff for D51145: Guard FMF context by excluding some FP operators from FPMathOperator.

Collapsed for single version...

Sep 11 2018, 2:18 PM
mcberg2017 added a comment to D51145: Guard FMF context by excluding some FP operators from FPMathOperator.

Hal/Sanjay could one of you have a look at this code, it would be great to wrap it up...

Sep 11 2018, 8:13 AM

Sep 10 2018

mcberg2017 added a comment to D51738: add IR flags to MI.

All the nsw/nuw context is set above SDAG currently in code that is common to both GlobalIsel and SDAG, meaning adding them to MI should be analogous to SDAG as a pass through and for detection of already derived context for actions and side effects. Currently SDAG does have some DAG combining opts that utilize these flags. MI should too for GlobalIsel to map existing optimizations and functionality, else GlobalIsel will be handicapped. Having said that, if we do due diligence to map SDAG context in GlobalIsel, then there should be no new poison state, only that which currently exists. We should also keep the door open for new SDAG optimizations under nsw/nuw to map into that space to provide parity of support.

Sep 10 2018, 11:49 AM

Sep 8 2018

mcberg2017 added a comment to D51738: add IR flags to MI.

The flags were requested for support in GlobalIsel, where there is a plan to make use of them once they are available. The path through SelectionDAG could also make use of the flags.

Sep 8 2018, 12:53 PM

Sep 6 2018

mcberg2017 updated the diff for D51738: add IR flags to MI.
Sep 6 2018, 11:14 AM
mcberg2017 updated the diff for D51738: add IR flags to MI.

With the appropriate test file...

Sep 6 2018, 10:36 AM
mcberg2017 added a comment to D51738: add IR flags to MI.

I have a test case which will show shortly...

Sep 6 2018, 10:30 AM
mcberg2017 added reviewers for D51738: add IR flags to MI: spatel, hfinkel, wristow.
Sep 6 2018, 10:30 AM
mcberg2017 created D51738: add IR flags to MI.
Sep 6 2018, 10:30 AM
mcberg2017 committed rL341565: [NFC] - in preparation for adding nsw, nuw and exact as flags to MI.
[NFC] - in preparation for adding nsw, nuw and exact as flags to MI
Sep 6 2018, 10:12 AM

Sep 4 2018

mcberg2017 updated the diff for D51145: Guard FMF context by excluding some FP operators from FPMathOperator.

I added one more non fmf instruction and there is room to add others if needed.

Sep 4 2018, 1:28 PM
mcberg2017 added a comment to D51145: Guard FMF context by excluding some FP operators from FPMathOperator.

Thanks, that is a good alternative. I am testing it internally to see I get similar coverage. More later...

Sep 4 2018, 12:10 PM

Aug 31 2018

mcberg2017 added a comment to D51145: Guard FMF context by excluding some FP operators from FPMathOperator.

In the newly created test case above, as checked in for test/CodeGen/X86/intersect-fma-fmf.ll, we get precisely this scenario. From a debug session breakpointed in llvm::SelectionDAGBuilder::visit at the line containing Node->intersectFlagsWith(IncomingFlags);
The Instruction in question is: %tmp11 = extractelement <4 x float> %tmp10, i32 1 as seen by the debugger, the Node we are associating it to is: t7: f32 = fadd nnan ninf nsz arcp contract afn reassoc t6, t5.
The extractelement is an Instruction that never carries flags and qualifies under

Aug 31 2018, 1:34 PM
mcberg2017 added a comment to D51145: Guard FMF context by excluding some FP operators from FPMathOperator.

Another data point, this change caused no drift in the lit tests, meaning none of our FMF opts managed in the lit tests are modified by the behavior.

Aug 31 2018, 12:00 PM
mcberg2017 added a comment to D51145: Guard FMF context by excluding some FP operators from FPMathOperator.

Correctly stated, but out of context. Some clarity first. The kinds of instructions in our case are neither strict nor fast, they never carry flags. Neither scalarization nor partial vectorization should cause FMF obliteration. Perhaps we need additional mechanisms?

Aug 31 2018, 11:58 AM

Aug 30 2018

mcberg2017 updated the diff for D51145: Guard FMF context by excluding some FP operators from FPMathOperator.

With the test file sync'd

Aug 30 2018, 4:17 PM
mcberg2017 committed rL341138: [NFC] adding initial intersect test for Node to Instruction association.
[NFC] adding initial intersect test for Node to Instruction association
Aug 30 2018, 3:44 PM
mcberg2017 added a comment to D51145: Guard FMF context by excluding some FP operators from FPMathOperator.

I have a smaller test case now, its baseline analog should show up in the tree in a bit...

Aug 30 2018, 3:38 PM
mcberg2017 added a comment to D51145: Guard FMF context by excluding some FP operators from FPMathOperator.

without the change:

Aug 30 2018, 3:13 PM
mcberg2017 added a comment to D51145: Guard FMF context by excluding some FP operators from FPMathOperator.

I will have both with and without assembler example shortly, added here. As for the test case, it is pretty close to minimal with context needed for association, but I will see if I can shrink it a bit after the assembler is up.

Aug 30 2018, 2:23 PM
mcberg2017 added a comment to D51145: Guard FMF context by excluding some FP operators from FPMathOperator.

Copying all available flags as false should not change the initial state of the object after its creation. It only does so because we are using AnyDefined as a sticky bit for assignment of any flag regardless of value. My notion is that any true value indicates that at least a value is set to something other than a default value (false). The test conditions occurs in partial vectorization and in our case, after scalarization on gpus where interior math operations occur. It happens frequently in our cases. The problem is when an instruction is associated to a Node that does have flags and where the Instruction it is associated to does not. This only ever occurs where the association is disjunct, meaning the Node and the Instruction originated differently. Generally its the other way around, where Node is empty and we are inheriting flags from an Instruction as the Instruction originated the Node in question. All other operations of intersect are done from Node to Node, ergo this change does not modify that behavior, that only occurs in this context.

Aug 30 2018, 2:12 PM
mcberg2017 added a comment to D51145: Guard FMF context by excluding some FP operators from FPMathOperator.

Comments, alternatives?

Aug 30 2018, 12:11 PM

Aug 22 2018

mcberg2017 added a comment to D51145: Guard FMF context by excluding some FP operators from FPMathOperator.

The attached test is a x86 approximation of internal tests, altered for platform, which show this problem which occurs frequently on many FMF optimization contexts.

Aug 22 2018, 5:42 PM
mcberg2017 created D51145: Guard FMF context by excluding some FP operators from FPMathOperator.
Aug 22 2018, 5:18 PM

Aug 20 2018

mcberg2017 committed rL340222: extend binop folds for selects to include true and false binops flag….
extend binop folds for selects to include true and false binops flag…
Aug 20 2018, 3:27 PM
mcberg2017 closed D50996: extend binop folds for selects to include true and false binops flag intersection.
Aug 20 2018, 3:27 PM
mcberg2017 added a comment to D50996: extend binop folds for selects to include true and false binops flag intersection.

Actually the other test in rL339938 shows the positive side, where both binops are fast to show the intersection in /test/Transforms/LoopVectorize/reduction.ll

Aug 20 2018, 2:47 PM
mcberg2017 added a comment to rL339938: add a missed case for binary op FMF propagation under select folds.

Adding note for related side effect handled in D50996 and reported in https://bugs.llvm.org/show_bug.cgi?id=38641

Aug 20 2018, 2:41 PM
mcberg2017 added a comment to D50996: extend binop folds for selects to include true and false binops flag intersection.

The select_meta test has a directly related case in it that maps to the bug test case in https://bugs.llvm.org/show_bug.cgi?id=38641

Aug 20 2018, 2:35 PM
mcberg2017 created D50996: extend binop folds for selects to include true and false binops flag intersection.
Aug 20 2018, 2:34 PM

Aug 16 2018

mcberg2017 committed rL339938: add a missed case for binary op FMF propagation under select folds.
add a missed case for binary op FMF propagation under select folds
Aug 16 2018, 2:00 PM

Aug 9 2018

mcberg2017 committed rL339357: extend folding fsub/fadd to fneg for FMF.
extend folding fsub/fadd to fneg for FMF
Aug 9 2018, 10:01 AM
mcberg2017 closed D50195: extend folding fsub/fadd to fneg for FMF.
Aug 9 2018, 10:00 AM

Aug 8 2018

mcberg2017 updated the diff for D50195: extend folding fsub/fadd to fneg for FMF.

With the flags added...

Aug 8 2018, 9:05 PM
mcberg2017 added a comment to D50195: extend folding fsub/fadd to fneg for FMF.

At this point there isn't any code either way that checks for fneg wrt to peering through or mining flags...

Aug 8 2018, 7:18 PM
mcberg2017 added a comment to D50195: extend folding fsub/fadd to fneg for FMF.

Its either that or peer through them like fp_round and fp_extend, which seems more natural since these usually camp over arithmetics.

Aug 8 2018, 7:16 PM
mcberg2017 updated the diff for D50195: extend folding fsub/fadd to fneg for FMF.

With changes to the new fold tests you added and the code mod.

Aug 8 2018, 6:59 PM
mcberg2017 added a comment to D50195: extend folding fsub/fadd to fneg for FMF.

I see what you meant, removing isNegatibleForFree/GetNegatedExpression in favor of fneg when that is what we doing. I have the rest of the change ready now. Should be up in a bit...

Aug 8 2018, 6:57 PM
mcberg2017 added a comment to D50195: extend folding fsub/fadd to fneg for FMF.

Even with all the above changes, the opportunity persists. We need to move:

Aug 8 2018, 11:18 AM

Aug 7 2018

mcberg2017 added a comment to D50417: [InstCombine] fold fneg into constant operand of fmul/fdiv.

Looked it over in detail, the transformations all track.
LGTM, up to you if you want second set of eyes.

Aug 7 2018, 4:48 PM
mcberg2017 updated the diff for D50195: extend folding fsub/fadd to fneg for FMF.

Updated and sync'd with fsub tests from r339197.

Aug 7 2018, 4:22 PM
mcberg2017 committed rL339197: [NFC] adding tests for Y - (X + Y) --> -X.
[NFC] adding tests for Y - (X + Y) --> -X
Aug 7 2018, 3:53 PM
mcberg2017 updated the diff for D50195: extend folding fsub/fadd to fneg for FMF.

With the non const version for both tests and some cleanup.

Aug 7 2018, 10:48 AM
mcberg2017 added a comment to D50195: extend folding fsub/fadd to fneg for FMF.

Nope, we can do either, I will upload the non constant version. Also I will split fp_fold.ll to use just unsafe for the initial check as NFC before this change.

Aug 7 2018, 10:46 AM
mcberg2017 added inline comments to D50195: extend folding fsub/fadd to fneg for FMF.
Aug 7 2018, 10:29 AM
mcberg2017 updated the diff for D50195: extend folding fsub/fadd to fneg for FMF.

I like these test versions a little better, they show an opportunity yet to be had for the IR optimizer.

Aug 7 2018, 10:28 AM
mcberg2017 added inline comments to D50195: extend folding fsub/fadd to fneg for FMF.
Aug 7 2018, 8:24 AM

Aug 2 2018

mcberg2017 created D50195: extend folding fsub/fadd to fneg for FMF.
Aug 2 2018, 9:59 AM

Aug 1 2018

mcberg2017 committed rL338604: [NFC] small addendum to r334242, FMF propagation.
[NFC] small addendum to r334242, FMF propagation
Aug 1 2018, 11:07 AM

Jun 18 2018

mcberg2017 committed rL334996: Utilize new SDNode flag functionality to expand current support for fadd.
Utilize new SDNode flag functionality to expand current support for fadd
Jun 18 2018, 4:49 PM
mcberg2017 closed D47909: Utilize new SDNode flag functionality to expand current support for fadd.
Jun 18 2018, 4:49 PM
mcberg2017 added inline comments to D47909: Utilize new SDNode flag functionality to expand current support for fadd.
Jun 18 2018, 4:26 PM
mcberg2017 updated the diff for D47909: Utilize new SDNode flag functionality to expand current support for fadd.

Updated for rL334984

Jun 18 2018, 2:45 PM
mcberg2017 committed rL334984: refactor of visitFADD for AllowNewConst cases.
refactor of visitFADD for AllowNewConst cases
Jun 18 2018, 2:16 PM
mcberg2017 closed D48289: refactor of visitFADD for AllowNewConst cases.
Jun 18 2018, 2:16 PM
mcberg2017 committed rL334970: [NFC] make MIFlag accessor functions consistant with usage model.
[NFC] make MIFlag accessor functions consistant with usage model
Jun 18 2018, 11:42 AM
mcberg2017 added a comment to D48289: refactor of visitFADD for AllowNewConst cases.

This change does not modify testing...

Jun 18 2018, 10:37 AM
mcberg2017 updated subscribers of D48289: refactor of visitFADD for AllowNewConst cases.
Jun 18 2018, 10:36 AM
mcberg2017 added a comment to D47909: Utilize new SDNode flag functionality to expand current support for fadd.

D48289 is now required to be checked in before this change.

Jun 18 2018, 10:35 AM
mcberg2017 created D48289: refactor of visitFADD for AllowNewConst cases.
Jun 18 2018, 10:34 AM
mcberg2017 added inline comments to D47909: Utilize new SDNode flag functionality to expand current support for fadd.
Jun 18 2018, 10:29 AM
mcberg2017 added inline comments to D47909: Utilize new SDNode flag functionality to expand current support for fadd.
Jun 18 2018, 9:05 AM

Jun 15 2018

mcberg2017 updated the diff for D47909: Utilize new SDNode flag functionality to expand current support for fadd.

Updated comment for reassociation case

Jun 15 2018, 6:05 PM
mcberg2017 abandoned D46562: Utilize new SDNode flag functionality to expand current support model.

This review is now covered in other checkins.

Jun 15 2018, 5:09 PM
mcberg2017 committed rL334876: Utilize new SDNode flag functionality to expand current support for fma.
Utilize new SDNode flag functionality to expand current support for fma
Jun 15 2018, 5:07 PM
mcberg2017 closed D47918: Utilize new SDNode flag functionality to expand current support for fma.
Jun 15 2018, 5:07 PM
mcberg2017 committed rL334862: Utilize new SDNode flag functionality to expand current support for fdiv.
Utilize new SDNode flag functionality to expand current support for fdiv
Jun 15 2018, 1:49 PM