Page MenuHomePhabricator
Feed Advanced Search

Jun 4 2020

anna accepted D81121: [Statepoint] Switch RS4GC to using gc-live bundle form.

Code LGTM. quick glance at tests.

Jun 4 2020, 12:45 PM · Restricted Project

Jun 2 2020

anna added a comment to D80937: Introduce a "gc-live" bundle for the gc arguments of a statepoint.

LGTM w/ comments inline.

Jun 2 2020, 10:25 AM · Restricted Project
anna accepted D80937: Introduce a "gc-live" bundle for the gc arguments of a statepoint.
Jun 2 2020, 10:25 AM · Restricted Project

May 26 2020

anna accepted D80598: Start migrating away from statepoint's inline length prefixed argument bundles.

LGTM. thanks for working on this! Apart from dropping all of the extra handling code in RS4GC and verifier (which itself is a really good reason for this support btw), I'm assuming this for optimizations which know about the deopt_op bundle (or gc_transition bundle) after relocations are made explicit? i.e., a general robustness patch.

May 26 2020, 8:10 PM · Restricted Project

May 15 2020

anna committed rG7cc3769adb15: [VectorUtils] Expose vector-function-abi-variant mangling as a utility. (authored by anna).
[VectorUtils] Expose vector-function-abi-variant mangling as a utility.
May 15 2020, 9:13 AM
anna closed D79867: [VectorUtils] Expose vector-function-abi-variant mangling as a utility. NFC.
May 15 2020, 9:13 AM · Restricted Project
anna added a comment to D79867: [VectorUtils] Expose vector-function-abi-variant mangling as a utility. NFC.

thank you for the review!

May 15 2020, 9:11 AM · Restricted Project

May 14 2020

anna updated the diff for D79867: [VectorUtils] Expose vector-function-abi-variant mangling as a utility. NFC.

addressed review comment about test case.

May 14 2020, 4:53 PM · Restricted Project
anna added inline comments to D79867: [VectorUtils] Expose vector-function-abi-variant mangling as a utility. NFC.
May 14 2020, 4:53 PM · Restricted Project
anna updated the diff for D79867: [VectorUtils] Expose vector-function-abi-variant mangling as a utility. NFC.

addressed review comments. Added unittest case.

May 14 2020, 2:08 PM · Restricted Project
anna added inline comments to D79867: [VectorUtils] Expose vector-function-abi-variant mangling as a utility. NFC.
May 14 2020, 1:36 PM · Restricted Project
anna committed rGeb282be9f8e9: [RS4GC] Fix algorithm to avoid setting vector BDV for scalar derived pointer"" (authored by anna).
[RS4GC] Fix algorithm to avoid setting vector BDV for scalar derived pointer""
May 14 2020, 8:38 AM
anna committed rGf20c62741e7b: Revert "[RS4GC] Fix algorithm to avoid setting vector BDV for scalar derived… (authored by anna).
Revert "[RS4GC] Fix algorithm to avoid setting vector BDV for scalar derived…
May 14 2020, 7:33 AM
anna added a reverting change for rGbb308b020522: [RS4GC] Fix algorithm to avoid setting vector BDV for scalar derived pointer: rGf20c62741e7b: Revert "[RS4GC] Fix algorithm to avoid setting vector BDV for scalar derived….
May 14 2020, 7:33 AM
anna committed rGbb308b020522: [RS4GC] Fix algorithm to avoid setting vector BDV for scalar derived pointer (authored by anna).
[RS4GC] Fix algorithm to avoid setting vector BDV for scalar derived pointer
May 14 2020, 7:32 AM
anna closed D76305: [RS4GC] Fix algorithm to avoid setting vector BDV for scalar derived pointer.

Landed as bb308b020522420413c7d3f2989a88f2fc423c56.

May 14 2020, 7:32 AM · Restricted Project
anna added inline comments to D76305: [RS4GC] Fix algorithm to avoid setting vector BDV for scalar derived pointer.
May 14 2020, 6:25 AM · Restricted Project

May 13 2020

anna added a comment to D79867: [VectorUtils] Expose vector-function-abi-variant mangling as a utility. NFC.

Thanks Johannes. @fpetrogalli Francesco, I believe I've addressed your concern as well?

May 13 2020, 12:32 PM · Restricted Project
anna committed rG0ab3ba230e92: NFC: Avoid redundant checks for vector-function-abi-variant attribute (authored by anna).
NFC: Avoid redundant checks for vector-function-abi-variant attribute
May 13 2020, 10:51 AM
anna added a comment to D70107: [VFABI] TargetLibraryInfo mappings in IR..
I don't see anything preventing this from being a function attribute as well.

HI @anna ,

apologies in advance for the late reply.

I don't think we want this. Imagine situation in which proto.h contains a scalar declaration foo marked with #pragma ompe declare simd. Suppose you include this header in 2 compilation units, one (sourceA.c) that can be compiled with -fopenmp-simd, and one (sourceB.c) that cannot be compiled with openmp - for any reason, for example because of some requirements on floating points computations. Then, you want to do some optimization that involves merging the two modules. The calls to foo in the IR generated from sourceB.c suddenly become vectorizable, which is wrong. So, overall, I think we should not attach this attribute to a function declaration.

I appreciate that what I described might be a remote possibility, but if we ever end up having to deal with it, it will be quite hard to fix.

Let me know if you have any question.

Kind regards,

Francesco

May 13 2020, 10:17 AM · Restricted Project
anna added a comment to D79867: [VectorUtils] Expose vector-function-abi-variant mangling as a utility. NFC.

Hi @fpetrogalli,
Yes, but it should be orthogonal to that requirement. I think hiding the mangling behind a static function, while the demangling is exposed seems unintuitive. Any front-ends that need to attach the attribute will need this function exposed.

May 13 2020, 10:17 AM · Restricted Project
anna added a reviewer for D79867: [VectorUtils] Expose vector-function-abi-variant mangling as a utility. NFC: ebrevnov.
May 13 2020, 8:38 AM · Restricted Project
anna created D79867: [VectorUtils] Expose vector-function-abi-variant mangling as a utility. NFC.
May 13 2020, 8:37 AM · Restricted Project

May 6 2020

anna added a comment to D70107: [VFABI] TargetLibraryInfo mappings in IR..

Francesco @fpetrogalli, I was reusing this attribute for custom scalar functions and I have a fundamental question - why is it that this *only* a callsite attribute? I don't see anything preventing this from being a function attribute as well. The meaning for the function attribute being if "variant-abi" is present on the function, it implies all callsites calling this particular function has that attribute. Of course, if you have multiple units being finally linked, it is the responsibility of the front end to choose it it wants to add the function attribute or a callsite attribute. However, I strongly feel we should have support for both, because there are use cases where the vector shape etc does not change depending on the callsite. Was there a reason for not supporting it as a function attribute as well?

May 6 2020, 12:25 PM · Restricted Project
anna added a comment to D70107: [VFABI] TargetLibraryInfo mappings in IR..

Francesco @fpetrogalli, I was reusing this attribute for custom scalar functions and I have a fundamental question - why is it that this *only* a callsite attribute? I don't see anything preventing this from being a function attribute as well. The meaning for the function attribute being if "variant-abi" is present on the function, it implies all callsites calling this particular function has that attribute. Of course, if you have multiple units being finally linked, it is the responsibility of the front end to choose it it wants to add the function attribute or a callsite attribute. However, I strongly feel we should have support for both, because there are use cases where the vector shape etc does not change depending on the callsite. Was there a reason for not supporting it as a function attribute as well?

May 6 2020, 12:25 PM · Restricted Project

May 5 2020

anna added a comment to D70107: [VFABI] TargetLibraryInfo mappings in IR..

For my purposes, our front-end converts the code into IR and our use case works with adding the attribute at that point itself. I was hoping to actually avoid having the various vector declarations in the IR - frankly it's just for IR cleanliness and some compile time (depending on number of vector variants for each such scalar function) since the vector declarations won't typically be used until we do a pass for some form of vectorization (loop/SLP etc).

I understand - this was our original intent too. Add the attribute and build the vector function signature at compile time in the middle end, our of the scalar signature in the IR and the mangled string of the vector function name. We started this work last summer, until our intern @aranisumedh found out that it was not possible to retrieve the vector signatures in some cases [1]. Essentially, it turned out that only the frontend has enough information about the language types that are needed to build the correct signature in IR. hence, we decided the vector declaration to be required in the IR.

[1] See this: http://lists.llvm.org/pipermail/llvm-dev/2019-June/133225.html, and the follow up discussion. Let me know if you have any question!

what I was thinking of adding in inject-TLI-mappings or a separate pass such as "inject-vector-declarations" is:

if (call->hasAttr("variant-abi")) {
  getVectorVariantFromAttr(call, VariantNames)
  for (VName: VariantNames) 
    addVariantDeclaration(CI, VF, VName);
}

So, to that end, I think it would be better to make the property that the "vector name mentioned in the attribute should be present in the IR as a vector function declaration" as optional?

Sorry, I don't think we can do this, for the aforementioned reason, and for the sake of consistency. It would be bad to end up having code to handle the custom behavior of the attribute.

Thanks for the clarification here.

May 5 2020, 8:03 AM · Restricted Project

May 4 2020

anna added a comment to D70107: [VFABI] TargetLibraryInfo mappings in IR..

Thank you for the detailed and quick response @fpetrogalli.

@fpetrogalli I have a high level question - why does this pass require that the function should be from one of the vector libraries (Mass, SMVL etc)? I'd like to piggy-back on the vector-function-abi-variant attribute to vectorize a call to a scalar function, once the front-end adds this attribute to the callsite. So, if we have the following code in IR, with a scalar call to a function trivially.vectorizable.func with the vector-function-abi-variant attribute, we will generate the vector function declarations and then LoopVectorizer/SLPVectorizer would do its thing.

Hi @anna ,

this is exactly what the attribute is for. This pass works only with the library recognized by the TLI as a shortcut implementation to avoid doing the codegeneration of the attribute for the library functions in the frontend.

As things are, if you run opt with -O2 on your IR, the code should be vectorized with a call to the vector version, if not for the fact that the IR is missing the declaration of the actual vector function. In fact, the vector-function-abi-variant attribute requires that all the mappings listed in the attribute are resolved by some declaration/definition in the IR.

Ah, interesting. I hadn't noticed that property of the attribute. So, basically, if we were to pass the attribute through the front-end, we're required to keep the vector declarations in the IR as well.

May 4 2020, 2:32 PM · Restricted Project
anna added a comment to D70107: [VFABI] TargetLibraryInfo mappings in IR..

@fpetrogalli I have a high level question - why does this pass require that the function should be from one of the vector libraries (Mass, SMVL etc)? I'd like to piggy-back on the vector-function-abi-variant attribute to vectorize a call to a scalar function, once the front-end adds this attribute to the callsite. So, if we have the following code in IR, with a scalar call to a function trivially.vectorizable.func with the vector-function-abi-variant attribute, we will generate the vector function declarations and then LoopVectorizer/SLPVectorizer would do its thing.

May 4 2020, 11:15 AM · Restricted Project

Apr 17 2020

anna committed rGfd5e069d23bf: Fix buildbot failure due to obsolete CallSite usage (authored by anna).
Fix buildbot failure due to obsolete CallSite usage
Apr 17 2020, 3:11 PM
anna added a comment to D76792: [InlineFunction] Update metadata on loads that are return values.

Hi, some of our internal tests seems to have started crashing due to this patch.

Here's a bug report with a reduced test: https://bugs.llvm.org/show_bug.cgi?id=45590

Please take a look.

Apr 17 2020, 3:10 PM · Restricted Project
anna committed rGef49b1d97e1a: Revert "[InlineFunction] Update metadata on loads that are return values" (authored by anna).
Revert "[InlineFunction] Update metadata on loads that are return values"
Apr 17 2020, 2:38 PM
anna added a reverting change for rG1d0f75790491: [InlineFunction] Update metadata on loads that are return values: rGef49b1d97e1a: Revert "[InlineFunction] Update metadata on loads that are return values".
Apr 17 2020, 2:38 PM

Apr 6 2020

anna added a comment to D76305: [RS4GC] Fix algorithm to avoid setting vector BDV for scalar derived pointer.

ping.

Apr 6 2020, 9:11 AM · Restricted Project

Apr 5 2020

anna committed rG1d0f75790491: [InlineFunction] Update metadata on loads that are return values (authored by anna).
[InlineFunction] Update metadata on loads that are return values
Apr 5 2020, 12:17 PM
anna closed D76792: [InlineFunction] Update metadata on loads that are return values.
Apr 5 2020, 12:17 PM · Restricted Project

Apr 2 2020

anna committed rGbf7a16a76871: [InlineFunction] Update valid return attributes at callsite within callee body (authored by anna).
[InlineFunction] Update valid return attributes at callsite within callee body
Apr 2 2020, 11:24 AM
anna closed D76140: [InlineFunction] update attributes during inlining.
Apr 2 2020, 11:23 AM · Restricted Project, Restricted Project
anna added a comment to D76792: [InlineFunction] Update metadata on loads that are return values.

thanks for the review @jdoerfert . Will incorporate these changes and rebase on landed D76140.

Apr 2 2020, 11:22 AM · Restricted Project
anna added a comment to D76140: [InlineFunction] update attributes during inlining.

LGTM again, with minor change.

will update it.

p.s. Sorry for missing the functional issue the first time. All of the test changes should have made the issue obvious, but despite reading the LangRef description of signext, I somehow managed to miss the separation between ABI and optimization attributes.

thanks for the review Philip and pointing out the problem. All of us had missed the functional issue the first time around.

Apr 2 2020, 10:17 AM · Restricted Project, Restricted Project

Apr 1 2020

anna updated the diff for D76140: [InlineFunction] update attributes during inlining.

fixed missing code left out during rebase.

Apr 1 2020, 9:01 AM · Restricted Project, Restricted Project
anna requested review of D76140: [InlineFunction] update attributes during inlining.

fixed buildbot failure. see above comments and added testcase test8.

Apr 1 2020, 8:27 AM · Restricted Project, Restricted Project
anna updated the diff for D76140: [InlineFunction] update attributes during inlining.

whitelist valid return attributes and only add those. Added testcase for signext.

Apr 1 2020, 8:27 AM · Restricted Project, Restricted Project

Mar 31 2020

anna added inline comments to D76140: [InlineFunction] update attributes during inlining.
Mar 31 2020, 2:17 PM · Restricted Project, Restricted Project
anna added a comment to D44429: [BinaryFormat] MessagePack reader/writer.

Hi,

It looks like there's some UB in this code. Pls see this failure: https://reviews.llvm.org/D76140#1953201
I'm not sure how to go about fixing the MsgPackReader code.
@scott.linder Could you PTAL?

Mar 31 2020, 2:17 PM
anna planned changes to D76140: [InlineFunction] update attributes during inlining.

see above comment.

Mar 31 2020, 2:17 PM · Restricted Project, Restricted Project
anna reopened D76140: [InlineFunction] update attributes during inlining.

I got a failure in one of the binaryFormats:
lib/BinaryFormat/CMakeFiles/LLVMBinaryFormat.dir/MsgPackReader.cpp

Attributes 'zeroext and signext' are incompatible!
  %rev.i.i.i.i.i.i.i.i = tail call signext zeroext i16 @llvm.bswap.i16(i16 %ret.0.copyload.i.i.i.i) #6
in function _ZN4llvm7msgpack6Reader7readIntIsEENS_8ExpectedIbEERNS0_6ObjectE
fatal error: error in backend: Broken function found, compilation aborted!

I believe this just showcases undefined behaviour since we were having a returnValue (i.e. call) with an incomptable attribute compared to the return attribute on the callsite.

Mar 31 2020, 2:17 PM · Restricted Project, Restricted Project
anna committed rG58a05675daf4: Revert "[InlineFunction] Handle return attributes on call within inlined body" (authored by anna).
Revert "[InlineFunction] Handle return attributes on call within inlined body"
Mar 31 2020, 1:47 PM
anna added a reverting change for rG28518d9ae39f: [InlineFunction] Handle return attributes on call within inlined body: rG58a05675daf4: Revert "[InlineFunction] Handle return attributes on call within inlined body".
Mar 31 2020, 1:47 PM
anna added a comment to D44429: [BinaryFormat] MessagePack reader/writer.

It looks like there's some UB in this code. Pls see this failure: https://reviews.llvm.org/D76140#1953201
I'm not sure how to go about fixing the MsgPackReader code.
@scott.linder Could you PTAL?

Mar 31 2020, 1:07 PM
anna added a comment to D76140: [InlineFunction] update attributes during inlining.

I got a failure in one of the binaryFormats:
lib/BinaryFormat/CMakeFiles/LLVMBinaryFormat.dir/MsgPackReader.cpp

Attributes 'zeroext and signext' are incompatible!
  %rev.i.i.i.i.i.i.i.i = tail call signext zeroext i16 @llvm.bswap.i16(i16 %ret.0.copyload.i.i.i.i) #6
in function _ZN4llvm7msgpack6Reader7readIntIsEENS_8ExpectedIbEERNS0_6ObjectE
fatal error: error in backend: Broken function found, compilation aborted!
Mar 31 2020, 1:07 PM · Restricted Project, Restricted Project
anna committed rG28518d9ae39f: [InlineFunction] Handle return attributes on call within inlined body (authored by anna).
[InlineFunction] Handle return attributes on call within inlined body
Mar 31 2020, 12:00 PM
anna closed D76140: [InlineFunction] update attributes during inlining.
Mar 31 2020, 11:59 AM · Restricted Project, Restricted Project

Mar 30 2020

anna added inline comments to D76140: [InlineFunction] update attributes during inlining.
Mar 30 2020, 3:16 PM · Restricted Project, Restricted Project
anna updated the diff for D76140: [InlineFunction] update attributes during inlining.

addressed review comments. Added two test cases: deref value being different, inlined callee body better optimized compared to callee.

Mar 30 2020, 2:44 PM · Restricted Project, Restricted Project
anna added inline comments to D76140: [InlineFunction] update attributes during inlining.
Mar 30 2020, 11:56 AM · Restricted Project, Restricted Project

Mar 26 2020

anna updated the diff for D76792: [InlineFunction] Update metadata on loads that are return values.

addressed review comments

Mar 26 2020, 1:39 PM · Restricted Project
anna updated the diff for D76140: [InlineFunction] update attributes during inlining.

NFC w.r.t prev diff. Use VMap.lookup instead of a lambda which does the same.

Mar 26 2020, 9:11 AM · Restricted Project, Restricted Project
anna added inline comments to D76792: [InlineFunction] Update metadata on loads that are return values.
Mar 26 2020, 6:28 AM · Restricted Project

Mar 25 2020

anna added a parent revision for D76792: [InlineFunction] Update metadata on loads that are return values: D76140: [InlineFunction] update attributes during inlining.
Mar 25 2020, 11:53 AM · Restricted Project
anna added a child revision for D76140: [InlineFunction] update attributes during inlining: D76792: [InlineFunction] Update metadata on loads that are return values.
Mar 25 2020, 11:53 AM · Restricted Project, Restricted Project
anna created D76792: [InlineFunction] Update metadata on loads that are return values.
Mar 25 2020, 11:53 AM · Restricted Project
anna added reviewers for D76792: [InlineFunction] Update metadata on loads that are return values: reames, jdoerfert, apilipenko.
Mar 25 2020, 11:53 AM · Restricted Project
anna added a comment to D63525: LangRef: Attempt to formulate some rules for addrspacecast.

Just chiming in here. We are planning to use addrspacecast for pointer width conversion (32 to 64 bit and vice-versa). Does not change the memory in anyway, i.e. if we lowered the addrspacecast into an IR call, that call could be marked argmemonly readnone. However, it is *not* a simple sign-extend/truncate either.
I've added some comments inline. Also, I think we have the scope to improve optimizations for addrspacecast at IR level, which is currently limited because different targets have varying lowering for addrspacecast.

Mar 25 2020, 11:21 AM · Restricted Project
anna added a comment to D76140: [InlineFunction] update attributes during inlining.

ping.

Mar 25 2020, 6:27 AM · Restricted Project, Restricted Project

Mar 23 2020

anna added inline comments to D76140: [InlineFunction] update attributes during inlining.
Mar 23 2020, 7:03 AM · Restricted Project, Restricted Project

Mar 22 2020

anna added inline comments to D76140: [InlineFunction] update attributes during inlining.
Mar 22 2020, 11:13 AM · Restricted Project, Restricted Project
anna updated the diff for D76140: [InlineFunction] update attributes during inlining.

Noticed while adding couple more tests, there were 2 bugs:

Mar 22 2020, 11:12 AM · Restricted Project, Restricted Project
anna added inline comments to D76140: [InlineFunction] update attributes during inlining.
Mar 22 2020, 9:36 AM · Restricted Project, Restricted Project

Mar 20 2020

anna updated the diff for D76140: [InlineFunction] update attributes during inlining.

use isGuaranteedToTransferExecutionToSuccessor instead of MayThrow

Mar 20 2020, 5:23 AM · Restricted Project, Restricted Project
Herald added a reviewer for D76140: [InlineFunction] update attributes during inlining: aartbik.
Mar 20 2020, 4:51 AM · Restricted Project, Restricted Project

Mar 19 2020

anna updated the diff for D76305: [RS4GC] Fix algorithm to avoid setting vector BDV for scalar derived pointer.

refactored code, made asserts cleaner.

Mar 19 2020, 1:09 PM · Restricted Project
anna updated the diff for D76140: [InlineFunction] update attributes during inlining.

fixed clang tests. rot-intrinsics.c testcase has 5 different RUNs with 3 prefixes. Depending on target-triple, the attribute is added to the caller, so I've disabled the optimization for that specific test with -update-return-attrs=false

Mar 19 2020, 12:36 PM · Restricted Project, Restricted Project
anna added inline comments to D76305: [RS4GC] Fix algorithm to avoid setting vector BDV for scalar derived pointer.
Mar 19 2020, 8:04 AM · Restricted Project
anna planned changes to D76305: [RS4GC] Fix algorithm to avoid setting vector BDV for scalar derived pointer.

Will avoid confusing usage with cleaner asserts.

Mar 19 2020, 8:04 AM · Restricted Project
anna updated the diff for D76305: [RS4GC] Fix algorithm to avoid setting vector BDV for scalar derived pointer.

addressed review comments. fixed CI failure related to clang-tidy.

Mar 19 2020, 6:59 AM · Restricted Project
anna added a comment to D76140: [InlineFunction] update attributes during inlining.

the test failures are related to attributes now being added to the calls in clang tests. All of these tests are using llvm intrinsics. Should we just disable this for intrinsic calls for now? Not sure how to update clang tests in the same patch as llvm project. Should be doable though.

Er, git is monorepo. Those tests should be checked out alongside your LLVM copy. You just need to build clang. You can and should simply update the tests in the same patch.

ah yes, I'd build llvm within it's own subdir without enabling any other projects. Build worked. thanks.

Mar 19 2020, 6:26 AM · Restricted Project, Restricted Project

Mar 17 2020

anna added a comment to D76140: [InlineFunction] update attributes during inlining.

the test failures are related to attributes now being added to the calls in clang tests. All of these tests are using llvm intrinsics. Should we just disable this for intrinsic calls for now? Not sure how to update clang tests in the same patch as llvm project. Should be doable though.

Mar 17 2020, 4:46 PM · Restricted Project, Restricted Project
anna updated the diff for D76140: [InlineFunction] update attributes during inlining.

addressed review comments. The analysis is conservative and test cases added show the negative cases where we should not backward propagate the attribute to the call (i.e. return value operand).

Mar 17 2020, 2:35 PM · Restricted Project, Restricted Project
anna updated the diff for D76305: [RS4GC] Fix algorithm to avoid setting vector BDV for scalar derived pointer.

fixed clang format. NFC w.r.t. prev diff.

Mar 17 2020, 12:56 PM · Restricted Project
anna created D76305: [RS4GC] Fix algorithm to avoid setting vector BDV for scalar derived pointer.
Mar 17 2020, 11:49 AM · Restricted Project

Mar 16 2020

anna planned changes to D76140: [InlineFunction] update attributes during inlining.

will update patch and place for review.

Mar 16 2020, 1:40 PM · Restricted Project, Restricted Project
anna added a comment to D76140: [InlineFunction] update attributes during inlining.

talked with Philip offline. We just need the check for non-trapping instructions between the return value (i.e. the call) and the return instruction. In other cases, it is either correct to propagate the nonnull-ness or it showcased a UB that already existed in the program.

Mar 16 2020, 1:07 PM · Restricted Project, Restricted Project

Mar 13 2020

anna added a comment to D76140: [InlineFunction] update attributes during inlining.

Anna, I'd encourage you to go very narrow here. We can resolve the correlated throw case with the following: require operand of return to be call instruction which is less than small constant window of non-trapping instructions before the return. (i.e. start with previous node) If we allow bitcasts, that provides reasonable coverage. We can always fallback to assumes as noted.

We don't need to be hugely general analysis wise to be very useful. Calls in tail positions or loads in analogous are very common. We should handle that obvious case.

Mar 13 2020, 6:22 PM · Restricted Project, Restricted Project
anna added a comment to D76140: [InlineFunction] update attributes during inlining.

hmm. yes, I can see this getting complicated for design and correctness. Thanks for the example @jdoerfert.

Mar 13 2020, 2:34 PM · Restricted Project, Restricted Project
anna retitled D76140: [InlineFunction] update attributes during inlining from [InlineFunction] update nonnnull attribute during inlining to [InlineFunction] update attributes during inlining.
Mar 13 2020, 2:01 PM · Restricted Project, Restricted Project
anna added a comment to D76140: [InlineFunction] update attributes during inlining.

In addition to @reames correctness concerns this is not valid for a different reason. You cannot backwards propagate information in the general case:

__attribute__((nonnull)) int *foo(int c) {
   int *A = unknown();
   int *B = unknown();
   do_sth_with_ptr_and_may_use_nonnull(A, B);
   return c ? A : B; // or if (C) return A; else return B;
}

Knowing foo returns a nonnull value cannot be used to annotate A or B.

Good catch, I'd missed that.

Just noticed this. I think we can special case this to: the return and def call are in the same basic block (it will take care of the if-else in the example) and has only one use which is the return. The latter takes care of avoiding incorrect semantics in that call do_sth_with_ptr_and_may_use_nonnull or any other use that depends on knowing which of the ptr is non-null.

Mar 13 2020, 2:01 PM · Restricted Project, Restricted Project
anna updated the diff for D76140: [InlineFunction] update attributes during inlining.

addressed review comments. This handles all attributes on the call and only done after the cloning of the inlined body.
Tests added for attributes and making sure the original callee does not have the attributes added within its body.

Mar 13 2020, 2:01 PM · Restricted Project, Restricted Project
anna created D76140: [InlineFunction] update attributes during inlining.
Mar 13 2020, 9:39 AM · Restricted Project, Restricted Project

Mar 6 2020

anna committed rG59029b9eef23: [RS4GC] Handle uses of extractelement for conversion from vector to scalar base (authored by anna).
[RS4GC] Handle uses of extractelement for conversion from vector to scalar base
Mar 6 2020, 1:50 PM
anna closed D75704: [RS4GC] Handle uses of extractelement for conversion from vector to scalar base.
Mar 6 2020, 1:49 PM · Restricted Project
anna updated the diff for D75704: [RS4GC] Handle uses of extractelement for conversion from vector to scalar base.

removed extra line. cleaned up whiitespace. NFC w.r.t. prev diff.

Mar 6 2020, 9:53 AM · Restricted Project
anna updated the diff for D75704: [RS4GC] Handle uses of extractelement for conversion from vector to scalar base.

changed to early-return, updated comments and test.

Mar 6 2020, 8:46 AM · Restricted Project
anna added a comment to D75704: [RS4GC] Handle uses of extractelement for conversion from vector to scalar base.

LGTM, but what about test failure? Please fix it

Mar 6 2020, 8:13 AM · Restricted Project

Mar 5 2020

anna updated the diff for D75704: [RS4GC] Handle uses of extractelement for conversion from vector to scalar base.

fixed dominator error.

Mar 5 2020, 7:07 PM · Restricted Project
anna added inline comments to D75704: [RS4GC] Handle uses of extractelement for conversion from vector to scalar base.
Mar 5 2020, 3:21 PM · Restricted Project
anna abandoned D52362: [CloneFunction] Simplify previously unsimplifiable instructions.

abandon revision - too old and context lost.

Mar 5 2020, 12:07 PM · Restricted Project
anna abandoned D50644: [WIP] [LAA] Allow runtime checks when strides different but address space does not wrap around.

abandoning this change - lost context.

Mar 5 2020, 11:33 AM · Restricted Project
anna created D75704: [RS4GC] Handle uses of extractelement for conversion from vector to scalar base.
Mar 5 2020, 11:32 AM · Restricted Project

Dec 4 2019

anna abandoned D57180: [LV] Avoid adding into interleaved group in presence of WAW dependency.
Dec 4 2019, 11:18 AM · Restricted Project
anna added a comment to D57180: [LV] Avoid adding into interleaved group in presence of WAW dependency.

hi, thanks guys. Sorry for the abnormally late response (was on mat leave). Yes, looks like this can be abandoned.

Dec 4 2019, 11:18 AM · Restricted Project