Page MenuHomePhabricator

sepavloff (Serge Pavlov)
User

Projects

User does not belong to any projects.

User Details

User Since
Mar 13 2013, 7:26 AM (485 w, 16 h)

Recent Activity

Tue, Jun 28

sepavloff added inline comments to D123952: [FPEnv] Allow CompoundStmt to keep FP options.
Tue, Jun 28, 9:13 AM · Restricted Project, Restricted Project
sepavloff updated the diff for D123952: [FPEnv] Allow CompoundStmt to keep FP options.

Updated patch according to reviewers' notes

Tue, Jun 28, 8:56 AM · Restricted Project, Restricted Project

Mon, Jun 27

sepavloff added inline comments to D123952: [FPEnv] Allow CompoundStmt to keep FP options.
Mon, Jun 27, 10:55 AM · Restricted Project, Restricted Project
sepavloff added inline comments to D123952: [FPEnv] Allow CompoundStmt to keep FP options.
Mon, Jun 27, 8:37 AM · Restricted Project, Restricted Project
sepavloff updated the diff for D123952: [FPEnv] Allow CompoundStmt to keep FP options.

Rebased, optimized FPOptions::diffWith.

Mon, Jun 27, 8:34 AM · Restricted Project, Restricted Project

Fri, Jun 24

sepavloff requested review of D128546: [GlobalISel] Do not crash on widening vector result.
Fri, Jun 24, 11:44 AM · Restricted Project, Restricted Project

Wed, Jun 22

sepavloff committed rG706e89db97d3: Fix interaction of pragma FENV_ACCESS with other pragmas (authored by sepavloff).
Fix interaction of pragma FENV_ACCESS with other pragmas
Wed, Jun 22, 1:16 AM · Restricted Project, Restricted Project
sepavloff closed D126364: Fix interaction of pragma FENV_ACCESS with other pragmas.
Wed, Jun 22, 1:15 AM · Restricted Project, Restricted Project

Fri, Jun 17

sepavloff updated the summary of D126364: Fix interaction of pragma FENV_ACCESS with other pragmas.
Fri, Jun 17, 12:25 AM · Restricted Project, Restricted Project
sepavloff added inline comments to D126364: Fix interaction of pragma FENV_ACCESS with other pragmas.
Fri, Jun 17, 12:24 AM · Restricted Project, Restricted Project
sepavloff updated the diff for D126364: Fix interaction of pragma FENV_ACCESS with other pragmas.

Remade the patch according to the review notes

Fri, Jun 17, 12:16 AM · Restricted Project, Restricted Project

Thu, Jun 16

sepavloff added a comment to D127964: [DCE] Eliminate no-op atan and atan2 calls.

The opengroup specification (https://pubs.opengroup.org/onlinepubs/9699919799/functions/atan.html) states:

If x is subnormal, a range error may occur

It does not state that error shall occur, which means this behavior is optional. So constant evaluation hardly needs changes.

Thu, Jun 16, 10:03 PM · Restricted Project, Restricted Project

Tue, Jun 14

sepavloff committed rG6117784c5f2b: [NFC] Remove unused function parameter (authored by sepavloff).
[NFC] Remove unused function parameter
Tue, Jun 14, 8:01 AM · Restricted Project, Restricted Project

Wed, Jun 8

sepavloff added inline comments to D126364: Fix interaction of pragma FENV_ACCESS with other pragmas.
Wed, Jun 8, 9:40 AM · Restricted Project, Restricted Project

Tue, Jun 7

sepavloff added inline comments to D126364: Fix interaction of pragma FENV_ACCESS with other pragmas.
Tue, Jun 7, 10:11 AM · Restricted Project, Restricted Project
sepavloff added inline comments to D126364: Fix interaction of pragma FENV_ACCESS with other pragmas.
Tue, Jun 7, 4:11 AM · Restricted Project, Restricted Project

Mon, Jun 6

sepavloff added inline comments to D126364: Fix interaction of pragma FENV_ACCESS with other pragmas.
Mon, Jun 6, 11:56 AM · Restricted Project, Restricted Project
sepavloff added a comment to D126364: Fix interaction of pragma FENV_ACCESS with other pragmas.

Shouldn't the rounding mode be FE_DYNAMIC by default?

According to the standard it must be FE_TONEAREST:

F.8.3p1:
At program startup the dynamic floating-point environment is initialized as prescribed by IEC 60559:
...
- The dynamic rounding direction mode is rounding to nearest.
...

When I say the default should be FE_DYNAMIC, I'm talking about the default FENV_ROUND state. That's talking about the initial state of the floating-point registers at runtime (on entry to main()).

Mon, Jun 6, 11:25 AM · Restricted Project, Restricted Project
sepavloff added a comment to D126364: Fix interaction of pragma FENV_ACCESS with other pragmas.

Shouldn't the rounding mode be FE_DYNAMIC by default?

Mon, Jun 6, 11:17 AM · Restricted Project, Restricted Project
sepavloff added a comment to D126364: Fix interaction of pragma FENV_ACCESS with other pragmas.

Given we have getEffectiveRoundingMode(), I think the calls to setRoundingModeOverride shouldn't be necessary? And if we drop those calls, we can also drop the IsRoundingModeSet variable.

Mon, Jun 6, 2:24 AM · Restricted Project, Restricted Project

Thu, Jun 2

sepavloff added a comment to D126364: Fix interaction of pragma FENV_ACCESS with other pragmas.

The way I see it, there are two possibilities here:

  1. In Sema, we have two rounding modes that correspond to FE_DYNAMIC: llvm::RoundingMode::Dynamic, and llvm::RoundingMode::NearestTiesToEven, plus some boolean to indicate whether the user actually explicitly specified FE_TONEAREST. (You're currently missing the boolean, which means that currently "#pragma STDC FENV_ACCESS OFF" followed by "#pragma STDC FENV_ACCESS ON" actually mutates the rounding mode.) We juggle the rounding modes and the bit based on whether FENV_ACCESS is currently enabled.
  2. We just have one rounding mode in Sema that corresponds to FE_DYNAMIC. Then in CodeGen, we set the actual rounding mode based on whether FENV_ACCESS is currently enabled.

(2) seems a lot simpler.

Thu, Jun 2, 11:24 PM · Restricted Project, Restricted Project
sepavloff updated the diff for D126364: Fix interaction of pragma FENV_ACCESS with other pragmas.

Update the patch

Thu, Jun 2, 11:23 PM · Restricted Project, Restricted Project

Wed, Jun 1

sepavloff abandoned D114766: If constrained intrinsic is replaced, remove its side effect.

The problem was solved in D118426.

Wed, Jun 1, 12:25 AM · Restricted Project, Restricted Project

May 30 2022

sepavloff added a comment to D126364: Fix interaction of pragma FENV_ACCESS with other pragmas.

setRoundingMode definitely should not call getAllowFEnvAccess() and it does not

Yes, it does?

// C2x: 7.6.2p3  If the FE_DYNAMIC mode is specified and FENV_ACCESS is "off",
// the translator may assume that the default rounding mode is in effect.
if (FPR == llvm::RoundingMode::Dynamic &&
    !CurFPFeatures.getAllowFEnvAccess() &&
    CurFPFeatures.getFPExceptionMode() == LangOptions::FPE_Ignore)
  FPR = llvm::RoundingMode::NearestTiesToEven;
May 30 2022, 10:27 PM · Restricted Project, Restricted Project
sepavloff added a comment to D126364: Fix interaction of pragma FENV_ACCESS with other pragmas.

I mean that ActOnPragmaFEnvAccess shouldn't call hasRoundingModeOverride()/setRoundingModeOverride(), and setRoundingMode shouldn't call getAllowFEnvAccess().

May 30 2022, 2:57 AM · Restricted Project, Restricted Project

May 27 2022

sepavloff added a comment to D126364: Fix interaction of pragma FENV_ACCESS with other pragmas.

For FENV_ROUND, I think we should try to stick to the standard as closely as possible in Sema; since the standard models FENV_ROUND as a separate state, Sema should also model it as a separate state.

May 27 2022, 4:25 AM · Restricted Project, Restricted Project

May 26 2022

sepavloff committed rGbdd0093f4d57: [GlobalISel] Add G_IS_FPCLASS (authored by sepavloff).
[GlobalISel] Add G_IS_FPCLASS
May 26 2022, 11:53 PM · Restricted Project, Restricted Project
sepavloff closed D121454: [GlobalISel] Add G_IS_FPCLASS.
May 26 2022, 11:52 PM · Restricted Project, Restricted Project
sepavloff added a comment to D126364: Fix interaction of pragma FENV_ACCESS with other pragmas.

Could you lay out the expected interaction between "STDC FENV_ACCESS", "clang fp exceptions", "float_control", and "fenv_access"? If there's some way to map everything to "#pragma clang fp", please lay that out; if that isn't possible, please explain why.

May 26 2022, 4:03 AM · Restricted Project, Restricted Project

May 25 2022

sepavloff requested review of D126364: Fix interaction of pragma FENV_ACCESS with other pragmas.
May 25 2022, 3:11 AM · Restricted Project, Restricted Project

May 24 2022

sepavloff committed rG6fc0bc5b0fa7: Fix behavior of is_fp_class on empty class set (authored by sepavloff).
Fix behavior of is_fp_class on empty class set
May 24 2022, 7:51 AM · Restricted Project, Restricted Project
sepavloff added a comment to D112025: Intrinsic for checking floating point class.

We believe that there's a bug when the 2nd argument is 0.
See here: https://gcc.godbolt.org/z/9735rYbqP

LLVM produces 1, but it should be 0. Found by @regehr.

May 24 2022, 7:49 AM · Restricted Project, Restricted Project

May 23 2022

sepavloff updated the diff for D123952: [FPEnv] Allow CompoundStmt to keep FP options.

Update after D125635 and rebase

May 23 2022, 12:42 AM · Restricted Project, Restricted Project

May 20 2022

sepavloff committed rG5537b22ccbdc: Make CompoundStmtBitfields::NumStmts not a bit-field (authored by sepavloff).
Make CompoundStmtBitfields::NumStmts not a bit-field
May 20 2022, 12:22 AM · Restricted Project, Restricted Project
sepavloff closed D125635: Make CompoundStmtBitfields::NumStmts not a bit-field.
May 20 2022, 12:22 AM · Restricted Project, Restricted Project
sepavloff added a comment to D125635: Make CompoundStmtBitfields::NumStmts not a bit-field.

Thanks!

May 20 2022, 12:20 AM · Restricted Project, Restricted Project

May 19 2022

sepavloff retitled D125635: Make CompoundStmtBitfields::NumStmts not a bit-field from Move NumStmts from CompoundStmtBitfields to fields of CompoundStmt to Make CompoundStmtBitfields::NumStmts not a bit-field.
May 19 2022, 8:06 AM · Restricted Project, Restricted Project
sepavloff added a comment to D125635: Make CompoundStmtBitfields::NumStmts not a bit-field.

On the one hand, I'm not sure 8M statements in a block — or 1M, for that matter — is an unreasonable implementation limit. On the other hand, this patch looks like it only changes overall memory use on 32-bit hosts, because CompoundStmt has a 32-bit field prior to its pointer-aligned trailing storage. Can you check how memory use actually changes? Ideally you'd be able to test it on a 32-bit host, but if you don't have one, just knowing the raw count of allocated CompoundStmt objects for a few large compilation benchmarks would be nice — the ideal stress test is probably something in C++ that instantiates a lot of function templates.

May 19 2022, 8:04 AM · Restricted Project, Restricted Project
sepavloff updated the diff for D125635: Make CompoundStmtBitfields::NumStmts not a bit-field.

Move NumStmts back to CompoundStmtBitfields

May 19 2022, 2:27 AM · Restricted Project, Restricted Project

May 15 2022

sepavloff added a comment to D123952: [FPEnv] Allow CompoundStmt to keep FP options.

Thanks for working on this! One thing that's not clear to me is what bugs this is solving -- the test coverage only shows a change to textual AST dumping behavior. Is this otherwise expected to be an NFC change, or should there be some codegen tests that show a difference in behavior?

May 15 2022, 10:25 AM · Restricted Project, Restricted Project
sepavloff requested review of D125635: Make CompoundStmtBitfields::NumStmts not a bit-field.
May 15 2022, 10:10 AM · Restricted Project, Restricted Project
sepavloff updated the diff for D123952: [FPEnv] Allow CompoundStmt to keep FP options.

Addressed review notes

May 15 2022, 3:13 AM · Restricted Project, Restricted Project
sepavloff requested review of D125625: Implementation of '#pragma STDC FENV_ROUND'.
May 15 2022, 1:55 AM · Restricted Project, Restricted Project

May 7 2022

sepavloff committed rGeb28da89a659: [InstCombine] Remove side effect of replaced constrained intrinsics (authored by sepavloff).
[InstCombine] Remove side effect of replaced constrained intrinsics
May 7 2022, 5:06 AM · Restricted Project, Restricted Project
sepavloff closed D118426: [InstCombine] Remove side effect of replaced constrained intrinsics.
May 7 2022, 5:06 AM · Restricted Project, Restricted Project
sepavloff added a comment to D118426: [InstCombine] Remove side effect of replaced constrained intrinsics.

Thanks!

May 7 2022, 5:04 AM · Restricted Project, Restricted Project

May 6 2022

sepavloff added a reviewer for D118426: [InstCombine] Remove side effect of replaced constrained intrinsics: reames.
May 6 2022, 3:48 AM · Restricted Project, Restricted Project
sepavloff updated the diff for D118426: [InstCombine] Remove side effect of replaced constrained intrinsics.

Updated the patch according to the discussion

May 6 2022, 3:37 AM · Restricted Project, Restricted Project
sepavloff reopened D118426: [InstCombine] Remove side effect of replaced constrained intrinsics.
May 6 2022, 3:34 AM · Restricted Project, Restricted Project

May 5 2022

sepavloff added a comment to D118426: [InstCombine] Remove side effect of replaced constrained intrinsics.

See the discussion in https://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20220502/1034841.html.

May 5 2022, 11:19 AM · Restricted Project, Restricted Project
sepavloff added a reverting change for rG83914ee96fc2: [InstCombine] Remove side effect of replaced constrained intrinsics: rGe1554ac63a90: Revert "[InstCombine] Remove side effect of replaced constrained intrinsics".
May 5 2022, 11:10 AM · Restricted Project, Restricted Project
sepavloff committed rGe1554ac63a90: Revert "[InstCombine] Remove side effect of replaced constrained intrinsics" (authored by sepavloff).
Revert "[InstCombine] Remove side effect of replaced constrained intrinsics"
May 5 2022, 11:10 AM · Restricted Project, Restricted Project
sepavloff added a reverting change for D118426: [InstCombine] Remove side effect of replaced constrained intrinsics: rGe1554ac63a90: Revert "[InstCombine] Remove side effect of replaced constrained intrinsics".
May 5 2022, 11:09 AM · Restricted Project, Restricted Project

May 4 2022

sepavloff committed rG83914ee96fc2: [InstCombine] Remove side effect of replaced constrained intrinsics (authored by sepavloff).
[InstCombine] Remove side effect of replaced constrained intrinsics
May 4 2022, 10:04 PM · Restricted Project, Restricted Project
sepavloff closed D118426: [InstCombine] Remove side effect of replaced constrained intrinsics.
May 4 2022, 10:04 PM · Restricted Project, Restricted Project
sepavloff added a comment to D118426: [InstCombine] Remove side effect of replaced constrained intrinsics.

Thanks!

May 4 2022, 10:01 PM · Restricted Project, Restricted Project
sepavloff added inline comments to D118426: [InstCombine] Remove side effect of replaced constrained intrinsics.
May 4 2022, 11:23 AM · Restricted Project, Restricted Project
sepavloff updated the diff for D118426: [InstCombine] Remove side effect of replaced constrained intrinsics.

Simplify code

May 4 2022, 11:09 AM · Restricted Project, Restricted Project

May 3 2022

sepavloff updated the diff for D118426: [InstCombine] Remove side effect of replaced constrained intrinsics.

Fixed comment and rebased

May 3 2022, 5:37 AM · Restricted Project, Restricted Project
sepavloff added a comment to D112025: Intrinsic for checking floating point class.

Is the second argument required to be a constant? If so, it would be great to document that. Thanks!

May 3 2022, 5:33 AM · Restricted Project, Restricted Project
sepavloff committed rGd9b5544e0f99: [Doc] Refine description of llvm.is_fpclass (authored by sepavloff).
[Doc] Refine description of llvm.is_fpclass
May 3 2022, 5:31 AM · Restricted Project, Restricted Project
sepavloff added inline comments to D118426: [InstCombine] Remove side effect of replaced constrained intrinsics.
May 3 2022, 4:47 AM · Restricted Project, Restricted Project

Apr 29 2022

sepavloff committed rGc96cc500f0b3: [SystemZ] Custom lowering of llvm.is_fpclass (authored by sepavloff).
[SystemZ] Custom lowering of llvm.is_fpclass
Apr 29 2022, 12:29 AM · Restricted Project, Restricted Project
sepavloff closed D114695: [SystemZ] Custom lowering of llvm.is_fpclass.
Apr 29 2022, 12:29 AM · Restricted Project, Restricted Project

Apr 28 2022

sepavloff committed rG9fc58f1820e3: [PowerPC] Support of ppc_fp128 in lowering of llvm.is_fpclass (authored by sepavloff).
[PowerPC] Support of ppc_fp128 in lowering of llvm.is_fpclass
Apr 28 2022, 9:12 PM · Restricted Project, Restricted Project
sepavloff closed D113908: [PowerPC] Support of ppc_fp128 in lowering of llvm.is_fpclass.
Apr 28 2022, 9:11 PM · Restricted Project, Restricted Project

Apr 25 2022

sepavloff committed rG170a90314490: Intrinsic for checking floating point class (authored by sepavloff).
Intrinsic for checking floating point class
Apr 25 2022, 11:20 PM · Restricted Project, Restricted Project
sepavloff closed D112025: Intrinsic for checking floating point class.
Apr 25 2022, 11:20 PM · Restricted Project, Restricted Project
sepavloff added a comment to D112025: Intrinsic for checking floating point class.

Thanks!

Apr 25 2022, 8:41 PM · Restricted Project, Restricted Project
sepavloff added inline comments to D112025: Intrinsic for checking floating point class.
Apr 25 2022, 5:54 AM · Restricted Project, Restricted Project
sepavloff updated the diff for D112025: Intrinsic for checking floating point class.

Addressed review notes. Rebased.

Apr 25 2022, 5:31 AM · Restricted Project, Restricted Project

Apr 21 2022

sepavloff added a comment to D112025: Intrinsic for checking floating point class.

LGTM but I'd prefer someone else to approve.

Apr 21 2022, 6:21 AM · Restricted Project, Restricted Project
sepavloff added inline comments to D118387: [IPSCCP] Switch away from Instruction::isSafeToRemove().
Apr 21 2022, 6:19 AM · Restricted Project, Restricted Project

Apr 20 2022

sepavloff added inline comments to D112025: Intrinsic for checking floating point class.
Apr 20 2022, 9:48 PM · Restricted Project, Restricted Project
sepavloff updated the diff for D112025: Intrinsic for checking floating point class.

Fixed comments

Apr 20 2022, 9:45 PM · Restricted Project, Restricted Project

Apr 18 2022

sepavloff requested review of D123952: [FPEnv] Allow CompoundStmt to keep FP options.
Apr 18 2022, 11:04 AM · Restricted Project, Restricted Project

Apr 14 2022

sepavloff added a comment to D121296: [GlobalIsel][X86] Legalization of G_IS_FPCLASS.

Could also use FewerElementsVector handling

Some support for fewerElements was added, but the support of vector types in X86 Global ISel is weak, and I could not make tests for this case. Some patches for this support are in work, but it is a long trail.

Are there any plans for X86 in GlobalIsel? It kind of stopped.

Apr 14 2022, 2:59 AM · Restricted Project, Restricted Project

Apr 13 2022

sepavloff added a comment to D112025: Intrinsic for checking floating point class.

Any feedback?

Apr 13 2022, 1:53 AM · Restricted Project, Restricted Project
sepavloff added a reviewer for D112025: Intrinsic for checking floating point class: andrew.w.kaylor.
Apr 13 2022, 1:53 AM · Restricted Project, Restricted Project

Apr 11 2022

sepavloff added a comment to D121296: [GlobalIsel][X86] Legalization of G_IS_FPCLASS.

Could also use FewerElementsVector handling

Apr 11 2022, 10:04 AM · Restricted Project, Restricted Project
sepavloff updated the diff for D121296: [GlobalIsel][X86] Legalization of G_IS_FPCLASS.

Addressed reviewers' notes

Apr 11 2022, 9:50 AM · Restricted Project, Restricted Project
sepavloff added a comment to D118426: [InstCombine] Remove side effect of replaced constrained intrinsics.

Ping.

Apr 11 2022, 4:06 AM · Restricted Project, Restricted Project

Apr 5 2022

sepavloff added a comment to D112025: Intrinsic for checking floating point class.

Ping.

Apr 5 2022, 7:26 AM · Restricted Project, Restricted Project

Apr 4 2022

sepavloff added inline comments to D118426: [InstCombine] Remove side effect of replaced constrained intrinsics.
Apr 4 2022, 2:15 AM · Restricted Project, Restricted Project

Apr 2 2022

sepavloff committed rGc625b6051c24: Remove duplicate code from wouldInstructionBeTriviallyDead (authored by sepavloff).
Remove duplicate code from wouldInstructionBeTriviallyDead
Apr 2 2022, 2:06 AM · Restricted Project, Restricted Project

Mar 31 2022

sepavloff added a comment to D69798: Implement inlining of strictfp functions.

Thanks!

Mar 31 2022, 5:17 AM · Restricted Project, Restricted Project
sepavloff committed rG47b3b76825dc: Implement inlining of strictfp functions (authored by sepavloff).
Implement inlining of strictfp functions
Mar 31 2022, 5:16 AM · Restricted Project, Restricted Project
sepavloff closed D69798: Implement inlining of strictfp functions.
Mar 31 2022, 5:16 AM · Restricted Project, Restricted Project

Mar 30 2022

sepavloff committed rG881350a92d82: Mapping of FP operations to constrained intrinsics (authored by sepavloff).
Mapping of FP operations to constrained intrinsics
Mar 30 2022, 9:09 PM · Restricted Project, Restricted Project
sepavloff added a reverting change for rG115b3ace3692: Mapping of FP operations to constrained intrinsics: rG8160dd582b67: Revert "Mapping of FP operations to constrained intrinsics".
Mar 30 2022, 2:48 AM · Restricted Project, Restricted Project
sepavloff committed rG8160dd582b67: Revert "Mapping of FP operations to constrained intrinsics" (authored by sepavloff).
Revert "Mapping of FP operations to constrained intrinsics"
Mar 30 2022, 2:48 AM · Restricted Project, Restricted Project
sepavloff added a reverting change for D69562: Mapping of FP operations to constrained intrinsics: rG8160dd582b67: Revert "Mapping of FP operations to constrained intrinsics".
Mar 30 2022, 2:47 AM · Restricted Project, Restricted Project

Mar 29 2022

sepavloff committed rG115b3ace3692: Mapping of FP operations to constrained intrinsics (authored by sepavloff).
Mapping of FP operations to constrained intrinsics
Mar 29 2022, 10:24 PM · Restricted Project, Restricted Project
sepavloff closed D69562: Mapping of FP operations to constrained intrinsics.
Mar 29 2022, 10:24 PM · Restricted Project, Restricted Project
sepavloff added a comment to D69562: Mapping of FP operations to constrained intrinsics.

Thanks!

Mar 29 2022, 9:18 PM · Restricted Project, Restricted Project
sepavloff updated the diff for D69562: Mapping of FP operations to constrained intrinsics.

Addressed reviewer's notes

Mar 29 2022, 9:17 PM · Restricted Project, Restricted Project

Mar 28 2022

sepavloff added a comment to D69798: Implement inlining of strictfp functions.

@andrew.w.kaylor Thank you for reviving this work!
I rebased the patches, the dependency patch has only small changes, this patch changed a bit more, because a new mechanism for intrinsic type parameters was used.

Mar 28 2022, 6:21 AM · Restricted Project, Restricted Project
sepavloff updated the diff for D69798: Implement inlining of strictfp functions.

Rebased and made some update

Mar 28 2022, 6:14 AM · Restricted Project, Restricted Project
sepavloff updated the diff for D69562: Mapping of FP operations to constrained intrinsics.

Rebase plus cosmetic changes

Mar 28 2022, 6:11 AM · Restricted Project, Restricted Project

Mar 23 2022

sepavloff added a comment to D118426: [InstCombine] Remove side effect of replaced constrained intrinsics.

Ping.

Mar 23 2022, 9:26 PM · Restricted Project, Restricted Project