Page MenuHomePhabricator

xur (Rong Xu)
User

Projects

User does not belong to any projects.

User Details

User Since
Aug 20 2015, 4:19 PM (269 w, 4 d)

Recent Activity

Sep 11 2020

xur accepted D87417: [MachineBasicBlock] Fix a typo in function copySuccessor.

Yes. This looks a typo to me too.

Sep 11 2020, 1:40 PM · Restricted Project

Jul 27 2020

xur updated the diff for D83024: [PGO] Instrument function entry BB by default in IR PGO.

Update the patch after committing the support in a separated patch:
commit 50da55a58534e9207d8d5e31c8b4b5cf0c624175

Jul 27 2020, 11:16 AM · Restricted Project

Jul 24 2020

xur committed rG1dd39b113313: [PGO] Fix incorrect function entry count (authored by xur).
[PGO] Fix incorrect function entry count
Jul 24 2020, 5:41 PM
xur closed D84378: [PGO] Fix incorrect function entry count.
Jul 24 2020, 5:40 PM · Restricted Project
xur committed rG31bd15c56244: [PGO][InstrProf] Do not promote count if the exit blocks contains ret… (authored by xur).
[PGO][InstrProf] Do not promote count if the exit blocks contains ret…
Jul 24 2020, 5:39 PM
xur committed rG5546c2ab42d4: Revert "[PGO][InstrProf] Do not promote count if the exit blocks contains ret… (authored by xur).
Revert "[PGO][InstrProf] Do not promote count if the exit blocks contains ret…
Jul 24 2020, 5:36 PM
xur added a reverting change for rG6fdc6f6c7d34: [PGO][InstrProf] Do not promote count if the exit blocks contains ret…: rG5546c2ab42d4: Revert "[PGO][InstrProf] Do not promote count if the exit blocks contains ret….
Jul 24 2020, 5:36 PM
xur committed rGdcf1bca0de3b: Revert "[PGO][InstrProf] Do not promote count if the exit blocks contains ret… (authored by xur).
Revert "[PGO][InstrProf] Do not promote count if the exit blocks contains ret…
Jul 24 2020, 5:34 PM
xur added a reverting change for rG867ef4472d8e: [PGO][InstrProf] Do not promote count if the exit blocks contains ret…: rGdcf1bca0de3b: Revert "[PGO][InstrProf] Do not promote count if the exit blocks contains ret….
Jul 24 2020, 5:34 PM
xur committed rG867ef4472d8e: [PGO][InstrProf] Do not promote count if the exit blocks contains ret… (authored by xur).
[PGO][InstrProf] Do not promote count if the exit blocks contains ret…
Jul 24 2020, 5:24 PM
xur committed rG6fdc6f6c7d34: [PGO][InstrProf] Do not promote count if the exit blocks contains ret… (authored by xur).
[PGO][InstrProf] Do not promote count if the exit blocks contains ret…
Jul 24 2020, 5:15 PM
xur closed D84379: PGO][InstrProf] Do not promote count if the exit blocks contains ret instruction.
Jul 24 2020, 5:15 PM · Restricted Project

Jul 23 2020

xur added inline comments to D84378: [PGO] Fix incorrect function entry count.
Jul 23 2020, 4:57 PM · Restricted Project
xur added inline comments to D84378: [PGO] Fix incorrect function entry count.
Jul 23 2020, 4:49 PM · Restricted Project
xur added inline comments to D84378: [PGO] Fix incorrect function entry count.
Jul 23 2020, 9:30 AM · Restricted Project

Jul 22 2020

Herald added a project to D84379: PGO][InstrProf] Do not promote count if the exit blocks contains ret instruction: Restricted Project.
Jul 22 2020, 7:08 PM · Restricted Project
Herald added a project to D84378: [PGO] Fix incorrect function entry count: Restricted Project.
Jul 22 2020, 7:03 PM · Restricted Project
xur committed rG50da55a58534: [PGO] Supporting code for always instrumenting entry block (authored by xur).
[PGO] Supporting code for always instrumenting entry block
Jul 22 2020, 3:03 PM
xur closed D84261: [PGO] Supporting code for always instrumenting entry block.
Jul 22 2020, 3:03 PM · Restricted Project, Restricted Project
xur updated the diff for D84261: [PGO] Supporting code for always instrumenting entry block.

Addressed review comments from David.

Jul 22 2020, 12:01 PM · Restricted Project, Restricted Project
xur added inline comments to D84261: [PGO] Supporting code for always instrumenting entry block.
Jul 22 2020, 10:24 AM · Restricted Project, Restricted Project

Jul 21 2020

Herald added a project to D84261: [PGO] Supporting code for always instrumenting entry block: Restricted Project.
Jul 21 2020, 12:07 PM · Restricted Project, Restricted Project

Jul 17 2020

xur updated the diff for D83024: [PGO] Instrument function entry BB by default in IR PGO.

Changed the implementation based on review comments.
Now we will not change the version of the index profile.
We will use bit 58 in the profile header to indicate if
we always instrument the entry block. This applies
to both raw and index format.

Jul 17 2020, 10:05 AM · Restricted Project

Jul 1 2020

xur created D83024: [PGO] Instrument function entry BB by default in IR PGO.
Jul 1 2020, 11:57 PM · Restricted Project

Jun 26 2020

xur committed rGb4bceb94eeb3: [PGO] Add a functionality to always instrument the func entry BB (authored by xur).
[PGO] Add a functionality to always instrument the func entry BB
Jun 26 2020, 10:56 AM
xur closed D82123: [PGO] Add a functionality to always instrument the func entry BB.
Jun 26 2020, 10:56 AM · Restricted Project

Jun 18 2020

xur created D82123: [PGO] Add a functionality to always instrument the func entry BB.
Jun 18 2020, 1:38 PM · Restricted Project

May 29 2020

xur added a comment to D80618: Extend InvokeInst !prof branch_weights metadata to unwind branches.

Thanks for the fix. We also noticed that the branch weight for invoke instructions were not set properly, even thought we had the profile information in PGO.
I have a check that disables setting the branch weight metadata for IRPGO. Once this patch is in. I can remove that check. Of you can integrate that change into this patch.
It's in PGOUseFunc::setBranchWeights(). Just white-list InvokeInst.

May 29 2020, 11:27 AM · Restricted Project

May 19 2020

xur added a comment to D79902: [IR] Make Module::setProfileSummary to replace an existing ProfileSummary flag..

I noticed the same issue when I implemented CSFDO -- I initially reused the same summary name for CSFDO as in FDO.
Exiting of two module flags with the same name sometime breaks the build (not always, if I remember correctly).

May 19 2020, 12:37 PM · Restricted Project

Mar 23 2020

xur added a comment to D62627: [NFC] Do not run CGProfilePass when not using integrated assembler.

look good to me with the fix of comments.

Mar 23 2020, 2:43 PM · Restricted Project, Restricted Project

Mar 5 2020

xur accepted D75499: [cmake] By default do not build compiler-rt with PGO instrumentation or use.

One correction to my previous comment: the default of NOT COMPILER_RT_ENABLE_PGO is true. But I think it's OK, as far as we have a way to build the instrumented version of compiler_rt.

Mar 5 2020, 3:53 PM · Restricted Project, Restricted Project
xur added a comment to D75499: [cmake] By default do not build compiler-rt with PGO instrumentation or use.

The problem here is libclang_rt.fuzzer-x86_64.a is instrumented and contains calls to profile runtime functions like llvm_profile_instrument_target.
When building with fuzzing, libclang_rt.fuzzer-x86_64.a is linked in. We also have the definition of
llvm_profile_instrument_target in the compiler.
But I don't think the compiler knows how to resolve this symbol to itself.

Mar 5 2020, 2:49 PM · Restricted Project, Restricted Project

Mar 4 2020

xur added a comment to D75499: [cmake] By default do not build compiler-rt with PGO instrumentation or use.

From crbug:1018840, it looks libfuzzer does not work with instrumentation. Do you know the reason.
I tried clang PGO bootstrap that enables PGO instrumentation in compiler-rt for stage2 compiler. Everything works fine -- i.e. profile runtime functions in compiel-rt generate a correct profile.

Mar 4 2020, 2:37 PM · Restricted Project, Restricted Project
xur accepted D75065: [cmake] Strip quotes in compiler-rt/lib/crt and explicitly throw error if check executable fails.

LGTM

Mar 4 2020, 2:37 PM · Restricted Project, Restricted Project

Feb 25 2020

xur added a comment to D75065: [cmake] Strip quotes in compiler-rt/lib/crt and explicitly throw error if check executable fails.

Thanks for working on this. Here are a few comments:
(1) I'm not sure why PGO options are passed to compiler-rt. It's probably harmless for -fprofile-use or -fprofile-instr-use as we only use the profile. My concern is we might instrument profdata runtime routine. This can create recursion that leads to run time issue.

Feb 25 2020, 11:24 AM · Restricted Project, Restricted Project
xur committed rG11857d49948b: [remark][diagnostics] [codegen] Fix PR44896 (authored by xur).
[remark][diagnostics] [codegen] Fix PR44896
Feb 25 2020, 8:17 AM
xur closed D74878: [remark][diagnostics] [codegen] Fix PR44896.
Feb 25 2020, 8:17 AM · Restricted Project

Feb 24 2020

xur updated the diff for D74878: [remark][diagnostics] [codegen] Fix PR44896.

Uploaded a wrong patch in the last time.
This is the correct one.

Feb 24 2020, 11:16 AM · Restricted Project
xur updated the diff for D74878: [remark][diagnostics] [codegen] Fix PR44896.

check if the -fdiscard-value-names explicitly in args (suggested by Jeroen and Serge)

Feb 24 2020, 11:07 AM · Restricted Project
xur added a comment to D74878: [remark][diagnostics] [codegen] Fix PR44896.

Gentle ping. Is the newest patch ok?

Feb 24 2020, 8:21 AM · Restricted Project

Feb 21 2020

xur updated the diff for D74878: [remark][diagnostics] [codegen] Fix PR44896.

Update the patch based on the reviews from Mehdi and Serge.
Reuse Sege's warning code in https://reviews.llvm.org/D74871?id=245594.

Feb 21 2020, 9:28 AM · Restricted Project

Feb 20 2020

xur added a comment to D74878: [remark][diagnostics] [codegen] Fix PR44896.

@lebedev.ri maybe we should at least warn the user if there was a flag at clang level to force discarding? That's what I've been doing in https://reviews.llvm.org/D74871?id=245594

Feb 20 2020, 9:15 AM · Restricted Project

Feb 19 2020

xur created D74878: [remark][diagnostics] [codegen] Fix PR44896.
Feb 19 2020, 3:36 PM · Restricted Project

Jan 28 2020

xur added a comment to D73387: [MBP] Partial tail duplication into hot predecessors.

Thanks for working on this. Current Duplication in block-placement does need improvement. We notice that disable it often improved performance.

Jan 28 2020, 2:53 PM · Restricted Project

Jan 14 2020

xur committed rGc9ee5e996e3c: Fix windows bot failures in c410adb092c9cb51ddb0b55862b70f2aa8c5b16f (clang… (authored by xur).
Fix windows bot failures in c410adb092c9cb51ddb0b55862b70f2aa8c5b16f (clang…
Jan 14 2020, 4:34 PM
xur committed rG60d39479221d: [remark][diagnostics] Using clang diagnostic handler for IR input files (authored by xur).
[remark][diagnostics] Using clang diagnostic handler for IR input files
Jan 14 2020, 3:53 PM
xur closed D72523: [remark][diagnostics] Using clang diagnostic handler for IR input files.
Jan 14 2020, 3:52 PM · Restricted Project

Jan 13 2020

xur updated the diff for D72523: [remark][diagnostics] Using clang diagnostic handler for IR input files.

Thanks Teresa for the suggestion: using the print() function in the llvm diagnosticPrinter is a lot better than duplicating the code. I changed the patch to use print() function. Also added comment as suggested by Teresa.

Jan 13 2020, 4:22 PM · Restricted Project
xur updated the diff for D72523: [remark][diagnostics] Using clang diagnostic handler for IR input files.

Integrated Teresa's review comments.

Jan 13 2020, 9:57 AM · Restricted Project
xur added inline comments to D72523: [remark][diagnostics] Using clang diagnostic handler for IR input files.
Jan 13 2020, 9:19 AM · Restricted Project

Jan 10 2020

xur created D72523: [remark][diagnostics] Using clang diagnostic handler for IR input files.
Jan 10 2020, 10:22 AM · Restricted Project

Oct 10 2019

xur committed rG686fa4bbfbce: [ValueTracking] Improve pointer offset computation for cases of same base (authored by xur).
[ValueTracking] Improve pointer offset computation for cases of same base
Oct 10 2019, 2:34 PM
xur closed D67989: [ValueTracking] Improve pointer offset computation for cases of same base.
Oct 10 2019, 2:34 PM · Restricted Project
xur committed rL374454: [ValueTracking] Improve pointer offset computation for cases of same base.
[ValueTracking] Improve pointer offset computation for cases of same base
Oct 10 2019, 2:34 PM
xur added a comment to D67989: [ValueTracking] Improve pointer offset computation for cases of same base.

I totally agree with what eugenis said.
I added his comments to a TODO comment.
I will commit this version and may address the TODO later.

Oct 10 2019, 11:31 AM · Restricted Project

Oct 2 2019

xur accepted D67920: [PGO] Refactor Value Profiling into a plugin based oracle and create a well defined API for the plugins..

Thanks for improving this.

Oct 2 2019, 10:51 AM · Restricted Project

Oct 1 2019

xur added inline comments to D67920: [PGO] Refactor Value Profiling into a plugin based oracle and create a well defined API for the plugins..
Oct 1 2019, 2:42 PM · Restricted Project
xur added a comment to D67920: [PGO] Refactor Value Profiling into a plugin based oracle and create a well defined API for the plugins..

Sorry it takes long to review this.
I have a pending patch that value profiling the expensive MOD/REM instructions. It is more tightly coupled to edge profile (than current mem-size-op and icall value profile).
The difference is that it does not have <valuesite, value> pair. The counts are stored like the edge counts.
It seems to be fine with patch as the instrumentation says in PGOInstrumenation.cpp and only the candidate collecting is extracted out.

Oct 1 2019, 11:42 AM · Restricted Project
xur committed rGe0fa2689de53: [PGO] Fix typos from r359612. NFC. (authored by xur).
[PGO] Fix typos from r359612. NFC.
Oct 1 2019, 11:07 AM
xur committed rL373369: [PGO] Fix typos from r359612. NFC..
[PGO] Fix typos from r359612. NFC.
Oct 1 2019, 11:07 AM
xur added a reviewer for D67989: [ValueTracking] Improve pointer offset computation for cases of same base: fhahn.
Oct 1 2019, 10:47 AM · Restricted Project
xur edited reviewers for D67989: [ValueTracking] Improve pointer offset computation for cases of same base, added: eugenis; removed: evghenii.
Oct 1 2019, 10:39 AM · Restricted Project

Sep 30 2019

xur committed rG367405008755: [PGO] Don't group COMDAT variables for compiler generated profile variables in… (authored by xur).
[PGO] Don't group COMDAT variables for compiler generated profile variables in…
Sep 30 2019, 11:11 AM
xur committed rL373241: [PGO] Don't group COMDAT variables for compiler generated profile variables in….
[PGO] Don't group COMDAT variables for compiler generated profile variables in…
Sep 30 2019, 11:11 AM
xur closed D68041: [PGO] Don't group COMDAT variables for compiler generated profile variables in ELF.
Sep 30 2019, 11:10 AM · Restricted Project

Sep 25 2019

xur created D68041: [PGO] Don't group COMDAT variables for compiler generated profile variables in ELF.
Sep 25 2019, 11:31 AM · Restricted Project
xur updated the diff for D67989: [ValueTracking] Improve pointer offset computation for cases of same base.

Fixed comments suggested by Guillaume.

Sep 25 2019, 9:57 AM · Restricted Project

Sep 24 2019

xur created D67989: [ValueTracking] Improve pointer offset computation for cases of same base.
Sep 24 2019, 2:56 PM · Restricted Project

Sep 13 2019

xur added a comment to D67579: [PGO] Use linkonce_odr linkage for __profd_ variables in comdat groups.

For the legacy pass manager, use option "-mllvm -debug-pass=Structure", or in the source, we add the lowering pass right after instrumentation pass.

Sep 13 2019, 4:27 PM · Restricted Project
xur accepted D67579: [PGO] Use linkonce_odr linkage for __profd_ variables in comdat groups.

LGTM. Thanks for the fix!

Sep 13 2019, 4:06 PM · Restricted Project

Aug 2 2019

xur committed rG206fe82be410: [PGO] Fix bolt failures from r367628 (authored by xur).
[PGO] Fix bolt failures from r367628
Aug 2 2019, 12:22 AM
xur committed rL367657: [PGO] Fix bolt failures from r367628.
[PGO] Fix bolt failures from r367628
Aug 2 2019, 12:21 AM

Aug 1 2019

xur committed rGca161fa00886: [PGO] Add PGO support at -O0 in the experimental new pass manager (authored by xur).
[PGO] Add PGO support at -O0 in the experimental new pass manager
Aug 1 2019, 3:39 PM
xur committed rL367628: [PGO] Add PGO support at -O0 in the experimental new pass manager.
[PGO] Add PGO support at -O0 in the experimental new pass manager
Aug 1 2019, 3:36 PM
xur closed D64029: [PGO] Add PGO support at -O0 in the experimental new pass manager.
Aug 1 2019, 3:36 PM · Restricted Project
xur added inline comments to D64029: [PGO] Add PGO support at -O0 in the experimental new pass manager.
Aug 1 2019, 2:59 PM · Restricted Project

Jul 29 2019

xur updated the diff for D64029: [PGO] Add PGO support at -O0 in the experimental new pass manager.

Integrated Chandler's review comments.

Jul 29 2019, 3:28 PM · Restricted Project
xur added a comment to D64029: [PGO] Add PGO support at -O0 in the experimental new pass manager.

I'm sorry that I missed this review for this long!

Jul 29 2019, 3:22 PM · Restricted Project

Jul 9 2019

xur added a comment to D64029: [PGO] Add PGO support at -O0 in the experimental new pass manager.

Ping

Jul 9 2019, 11:03 AM · Restricted Project

Jul 8 2019

xur committed rGc23da4824668: [llvm-profdata] Fix buildbot failure on llvm-clang-x86_64-expensive-checks-win (authored by xur).
[llvm-profdata] Fix buildbot failure on llvm-clang-x86_64-expensive-checks-win
Jul 8 2019, 3:19 PM
xur committed rL365401: [llvm-profdata] Fix buildbot failure on llvm-clang-x86_64-expensive-checks-win.
[llvm-profdata] Fix buildbot failure on llvm-clang-x86_64-expensive-checks-win
Jul 8 2019, 3:19 PM
xur committed rGf0d3dcec97a1: llvm-profdata] Handle the cases of overlapping input file and output file (authored by xur).
llvm-profdata] Handle the cases of overlapping input file and output file
Jul 8 2019, 2:06 PM
xur committed rL365386: llvm-profdata] Handle the cases of overlapping input file and output file.
llvm-profdata] Handle the cases of overlapping input file and output file
Jul 8 2019, 2:03 PM
xur closed D64360: [llvm-profdata] Handle the cases of overlapping input file and output file.
Jul 8 2019, 2:03 PM · Restricted Project
xur updated the diff for D64360: [llvm-profdata] Handle the cases of overlapping input file and output file.

Change the error report format suggested by David.

Jul 8 2019, 12:52 PM · Restricted Project
xur created D64360: [llvm-profdata] Handle the cases of overlapping input file and output file.
Jul 8 2019, 12:03 PM · Restricted Project

Jul 3 2019

xur added a comment to D63949: [PGO] Add profile instrumentation sampling support.

Does the bursty style sampling provide additional benefit? A non-bursty style sampling can be cheaper:

sample_count++;
if (sample_count == SamplePeriod) {

increment_prof_counter();
 sample_count = 0;

}

Jul 3 2019, 2:39 PM · Restricted Project

Jul 1 2019

xur updated the diff for D64029: [PGO] Add PGO support at -O0 in the experimental new pass manager.

Sent the wrong test file in last patch.
Update to the correct one.

Jul 1 2019, 12:59 PM · Restricted Project
xur created D64029: [PGO] Add PGO support at -O0 in the experimental new pass manager.
Jul 1 2019, 12:23 PM · Restricted Project

Jun 28 2019

xur added a comment to D63155: [clang][NewPM] Fix broken profile test.
In D63155#1563229, @xur wrote:

This patch does not make sense to me.

The reason of failing with -fexperimental-new-pass-manager is because we don't do PGO instrumentation at -O0. This is due to the fact that PGO instrumentation/use passes are under PassBuilder::buildPerModuleDefaultPipeline.

This patch add a pass
MPM.addPass(PGOInstrumentationGenCreateVar(PGOOpt->ProfileFile));
which only gives you the wrong signal of instrumentation is done.

I wrote pass PGOInstrumentationGenCreateVar only for some trick interactions for thinlto under ldd for CSPGO.
Regular FDO should not use it.

The right fix is to enable PGO instrumentation and use in pass builder for O0.

I would like to request to revert this patch.

As an alternative, could I instead request that we remove the BackendUtil changes and just mark the runs in gcc-flag-compatibility.c with -fno-experimental-new-pass-manager. This way we could clarify that under the new PM, we shouldn't run PGO at -O0? If not, I'll revert this patch as is.

No, I think we should be doing PGO at O0 in the new PM if we do so in the old PM.

I think Rong is saying that the *way* you're enabling PGO at O0 isn't correct to fix this test case. That seems plausible to me at least, and I think reverting and figuring out what the right way to do it is a fine approach.

Jun 28 2019, 5:09 PM · Restricted Project, Restricted Project
xur added a comment to D63155: [clang][NewPM] Fix broken profile test.

they are not doing the exacly the same thing for old pass manager and new pass manger: old pass manger is doing instrumentation, while the new pass manager with this change is NOT.
the test is not check instrumentation, (it only check the variables that generates by InstroProfiling pass).
In this sense, the test is not well written.

Jun 28 2019, 5:09 PM · Restricted Project, Restricted Project
xur added a comment to D63155: [clang][NewPM] Fix broken profile test.

This patch does not make sense to me.

Jun 28 2019, 4:46 PM · Restricted Project, Restricted Project
xur created D63949: [PGO] Add profile instrumentation sampling support.
Jun 28 2019, 11:50 AM · Restricted Project

Jun 10 2019

xur committed rG7ea131c20c11: [PGO] Fix the buildbot failure in r362995 (authored by xur).
[PGO] Fix the buildbot failure in r362995
Jun 10 2019, 4:17 PM
xur committed rL363004: [PGO] Fix the buildbot failure in r362995.
[PGO] Fix the buildbot failure in r362995
Jun 10 2019, 4:16 PM
xur committed rGe44fa83c3744: [PGO] Handle cases of non-instrument BBs (authored by xur).
[PGO] Handle cases of non-instrument BBs
Jun 10 2019, 3:34 PM
xur committed rL362995: [PGO] Handle cases of non-instrument BBs.
[PGO] Handle cases of non-instrument BBs
Jun 10 2019, 3:34 PM
xur closed D62700: [PGO] Handle cases of non-instrument BBs.
Jun 10 2019, 3:34 PM · Restricted Project
xur updated the diff for D62700: [PGO] Handle cases of non-instrument BBs.

Integrated David's review suggestions.

Jun 10 2019, 2:55 PM · Restricted Project
xur added a comment to D62700: [PGO] Handle cases of non-instrument BBs.

This can be handled this way:

BBInfo &SrcInfo = getBBInfo(SrcBB);    // BBInfo is the template type
BBInfo &DestInfo = getBBInfo(DestBB);
SrcInfo.addOutEdge(E.get());
DestInfo.addInEdge(E.get());

For base class BBInfo, addOutEdge, addInEdge will be empty, while it is defined for UseBBInfo class.

By so doing, the code is more readable.

Jun 10 2019, 2:55 PM · Restricted Project