Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Phabricator shutdown timeline

alexgatea (Alex Gatea)
User

Projects

User does not belong to any projects.

User Details

User Since
Feb 11 2022, 6:53 PM (84 w, 3 d)

Recent Activity

Jul 19 2023

alexgatea updated the diff for D153907: [AIX] [TOC] Add -mtocdata/-mno-tocdata options on AIX .

Add back the missing tests

Jul 19 2023, 2:56 PM · Restricted Project, Restricted Project, Restricted Project
alexgatea updated the diff for D153907: [AIX] [TOC] Add -mtocdata/-mno-tocdata options on AIX .

Fixed diff discrepancy, removed asserts for structs/arrays/vectors, updated doc

Jul 19 2023, 2:45 PM · Restricted Project, Restricted Project, Restricted Project
alexgatea updated the diff for D153907: [AIX] [TOC] Add -mtocdata/-mno-tocdata options on AIX .

Addressed some review comments, moved parsing of mtocdata options to AIX.cpp

Jul 19 2023, 9:07 AM · Restricted Project, Restricted Project, Restricted Project

Jul 18 2023

alexgatea updated the diff for D153907: [AIX] [TOC] Add -mtocdata/-mno-tocdata options on AIX .

Addressed review comments

Jul 18 2023, 1:22 PM · Restricted Project, Restricted Project, Restricted Project
alexgatea updated the diff for D153907: [AIX] [TOC] Add -mtocdata/-mno-tocdata options on AIX .

Added diagnostic for when -mtocdata is used with -mcmodel=large

Jul 18 2023, 11:19 AM · Restricted Project, Restricted Project, Restricted Project
alexgatea updated the diff for D153907: [AIX] [TOC] Add -mtocdata/-mno-tocdata options on AIX .

Addressed latest review comments

Jul 18 2023, 10:15 AM · Restricted Project, Restricted Project, Restricted Project
alexgatea added inline comments to D153907: [AIX] [TOC] Add -mtocdata/-mno-tocdata options on AIX .
Jul 18 2023, 9:21 AM · Restricted Project, Restricted Project, Restricted Project
alexgatea updated the diff for D153907: [AIX] [TOC] Add -mtocdata/-mno-tocdata options on AIX .
Jul 18 2023, 7:30 AM · Restricted Project, Restricted Project, Restricted Project

Jul 13 2023

alexgatea updated the diff for D153907: [AIX] [TOC] Add -mtocdata/-mno-tocdata options on AIX .

Rebase and fix last test case (remove include)

Jul 13 2023, 11:39 AM · Restricted Project, Restricted Project, Restricted Project
alexgatea updated the diff for D153907: [AIX] [TOC] Add -mtocdata/-mno-tocdata options on AIX .

Addressed most of the review suggestions (except for the include)

Jul 13 2023, 11:04 AM · Restricted Project, Restricted Project, Restricted Project
alexgatea added a comment to D153907: [AIX] [TOC] Add -mtocdata/-mno-tocdata options on AIX .

You can use -### to dump cc1 options and find the useful one for your %clang_cc1 command.

Jul 13 2023, 7:12 AM · Restricted Project, Restricted Project, Restricted Project

Jul 12 2023

alexgatea added a comment to D153907: [AIX] [TOC] Add -mtocdata/-mno-tocdata options on AIX .

%clang and %clang++ are normally only for test/Driver. Use %clang_cc1 for codegen tests.

Jul 12 2023, 11:38 AM · Restricted Project, Restricted Project, Restricted Project
alexgatea updated the diff for D153907: [AIX] [TOC] Add -mtocdata/-mno-tocdata options on AIX .
Jul 12 2023, 9:45 AM · Restricted Project, Restricted Project, Restricted Project
alexgatea updated the diff for D153907: [AIX] [TOC] Add -mtocdata/-mno-tocdata options on AIX .
Jul 12 2023, 7:20 AM · Restricted Project, Restricted Project, Restricted Project

Jul 11 2023

alexgatea updated the summary of D153903: [CodeGen][NFCI] Avoid calls to setTargetAttributes on definitions.
Jul 11 2023, 10:39 AM · Restricted Project

Jul 10 2023

alexgatea requested review of D154863: [AIX] [XCOFF] Add support for common and local common symbols in the TOC.
Jul 10 2023, 9:50 AM · Restricted Project
alexgatea retitled D153903: [CodeGen][NFCI] Avoid calls to setTargetAttributes on definitions from [NFC] [CodeGenModule] Avoid calls to setTargetAttributes on definitions to [CodeGen][NFCI] Avoid calls to setTargetAttributes on definitions.
Jul 10 2023, 9:36 AM · Restricted Project
alexgatea retitled D153903: [CodeGen][NFCI] Avoid calls to setTargetAttributes on definitions from [CodeGenModule] Avoid calls to setTargetAttributes on definitions to [NFC] [CodeGenModule] Avoid calls to setTargetAttributes on definitions.
Jul 10 2023, 9:35 AM · Restricted Project

Jun 29 2023

alexgatea updated the diff for D153907: [AIX] [TOC] Add -mtocdata/-mno-tocdata options on AIX .
Jun 29 2023, 12:05 PM · Restricted Project, Restricted Project, Restricted Project
alexgatea updated the diff for D153903: [CodeGen][NFCI] Avoid calls to setTargetAttributes on definitions.
Jun 29 2023, 11:07 AM · Restricted Project
alexgatea updated the diff for D153907: [AIX] [TOC] Add -mtocdata/-mno-tocdata options on AIX .
Jun 29 2023, 8:34 AM · Restricted Project, Restricted Project, Restricted Project
alexgatea updated the diff for D153907: [AIX] [TOC] Add -mtocdata/-mno-tocdata options on AIX .
Jun 29 2023, 8:27 AM · Restricted Project, Restricted Project, Restricted Project
alexgatea updated the diff for D153903: [CodeGen][NFCI] Avoid calls to setTargetAttributes on definitions.
Jun 29 2023, 8:25 AM · Restricted Project
alexgatea updated the diff for D153903: [CodeGen][NFCI] Avoid calls to setTargetAttributes on definitions.
Jun 29 2023, 7:42 AM · Restricted Project
alexgatea updated the diff for D153907: [AIX] [TOC] Add -mtocdata/-mno-tocdata options on AIX .
Jun 29 2023, 7:41 AM · Restricted Project, Restricted Project, Restricted Project
alexgatea updated the diff for D153907: [AIX] [TOC] Add -mtocdata/-mno-tocdata options on AIX .
Jun 29 2023, 7:31 AM · Restricted Project, Restricted Project, Restricted Project
alexgatea updated the diff for D153907: [AIX] [TOC] Add -mtocdata/-mno-tocdata options on AIX .

Added TargetSpecific flag, updated some comments.

Jun 29 2023, 7:30 AM · Restricted Project, Restricted Project, Restricted Project

Jun 27 2023

alexgatea added inline comments to D153907: [AIX] [TOC] Add -mtocdata/-mno-tocdata options on AIX .
Jun 27 2023, 1:46 PM · Restricted Project, Restricted Project, Restricted Project
alexgatea updated the diff for D153907: [AIX] [TOC] Add -mtocdata/-mno-tocdata options on AIX .

Updated clang doc, added assert

Jun 27 2023, 1:05 PM · Restricted Project, Restricted Project, Restricted Project
alexgatea requested review of D153907: [AIX] [TOC] Add -mtocdata/-mno-tocdata options on AIX .
Jun 27 2023, 11:58 AM · Restricted Project, Restricted Project, Restricted Project
alexgatea updated the summary of D153903: [CodeGen][NFCI] Avoid calls to setTargetAttributes on definitions.
Jun 27 2023, 11:34 AM · Restricted Project
alexgatea requested review of D153903: [CodeGen][NFCI] Avoid calls to setTargetAttributes on definitions.
Jun 27 2023, 11:32 AM · Restricted Project

Jan 26 2023

alexgatea added a comment to rG46db90cc71d1: [SCEV] `MatchBinaryOp()`: try to recognize `or` as `add`-in-disguise (w/ no….

@lebedev.ri
Hi again
Seeing as the patch doesn't seem as straightforward as originally thought and people have been opposed to it, do you think it might be better to revert your initial commit until there's a fix everyone is happy with?

Jan 26 2023, 1:05 PM · Restricted Project, Restricted Project

Jan 13 2023

alexgatea accepted D141727: [profile][test][NFC] Simplify test code for prof_avoid_relocs.

LGTM. My main previous concern has been addressed by the {{.*}}

Jan 13 2023, 2:12 PM · Restricted Project, Restricted Project

Jan 12 2023

alexgatea added a comment to rG6e5cbc097a5a: "Reland "[pgo] Avoid introducing relocations by using private alias".

Thanks; my suggestion regarding the location was just a guess, I think you're right that it might not be the problem. Unless someone else brings it up, it's fine to leave it as it is.
I'm not sure if I can share specific details so I'll err on the side of caution and won't. But basically I'll just say it was a very minor change in the expected PGO struct (after the private global).
Yes, autogenerated tests are convenient, but the drawback is that these tests check all of the lines not just what is relevant to the original commit so these test cases are fragile.

Jan 12 2023, 1:31 PM · Restricted Project, Restricted Project, Restricted Project
alexgatea accepted rG6e5cbc097a5a: "Reland "[pgo] Avoid introducing relocations by using private alias".

Actually, I figured out a way around this failure by slightly modifying the expected output. So no further need for changes here.
Fyi in the future it would be helpful if we just have .* in places that aren't relevant to what the test is supposed to be testing, to avoid issues like this.
Thanks!

Jan 12 2023, 11:06 AM · Restricted Project, Restricted Project, Restricted Project
alexgatea raised a concern with rG6e5cbc097a5a: "Reland "[pgo] Avoid introducing relocations by using private alias".

Hi @paulkirth
The test llvm/test/Transforms/PGOProfile/prof_avoid_relocs.ll causes a failure on my end with Power. I see that you have a target triple with X86 in it, so I'm wondering if this should be moved to the X86 directory. Or alternatively, you could do what you did in llvm/test/Transforms/PGOProfile/comdat.ll and use regular expressions for the part after "private global," the should fix it too.

Jan 12 2023, 9:18 AM · Restricted Project, Restricted Project, Restricted Project

Jan 6 2023

alexgatea added a comment to rG46db90cc71d1: [SCEV] `MatchBinaryOp()`: try to recognize `or` as `add`-in-disguise (w/ no….

Hi @lebedev.ri
I noticed it's been a while since the last review comment in your patch for the issue I reported last month; just wondering if you could ping them again so we can get this resolved. Alternatively, if you think it'll take a while, please revert your initial commit.

Jan 6 2023, 8:36 AM · Restricted Project, Restricted Project

Dec 12 2022

alexgatea raised a concern with rG46db90cc71d1: [SCEV] `MatchBinaryOp()`: try to recognize `or` as `add`-in-disguise (w/ no….

This commit seems to increase the cost for expanding trip count scev leading to some loops prevented from being unrolled. For example, in the test case below:

  • Prior to this commit isHighCostExpansionHelper returns false (the computed cost 3 < the budget 4) and the loop is unrolled by 8
  • Following the commit, isHighCostExpansionHelper returns true (the computed cost 5 > the budget 4) and the loop is no longer unrolled

Please revert the commit until you have a fix ready.

Dec 12 2022, 8:00 AM · Restricted Project, Restricted Project

Nov 4 2022

alexgatea added a comment to D136095: [GVN] Patch for invalid GVN replacement.

@nikic I'm just wondering if you had a chance to push my commit through

Nov 4 2022, 6:07 AM · Restricted Project, Restricted Project

Nov 1 2022

alexgatea added a comment to D136095: [GVN] Patch for invalid GVN replacement.

@alexgatea Can you please share Name <email> to use for the commit?

Nov 1 2022, 6:05 AM · Restricted Project, Restricted Project

Oct 31 2022

alexgatea updated the diff for D136095: [GVN] Patch for invalid GVN replacement.

Updated test name

Oct 31 2022, 9:01 AM · Restricted Project, Restricted Project
alexgatea added a comment to D136095: [GVN] Patch for invalid GVN replacement.

@nikic Thanks for approving! Since this is my first approved patch, I don't think I have commit access. So can you please push it for me (or let me know if I'm wrong)?

Oct 31 2022, 8:59 AM · Restricted Project, Restricted Project

Oct 28 2022

alexgatea updated the diff for D136095: [GVN] Patch for invalid GVN replacement.

Updated the patch with the suggested fix, and updated my LIT test as well as the LIT test from the previous patch. I agree that this is a better approach than my initial try.

Oct 28 2022, 9:47 AM · Restricted Project, Restricted Project
alexgatea updated the diff for D136095: [GVN] Patch for invalid GVN replacement.

Updated LIT test to the suggested reduced test case.

Oct 28 2022, 8:16 AM · Restricted Project, Restricted Project
alexgatea added reviewers for D136095: [GVN] Patch for invalid GVN replacement: nlopes, spatel.
Oct 28 2022, 6:14 AM · Restricted Project, Restricted Project

Oct 24 2022

alexgatea added a comment to D136095: [GVN] Patch for invalid GVN replacement.

Fyi the build fails due to clang-format, but I checked locally and the improperly formatted lines are not related to my patch

Oct 24 2022, 1:20 PM · Restricted Project, Restricted Project
alexgatea updated the diff for D136095: [GVN] Patch for invalid GVN replacement.
Oct 24 2022, 10:35 AM · Restricted Project, Restricted Project

Oct 20 2022

alexgatea added a comment to D135451: [TTI] New PPC target hook enableUncondDivisionSpeculation.

Could you instead insert a clamp of the divisor and then pattern match that out during selection?

Hmm not sure what you mean by selection. Could you please elaborate (perhaps with an example)?

If you speculate sdiv x, y, replace it with sdiv x, (y == 0 ? 1 : y) or whatever behavior you get for this case. In your backend, then pattern match the divide by 0 check when selecting to the instruction

Oct 20 2022, 10:26 AM · Restricted Project, Restricted Project
alexgatea abandoned D135451: [TTI] New PPC target hook enableUncondDivisionSpeculation.

Thank you for all the comments and suggestions! Closing this PR since the consensus is that using a TTI hook to create target-specific IR semantics is undesirable.

Oct 20 2022, 10:13 AM · Restricted Project, Restricted Project

Oct 17 2022

alexgatea updated the summary of D136095: [GVN] Patch for invalid GVN replacement.
Oct 17 2022, 11:25 AM · Restricted Project, Restricted Project
alexgatea updated the diff for D136095: [GVN] Patch for invalid GVN replacement.

Changed to full context differential and provided more information in the description

Oct 17 2022, 11:14 AM · Restricted Project, Restricted Project
alexgatea updated the summary of D136095: [GVN] Patch for invalid GVN replacement.
Oct 17 2022, 10:57 AM · Restricted Project, Restricted Project
alexgatea updated the diff for D136095: [GVN] Patch for invalid GVN replacement.
Oct 17 2022, 10:31 AM · Restricted Project, Restricted Project
alexgatea added reviewers for D136095: [GVN] Patch for invalid GVN replacement: fhahn, arsenm.
Oct 17 2022, 10:27 AM · Restricted Project, Restricted Project
alexgatea requested review of D136095: [GVN] Patch for invalid GVN replacement.
Oct 17 2022, 10:25 AM · Restricted Project, Restricted Project

Oct 14 2022

alexgatea added a comment to D135451: [TTI] New PPC target hook enableUncondDivisionSpeculation.

Could you instead insert a clamp of the divisor and then pattern match that out during selection?

Oct 14 2022, 10:55 AM · Restricted Project, Restricted Project

Oct 7 2022

alexgatea added a comment to D135451: [TTI] New PPC target hook enableUncondDivisionSpeculation.

IIUC this proposal would effectively re-define udiv and urem's semantics on the IR level to not have undefined behavior for PPC?

I don't think that's quite correct. We still view them as undefined, it's just that we allow further optimizations to happen that we previously bailed out of. The example I gave shows exactly this; without the speculative execution the div is still hoisted to the preheader, but this is done much later in the pipeline by MachineLICM so we do not optimize it fully (because IndVarSimplifyPass occurs earlier).

Right, but the reason MachineLICM can do this today is because at this point we are dealing with machine instructions.

In terms of LLVM IR semantics, this change would allow hoisting an instruction that may produce UB into a path that didn't have UB before AFAICT.

Oct 7 2022, 9:49 AM · Restricted Project, Restricted Project
alexgatea added a comment to D135451: [TTI] New PPC target hook enableUncondDivisionSpeculation.

IIUC this proposal would effectively re-define udiv and urem's semantics on the IR level to not have undefined behavior for PPC?

Oct 7 2022, 9:20 AM · Restricted Project, Restricted Project
alexgatea requested review of D135451: [TTI] New PPC target hook enableUncondDivisionSpeculation.
Oct 7 2022, 8:39 AM · Restricted Project, Restricted Project

Sep 14 2022

alexgatea closed D133841: [test][clang] run test for lld emitting dwarf-aranages only if lld is presented.

It should be fixed in https://reviews.llvm.org/D133847

Ah I didn't see that. Thank you!

Sep 14 2022, 5:42 AM · Restricted Project, Restricted Project
alexgatea reopened D133841: [test][clang] run test for lld emitting dwarf-aranages only if lld is presented.

Hi
This test case is still failing for me due to the lines without -fuse-ld=ldd:

Sep 14 2022, 5:33 AM · Restricted Project, Restricted Project

Sep 13 2022

alexgatea added a comment to D132913: [HLSL] Preserve vec3 for HLSL..

Thanks for reporting the issue.
But I cannot repro the fail.
Do you mind sharing your cmake command?

Hmm, I'm just running the command in the test case:
clang --driver-mode=dxc -Tlib_6_7 -fcgl -Fo - clang/test/CodeGenHLSL/float3.hlsl | FileCheck clang/test/CodeGenHLSL/float3.hlsl

This is the output I got with clang --driver-mode=dxc -Tlib_6_7 -fcgl -Fo - clang/test/CodeGenHLSL/float3.hlsl

target datalayout = "e-m:e-p:32:32-i1:32-i8:8-i16:16-i32:32-i64:64-f16:16-f32:32-f64:64-n8:16:32:64"
target triple = "dxil-unknown-shadermodel6.7-library"

; Function Attrs: noinline nounwind optnone
define noundef <3 x float> @"?foo@@YAT?$__vector@M$02@__clang@@T12@@Z"(<3 x float> noundef %a) #0 {
entry:
  %a.addr = alloca <3 x float>, align 16
  store <3 x float> %a, ptr %a.addr, align 16
  %0 = load <3 x float>, ptr %a.addr, align 16
  ret <3 x float> %0
}

attributes #0 = { noinline nounwind optnone "frame-pointer"="all" "min-legal-vector-width"="96" "no-trapping-math"="true" "stack-protector-buffer-size"="8" }

!llvm.module.flags = !{!0, !1}
!dx.valver = !{!2}
!llvm.ident = !{!3}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 7, !"frame-pointer", i32 2}
!2 = !{i32 1, i32 7}
!3 = !{!"clang version 16.0.0 (https://github.com/llvm/llvm-project c9d2b6b92d6c29d00f6adc0527cf2331dbaae31a)"}

Maybe you build clang with a different setting? What are the CMake options you're using?

Sep 13 2022, 12:32 PM · Restricted Project, Restricted Project
alexgatea added a comment to D132913: [HLSL] Preserve vec3 for HLSL..

Thanks for reporting the issue.
But I cannot repro the fail.
Do you mind sharing your cmake command?

Sep 13 2022, 8:52 AM · Restricted Project, Restricted Project
alexgatea reopened D132913: [HLSL] Preserve vec3 for HLSL..

This test fails because the actual output has <3 x float>* rather than ptr. Could you please fix this test case?

Sep 13 2022, 7:27 AM · Restricted Project, Restricted Project

Sep 6 2022

alexgatea added a comment to D133275: [SimpleLoopUnswitch] Skip non-trivial unswitching of cold functions.

I don't think we need to worry about SPEC too much, just resolve regressions

Sep 6 2022, 11:33 AM · Restricted Project, Restricted Project
alexgatea accepted D133275: [SimpleLoopUnswitch] Skip non-trivial unswitching of cold functions.

LGTM

Sep 6 2022, 6:05 AM · Restricted Project, Restricted Project

Aug 29 2022

alexgatea added a comment to D129599: [SimpleLoopUnswitch] Skip non-trivial unswitching of cold loops.

@alexgatea please try whether the new revision could solve your problem. Thanks

Aug 29 2022, 5:54 AM · Restricted Project, Restricted Project

Aug 25 2022

alexgatea added a comment to D129599: [SimpleLoopUnswitch] Skip non-trivial unswitching of cold loops.

we can change the condition to if the function is cold

Aug 25 2022, 10:30 AM · Restricted Project, Restricted Project
alexgatea added a comment to D129599: [SimpleLoopUnswitch] Skip non-trivial unswitching of cold loops.

@alexgatea Thanks for the feedback.
isColdBlock should be global. One example is in (https://llvm.org/doxygen/ProfileSummaryInfo_8cpp_source.html#l00142), which uses isColdBlock to check whether a function is cold or not. So I assume the issue is the loop is non-cold in real case, but was concerned as cold in the profile data. I kindly suggest updating the profile data to see if there is still any degradation.
Please correct me if I am wrong. Thanks

Aug 25 2022, 9:35 AM · Restricted Project, Restricted Project
alexgatea reopened D129599: [SimpleLoopUnswitch] Skip non-trivial unswitching of cold loops.

I noticed significant performance degradation (~30%) on a spec benchmark due to this commit. isColdBlock doesn't seem to work as expected, because it considered cold a loop that was in a hot function through the profile.

Aug 25 2022, 6:29 AM · Restricted Project, Restricted Project

Apr 25 2022

alexgatea added a comment to D123198: [LibCalls] Add argument extension attributes to more functions..

When I compile the following valid test case:

Apr 25 2022, 1:06 PM · Restricted Project, Restricted Project

Feb 14 2022

alexgatea added a comment to D119566: [flang] Fix edge case in USE-associated generics.

I don't recognize those as tests in flang; do you have a link to the failures? It is highly unlikely that a change to Fortran semantics would affect any test not involving flang.

Feb 14 2022, 6:14 AM · Restricted Project, Restricted Project

Feb 11 2022

alexgatea added a comment to D119566: [flang] Fix edge case in USE-associated generics.

Just want to give you a heads-up that there are 3 LIT failures for to this commit:
TestCases/Linux/asan_dlopen_test.cpp
TestCases/Integer/sub-overflow.cpp
TestCases/Integer/uadd-overflow.cpp
Please investigate.

Feb 11 2022, 6:56 PM · Restricted Project, Restricted Project