Page MenuHomePhabricator

pcc (Peter Collingbourne)
User

Projects

User does not belong to any projects.

User Details

User Since
Dec 28 2012, 2:34 PM (495 w, 6 d)

Recent Activity

Fri, Jun 24

pcc committed rGb064bc18c30c: ELF: Do not relax ADRP/LDR -> ADRP/ADD for absolute symbols in PIC. (authored by pcc).
ELF: Do not relax ADRP/LDR -> ADRP/ADD for absolute symbols in PIC.
Fri, Jun 24, 8:48 AM · Restricted Project
pcc closed D128492: ELF: Do not relax ADRP/LDR -> ADRP/ADD for absolute symbols in PIC..
Fri, Jun 24, 8:48 AM · Restricted Project, Restricted Project

Thu, Jun 23

pcc updated the diff for D128492: ELF: Do not relax ADRP/LDR -> ADRP/ADD for absolute symbols in PIC..

Comment

Thu, Jun 23, 10:38 PM · Restricted Project, Restricted Project
pcc added a comment to D128492: ELF: Do not relax ADRP/LDR -> ADRP/ADD for absolute symbols in PIC..

Thanks for catching this case. For absolute symbols we can choose not relaxing in -no-pie mode. Do you prefer relaxing?

Thu, Jun 23, 10:37 PM · Restricted Project, Restricted Project
pcc requested review of D128492: ELF: Do not relax ADRP/LDR -> ADRP/ADD for absolute symbols in PIC..
Thu, Jun 23, 10:23 PM · Restricted Project, Restricted Project
pcc accepted D115844: [ubsan] Using metadata instead of prologue data for function sanitizer.

Yes, but not indirectly called from C/C++ but rather from compiler-generated code right? That's presumably why this patch + D116130 worked for @zhuhan0.

Thu, Jun 23, 7:15 PM · Restricted Project, Restricted Project, Restricted Project
pcc added inline comments to D119296: KCFI sanitizer.
Thu, Jun 23, 6:59 PM · Restricted Project, Restricted Project, Restricted Project
pcc accepted D127543: [HWASan] Use new IR attribute for communicating unsanitized globals..

LGTM

Thu, Jun 23, 5:36 PM · Restricted Project, Restricted Project

Wed, Jun 15

pcc added a comment to D127906: [gn build] Allow use_ubsan=true on mac and unbreak use_asan and use_ubsan.

LGTM

Wed, Jun 15, 4:48 PM · Restricted Project, Restricted Project
pcc accepted D127876: [clang] Don't emit type test/assume for virtual classes that should never participate in WPD.

Okay, it seems reasonable enough to have the [[clang::lto_visibility_public]] attribute override the --lto-whole-program-visibility flag.

Wed, Jun 15, 4:46 PM · Restricted Project, Restricted Project
pcc updated subscribers of D127906: [gn build] Allow use_ubsan=true on mac and unbreak use_asan and use_ubsan.
Wed, Jun 15, 4:34 PM · Restricted Project, Restricted Project
pcc added inline comments to D127906: [gn build] Allow use_ubsan=true on mac and unbreak use_asan and use_ubsan.
Wed, Jun 15, 3:53 PM · Restricted Project, Restricted Project
pcc added a comment to D122862: gn build: Fix support for building the builtins for baremetal..

I don't think I would expect the stage 2 runtimes to be built with a sanitizer even if use_asan is set. The sanitizer runtimes themselves don't support being built with sanitizers, and they might be compiled to depend on the builtins, which would create a circular dependency. So I think use_asan and such should only affect the stage 1 compiler. I think I would favor adding use_asan = false to the stage2_unix_toolchain template.

Wed, Jun 15, 3:52 PM · Restricted Project, Restricted Project
pcc added a comment to D127876: [clang] Don't emit type test/assume for virtual classes that should never participate in WPD.

This diverges from the documented behavior of -lto-whole-program-visibility. The flag is meant to give all classes hidden LTO visibility, but now it only does that to some of them.

perhaps I'm misunderstanding, but even with -lto-whole-program-visibility classes explicitly marked with public LTO visibility still shouldn't participate in WPD?

Wed, Jun 15, 10:21 AM · Restricted Project, Restricted Project
pcc requested changes to D127876: [clang] Don't emit type test/assume for virtual classes that should never participate in WPD.

This diverges from the documented behavior of -lto-whole-program-visibility. The flag is meant to give all classes hidden LTO visibility, but now it only does that to some of them.

Wed, Jun 15, 10:14 AM · Restricted Project, Restricted Project

Tue, Jun 14

pcc added a comment to D126089: [WPD] Try harder to find assumes through phis.

is this patch ok to submit at least as a short term workaround?

Chrome already has a short-term workaround, which is to disable opaque pointers, right? I think you can use that until the proper fix is developed.

As upstream tests move away from testing typed pointers, I'm worried that pinning to typed pointers will cause regressions that we don't want to spend time investigating. I'm not sure how long a redesign/rewrite would take so I'd like to get Chrome off of typed pointers soonish.

Tue, Jun 14, 2:21 PM · Restricted Project, Restricted Project
pcc added a comment to D126089: [WPD] Try harder to find assumes through phis.

is this patch ok to submit at least as a short term workaround?

Chrome already has a short-term workaround, which is to disable opaque pointers, right? I think you can use that until the proper fix is developed.

As noted, I'm really not convinced that we cannot hit this issue for hidden visibility patches.

However, another reason to submit this particular patch is that it is merely enabling WPD in additional cases, when there is a phi between the type test and assume, by recognizing more assumes. I would imagine we will still have cases like that even for hidden visibility classes, or with your proposed fix to use a new TBD intrinsic that is converted to an llvm.type.test in the case of --lto-whole-program-visibility, right? So in either case this seems to me to be an improvement.

Tue, Jun 14, 12:24 PM · Restricted Project, Restricted Project
pcc added a comment to D126089: [WPD] Try harder to find assumes through phis.

is this patch ok to submit at least as a short term workaround?

Tue, Jun 14, 10:00 AM · Restricted Project, Restricted Project

Mon, Jun 13

pcc updated the diff for D127556: gn build: Add support for building the standalone ubsan runtime..

Fix Mac build

Mon, Jun 13, 4:18 PM · Restricted Project, Restricted Project
pcc reopened D127556: gn build: Add support for building the standalone ubsan runtime..
Mon, Jun 13, 4:17 PM · Restricted Project, Restricted Project
pcc added a reverting change for rGb49bd8e07faf: gn build: Add support for building the standalone ubsan runtime.: rG0e3c8bdd4b3c: Revert "gn build: Add support for building the standalone ubsan runtime.".
Mon, Jun 13, 2:07 PM · Restricted Project, Restricted Project
pcc added a reverting change for rG6ef9af6386fe: gn build: Disable ubsan build on mac/win.: rG0e3c8bdd4b3c: Revert "gn build: Add support for building the standalone ubsan runtime.".
Mon, Jun 13, 2:07 PM · Restricted Project, Restricted Project
pcc added a reverting change for rGee21411107aa: gn build: Don't define an action for gen_version_script on mac/win.: rG0e3c8bdd4b3c: Revert "gn build: Add support for building the standalone ubsan runtime.".
Mon, Jun 13, 2:07 PM · Restricted Project, Restricted Project
pcc committed rG0e3c8bdd4b3c: Revert "gn build: Add support for building the standalone ubsan runtime." (authored by pcc).
Revert "gn build: Add support for building the standalone ubsan runtime."
Mon, Jun 13, 2:06 PM · Restricted Project, Restricted Project
pcc added a reverting change for D127556: gn build: Add support for building the standalone ubsan runtime.: rG0e3c8bdd4b3c: Revert "gn build: Add support for building the standalone ubsan runtime.".
Mon, Jun 13, 2:06 PM · Restricted Project, Restricted Project
pcc committed rGee21411107aa: gn build: Don't define an action for gen_version_script on mac/win. (authored by pcc).
gn build: Don't define an action for gen_version_script on mac/win.
Mon, Jun 13, 1:55 PM · Restricted Project, Restricted Project
pcc committed rG6ef9af6386fe: gn build: Disable ubsan build on mac/win. (authored by pcc).
gn build: Disable ubsan build on mac/win.
Mon, Jun 13, 1:45 PM · Restricted Project, Restricted Project
pcc committed rG7316b0d54c3d: gn build: Add support for building the AArch64 LSE builtins. (authored by pcc).
gn build: Add support for building the AArch64 LSE builtins.
Mon, Jun 13, 1:16 PM · Restricted Project, Restricted Project
pcc committed rGb49bd8e07faf: gn build: Add support for building the standalone ubsan runtime. (authored by pcc).
gn build: Add support for building the standalone ubsan runtime.
Mon, Jun 13, 1:16 PM · Restricted Project, Restricted Project
pcc closed D127560: gn build: Add support for building the AArch64 LSE builtins..
Mon, Jun 13, 1:16 PM · Restricted Project, Restricted Project
pcc closed D127556: gn build: Add support for building the standalone ubsan runtime..
Mon, Jun 13, 1:16 PM · Restricted Project, Restricted Project
pcc added inline comments to D127556: gn build: Add support for building the standalone ubsan runtime..
Mon, Jun 13, 1:09 PM · Restricted Project, Restricted Project
pcc added inline comments to D127560: gn build: Add support for building the AArch64 LSE builtins..
Mon, Jun 13, 12:53 PM · Restricted Project, Restricted Project
pcc updated the diff for D127560: gn build: Add support for building the AArch64 LSE builtins..

Stop sync_source_lists_from_cmake.py from finding the reference to the source file

Mon, Jun 13, 12:51 PM · Restricted Project, Restricted Project

Fri, Jun 10

pcc requested review of D127560: gn build: Add support for building the AArch64 LSE builtins..
Fri, Jun 10, 10:12 PM · Restricted Project, Restricted Project
pcc requested review of D127556: gn build: Add support for building the standalone ubsan runtime..
Fri, Jun 10, 9:05 PM · Restricted Project, Restricted Project

Thu, Jun 9

pcc added a comment to D126089: [WPD] Try harder to find assumes through phis.

Thanks for the reproducer!

I think the root cause of the issue here is that the IR generated by Clang is wrong. llvm.type.test will only consider types that are local to the LTO unit, which means that it is incorrect to emit llvm.assume(llvm.type.test) for types A or B, because they have public LTO visibility, which means that definitions may reside outside of the LTO unit. The LowerTypeTests pass is therefore correctly replacing the llvm.type.tests with false, leading to the miscompilation seen here. The issue can also be seen if the [[clang::lto_visibility_public]] attribute is removed.

This is by design per the changes I made awhile back to delay the decision about visibility until LTO link time: https://groups.google.com/g/llvm-dev/c/6LfIiAo9g68/m/Ng1Xvw4WAwAJ
They should have public !vcall_visibility metadata by default, and since whole program visibility isn't being asserted here, there should be no devirt, etc.

The problem with this design is that it leaves the meaning of llvm.type.test undefined in the case where there are no globals that are a member of the type, because the !vcall_visibility is associated with the global. So there's no way to know whether the type argument was intended to refer to a type with hidden LTO visibility or one with public LTO visibility, if there are no member globals.

Since -lto-whole-program-visibility is a flag that affects the operation of the type tests globally, I think a better design would be to replace all llvm.type.test calls with true, and replaces llvm.type.checked.load with a regular load, if the flag is not passed.

We only perform WPD if there is a global, however. And then we subsequently remove these sequences if there is no global for a type id [1].

Maybe I am misunderstanding the concern though, can you give an example where this will go wrong?

Thu, Jun 9, 2:40 PM · Restricted Project, Restricted Project
pcc added a comment to D126089: [WPD] Try harder to find assumes through phis.

Since -lto-whole-program-visibility is a flag that affects the operation of the type tests globally, I think a better design would be to replace all llvm.type.test calls with true, and replaces llvm.type.checked.load with a regular load, if the flag is not passed.

My original patch (https://reviews.llvm.org/D126089?id=431037) replaced llvm.type.test with true in all cases, but tejohnson said

Regarding the quoted comment, note it is "type test assume" sequences, not all type tests, that need to be removed here in certain circumstances. Note also that before I made the change to try to keep these around longer for use by other analyses, this code attempted to remove all "type test assume" sequences. I.e. it removed all the analyzed assumes, and any type test that was subsequently dead. Presumably that version of WPD+LTT would have also illustrated the original problem this patch tries to address (an assume fed by a phi, in turn fed by a type test that got an Unsat and resulted in llvm.assume(false)), and for a WPD+CFI build we certainly wouldn't want to replace *all* type test uses in the code at this point with true. So I am skeptical that it is correct to replace type test non-assume (non-phi) uses with true in the more limited cases being handled currently either.

Thu, Jun 9, 2:29 PM · Restricted Project, Restricted Project
pcc added a comment to D126089: [WPD] Try harder to find assumes through phis.

Thanks for the reproducer!

I think the root cause of the issue here is that the IR generated by Clang is wrong. llvm.type.test will only consider types that are local to the LTO unit, which means that it is incorrect to emit llvm.assume(llvm.type.test) for types A or B, because they have public LTO visibility, which means that definitions may reside outside of the LTO unit. The LowerTypeTests pass is therefore correctly replacing the llvm.type.tests with false, leading to the miscompilation seen here. The issue can also be seen if the [[clang::lto_visibility_public]] attribute is removed.

This is by design per the changes I made awhile back to delay the decision about visibility until LTO link time: https://groups.google.com/g/llvm-dev/c/6LfIiAo9g68/m/Ng1Xvw4WAwAJ
They should have public !vcall_visibility metadata by default, and since whole program visibility isn't being asserted here, there should be no devirt, etc.

Thu, Jun 9, 12:48 PM · Restricted Project, Restricted Project

Wed, Jun 8

pcc requested changes to D126089: [WPD] Try harder to find assumes through phis.

Thanks for the reproducer!

Wed, Jun 8, 9:14 PM · Restricted Project, Restricted Project

Sun, Jun 5

pcc committed rGa739f4d083df: gn build: Fix build when not building the native target. (authored by pcc).
gn build: Fix build when not building the native target.
Sun, Jun 5, 2:18 PM · Restricted Project, Restricted Project
pcc closed D127068: gn build: Fix build when not building the native target..
Sun, Jun 5, 2:18 PM · Restricted Project, Restricted Project
pcc requested review of D127068: gn build: Fix build when not building the native target..
Sun, Jun 5, 2:05 AM · Restricted Project, Restricted Project

Thu, Jun 2

pcc added a comment to D125191: [AArch64] Ampere1 does not support MTE.

Doesn't it also need to be removed from the list in llvm/lib/Target/AArch64/AArch64.td?

Thu, Jun 2, 6:42 PM · Restricted Project, Restricted Project

May 25 2022

pcc added a comment to D126089: [WPD] Try harder to find assumes through phis.

This case is supposed to be handled as a result of running the WPD pass early. See the comment near the top of PassBuilder::buildThinLTODefaultPipeline:

// These passes import type identifier resolutions for whole-program
// devirtualization and CFI. They must run early because other passes may
// disturb the specific instruction patterns that these passes look for,
// creating dependencies on resolutions that may not appear in the summary.
//
// For example, GVN may transform the pattern assume(type.test) appearing in
// two basic blocks into assume(phi(type.test, type.test)), which would
// transform a dependency on a WPD resolution into a dependency on a type
// identifier resolution for CFI.
//
// Also, WPD has access to more precise information than ICP and can
// devirtualize more effectively, so it should operate on the IR first.
//
// The WPD and LowerTypeTest passes need to run at -O0 to lower type
// metadata and intrinsics.

Is there some way that we can now end up with GVN or some other such pass running between when we create the summary and when we run WPD that's inserting a phi?

I thought the frontend emitted the type test/assume. I'm seeing them in the IR after the pre link step. CodeGenFunction::EmitTypeMetadataCodeForVCall() in clang emits a type test/assume.

Right, but the phi must be coming from somewhere else after summary generation if it isn't accounted for in the summary (if the phi was inserted before summary generation, the summary should end up with a dependency on a CFI type identifier resolution, instead of a WPD resolution). Can you trace where it is coming from?

I'm not super familiar with ThinLTO summaries, could you explain a bit more?
The assume(phi(type test, type test)) is coming from the output of the pre link. Then post link WPD looks at all type test usages and I think LTT does the same? So not sure where the summary is relevant.

May 25 2022, 5:41 PM · Restricted Project, Restricted Project
pcc added a comment to D126089: [WPD] Try harder to find assumes through phis.

This case is supposed to be handled as a result of running the WPD pass early. See the comment near the top of PassBuilder::buildThinLTODefaultPipeline:

// These passes import type identifier resolutions for whole-program
// devirtualization and CFI. They must run early because other passes may
// disturb the specific instruction patterns that these passes look for,
// creating dependencies on resolutions that may not appear in the summary.
//
// For example, GVN may transform the pattern assume(type.test) appearing in
// two basic blocks into assume(phi(type.test, type.test)), which would
// transform a dependency on a WPD resolution into a dependency on a type
// identifier resolution for CFI.
//
// Also, WPD has access to more precise information than ICP and can
// devirtualize more effectively, so it should operate on the IR first.
//
// The WPD and LowerTypeTest passes need to run at -O0 to lower type
// metadata and intrinsics.

Is there some way that we can now end up with GVN or some other such pass running between when we create the summary and when we run WPD that's inserting a phi?

I thought the frontend emitted the type test/assume. I'm seeing them in the IR after the pre link step. CodeGenFunction::EmitTypeMetadataCodeForVCall() in clang emits a type test/assume.

May 25 2022, 4:21 PM · Restricted Project, Restricted Project
pcc added a comment to D126089: [WPD] Try harder to find assumes through phis.

This case is supposed to be handled as a result of running the WPD pass early. See the comment near the top of PassBuilder::buildThinLTODefaultPipeline:

// These passes import type identifier resolutions for whole-program
// devirtualization and CFI. They must run early because other passes may
// disturb the specific instruction patterns that these passes look for,
// creating dependencies on resolutions that may not appear in the summary.
//
// For example, GVN may transform the pattern assume(type.test) appearing in
// two basic blocks into assume(phi(type.test, type.test)), which would
// transform a dependency on a WPD resolution into a dependency on a type
// identifier resolution for CFI.
//
// Also, WPD has access to more precise information than ICP and can
// devirtualize more effectively, so it should operate on the IR first.
//
// The WPD and LowerTypeTest passes need to run at -O0 to lower type
// metadata and intrinsics.

Is there some way that we can now end up with GVN or some other such pass running between when we create the summary and when we run WPD that's inserting a phi?

May 25 2022, 3:32 PM · Restricted Project, Restricted Project
Herald added a project to D118269: [gn build] Make HAVE_MALLINFO2 a gn arg, default to false: Restricted Project.
May 25 2022, 11:48 AM · Restricted Project, Restricted Project
pcc added inline comments to D114846: [llvm] [Debuginfod] LLVM debuginfod server..
May 25 2022, 10:37 AM · Restricted Project, Restricted Project

May 16 2022

pcc added inline comments to D125624: [gold] Remove an external dependency to GNU binutils' header file.
May 16 2022, 12:43 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

May 13 2022

pcc added a comment to D120727: [libc++] Overhaul how we select the ABI library.

Hi, we're seeing some failures in Fuchsia's Clang CI. Our runtimes build seems to be unable to find cxxabi.h.

The failing bot can be found here: https://luci-milo.appspot.com/ui/p/fuchsia/builders/toolchain.ci/clang-linux-x64/b8814278370664903633/overview

May 13 2022, 1:57 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

May 12 2022

pcc added inline comments to D115844: [ubsan] Using metadata instead of prologue data for function sanitizer.
May 12 2022, 11:41 AM · Restricted Project, Restricted Project, Restricted Project
pcc added inline comments to D115844: [ubsan] Using metadata instead of prologue data for function sanitizer.
May 12 2022, 11:04 AM · Restricted Project, Restricted Project, Restricted Project

May 2 2022

pcc added a comment to D120862: Sema: Allow scoped enums as source type for integral conversion..

Ping.

May 2 2022, 9:14 PM · Restricted Project, Restricted Project

Apr 28 2022

pcc added a comment to D119296: KCFI sanitizer.

I played a little bit with kcfi and here are some thoughts:

  • under -Os I saw functions being inlined, regardless of the source code calling them indirectly. In these scenarios, the KCFI check was still in place, even though there was not a pointer involved in the call. Although not semantically incorrect, it would be great to prevent the unnecessary overhead (see attached source/compile it with -Os and -fsanitize=kcfi).

Yes, I suspect this might be an issue with Clang's existing CFI schemes too, and would probably require an additional pass to drop checks before calls that were either inlined or optimized into direct calls.

Apr 28 2022, 11:52 AM · Restricted Project, Restricted Project, Restricted Project

Apr 22 2022

pcc accepted D124212: [sanitizer] Use canonical syscalls everywhere.

LGTM

Apr 22 2022, 11:14 AM · Restricted Project, Restricted Project

Apr 21 2022

pcc added inline comments to D124212: [sanitizer] Use canonical syscalls everywhere.
Apr 21 2022, 5:20 PM · Restricted Project, Restricted Project
pcc added inline comments to D124212: [sanitizer] Use canonical syscalls everywhere.
Apr 21 2022, 4:56 PM · Restricted Project, Restricted Project

Apr 19 2022

pcc requested changes to D123969: [LTO] Use names from more GlobalValue types to generate the ModuleID.

I think this will introduce a correctness issue as it will become possible for two modules that can be linked together to have the same unique module ID.

Apr 19 2022, 12:51 PM · Restricted Project, Restricted Project

Apr 18 2022

pcc added inline comments to D123814: [compiler-rt][lsan] Update CanBeAHeapPointer for AArch64.
Apr 18 2022, 2:44 PM · Restricted Project, Restricted Project

Apr 12 2022

pcc accepted D123493: Support the min of module flags when linking, use for AArch64 BTI/PAC-RET.

LGTM but please add a test for the autoupgrader.

Apr 12 2022, 10:17 AM · Restricted Project, Restricted Project, Restricted Project

Apr 11 2022

pcc added a comment to D123493: Support the min of module flags when linking, use for AArch64 BTI/PAC-RET.

Can we add logic to llvm/lib/IR/AutoUpgrade.cpp to change Error to Min if we see one of these module flags? I think that should allow old bitcode to continue working.

Apr 11 2022, 10:16 AM · Restricted Project, Restricted Project, Restricted Project

Apr 7 2022

pcc added a comment to D119296: KCFI sanitizer.

Note that if additional data has been injected between the KCFI
type identifier and the start of the function, e.g. by using
-fpatchable-function-entry, the offset in bytes must be specified
using -fsanitize-kcfi-offset=<value> to avoid errors. The offset
must be the same for all indirectly called functions in every
translation unit.

Apr 7 2022, 4:32 PM · Restricted Project, Restricted Project, Restricted Project

Apr 6 2022

pcc committed rG38f920094576: gn build: Fix some tests for host_os to instead check current_os. (authored by pcc).
gn build: Fix some tests for host_os to instead check current_os.
Apr 6 2022, 3:46 PM · Restricted Project, Restricted Project
pcc committed rG02a7b1754f76: Reland "gn build: Fix support for building the builtins for baremetal." (authored by pcc).
Reland "gn build: Fix support for building the builtins for baremetal."
Apr 6 2022, 1:49 PM · Restricted Project, Restricted Project
pcc committed rG096477e25e44: gn build: Use target OS to control whether to use/depend on llvm-ar. (authored by pcc).
gn build: Use target OS to control whether to use/depend on llvm-ar.
Apr 6 2022, 1:49 PM · Restricted Project, Restricted Project
pcc closed D123244: gn build: Use target OS to control whether to use/depend on llvm-ar..
Apr 6 2022, 1:49 PM · Restricted Project, Restricted Project
pcc added a comment to D122862: gn build: Fix support for building the builtins for baremetal..

This broke building on non-linux: http://45.33.8.238/macm1/32578/step_4.txt

Ptal and revert if it takes a while to fix.

Apr 6 2022, 12:48 PM · Restricted Project, Restricted Project
pcc requested review of D123244: gn build: Use target OS to control whether to use/depend on llvm-ar..
Apr 6 2022, 12:48 PM · Restricted Project, Restricted Project
pcc added a reverting change for rGb02b9b3dacc8: gn build: Fix support for building the builtins for baremetal.: rGd384f2b253bf: Revert "gn build: Fix support for building the builtins for baremetal.".
Apr 6 2022, 12:16 PM · Restricted Project, Restricted Project
pcc committed rGd384f2b253bf: Revert "gn build: Fix support for building the builtins for baremetal." (authored by pcc).
Revert "gn build: Fix support for building the builtins for baremetal."
Apr 6 2022, 12:16 PM · Restricted Project, Restricted Project
pcc added a reverting change for D122862: gn build: Fix support for building the builtins for baremetal.: rGd384f2b253bf: Revert "gn build: Fix support for building the builtins for baremetal.".
Apr 6 2022, 12:16 PM · Restricted Project, Restricted Project
pcc committed rGb02b9b3dacc8: gn build: Fix support for building the builtins for baremetal. (authored by pcc).
gn build: Fix support for building the builtins for baremetal.
Apr 6 2022, 11:02 AM · Restricted Project, Restricted Project
pcc closed D122862: gn build: Fix support for building the builtins for baremetal..
Apr 6 2022, 11:01 AM · Restricted Project, Restricted Project
pcc added inline comments to D122862: gn build: Fix support for building the builtins for baremetal..
Apr 6 2022, 10:52 AM · Restricted Project, Restricted Project

Apr 5 2022

pcc added a comment to D123160: [AArch64] Fix the upper limit for folded address offsets for COFF.

IIRC 1 << 21 was from COFF (missed that the addend was signed), so it wouldn't make sense to have this be 1 << 21 on other object formats if the actual limit is higher.

Apr 5 2022, 5:06 PM · Restricted Project, Restricted Project

Mar 31 2022

pcc requested review of D122862: gn build: Fix support for building the builtins for baremetal..
Mar 31 2022, 8:41 PM · Restricted Project, Restricted Project

Mar 15 2022

Herald added a project to D85649: [AArch64] PAC/BTI code generation for LLVM generated functions: Restricted Project.

It looks like the only value that makes sense is Error - any other policy (existing or not) would potentially lead to meaningfully different code generated with or without LTO.

Mar 15 2022, 11:37 AM · Restricted Project, Restricted Project, Restricted Project

Mar 14 2022

pcc accepted D121250: [DFSan] Remove trampolines to unblock opaque pointers..

LGTM

Mar 14 2022, 1:02 PM · Restricted Project, Restricted Project, Restricted Project
pcc committed rGaaca634c94c6: gn build: Add support for building with libcurl. (authored by pcc).
gn build: Add support for building with libcurl.
Mar 14 2022, 12:52 PM · Restricted Project
pcc closed D121260: gn build: Add support for building with libcurl..
Mar 14 2022, 12:52 PM · Restricted Project, Restricted Project

Mar 8 2022

pcc added inline comments to D114846: [llvm] [Debuginfod] LLVM debuginfod server..
Mar 8 2022, 5:43 PM · Restricted Project, Restricted Project
Herald added a project to D114846: [llvm] [Debuginfod] LLVM debuginfod server.: Restricted Project.
Mar 8 2022, 5:13 PM · Restricted Project, Restricted Project
pcc requested review of D121260: gn build: Add support for building with libcurl..
Mar 8 2022, 3:17 PM · Restricted Project, Restricted Project

Mar 2 2022

pcc requested review of D120862: Sema: Allow scoped enums as source type for integral conversion..
Mar 2 2022, 6:33 PM · Restricted Project, Restricted Project

Feb 17 2022

pcc added a comment to D116774: AST: Move __va_list tag back to std conditionally on AArch64..
Feb 17 2022, 11:38 AM · Restricted Project
pcc committed rG82e5f951fd6e: AST: Move __va_list tag back to std conditionally on AArch64. (authored by pcc).
AST: Move __va_list tag back to std conditionally on AArch64.
Feb 17 2022, 11:34 AM
pcc committed rG18ead23385a4: AST: Make getEffectiveDeclContext() a member function of… (authored by pcc).
AST: Make getEffectiveDeclContext() a member function of…
Feb 17 2022, 11:34 AM
pcc closed D116774: AST: Move __va_list tag back to std conditionally on AArch64..
Feb 17 2022, 11:34 AM · Restricted Project
pcc closed D116773: AST: Make getEffectiveDeclContext() a member function of ItaniumMangleContextImpl. NFCI..
Feb 17 2022, 11:33 AM · Restricted Project
pcc added a comment to D116774: AST: Move __va_list tag back to std conditionally on AArch64..
Feb 17 2022, 10:43 AM · Restricted Project
pcc updated the diff for D116774: AST: Move __va_list tag back to std conditionally on AArch64..

Use isARM() etc

Feb 17 2022, 10:39 AM · Restricted Project

Feb 14 2022

pcc added a comment to D115844: [ubsan] Using metadata instead of prologue data for function sanitizer.

On the bug you have:

define internal fastcc void @&#8203;_Z4callIiE4taskv.resume(%_Z4callIiE4taskv.Frame* noalias nonnull align 8 dereferenceable(24
    ) %FramePtr) #&#8203;1 prologue <{ i32, i32 }> <{ i32 846595819, i32 trunc (i64 sub (i64 ptrtoint (i8** @&#8203;1 to i64), i64 ptrtoint (void ()* @&#8203;_Z4callIiE4taskv to i64)) to i32) }> {...}

Is it possible for the C/C++ code to take the address of the function _Z4callIiE4taskv.resume and call it indirectly?

*.resume is a compiler inserted function that is opaque to the programmer. It is called indirectly most of the time if not all the time.

Feb 14 2022, 4:26 PM · Restricted Project, Restricted Project, Restricted Project
pcc added inline comments to rGa8a3a4379247: [AArch64] Add apple-m1 CPU, and default to it for macOS..
Feb 14 2022, 3:36 PM
pcc added a comment to D115844: [ubsan] Using metadata instead of prologue data for function sanitizer.

On the bug you have:

define internal fastcc void @&#8203;_Z4callIiE4taskv.resume(%_Z4callIiE4taskv.Frame* noalias nonnull align 8 dereferenceable(24
    ) %FramePtr) #&#8203;1 prologue <{ i32, i32 }> <{ i32 846595819, i32 trunc (i64 sub (i64 ptrtoint (i8** @&#8203;1 to i64), i64 ptrtoint (void ()* @&#8203;_Z4callIiE4taskv to i64)) to i32) }> {...}

Is it possible for the C/C++ code to take the address of the function _Z4callIiE4taskv.resume and call it indirectly? If not, it seems like the right fix would be to arrange for the prologue data to be dropped on the .resume function instead of duplicating it there. I would also imagine that whatever signature you have on the .resume function would be incorrect since it appears that the coro splitting pass will use a different function signature for that function.

Feb 14 2022, 3:22 PM · Restricted Project, Restricted Project, Restricted Project

Feb 11 2022

pcc added a comment to D105425: Use explicit type for size_t on musl.

I suspect the real issue is that we're missing #include <stddef.h> at the top of this file. What happens if you add that and don't std qualify everything?

Feb 11 2022, 4:59 PM · Restricted Project, Restricted Project
pcc added a comment to D119367: [HWASan] Allow no_sanitize(..) and change metadata passing..

In addition to the .bc support we will also need support for reading/writing .ll files.

Feb 11 2022, 12:00 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Feb 9 2022

pcc added inline comments to D119296: KCFI sanitizer.
Feb 9 2022, 12:41 PM · Restricted Project, Restricted Project, Restricted Project
pcc added inline comments to D119296: KCFI sanitizer.
Feb 9 2022, 12:38 PM · Restricted Project, Restricted Project, Restricted Project
pcc updated the diff for D116774: AST: Move __va_list tag back to std conditionally on AArch64..

Make it conditional

Feb 9 2022, 11:36 AM · Restricted Project