Page MenuHomePhabricator
Feed Advanced Search

Mon, Apr 15

vsk added a comment to D60586: [Clang] Conversion of a switch table to a bitmap is not profitable for -Os and -Oz compilation.

Why shouldn't llvm simply pick the right behavior for -Os/-Oz automatically?

Mon, Apr 15, 3:28 PM · Restricted Project

Fri, Apr 12

vsk accepted D59790: [DebugInfo][Docs] Document how variable location metadata is transformed through target codegen.

Looks great, thanks!

Fri, Apr 12, 3:53 PM · Restricted Project
vsk added a comment to D60612: Cowardly refuse to insert instructions after a terminator..

Thanks for working on this. Two thoughts:

Fri, Apr 12, 8:13 AM · Restricted Project

Mon, Apr 8

vsk added a comment to D57265: [PM/CC1] Add -f[no-]split-cold-code CC1 options to toggle splitting.

Ping.

Mon, Apr 8, 9:40 AM · Restricted Project
vsk added a comment to D59715: [HotColdSplit] Reflect full cost of parameters in split penalty.

Ping.

Mon, Apr 8, 9:37 AM · Restricted Project

Thu, Apr 4

Herald added a project to D28390: [DWARF] LICM should null out the debug loc of hoisted loop invariant instructions: Restricted Project.

As an alternative to removing the debug location, what about setting a line 0 location (with appropriate scope/inlinedAt info) to the hoisted instruction? It seems like that allows debuggers to give more helpful/specific backtraces. It also doesn't affect stepping (at least not in lldb, which collapses line 0 ranges). Example:

Thu, Apr 4, 9:40 PM · Restricted Project

Wed, Apr 3

vsk updated subscribers of D60209: If conversion to conditional select for -Oz or -Os unprofitable for single operation blocks.

Thanks for working on this. I’d suggest splitting this into a sequence of three patches (with tests and accompanying code size numbers), so its effects can be understood better.

Wed, Apr 3, 10:54 AM

Tue, Apr 2

vsk added inline comments to D59790: [DebugInfo][Docs] Document how variable location metadata is transformed through target codegen.
Tue, Apr 2, 7:20 PM · Restricted Project
vsk added a comment to D59790: [DebugInfo][Docs] Document how variable location metadata is transformed through target codegen.

Thanks so much for writing this down! Imho this is in pretty good shape (better than the drafts of similar docs I've thrown away). I've taken a look at the first third. I'll try to give a more detailed pass over the remaining bits later.

Tue, Apr 2, 7:08 PM · Restricted Project
vsk committed rG37b0f9ad9531: [os_log] Mark os_log_helper `nounwind` (authored by vsk).
[os_log] Mark os_log_helper `nounwind`
Tue, Apr 2, 10:43 AM
vsk committed rG9da8a68d6b54: [ArgPromotion] Set debug location at updated callsites (authored by vsk).
[ArgPromotion] Set debug location at updated callsites
Tue, Apr 2, 10:42 AM
vsk committed rGc6bceec01a4b: [DebugInfo] Fix pr41180 : Loop Vectorization Debugify Failure (authored by vsk).
[DebugInfo] Fix pr41180 : Loop Vectorization Debugify Failure
Tue, Apr 2, 10:28 AM
vsk added a comment to D34499: Expose __gcov_flush for parity with libgcov in the gcc project.

Sorry for the delay here. I am hitting two test failures with this patch applied on Darwin. Could you take a look?

Tue, Apr 2, 10:20 AM · Restricted Project, Restricted Project

Mon, Apr 1

vsk created D60113: [ArgPromotion] Set debug location at updated callsites.
Mon, Apr 1, 10:42 PM · Restricted Project
vsk created D60108: [os_log] Mark os_log_helper `nounwind`.
Mon, Apr 1, 6:43 PM · Restricted Project
vsk accepted D59944: [DebugInfo] Fix pr41180 : Loop Vectorization Debugify Failure.

Thanks, lgtm.

Mon, Apr 1, 12:07 PM · Restricted Project

Fri, Mar 29

vsk added a comment to D59715: [HotColdSplit] Reflect full cost of parameters in split penalty.

Ping.

Fri, Mar 29, 11:45 AM · Restricted Project

Mon, Mar 25

vsk updated the diff for D57265: [PM/CC1] Add -f[no-]split-cold-code CC1 options to toggle splitting.

Use a function attribute to implement the -fsplit-cold-code option. This removes some complexity from the old/new PMs and ensures consistent behavior when LTO is enabled.

Mon, Mar 25, 2:43 PM · Restricted Project

Fri, Mar 22

vsk added a comment to D57265: [PM/CC1] Add -f[no-]split-cold-code CC1 options to toggle splitting.
In D57265#1393453, @vsk wrote:

I'd prefer not adding this kind of state to PassBuilder. SplitColdCode is soemthing that refers to the construction of one particular pipeline, not to pipeline-building in general. It should be an argument passed down through the build*Pipeline calls.

I'm not sure I understand the distinction being made here -- could you elaborate? Isn't enabling a pass related to pipeline-building in general? If not, I don't see how arguments to build*Pipeline do become related to pipeline-building in general.

For context, I've modeled the addition of the SplitColdCode member to PassBuilder on PGOOpt (c.f. PGOOptions::RunProfileGen). One thing I like about this approach is that it doesn't require changing IR, or changing very many different APIs. But if it's really not reasonable, I'm happy to take another shot at it.

I cant say for PGOOpt in particular, but overall idea of PassBuilder is that, well, it is not "builder" as per "builder pattern".
You do not fill it with parts of a complex pipeline object and then press a magical "build" button.
Instead you ask it to build various "named" pipelines, or just parse it from text.
If you compare with PassManagerBuilder, which contains a dozen of various data members that seem to drive the pipeline construction,
PassBuilder contains only a few. And the purpose of PassBuilder members is to be used during individual *pass*es creation.

Say, you wont find OptLevel there. Instead it is being passed as an argument to build*Pipeline functions.

As for PGOOpts - it seems to be the only member that stands out.
And to me it looks like we should remove it from PassBuilder either, and start passing it to build*Pipeline functions as well.
But honestly, this is the first time I really looked through the PGOOpts code, so I might be well mistaken.

Fri, Mar 22, 3:38 PM · Restricted Project
vsk updated the diff for D59715: [HotColdSplit] Reflect full cost of parameters in split penalty.
  • Increase test coverage.
Fri, Mar 22, 2:24 PM · Restricted Project
vsk created D59715: [HotColdSplit] Reflect full cost of parameters in split penalty.
Fri, Mar 22, 1:47 PM · Restricted Project

Mar 18 2019

vsk added a comment to D59417: [GVN] Add default debug location when constructing PHI nodes.
In D59417#1431369, @vsk wrote:

As for instructions at the start of the block - I'm pretty sure that a while back @probinson made a change to ensure that cascade locations couldn't occur at the start of a block (that we'd set to line zero down in the AsmPrinter/DwarfDebug if that occurred) so we shouldn't end up with super weird/layout-based cascade locations for instructions generated from phis at the start of blocks.

That makes sense. What if a block has multiple phis? I.e. if the first phi in a block has a location but the second phi doesn't, is that a bug, or do we expect the location to cascade?

Locations cascade, with one exception: If the first instruction after a label does not have an explicit source location, we emit line 0.

Mar 18 2019, 10:42 AM · Restricted Project

Mar 15 2019

vsk added a comment to D59417: [GVN] Add default debug location when constructing PHI nodes.
Phis often cannot assume a previous location (say, if they're at the start of a block).

Not sure I follow this bit - setting a zero location doesn't make them any easier to debug, does it? Or was it that the "cascade location" (whatever the previous instruction was) the source of confusion?

Mar 15 2019, 1:16 PM · Restricted Project
vsk added a comment to D59417: [GVN] Add default debug location when constructing PHI nodes.

I believe this is a patch to fix PR37964?

Hrm - if debugify diagnoses all instances of instructions without locations as buggy, that sounds very noisy to me. How does it handle all the other cases of merged locations that end up with no location? (if my recollection is accurate and the code is still doing this - merged locations that aren't the same and that aren't calls get no location, not a zero location)

Mar 15 2019, 11:31 AM · Restricted Project

Mar 14 2019

vsk accepted D59277: Speeding up llvm-cov export with multithreaded renderFiles implementation..

Thanks, lgtm.

Mar 14 2019, 9:12 AM · Restricted Project

Mar 13 2019

vsk added a comment to D59277: Speeding up llvm-cov export with multithreaded renderFiles implementation..

Thanks for working on this!

Mar 13 2019, 4:40 PM · Restricted Project
vsk added inline comments to D59277: Speeding up llvm-cov export with multithreaded renderFiles implementation..
Mar 13 2019, 10:40 AM · Restricted Project
vsk added a reviewer for D59288: [DebugInfoMetadata] Move main subprogram DIFlag into DISPFlags: steven_wu.

+ Steven, is debug info bitcode backwards compatibility important for the App Store? (I’m not 100% sure, but I think it is, in which case we’d need to 1) detect old DI metadata and 2) auto upgrade it?)

Mar 13 2019, 8:14 AM · Restricted Project

Mar 11 2019

vsk accepted D59206: [SimplifyCFG] Retain debug info when threading jumps with critical edges.

Thanks, looks great (and thanks to @gbedwell for finding this)!

Mar 11 2019, 8:58 AM · Restricted Project

Mar 8 2019

vsk accepted D58963: [JumpThreading] Retain debug info when replacing branch instructions.

Thanks, lgtm as well.

Mar 8 2019, 11:45 AM · Restricted Project

Mar 1 2019

vsk added a comment to D58726: [DebugInfo][Docs] Explicitly document how dbg.value intrinsics are interpreted in optimized code.

+1, thanks for codifying all of this!

Mar 1 2019, 4:32 PM · Restricted Project

Feb 28 2019

vsk added a comment to D58737: [InstrProf] Use separate comdat group for data and counters.
In D58737#1412846, @rnk wrote:

Oops, forgot to respond to this...

In D58737#1412734, @vsk wrote:

I'm confused by this wording re: comdats in the LangRef: "All global objects that specify this key will only end up in the final object file if the linker chooses that key over some other key". Why can multiple global objects with the same comdat key end up in the final object file?

These words are trying to say that, some number of global objects can use a comdat key. If the object file they are contained in has the prevailing definition of that comdat key, then they will be included, and they will be discarded if not. The prevailing object is typically just the first object file that uses the comdat.

So, multiple objects from *one TU* can use the key and end up in the final binary, but objects from different TUs will never end up mixed together in the final binary.

Feb 28 2019, 10:38 AM · Restricted Project, Restricted Project, Restricted Project

Feb 27 2019

vsk added a comment to D58737: [InstrProf] Use separate comdat group for data and counters.

I'm confused by this wording re: comdats in the LangRef: "All global objects that specify this key will only end up in the final object file if the linker chooses that key over some other key". Why can multiple global objects with the same comdat key end up in the final object file?

Feb 27 2019, 2:40 PM · Restricted Project, Restricted Project, Restricted Project

Feb 26 2019

vsk committed rG73522d167890: [HotColdSplit] Disable splitting for sanitized functions (authored by vsk).
[HotColdSplit] Disable splitting for sanitized functions
Feb 26 2019, 2:55 PM
vsk accepted D58691: [MS] Don't emit coverage for deleting dtors.

Thanks! Lgtm.

Feb 26 2019, 12:11 PM · Restricted Project, Restricted Project
vsk added inline comments to D58691: [MS] Don't emit coverage for deleting dtors.
Feb 26 2019, 11:39 AM · Restricted Project, Restricted Project

Feb 25 2019

vsk accepted D58661: [llvm-cov] Fix llvm-cov on Windows and un-XFAIL test.
Feb 25 2019, 6:14 PM · Restricted Project, Restricted Project
vsk added a comment to D58661: [llvm-cov] Fix llvm-cov on Windows and un-XFAIL test.

I suppose Names{Start,End} are needed on Windows so that we can find section boundaries.

Feb 25 2019, 6:14 PM · Restricted Project, Restricted Project

Feb 21 2019

vsk added inline comments to D58044: [DwarfDebug] Dump call site debug info into DWARF.
Feb 21 2019, 11:46 AM · debug-info
vsk added inline comments to D58044: [DwarfDebug] Dump call site debug info into DWARF.
Feb 21 2019, 11:26 AM · debug-info
vsk accepted D34499: Expose __gcov_flush for parity with libgcov in the gcc project.

Thanks, LGTM. If you don't have commit access, let me know and I can land this on your behalf.

Feb 21 2019, 11:21 AM · Restricted Project, Restricted Project
vsk added reviewers for D58035: [clang/DIVar] Emit flag for params that have unchanged values: bricci, rsmith.

+ rsmith, + bricci for review.

Feb 21 2019, 11:02 AM · debug-info

Feb 20 2019

vsk added inline comments to D34499: Expose __gcov_flush for parity with libgcov in the gcc project.
Feb 20 2019, 11:14 AM · Restricted Project, Restricted Project

Feb 19 2019

vsk committed rGa0b972547978: [llvm-cov] Add support for gcov --hash-filenames option (authored by vsk).
[llvm-cov] Add support for gcov --hash-filenames option
Feb 19 2019, 12:45 PM
vsk accepted D58370: [llvm-cov] Add support for gcov --hash-filenames option..

Hi @iignatev, thanks for the patch. LGTM.

Feb 19 2019, 10:49 AM · Restricted Project

Feb 15 2019

vsk committed rG5f5cac3ae29d: [CodeExtractor] Do not lift lifetime.end markers for region inputs (authored by vsk).
[CodeExtractor] Do not lift lifetime.end markers for region inputs
Feb 15 2019, 10:47 AM
vsk committed rG47a0c9b69cd7: [HotColdSplit] Schedule splitting late to fix perf regression (authored by vsk).
[HotColdSplit] Schedule splitting late to fix perf regression
Feb 15 2019, 10:47 AM

Feb 14 2019

vsk updated the diff for D58258: [HotColdSplit] Schedule splitting late to fix perf regression.
  • Add a NewPM LTO pre-link test.
  • Schedule splitting at the same point in the old & new PM's.
Feb 14 2019, 5:24 PM · Restricted Project
vsk updated subscribers of D58258: [HotColdSplit] Schedule splitting late to fix perf regression.
Feb 14 2019, 4:47 PM · Restricted Project
vsk added a comment to D57805: [HotColdSplit] Move splitting after instrumented PGO use.

... I will try moving the splitting to after the ThinLTO backend (post-thinlink) inlining and see what effect there is. Theoretically we should be getting more accurate importing/inlining, it would be good to understand where this is going wrong if not!

Feb 14 2019, 3:37 PM · Restricted Project
vsk accepted D58259: Fixed failure on Darwin due to r354064.

Thanks, lgtm.

Feb 14 2019, 3:36 PM · Restricted Project
vsk created D58258: [HotColdSplit] Schedule splitting late to fix perf regression.
Feb 14 2019, 3:27 PM · Restricted Project
vsk created D58253: [CodeExtractor] Do not lift lifetime.end markers for region inputs.
Feb 14 2019, 2:07 PM · Restricted Project
vsk added a comment to D57834: [CodeExtractor] Only lift lifetime markers present in the extraction region.

In this example there are two possible entry points in region, so it can't be extracted (first block in region should dominate the others). Maybe there are better examples of issue?

Feb 14 2019, 2:07 PM · Restricted Project
vsk updated subscribers of D57986: [ProfileData] Sort FuncData before iteration to remove non-determinism.

I think this could roughly double the memory utilization of the writer, which might be problematic because the number of records to write can be high. (@dblaikie did some work on reducing memory usage in this area, he might have hard data about this.)

Feb 14 2019, 10:46 AM · Restricted Project, Restricted Project

Feb 13 2019

vsk added a comment to D57834: [CodeExtractor] Only lift lifetime markers present in the extraction region.

@kachkov98 @davidxl apologies, but this patch is still not correct.

Feb 13 2019, 6:20 PM · Restricted Project
vsk accepted D58156: [Sanitizer] On Darwin `__sanitizer_print_stack_trace` only prints topmost frame.

Thanks, LGTM. Could you wait for another +1? It's been a while since I've looked at this code, and I think another review would help make sure this is safe.

Feb 13 2019, 1:08 PM · Restricted Project, Restricted Project
vsk committed rG4b0cc9a7c80f: [CodeExtractor] Only lift lifetime markers present in the extraction region (authored by vsk).
[CodeExtractor] Only lift lifetime markers present in the extraction region
Feb 13 2019, 11:56 AM

Feb 11 2019

vsk accepted D58071: Fix auto-upgrade for the new parameter to llvm.objectsize.

Thanks, lgtm. Steven?

Feb 11 2019, 1:18 PM · Restricted Project
vsk added a comment to D57805: [HotColdSplit] Move splitting after instrumented PGO use.
In D57805#1393416, @vsk wrote:

@tejohnson have you had a chance to evaluate performance with IR-PGO + splitting enabled?

I have one data point, more below.

Our internal CI shows performance regressions on SPEC/CINT2000 with FE-PGO + splitting enabled. Allowing inlining of split functions reduces the perf regression,

This is controlled by the MinSize attribute, right?

Feb 11 2019, 12:37 PM · Restricted Project
vsk added a comment to D57265: [PM/CC1] Add -f[no-]split-cold-code CC1 options to toggle splitting.

I'd prefer not adding this kind of state to PassBuilder. SplitColdCode is soemthing that refers to the construction of one particular pipeline, not to pipeline-building in general. It should be an argument passed down through the build*Pipeline calls.

Feb 11 2019, 11:41 AM · Restricted Project
vsk added a comment to D57805: [HotColdSplit] Move splitting after instrumented PGO use.

@tejohnson have you had a chance to evaluate performance with IR-PGO + splitting enabled?

Feb 11 2019, 11:13 AM · Restricted Project

Feb 8 2019

vsk retitled D57985: [test-suite] Add cmake option to use IR PGO (TEST_SUITE_USE_IR_PGO) from Add cmake option to use IR PGO (TEST_SUITE_USE_IR_PGO) to [test-suite] Add cmake option to use IR PGO (TEST_SUITE_USE_IR_PGO).
Feb 8 2019, 4:17 PM · Restricted Project
vsk created D57985: [test-suite] Add cmake option to use IR PGO (TEST_SUITE_USE_IR_PGO).
Feb 8 2019, 4:17 PM · Restricted Project
Herald added a project to D56761: Add a parameter to the objectsize intrinsic that controls whether to evaluate size dynamically: Restricted Project.

I think this breaks bitcode backwards compatibility:

Feb 8 2019, 1:21 PM · Restricted Project
vsk committed rG0e5dd512aae0: [CodeExtractor] Restore outputs after creating exit stubs (authored by vsk).
[CodeExtractor] Restore outputs after creating exit stubs
Feb 8 2019, 12:50 PM
vsk accepted D57957: [NFC] Avoid passing blocks vector to the OutlineRegionInfo constructor by value..

Thanks, lgtm.

Feb 8 2019, 12:08 PM · Restricted Project
vsk accepted D57919: [CodeExtractor] Restore outputs after creating exit stubs.

Thanks for doing this! LGTM with a simple change.

Feb 8 2019, 10:56 AM · Restricted Project
vsk added inline comments to D57957: [NFC] Avoid passing blocks vector to the OutlineRegionInfo constructor by value..
Feb 8 2019, 10:03 AM · Restricted Project
vsk added reviewers for D57957: [NFC] Avoid passing blocks vector to the OutlineRegionInfo constructor by value.: fhahn, davidxl.
Feb 8 2019, 10:03 AM · Restricted Project

Feb 7 2019

vsk added a comment to D57919: [CodeExtractor] Restore outputs after creating exit stubs.

Thanks! This mostly looks good, and I believe it resolves llvm.org/PR40455.

Feb 7 2019, 12:06 PM · Restricted Project
vsk accepted D57900: [HotColdSplit] With PGO add profile entry metadata to split cold function.

Thanks, lgtm.

Feb 7 2019, 9:48 AM · Restricted Project

Feb 6 2019

vsk accepted D57215: [CodeExtractor] Update function's assumption cache after extracting blocks from it.

LGTM, but, please wait for a +1 from someone more familiar with AssumptionCache before committing.

Feb 6 2019, 3:30 PM · Restricted Project
vsk updated the diff for D57265: [PM/CC1] Add -f[no-]split-cold-code CC1 options to toggle splitting.

Rebase.

Feb 6 2019, 2:16 PM · Restricted Project
vsk added reviewers for D57265: [PM/CC1] Add -f[no-]split-cold-code CC1 options to toggle splitting: fedor.sergeev, philip.pfaffe.

Thanks @hiraditya. I'd also like to get a +1 from someone who's worked on the NewPM infrastructure extensively, just to make sure those changes look ok.

Feb 6 2019, 2:09 PM · Restricted Project
vsk added a comment to D57215: [CodeExtractor] Update function's assumption cache after extracting blocks from it.

@sdmitriev thanks for the patch!

Feb 6 2019, 2:04 PM · Restricted Project
vsk created D57834: [CodeExtractor] Only lift lifetime markers present in the extraction region.
Feb 6 2019, 11:39 AM · Restricted Project

Feb 5 2019

vsk accepted D57805: [HotColdSplit] Move splitting after instrumented PGO use.

Thanks, LGTM.

Feb 5 2019, 8:26 PM · Restricted Project
vsk committed rGbd94b4287c9e: [HotColdSplit] Do not split out `resume` instructions (authored by vsk).
[HotColdSplit] Do not split out `resume` instructions
Feb 5 2019, 3:39 PM

Feb 4 2019

vsk added reviewers for D57722: [Clang][NCF] Sanitizer options: helpers to check if {Kernel,Hardware}ASan is enabled: eugenis, kcc.
Feb 4 2019, 4:32 PM · Restricted Project
vsk accepted D57711: [Sanitizers] UBSan unreachable incompatible with Kernel ASan.

LGTM, thanks. It might make sense to add a predicate to SanitizerSet to make it easier to check when ASan is enabled, either pre-commit or as a follow-up.

Feb 4 2019, 2:09 PM · Restricted Project, Restricted Project

Feb 1 2019

vsk accepted D57489: [ASan] Do not instrument other runtime functions with `__asan_handle_no_return`.

Thanks, lgtm!

Feb 1 2019, 12:38 PM · Restricted Project, Restricted Project, Restricted Project
vsk added a comment to D57265: [PM/CC1] Add -f[no-]split-cold-code CC1 options to toggle splitting.

Ping.

Feb 1 2019, 10:30 AM · Restricted Project

Jan 31 2019

vsk added a comment to D57489: [ASan] Do not instrument other runtime functions with `__asan_handle_no_return`.

Looks reasonable to me.

Jan 31 2019, 11:04 AM · Restricted Project, Restricted Project, Restricted Project

Jan 29 2019

vsk accepted D57278: [Sanitizers] UBSan unreachable incompatible with ASan in the presence of `noreturn` calls.

LGTM, thanks!

Jan 29 2019, 2:03 PM · Restricted Project

Jan 28 2019

vsk added a comment to D57278: [Sanitizers] UBSan unreachable incompatible with ASan in the presence of `noreturn` calls.

Is it necessary to remove visitation of 'noreturn' call sites from ASan? I'd expect that to break non-C frontends which emit noreturn calls (rust/swift?).

Jan 28 2019, 5:41 PM · Restricted Project
vsk added inline comments to D57190: [MC] Teach the MachO object writer about N_FUNC_COLD.
Jan 28 2019, 9:14 AM

Jan 25 2019

vsk closed D57190: [MC] Teach the MachO object writer about N_FUNC_COLD.
Jan 25 2019, 4:57 PM
vsk updated the diff for D57265: [PM/CC1] Add -f[no-]split-cold-code CC1 options to toggle splitting.
  • Fix a think-o in a comment.
Jan 25 2019, 4:41 PM · Restricted Project
vsk added inline comments to D57190: [MC] Teach the MachO object writer about N_FUNC_COLD.
Jan 25 2019, 4:33 PM
vsk created D57265: [PM/CC1] Add -f[no-]split-cold-code CC1 options to toggle splitting.
Jan 25 2019, 4:30 PM · Restricted Project
vsk added a comment to D57050: [CodeGenPrepare] Handle all debug calls in dupRetToEnableTailCallOpts().

I see a minor issue in the test, but the patch looks great to me otherwise. Thanks!

Jan 25 2019, 9:56 AM

Jan 24 2019

vsk added a comment to D56624: [Sanitizers] UBSan unreachable incompatible with ASan in the presence of `noreturn` calls.
In D56624#1370607, @yln wrote:

Maybe the frontend should insert __asan_handle_noreturn whenever ASan is enabled, and then ASan would not care about the attribute? I'd like to avoid having this logic in two places.

+1 for this. @vsk Can you sign off on this design?

Jan 24 2019, 7:09 PM · Restricted Project
vsk added a comment to D57190: [MC] Teach the MachO object writer about N_FUNC_COLD.
In D57190#1370535, @pcc wrote:

Interesting, what's the advantage of this over doing something like creating a __cold section in the __TEXT segment?

Jan 24 2019, 6:49 PM
vsk updated the diff for D57190: [MC] Teach the MachO object writer about N_FUNC_COLD.

Per @pcc's suggestion, add basic AsmParser support for the .cold directive.

Jan 24 2019, 6:49 PM
vsk added a reviewer for D57190: [MC] Teach the MachO object writer about N_FUNC_COLD: mtrent.

+ Mike, who's touched nm recently.

Jan 24 2019, 4:23 PM
vsk added a comment to D57082: [HotColdSplit] Move splitting earlier in the pipeline.

I relaxed the test in r352138, and think that should address the issue.

Jan 24 2019, 4:21 PM
vsk added a comment to D56624: [Sanitizers] UBSan unreachable incompatible with ASan in the presence of `noreturn` calls.

Wouldn’t it be preferable to unpoison the stack inside of maybe_longjmp, once the opaque condition can be checked?

Sure, but that's not always possible. That's why we have interceptors.

Jan 24 2019, 4:19 PM · Restricted Project
vsk added a comment to D57082: [HotColdSplit] Move splitting earlier in the pipeline.

Sorry about that, taking a look now

Jan 24 2019, 4:08 PM
vsk added a comment to D56624: [Sanitizers] UBSan unreachable incompatible with ASan in the presence of `noreturn` calls.

Because "expect_noreturn" calls are allowed to return, the compiler must behave as they could. In particular, this means that unpoisoning the stack before expect_noreturn calls (given the current semantics) is premature.

I don't think that's true. A hypothetical function

maybe_longjmp(jmp_buf env)

that checks an opaque condition needs stack unpoisoning before the call, in the absense of a better solution.

Jan 24 2019, 2:52 PM · Restricted Project