[PATCH] D64152: [Attributor] Deduce "align" attribute on return value

Hideto Ueno via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 3 12:48:33 PDT 2019


uenoku marked an inline comment as done.
uenoku added a comment.

@jdoerfert 
I know align attribute is integer attribute and we need somewhat different deduction with other attributes. However, I implement `AAAlignImpl` as a subclass of BooleanState for now. Is it better to add some base class for the integer attribute?



================
Comment at: llvm/test/Transforms/FunctionAttrs/align.ll:35
+
+; TEST 5
+; declare align 8 i32* @align8() #0  
----------------
I want to test this for 
```
    if (ICS && ICS.hasRetAttr(Attribute::Alignment))
      return CompareOrSet(ICS.getRetAlignment());
```
but it does not work well now.
I find that ICS.hasRetAttr(Attribute::Alignment) returns true but ICS.getRetAlignment() returns 0 and get error in the current implementation. I think maybe that this is parse level problem... I'll investigate more.




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

https://reviews.llvm.org/D64152





More information about the llvm-commits mailing list