[PATCH] D72475: [WIP] Build assume from call

Tyker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 13 10:35:26 PST 2020


Tyker added a comment.

In D72475#1817423 <https://reviews.llvm.org/D72475#1817423>, @jdoerfert wrote:

>   `bool getAttributeFromAssume(Value &Base, CallInst &AssumeCI, Attribute::Kind Kind, int &Value)`
>
> and similar for string attributes. Alternatively we could return a map from `WhatOn` values to attributes.


something like that seem fine.

> I don't understand. What do you mean by "good names"? We have the operand bundle strings, right?

I meant that in the operand bundle the first argument is the WasOn and the second is optionally the attributes value.
but users shouldn't have to use magic numbers to access those fields.

> Agreed that an API should hide the actual encoding, thus the above grouping is something we should be able to do easily.

i don't know if the grouping is desirable it makes arguments in the bundle more confusing when there is the attribute has an optional argument.
but i wanted to have the opportunity to tweak the representation later.

is there any comment left on this patch ?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72475/new/

https://reviews.llvm.org/D72475





More information about the llvm-commits mailing list