aemerson (Amara Emerson)
Asian George Costanza

Projects

User does not belong to any projects.

User Details

User Since
Sep 9 2013, 3:45 AM (232 w, 3 d)

Compilers at a fruit company

Recent Activity

Yesterday

aemerson added inline comments to D43444: [AArch64][GlobalISel] When copying from a gpr32 to an fpr16 reg, convert to fpr32 first.
Wed, Feb 21, 11:00 PM
aemerson closed D43444: [AArch64][GlobalISel] When copying from a gpr32 to an fpr16 reg, convert to fpr32 first.

r325550.

Wed, Feb 21, 4:02 AM

Mon, Feb 19

aemerson committed rL325550: [AArch64][GlobalISel] When copying from a gpr32 to an fpr16 reg, convert to….
[AArch64][GlobalISel] When copying from a gpr32 to an fpr16 reg, convert to…
Mon, Feb 19, 9:16 PM
aemerson accepted D43444: [AArch64][GlobalISel] When copying from a gpr32 to an fpr16 reg, convert to fpr32 first.

As stated in PR36345 I'm committing this now to get it into 6.0.

Mon, Feb 19, 8:25 PM

Sun, Feb 18

aemerson created D43444: [AArch64][GlobalISel] When copying from a gpr32 to an fpr16 reg, convert to fpr32 first.
Sun, Feb 18, 9:36 AM
aemerson committed rL325464: Fix unused assertion variable warning..
Fix unused assertion variable warning.
Sun, Feb 18, 9:30 AM
aemerson committed rL325463: [AArch64][GlobalISel] Fix an assert fail/miscompile when fp16 types are copied.
[AArch64][GlobalISel] Fix an assert fail/miscompile when fp16 types are copied
Sun, Feb 18, 9:13 AM
aemerson closed D43310: [AArch64][GlobalISel] Fix an assert fail/miscompile when fp16 types are copied to GPR register banks.
Sun, Feb 18, 9:12 AM
aemerson committed rL325462: [AArch64][GlobalISel] Support G_INSERT/G_EXTRACT of types < s32 bits..
[AArch64][GlobalISel] Support G_INSERT/G_EXTRACT of types < s32 bits.
Sun, Feb 18, 9:05 AM
aemerson added a comment to D43310: [AArch64][GlobalISel] Fix an assert fail/miscompile when fp16 types are copied to GPR register banks.

Thanks, I'll commit this with those changes and put up another patch shortly for the copies in the other direction.

Sun, Feb 18, 9:05 AM

Fri, Feb 16

aemerson accepted D42356: [AArch64] Implement dynamic stack probing for windows.

Thanks for refactoring it. LGTM with a minor comment addition.

Fri, Feb 16, 10:50 PM

Wed, Feb 14

aemerson created D43310: [AArch64][GlobalISel] Fix an assert fail/miscompile when fp16 types are copied to GPR register banks.
Wed, Feb 14, 11:40 AM

Fri, Feb 9

aemerson closed D38128: Handle COPYs of physregs better (regalloc hints).
Fri, Feb 9, 2:41 AM
aemerson accepted D38128: Handle COPYs of physregs better (regalloc hints).

Sorry I didn't see this, I need to fix my email filters.

Fri, Feb 9, 2:41 AM

Fri, Feb 2

aemerson added a comment to D42860: [ReleaseNotes] Add note for the new -fexperimental-isel flag..

@hans if you're happy with this could you commit to the branch?

Fri, Feb 2, 1:17 PM
aemerson added a comment to D42861: [ReleaseNotes] Add note for enabling GlobalISel for AArch64 -O0.

@hans if you're happy with this could you commit to the branch?

Fri, Feb 2, 1:17 PM
aemerson created D42860: [ReleaseNotes] Add note for the new -fexperimental-isel flag..
Fri, Feb 2, 11:34 AM
aemerson created D42861: [ReleaseNotes] Add note for enabling GlobalISel for AArch64 -O0.
Fri, Feb 2, 11:34 AM
aemerson committed rL324110: [AArch64][GlobalISel] Use getRegClassForTypeOnBank() in selectCopy..
[AArch64][GlobalISel] Use getRegClassForTypeOnBank() in selectCopy.
Fri, Feb 2, 10:07 AM
aemerson closed D42832: [AArch64][GlobalISel] Use getRegClassForTypeOnBank() in selectCopy..
Fri, Feb 2, 10:07 AM
aemerson added inline comments to D42832: [AArch64][GlobalISel] Use getRegClassForTypeOnBank() in selectCopy..
Fri, Feb 2, 9:47 AM

Thu, Feb 1

aemerson created D42832: [AArch64][GlobalISel] Use getRegClassForTypeOnBank() in selectCopy..
Thu, Feb 1, 6:38 PM
aemerson committed rL324051: [AArch64][GlobalISel] Fix old use of % sigil in test..
[AArch64][GlobalISel] Fix old use of % sigil in test.
Thu, Feb 1, 6:18 PM
aemerson committed rL324048: Fix debug spelling in ResetMachineFunction pass..
Fix debug spelling in ResetMachineFunction pass.
Thu, Feb 1, 5:51 PM
aemerson committed rL324047: [GlobalISel] Constrain the dest reg of IMPLICT_DEF..
[GlobalISel] Constrain the dest reg of IMPLICT_DEF.
Thu, Feb 1, 5:48 PM
aemerson closed D42697: [GlobalISel] Constrain the dest reg of IMPLICT_DEF.
Thu, Feb 1, 5:48 PM
aemerson added a comment to D42697: [GlobalISel] Constrain the dest reg of IMPLICT_DEF.

Thanks, I'll commit this first and follow up on that. At first glance they're using different slightly different register classes so I'm not sure how correct it is to use that.

Thu, Feb 1, 5:30 PM
aemerson committed rL324028: [GlobalISel][Legalizer] Relax a legalization loop detecting assert..
[GlobalISel][Legalizer] Relax a legalization loop detecting assert.
Thu, Feb 1, 3:14 PM
aemerson committed rL324001: [GlobalISel] Fix assert failure when legalizing non-power-2 loads..
[GlobalISel] Fix assert failure when legalizing non-power-2 loads.
Thu, Feb 1, 12:50 PM
aemerson added a comment to D42697: [GlobalISel] Constrain the dest reg of IMPLICT_DEF.

Ping.

Thu, Feb 1, 10:50 AM

Wed, Jan 31

aemerson committed rL323933: [GlobalOpt] Improve common case efficiency of static global initializer….
[GlobalOpt] Improve common case efficiency of static global initializer…
Wed, Jan 31, 4:00 PM
This revision was not accepted when it landed; it landed in state Needs Review.
Wed, Jan 31, 4:00 PM
aemerson added inline comments to D42612: [GlobalOpt] Improve common case efficiency of static global initializer evaluation.
Wed, Jan 31, 2:30 PM
aemerson updated the diff for D42612: [GlobalOpt] Improve common case efficiency of static global initializer evaluation.

Simplified the logic a bit and added an example in the function documentation of complex and simple addresses.

Wed, Jan 31, 11:12 AM

Tue, Jan 30

aemerson added a comment to D42612: [GlobalOpt] Improve common case efficiency of static global initializer evaluation.

This is very close now. Could you add an explicit examples (eg show the IR) showing which initialization remain slow (Complex) and which are fast now? This should also address the spirit of Adrian's question I think.

Thanks
Gerolf

Tue, Jan 30, 9:22 PM
aemerson updated the diff for D42612: [GlobalOpt] Improve common case efficiency of static global initializer evaluation.

Addressed feedback.

Tue, Jan 30, 8:39 PM
aemerson updated the diff for D42697: [GlobalISel] Constrain the dest reg of IMPLICT_DEF.

New fix, I think the issue was that IMPLICIT_DEFs weren't constraining their dest register, while COPY selection didn't constrain the source.

Tue, Jan 30, 1:17 PM
aemerson added inline comments to D42697: [GlobalISel] Constrain the dest reg of IMPLICT_DEF.
Tue, Jan 30, 11:15 AM
aemerson accepted D42567: [AArch64] Properly handle dllimport of variables when using fast-isel.

Looks fine.

Tue, Jan 30, 11:10 AM
aemerson added a comment to D42697: [GlobalISel] Constrain the dest reg of IMPLICT_DEF.

Meant to say, I'm *not* familiar with this part of the codebase.

Tue, Jan 30, 10:32 AM
aemerson created D42697: [GlobalISel] Constrain the dest reg of IMPLICT_DEF.
Tue, Jan 30, 10:31 AM

Mon, Jan 29

aemerson added a comment to D42612: [GlobalOpt] Improve common case efficiency of static global initializer evaluation.

Thank you drilling into this! I have a few questions below. Also, could you comment on the time savings you measured for your implementation?

-Gerolf

With this change, the test case I was using completed compiling in about 45 seconds, a significant portion of which was spent in the front-end/elsewhere in the compiler.

Mon, Jan 29, 8:57 PM
aemerson updated the diff for D42612: [GlobalOpt] Improve common case efficiency of static global initializer evaluation.

Updated with some more comments.

Mon, Jan 29, 10:37 AM

Fri, Jan 26

aemerson committed rL323582: [GlobalISel][Legalizer] Convert the FP constants to the right APFloat type for….
[GlobalISel][Legalizer] Convert the FP constants to the right APFloat type for…
Fri, Jan 26, 11:08 PM
aemerson created D42612: [GlobalOpt] Improve common case efficiency of static global initializer evaluation.
Fri, Jan 26, 7:12 PM
aemerson accepted D42568: [GlobalISel] Bail out on calls to dllimported functions.

LGTM from a GISel point of view, I can't say I understand Windows enough to say the tests are right.

Fri, Jan 26, 8:01 AM

Thu, Jan 25

aemerson committed rL323485: [Driver] Add an -fexperimental-isel driver option to enable/disable GlobalISel..
[Driver] Add an -fexperimental-isel driver option to enable/disable GlobalISel.
Thu, Jan 25, 4:29 PM
aemerson committed rC323485: [Driver] Add an -fexperimental-isel driver option to enable/disable GlobalISel..
[Driver] Add an -fexperimental-isel driver option to enable/disable GlobalISel.
Thu, Jan 25, 4:29 PM
aemerson closed D42276: [Driver] Add an -fexperimental-isel driver option to enable/disable GlobalISel.
Thu, Jan 25, 4:29 PM
aemerson added inline comments to D42356: [AArch64] Implement dynamic stack probing for windows.
Thu, Jan 25, 6:15 AM

Wed, Jan 24

aemerson added a comment to D42512: [X86] When using Win64 ABI, exit with error if SSE is disabled for varargs.

Right, it's not clear to me how we'd avoid crashing later on since in this case it happens in a later pass, not in isel. If report_fatal_error does indeed always triggers crash diagnostics in clang then this is no better than assertion failures. Perhaps emitting the diagnostic first with errorUnsupported might be better than nothing.

Wed, Jan 24, 5:50 PM
aemerson created D42512: [X86] When using Win64 ABI, exit with error if SSE is disabled for varargs.
Wed, Jan 24, 4:12 PM
aemerson accepted D41373: [GISel][RFC]: GlobalISel Combiner prototype.

LGTM with some minor comment fixes.

Wed, Jan 24, 2:51 PM
aemerson committed rL323384: [GlobalISel] Add a requires: asserts to a test..
[GlobalISel] Add a requires: asserts to a test.
Wed, Jan 24, 2:43 PM
aemerson committed rL323371: [AArch64][GlobalISel] Fall back during AArch64 isel if we have a volatile load..
[AArch64][GlobalISel] Fall back during AArch64 isel if we have a volatile load.
Wed, Jan 24, 12:38 PM
aemerson committed rL323369: [GlobalISel] Don't fall back to FastISel..
[GlobalISel] Don't fall back to FastISel.
Wed, Jan 24, 12:01 PM
aemerson added a comment to D41373: [GISel][RFC]: GlobalISel Combiner prototype.

I think this is ok to progress now. We're happy with the overall design, although the pre-legalize pass is probably unnecessary at this moment, so leave that for another patch?

Wed, Jan 24, 8:39 AM
aemerson updated subscribers of D42356: [AArch64] Implement dynamic stack probing for windows.

For GlobalISel we haven't had to have very target specific code in the IRTranslator for this before. @qcolombet any opinion on whether we want to include target/ABI specific code into the IRTranslator? My feeling is that we want to avoid this, the alternative I can see is to introduce a new opcode for G_DYNALLOCA and lower that at isel.

Wed, Jan 24, 8:36 AM

Tue, Jan 23

aemerson updated the diff for D42276: [Driver] Add an -fexperimental-isel driver option to enable/disable GlobalISel.

I've added two kinds of warnings, one for targets which have incomplete GISel support, and another for unsupported optimisation levels (for ARM64 -O{1,2,3,s,z}).

Tue, Jan 23, 7:59 PM

Jan 22 2018

aemerson added inline comments to D42276: [Driver] Add an -fexperimental-isel driver option to enable/disable GlobalISel.
Jan 22 2018, 3:18 AM

Jan 18 2018

aemerson updated the diff for D42276: [Driver] Add an -fexperimental-isel driver option to enable/disable GlobalISel.
Jan 18 2018, 5:48 PM
aemerson created D42276: [Driver] Add an -fexperimental-isel driver option to enable/disable GlobalISel.
Jan 18 2018, 5:44 PM
aemerson committed rL322878: [AArch64][GlobalISel] Add isel support for global values in the large code….
[AArch64][GlobalISel] Add isel support for global values in the large code…
Jan 18 2018, 11:23 AM
aemerson closed D42175: [AArch64][GlobalISel] Add isel support for global values in the large code model.
Jan 18 2018, 11:23 AM

Jan 17 2018

aemerson added a comment to D42175: [AArch64][GlobalISel] Add isel support for global values in the large code model.

@kristof.beyls @rogfer01 Could someone from ARM do a quick test of this? I don't have an ELF target handy to test it myself and I'd like to get this fixed in the release branch.

Jan 17 2018, 7:20 PM
aemerson added a reviewer for D42175: [AArch64][GlobalISel] Add isel support for global values in the large code model: ab.
Jan 17 2018, 9:38 AM
aemerson created D42175: [AArch64][GlobalISel] Add isel support for global values in the large code model.
Jan 17 2018, 6:17 AM

Jan 14 2018

aemerson committed rL322466: [GlobalISel][Legalizer] Convert some typedefs to using. NFC..
[GlobalISel][Legalizer] Convert some typedefs to using. NFC.
Jan 14 2018, 4:45 PM

Jan 5 2018

aemerson added a reviewer for D41774: [GlobalISel] Refactory CallLowering handleAssignments for custom <Target>CCState: qcolombet.
Jan 5 2018, 11:01 AM

Jan 4 2018

aemerson committed rL321819: Revert "[X86] Regenerate test".
Revert "[X86] Regenerate test"
Jan 4 2018, 12:21 PM
aemerson committed rL321813: [DAGCombine] Ensure SDNode use iterator is incremented properly..
[DAGCombine] Ensure SDNode use iterator is incremented properly.
Jan 4 2018, 10:39 AM

Jan 2 2018

aemerson committed rL321690: [GlobalISel][Legalizer] Fix legalization of llvm.smul.with.overflow.
[GlobalISel][Legalizer] Fix legalization of llvm.smul.with.overflow
Jan 2 2018, 8:58 PM
aemerson committed rL321662: [AArch64][GlobalISel] Fix assert fail with unknown intrinsic..
[AArch64][GlobalISel] Fix assert fail with unknown intrinsic.
Jan 2 2018, 10:57 AM
aemerson added a comment to D41334: [CodeExtractor] Use subset of function attributes for extracted function..

Post holiday ping. Happy new year! This updates CodeExtractor to propagate the function attributes for the original function to the extracted function (and the call to the extracted function). As the extracted function is a subset of the original function, I think that should be safe and desired (e.g. correctly preserving fastmath flags or ARM thumbness)

What about the noreturn attribute? Obviously the extracted function must include a return so it seems this would need to be dropped.

Jan 2 2018, 9:22 AM
aemerson committed rL321655: [AArch64][GlobalISel] Enable GlobalISel at -O0 by default.
[AArch64][GlobalISel] Enable GlobalISel at -O0 by default
Jan 2 2018, 8:32 AM
aemerson closed D41362: [AArch64][GlobalISel] Enable GlobalISel at -O0 by default.
Jan 2 2018, 8:32 AM
aemerson accepted D41362: [AArch64][GlobalISel] Enable GlobalISel at -O0 by default.
Jan 2 2018, 8:30 AM
aemerson added a comment to D41362: [AArch64][GlobalISel] Enable GlobalISel at -O0 by default.

Hi,

I see all issues that came up in this thread covered by the last patch. Before this can be committed I still want to check that all paths/issues are tested/covered wrt to fast-isel:
a) how do we guarantee that there is no fallback from GISel to FastISel (when GISel is supported)? This is probably a nit since it is obvious to everyone deeper in the implementation then I am.
b) for all the tests where fast-isel was added shouldn't there equivalent tests for GISel, too? Even if the tests target fast-isel specific issues how do we make sure GISel does not expose similar/same bugs?

Thanks
Gerolf

Reading the code again I think we're covered for the fall back issue for the cases where TargetOptions::EnableFastISel is queried.

Jan 2 2018, 4:36 AM

Dec 21 2017

aemerson updated the diff for D41362: [AArch64][GlobalISel] Enable GlobalISel at -O0 by default.

Patch updated. I've changed the abort method to no longer be an override. It doesn't really make sense to override it since only the TPC implementation can access the CLI options, so overriding it wouldn't work anyway.

Dec 21 2017, 8:38 AM

Dec 20 2017

aemerson added a comment to D41362: [AArch64][GlobalISel] Enable GlobalISel at -O0 by default.

Sounds like this option doesn’t use the fallback path.
I thought it did.
Something to double check.

Dec 20 2017, 9:05 PM
aemerson added a comment to D41373: [GISel][RFC]: GlobalISel Combiner prototype.

I think it would be helpful to articulate here or in another patch/discussion the rationale for having a pre-legalize pass. While targets can of course do as they see fit, we should have some documentation on the source explaining what kind things are expected to be done there, and what kind of things are suggested to be done later. I.e. we can do some early canonicalization, early simplification to save compile time etc.

Dec 20 2017, 4:23 PM
aemerson requested review of D41362: [AArch64][GlobalISel] Enable GlobalISel at -O0 by default.

I've updated the patch and introduced a new default behavior for -global-isel-abort so it can co-operate with targets which have GISel enabled by default. The bug Eli raised should also be fixed as well in another commit.

Dec 20 2017, 12:39 PM
aemerson updated the diff for D41362: [AArch64][GlobalISel] Enable GlobalISel at -O0 by default.
Dec 20 2017, 12:36 PM

Dec 19 2017

aemerson committed rL321091: [GlobalISel][Legalizer] Fix crash when trying to lower G_FNEG of fp128 types..
[GlobalISel][Legalizer] Fix crash when trying to lower G_FNEG of fp128 types.
Dec 19 2017, 9:22 AM

Dec 18 2017

aemerson created D41362: [AArch64][GlobalISel] Enable GlobalISel at -O0 by default.
Dec 18 2017, 10:59 AM

Dec 16 2017

aemerson added a comment to D40863: [AArch64][Darwin] Implement stack probing for static and dynamic stack objects.

It would be helpful to describe somewhere what exactly stack probing is. Maybe add more comments to emitStackProbe() and the commit message.

Is it one of those situations where you have to touch the OS pages backing stack memory one after the other (instead of accidentally jumping across pages for big arrays)?

Yes, that's correct. The default implementation I've created in D40857 in compiler-rt loads data in 4096 (=page size) byte intervals. This ensures that the stack guard page is always hit

Since aarch64 on darwin isn't exactly new, how did expanding the stack by more than 4096 bytes work prior to this patchset? Functions allocating more than 4096 bytes of stack space isn't exactly uncommon. Will darwin start requiring this if it detects an executable built by a new enough toolchain to support it?

The motivation for stack probing here is different to the Windows case, although the mechanism is the same. For Darwin this is a security feature to protect against stack clash based attacks.

Dec 16 2017, 7:27 AM

Dec 11 2017

aemerson committed rL320388: [GlobalISel] Disable GISel for big endian..
[GlobalISel] Disable GISel for big endian.
Dec 11 2017, 8:59 AM
aemerson closed D40789: [GlobalISel] Disable GISel for big endian by committing rL320388: [GlobalISel] Disable GISel for big endian..
Dec 11 2017, 8:59 AM

Dec 8 2017

aemerson updated the diff for D40789: [GlobalISel] Disable GISel for big endian.

Thanks, I've added a new fallback test.

Dec 8 2017, 6:49 AM

Dec 6 2017

aemerson added a comment to D40789: [GlobalISel] Disable GISel for big endian.

Ping.

Dec 6 2017, 10:46 AM
aemerson added inline comments to D40863: [AArch64][Darwin] Implement stack probing for static and dynamic stack objects.
Dec 6 2017, 6:48 AM
aemerson added inline comments to D40864: [Darwin] Add a new -mstack-probe option and enable by default.
Dec 6 2017, 6:46 AM

Dec 5 2017

aemerson added a comment to D40863: [AArch64][Darwin] Implement stack probing for static and dynamic stack objects.

It would be helpful to describe somewhere what exactly stack probing is. Maybe add more comments to emitStackProbe() and the commit message.

Is it one of those situations where you have to touch the OS pages backing stack memory one after the other (instead of accidentally jumping across pages for big arrays)?

Dec 5 2017, 3:23 PM
aemerson added a comment to D40861: [X86] Add support for stack probing on x86_64 Darwin.

I'm a little confused here, is the intent that this will be the default on the platform? If not, can you explain the functional difference between this and just using the "probe-stack" attribute with ___chkstk_darwin?

Dec 5 2017, 3:13 PM
aemerson added a dependent revision for D40863: [AArch64][Darwin] Implement stack probing for static and dynamic stack objects: D40864: [Darwin] Add a new -mstack-probe option and enable by default.
Dec 5 2017, 3:07 PM
aemerson added a dependency for D40864: [Darwin] Add a new -mstack-probe option and enable by default: D40863: [AArch64][Darwin] Implement stack probing for static and dynamic stack objects.
Dec 5 2017, 3:07 PM
aemerson created D40864: [Darwin] Add a new -mstack-probe option and enable by default.
Dec 5 2017, 3:07 PM
aemerson added a dependent revision for D40857: [AArch64][Darwin] Add new ARM64 stack probing function for Darwin: D40863: [AArch64][Darwin] Implement stack probing for static and dynamic stack objects.
Dec 5 2017, 2:59 PM
aemerson added dependencies for D40863: [AArch64][Darwin] Implement stack probing for static and dynamic stack objects: D40857: [AArch64][Darwin] Add new ARM64 stack probing function for Darwin, D40861: [X86] Add support for stack probing on x86_64 Darwin.
Dec 5 2017, 2:59 PM
aemerson added a dependent revision for D40861: [X86] Add support for stack probing on x86_64 Darwin: D40863: [AArch64][Darwin] Implement stack probing for static and dynamic stack objects.
Dec 5 2017, 2:59 PM