nlopes (Nuno Lopes)
User

Projects

User does not belong to any projects.

User Details

User Since
Oct 3 2013, 11:31 AM (250 w, 1 d)

Recent Activity

Tue, Jul 17

nlopes committed rL337307: devmtg201810: add SRC PC members.
devmtg201810: add SRC PC members
Tue, Jul 17, 10:55 AM

Mon, Jul 9

nlopes committed rL336535: update next conf date.
update next conf date
Mon, Jul 9, 3:23 AM

Sun, Jul 8

nlopes added a comment to D49042: [LangRef] Clarify alloca of zero bytes..

Does this mean we can "construct" undef as:

x = alloca 0
y = alloca 0
undef = x == y  // Non-deterministically 0 or 1

? If so, this is a problem since it means even if we spec un-initialized memory as poison we still have undef in the IR (with all the problems it brings).

Sun, Jul 8, 12:16 PM
nlopes added a comment to D49047: [InstCombine] fix shuffle-of-binops transform to avoid poison/undef .

BTW, I couldn't figure if this case is possible, but mentioning it just in case: it's also not legal to introduce 'sdiv undef, ..', since 'sdiv INT_MIN, -1' is UB. Same for srem. So we need to be careful when folding the shuffle on LHS as well.

Sun, Jul 8, 11:10 AM
nlopes added inline comments to D49041: [LangRef] Clarify undefined behavior for function attributes..
Sun, Jul 8, 8:05 AM

Fri, Jul 6

nlopes added inline comments to D48987: [InstCombine] drop poison flags for shuffle transforms with undefs.
Fri, Jul 6, 1:12 AM

Thu, Jul 5

nlopes added inline comments to D48987: [InstCombine] drop poison flags for shuffle transforms with undefs.
Thu, Jul 5, 2:32 PM

Wed, Jul 4

nlopes added a comment to D48893: [Constants, InstCombine] allow RHS (operand 1) identity constants for binops.

shl %x, undef is poison; we don't want more undefs :)
So this transformation for shifts is not correct. The way to make it correct would be to introduce a poison value and use it in the shuffle instructions instead of undef. I suggest we finally go ahead and do that.

  1. Does the 'undef' in the shuffle mask represent something different than the 'undef' in the shift amount?
Wed, Jul 4, 3:36 PM
nlopes added a comment to D48893: [Constants, InstCombine] allow RHS (operand 1) identity constants for binops.

shl %x, undef is poison; we don't want more undefs :)
So this transformation for shifts is not correct. The way to make it correct would be to introduce a poison value and use it in the shuffle instructions instead of undef. I suggest we finally go ahead and do that.

Wed, Jul 4, 1:51 AM

Tue, Jul 3

nlopes accepted D48860: Make llvm.objectsize more conservative with null in non-zero address spaces.

LGTM

Tue, Jul 3, 3:19 PM

Jun 17 2018

nlopes added inline comments to D48239: [LangRef] Clarify meaning of "dereferencable" attribute/metadata..
Jun 17 2018, 11:27 AM

Jun 12 2018

nlopes added inline comments to D48066: Add one more No-alias case to alias analysis..
Jun 12 2018, 5:57 AM
nlopes added inline comments to D48066: Add one more No-alias case to alias analysis..
Jun 12 2018, 5:39 AM
nlopes added inline comments to D47854: [LangRef] Clarify semantics of load metadata..
Jun 12 2018, 1:39 AM
nlopes added inline comments to D44748: Track whether the size of a MemoryLocation is precise.
Jun 12 2018, 1:29 AM

Jun 11 2018

nlopes added inline comments to D47854: [LangRef] Clarify semantics of load metadata..
Jun 11 2018, 3:51 AM
nlopes added inline comments to D47854: [LangRef] Clarify semantics of load metadata..
Jun 11 2018, 3:22 AM

Jun 9 2018

nlopes added inline comments to D47963: [LangRef] nnan and ninf produce poison..
Jun 9 2018, 3:05 PM

Jun 7 2018

nlopes added a comment to D47854: [LangRef] Clarify semantics of load metadata..

Yes, although hopefully align(4) would have also been specified on the function argument. As the reference must have been bound to a valid object, from C++ semantics, we should know that it's properly aligned. Do we do that now?

Jun 7 2018, 7:18 AM
nlopes added a comment to D47854: [LangRef] Clarify semantics of load metadata..

I just got a scary ah-ah moment..
Take this code:

Jun 7 2018, 7:01 AM
nlopes accepted D47851: [LangRef] fptosi and fptoui return poison on overflow..

The C++ standard defines this as UB: http://eel.is/c++draft/conv.fpint#1
"A prvalue of a floating-point type can be converted to a prvalue of an integer type. The conversion truncates; that is, the fractional part is discarded.
The behavior is undefined if the truncated value cannot be represented in the destination type."

Jun 7 2018, 6:10 AM
nlopes accepted D47859: [LangRef] insertelement/extractelement return poison for out of range..

LGTM

Jun 7 2018, 6:01 AM

Jun 5 2018

nlopes added inline comments to D47339: [GVN,NewGVN] Keep nonnull if K does not move..
Jun 5 2018, 8:12 AM
nlopes added inline comments to D47747: [LangRef] Clarify "undefined" for various instructions..
Jun 5 2018, 8:03 AM
nlopes added a comment to D47747: [LangRef] Clarify "undefined" for various instructions..

Eli, thanks a lot for kicking off the discussion. I think this patch is a bit too big since there are a few things that are not trivial.
For example, I would rather not introduce more functions returning undef, but rather return poison instead. If there's no good motivation for undef, poison should be used by default from now on, since it's much easier to handle than undef.
This patch also introduces a lot of UB with metadata tags, which is a departure from how we handle things like nsw/nuw which make the instructions yield poison instead of UB. Why is it more important to preserve nsw when hoisting an add than preserving !nonnull when hoisting a load? I really don't know; hence I'm asking.
I think it would help to split this patch a bit.

Jun 5 2018, 7:46 AM
nlopes updated subscribers of D47747: [LangRef] Clarify "undefined" for various instructions..
Jun 5 2018, 7:36 AM

Jun 4 2018

nlopes added inline comments to D47339: [GVN,NewGVN] Keep nonnull if K does not move..
Jun 4 2018, 3:02 PM
nlopes added inline comments to D47475: [Local] Make DoesKMove required for combineMetadata..
Jun 4 2018, 3:00 PM

May 28 2018

nlopes added a comment to D47339: [GVN,NewGVN] Keep nonnull if K does not move..

The optimization looks good to me.

May 28 2018, 12:11 PM

May 13 2018

nlopes committed rL332194: fix a slides link.
fix a slides link
May 13 2018, 2:24 AM

Apr 5 2018

nlopes added inline comments to D42381: [DA] Correct size parameter from dependency analysis to AA.
Apr 5 2018, 3:00 AM

Mar 31 2018

nlopes added a comment to D44748: Track whether the size of a MemoryLocation is precise.

LGTM, but I would wait for another review due to the size of the change.

Mar 31 2018, 11:30 AM

Mar 26 2018

nlopes added a comment to D44748: Track whether the size of a MemoryLocation is precise.

I like the direction in general. I've reviewed this patch and it LGTM (as well as the overall plan).
There are still a few corner cases we need to fix regarding the meaning of size -1, but I guess it's an orthogonal fix. Right now I don't know exactly what -1 size is: does it mean potentially access the whole object, or access the object from the current offset and potentially until the end?

Mar 26 2018, 12:17 PM
nlopes added a comment to D44884: Improving 'addArgumentAttrsFromCallsites' .

Please don't remove non-functional changes from this patch. It contains dozens of indentation changes which are completely unrelated with the intended change and make the review more difficult. There are also debug printfs included that need to be removed :)
This document may be useful: http://llvm.org/docs/Contributing.html

Mar 26 2018, 8:55 AM

Feb 20 2018

nlopes committed rL325638: open projects gsoc'18: add function attribute inference idea.
open projects gsoc'18: add function attribute inference idea
Feb 20 2018, 3:00 PM
nlopes committed rL325636: open projects: move LLVM gsoc'18 projects out od LLDB section.
open projects: move LLVM gsoc'18 projects out od LLDB section
Feb 20 2018, 2:43 PM

Feb 18 2018

nlopes added a comment to D43269: [MemorySSA] Be less aggressive with @llvm.lifetime.start.

Thanks @dberlin and @george.burgess.iv. I wasn't aware of this issue.

Feb 18 2018, 2:54 PM
nlopes added a comment to D43269: [MemorySSA] Be less aggressive with @llvm.lifetime.start.

Given that the original motivation for these lifetime intrinsincs was for inlining, I don't see a reason to support multiple start/ends on the same pointer.
Or is there another new use case that I'm unaware of? Also, we don't have any transformation splitting (or even shrinking I think) these lifetimes.

Feb 18 2018, 8:07 AM

Feb 11 2018

nlopes added a comment to D43141: [DAG] make binops with undef operands consistent with IR.

oh, wow, so many bugs in DAG combiner handling undef.. Nice table btw!

Feb 11 2018, 4:36 AM

Jan 17 2018

nlopes added a comment to D41944: [LLVM][IR][LIT] support of 'no-overflow' flag for sdiv\udiv instructions.

Before accepting this patch, we really need to see benchmark results. I'm not going to change clang to start emitting non-UB divs if the perf is going to be horrible. We need data.
Otherwise I don't see the need for this poison version of division. Could you elaborate if your plan is to expose this somehow to the application developer?

I'm sorry if this questions have been properly answered in the past. If so, could you please link them here?

In general the proposed feature allows compiler to start speculating div without worrying too much of div-by-zero etc. so for example you can do instruction hoisting or vectorizing predicated sdiv.
We are currently focused on vectorizing predicated div instruction and our implementation shows around 20-30% improvements on several tests of coremark-pro and denbench.

Jan 17 2018, 9:40 AM
nlopes added a comment to D41944: [LLVM][IR][LIT] support of 'no-overflow' flag for sdiv\udiv instructions.

Before accepting this patch, we really need to see benchmark results. I'm not going to change clang to start emitting non-UB divs if the perf is going to be horrible. We need data.
Otherwise I don't see the need for this poison version of division. Could you elaborate if your plan is to expose this somehow to the application developer?

Jan 17 2018, 8:53 AM

Dec 13 2017

nlopes added a comment to D40670: Let Alloca treated as nonnull for any alloca addr space value.

How about introduce nullptr value for each addr space in data layout? E.g., assume alloca addr space is 3 and nullptr value of addr space 3 is -1. alloca of addr space 3 could return 0, but never return -1.

Then this code

if (isa<AllocaInst>(V) && Q.DL.getAllocaAddrSpace() == 0)

can be changed as

if (isa<AllocaInst>(V) && Q.DL.getAllocaNullPointerValue() == 0)

This assumes that alloca never returns nullptr value.

Nuno, Sean, will this work for you?

Thanks.

Sorry for the delay.
What if a target doesn't have an invalid pointer? This is not uncommon in embedded ISAs.

I don't particularly like the idea of mixing null pointers (which we define as having the value zero ATM), alloca not being able to return a null pointer, and the possibility of changing the value of null pointers to a non-zero value.

How about adding a hook TargetTransformInfo::isAllocaPtrValueNonZero which returns true if alloca inst value is always non-zero.

The drawback is that some ValueTracking functions will depend on TargetTransformInfo. As a result, those passes using ValueTrackign will require TargetTransformInfo.

What do you think?

Thanks.

Dec 13 2017, 3:18 PM

Dec 12 2017

nlopes added a comment to D40670: Let Alloca treated as nonnull for any alloca addr space value.

How about introduce nullptr value for each addr space in data layout? E.g., assume alloca addr space is 3 and nullptr value of addr space 3 is -1. alloca of addr space 3 could return 0, but never return -1.

Then this code

if (isa<AllocaInst>(V) && Q.DL.getAllocaAddrSpace() == 0)

can be changed as

if (isa<AllocaInst>(V) && Q.DL.getAllocaNullPointerValue() == 0)

This assumes that alloca never returns nullptr value.

Nuno, Sean, will this work for you?

Thanks.

Dec 12 2017, 7:27 AM

Nov 30 2017

nlopes requested changes to D40670: Let Alloca treated as nonnull for any alloca addr space value.

This change is incorrect. null can be a valid pointer in a non-0 address space, and alloca may return it.
If your target's address space guarantees that alloca doesn't return null, then we can probably make this target-dependent. But we cannot simply make it unconditional; that's not correct.

Nov 30 2017, 2:32 PM

Nov 28 2017

nlopes resigned from D20375: [PM] Port Bounds-Checking to the new pass manager.
Nov 28 2017, 6:35 AM

Nov 23 2017

nlopes added a comment to D38569: Expose must/may alias info in MemorySSA..

An immediate usecase I have in LICM, is in very large testcases where I want to rely on MemorySSA's threshhold for optimizing MemUses.
I need to use getDefiningAccess() on a Use and query if the result given is May_Alias or Must_Alias. If the Use is not optimized, the result will always be MayAlias. If optimized, it may be May or Must.
Alias info is needed to avoid an additional AA.alias call when creating mssa alias sets for promotion.

It can certainly be used for more complex optimizations, aliasing between MemDefs is the most interesting to me. Since in MemorySSA all stores clobber all stores (until optimized), must alias info could be used to shortcut def alias chains. AFAIK this is done for MemUses, I don't think it's done for MemDefs.

Nov 23 2017, 5:21 AM
nlopes added inline comments to D38862: Add must alias info to ModRefInfo..
Nov 23 2017, 2:58 AM
nlopes added inline comments to D38862: Add must alias info to ModRefInfo..
Nov 23 2017, 2:56 AM

Nov 22 2017

nlopes added a comment to D39417: InstCombine: Preserve nuw when reassociating nuw ops.

This patch LGTM, except for the changes in tryFactorization(). It seems there's some code missing.

Nov 22 2017, 10:51 AM
nlopes added a comment to D38569: Expose must/may alias info in MemorySSA..

The concept looks interesting to me. I'll let the experts review the patch, though (I just skimmed over it).
Out of curiosity, what are the clients you envision could use this functionality?
I can imagine that we can do store forwarding with a mustalias MemUse if stored size >= load size. Also, a mustalias MemDef can kill the previous MemDef if it has no other uses (2 stores to same location).
Are there any other uses cases? Can it be used to simplify more complex optimizations? Even better, are there missing blocks that would be needed to simplify these optimizations? (tricky question; just wondering if you have some thoughts on that).

Nov 22 2017, 9:43 AM

Nov 21 2017

nlopes committed rL318786: removed unused private method decl. NFC.
removed unused private method decl. NFC
Nov 21 2017, 9:56 AM

Nov 9 2017

nlopes committed rL317815: revert r317812 [BasicAA] fix build break by converting the previously….
revert r317812 [BasicAA] fix build break by converting the previously…
Nov 9 2017, 9:35 AM
nlopes committed rL317812: [BasicAA] fix build break by converting the previously introduced assert into….
[BasicAA] fix build break by converting the previously introduced assert into…
Nov 9 2017, 9:06 AM
nlopes committed rL317803: [BasicAA] add assertion for corner case in aliasGEP().
[BasicAA] add assertion for corner case in aliasGEP()
Nov 9 2017, 8:17 AM

Nov 8 2017

nlopes committed rL317680: BasicAA: fix bug where we would return partialalias instead of noalias.
BasicAA: fix bug where we would return partialalias instead of noalias
Nov 8 2017, 2:59 AM

Oct 28 2017

nlopes committed rL316838: [pubs.js] add poison paper.
[pubs.js] add poison paper
Oct 28 2017, 12:30 PM

Sep 21 2017

nlopes added a comment to D37832: Eliminate PHI (int typed) which is only used by inttoptr.

Ok, mea culpa, I thought CreateBitOrPointerCast() would simply create a bitcast.
Then, what we have here is:

v = phi(ptr2int(p), ptr2int(q))
 =>
v = ptr2int(phi(p, q))
Sep 21 2017, 8:35 AM

Sep 20 2017

nlopes added a comment to D37832: Eliminate PHI (int typed) which is only used by inttoptr.

As I have mentioned, this patch itself does *not* fold any ptrtoint/inttoptr. It simply moves the intptr across the phi node. The folding you see with the test cases is done by existing optimizations, so I am not sure what the objection is about.

Sep 20 2017, 3:56 AM

Sep 19 2017

nlopes added a comment to D37832: Eliminate PHI (int typed) which is only used by inttoptr.

Ok, so after another scan through the patch and a discussion with Gil, I must say the transformation is not fully correct.

Sep 19 2017, 6:24 AM

Sep 18 2017

nlopes added a comment to D37832: Eliminate PHI (int typed) which is only used by inttoptr.

This transformation looks correct to me and goes in the right direction (remove unneeded int2ptr/ptr2int, since they block many optimizations). The patch can be made a bit more general later.
Before the patch goes in, please add a few negative tests; you only have positive ones. Thanks!

Sep 18 2017, 10:30 AM
nlopes added a comment to D37832: Eliminate PHI (int typed) which is only used by inttoptr.

This transformation looks correct to me and goes in the right direction (remove unneeded int2ptr/ptr2int, since they block many optimizations). The patch can be made a bit more general later.
Before the patch goes in, please add a few negative tests; you only have positive ones. Thanks!

Sep 18 2017, 6:17 AM

Sep 13 2017

nlopes accepted D37713: [InstSimplify] fold sdiv/srem based on compare of dividend and divisor.

LGTM, thanks.
You're right: the Boolean connector for the second transformation was flipped. All good now :)

Sep 13 2017, 11:26 AM

Sep 12 2017

nlopes requested changes to D37713: [InstSimplify] fold sdiv/srem based on compare of dividend and divisor.

I was trying to prove this in Alive, but the proof doesn't go through.
Some corner cases are not correct: http://rise4fun.com/Alive/iVs
For example: 'INT_MIN / something' would be replaced with 0, but shouldn't.

Sep 12 2017, 2:50 PM

Sep 9 2017

nlopes committed rL312870: clang fix for LLVM API change: isKnownNonNull -> isKnownNonZero.
clang fix for LLVM API change: isKnownNonNull -> isKnownNonZero
Sep 9 2017, 11:27 AM
nlopes committed rL312869: Merge isKnownNonNull into isKnownNonZero.
Merge isKnownNonNull into isKnownNonZero
Sep 9 2017, 11:25 AM
nlopes closed D37628: Cleanup: Merge isKnownNonNull into isKnownNonZero by committing rL312869: Merge isKnownNonNull into isKnownNonZero.
Sep 9 2017, 11:25 AM

Sep 8 2017

nlopes created D37628: Cleanup: Merge isKnownNonNull into isKnownNonZero.
Sep 8 2017, 9:09 AM

Sep 6 2017

nlopes committed rL312648: Fix PR33878: BasicAA incorrectly assumes different address spaces don't alias.
Fix PR33878: BasicAA incorrectly assumes different address spaces don't alias
Sep 6 2017, 9:57 AM
nlopes closed D37518: Fix PR33878: BasicAA incorrectly assumes different address spaces don't alias by committing rL312648: Fix PR33878: BasicAA incorrectly assumes different address spaces don't alias.
Sep 6 2017, 9:56 AM
nlopes created D37518: Fix PR33878: BasicAA incorrectly assumes different address spaces don't alias.
Sep 6 2017, 7:41 AM

Aug 12 2017

nlopes added a comment to D36592: [BDCE] clear poison generators after turning a value into zero (PR33695, PR34037).

LGTM, with minor comments: missing the CHECK comment above, and missing a test for the assume removal.

Aug 12 2017, 2:54 AM

Aug 10 2017

nlopes added inline comments to D29011: [IR] Add Freeze instruction.
Aug 10 2017, 3:51 AM

Aug 9 2017

nlopes committed rL310495: CFLAA: return MustAlias when pointers p, q are equal, i.e.,.
CFLAA: return MustAlias when pointers p, q are equal, i.e.,
Aug 9 2017, 10:05 AM

Aug 8 2017

nlopes committed rL310420: BasicAA: assert on another case where aliasGEP shouldn't get a PartialAlias….
BasicAA: assert on another case where aliasGEP shouldn't get a PartialAlias…
Aug 8 2017, 2:26 PM
nlopes committed rL310373: BasicAA: aliasGEP shouldn't get a PartialAlias response here.
BasicAA: aliasGEP shouldn't get a PartialAlias response here
Aug 8 2017, 9:16 AM

Jul 29 2017

nlopes added a comment to D35887: isKnownNonNull: recognize GEP inbounds as non-null.

isKnownNonZero was added in r124183; isKnownNonNull was originally part of BasicAA, then moved in r151446.

Jul 29 2017, 2:31 PM

Jul 28 2017

nlopes abandoned D35887: isKnownNonNull: recognize GEP inbounds as non-null.
Jul 28 2017, 6:12 AM

Jul 27 2017

nlopes added a comment to D35887: isKnownNonNull: recognize GEP inbounds as non-null.

Just realized there's a complicated isGEPKnownNonNull() in ValueTracking.cpp, which is use solely by isKnownNonZero().
I don't believe such a thing is necessary, since the input pointer to a GEP inbounds has to be non-null in address space 0. If others agree I'll also remove that function in a subsequent patch.

Jul 27 2017, 1:58 AM

Jul 26 2017

nlopes committed rL309117: [docs] change a few code-blocks to llvm from text.
[docs] change a few code-blocks to llvm from text
Jul 26 2017, 7:14 AM
nlopes resigned from D7583: asan: do not instrument direct inbounds accesses to stack variables.
Jul 26 2017, 5:58 AM
nlopes updated subscribers of D35887: isKnownNonNull: recognize GEP inbounds as non-null.
Jul 26 2017, 5:55 AM
nlopes created D35887: isKnownNonNull: recognize GEP inbounds as non-null.
Jul 26 2017, 5:55 AM

Jul 25 2017

nlopes accepted D35811: A workaround for the bug caused by descrepancy between loop-unswitch and GVN about branch on undef.

LGTM.
Seems good enough to me as a temporary hack.

Jul 25 2017, 1:05 AM

Jul 15 2017

nlopes committed rL308090: [docs] AliasAnalysis: clarify that PartialAlias doesn't enforce.
[docs] AliasAnalysis: clarify that PartialAlias doesn't enforce
Jul 15 2017, 2:09 AM

Jun 6 2017

nlopes committed rL304780: [docs] Make it clear shifts yield poison when shift amount >= bitwidth.
[docs] Make it clear shifts yield poison when shift amount >= bitwidth
Jun 6 2017, 1:28 AM
nlopes closed D33654: [docs] Make it clear shifts yield poison when shift amount >= bitwidth by committing rL304780: [docs] Make it clear shifts yield poison when shift amount >= bitwidth.
Jun 6 2017, 1:28 AM

May 30 2017

nlopes added a comment to D33654: [docs] Make it clear shifts yield poison when shift amount >= bitwidth.

This one for example (stole from Dave; I don't have my list here handy):
rewrite (1 << Y) * X into X << Y:

May 30 2017, 11:44 AM

May 29 2017

nlopes retitled D33654: [docs] Make it clear shifts yield poison when shift amount >= bitwidth from [docs] Make it clear shifts yield poison when shift ammount >= bitwidth to [docs] Make it clear shifts yield poison when shift amount >= bitwidth.
May 29 2017, 11:59 AM
nlopes created D33654: [docs] Make it clear shifts yield poison when shift amount >= bitwidth.
May 29 2017, 11:59 AM

May 5 2017

nlopes committed rL302246: fix build on Cygwin.
fix build on Cygwin
May 5 2017, 9:21 AM

Mar 27 2017

nlopes added a comment to D20116: Add speculatable function attribute.

Then we have an orthogonal concern which is what's the precondition that is sufficient to justify an optimization. For example, whether a function call can be executed speculatively is one of such preconditions. It can be derived by looking at the function attributes. For example, for speculative execution we probably need to know that the function doesn't write to memory and that it terminates.

It is not enough (for example division by zero).

Mar 27 2017, 1:38 AM

Mar 26 2017

nlopes added a comment to D20116: Add speculatable function attribute.

Let me maybe zoom out and give a different perspective:
Right now call site and function attributes are an AND of predicates that are always guaranteed to hold for that specific call site or for all call sites, respectively.
Predicates include things like doesn't write to memory, only writes to memory that is not observable, etc. Using attributes we can state that several of these predicates hold.
In the ideal world, predicates wouldn't overlap, although since we can only state ANDs of predicates and not ORs, some overlap may be need in practice.

Mar 26 2017, 8:17 AM

Mar 15 2017

nlopes committed rL297816: fix gcc -Wmisleading-indentation [NFC].
fix gcc -Wmisleading-indentation [NFC]
Mar 15 2017, 2:45 AM

Mar 11 2017

nlopes accepted D30834: [x86] these aren't the undefs you're looking for (PR32176).
Mar 11 2017, 1:26 AM

Mar 9 2017

nlopes committed rL297378: fix build on Cygwin.
fix build on Cygwin
Mar 9 2017, 5:55 AM

Mar 8 2017

nlopes added a comment to D30665: [InstSimplify] vector div/rem with any zero element in divisor is undef.

LGTM

Mar 8 2017, 1:38 AM

Feb 12 2017

nlopes added a comment to D29774: [InstCombine] fold icmp sgt/slt (add nsw X, C2), C --> icmp sgt/slt X, (C - C2).

LGTM.
The easy way to check for overflow in Alive: http://rise4fun.com/Alive/MH

Thanks! I should read some docs now. :)
It looks like I should start with the papers and presentations from previous LLVM dev confs...is there also a reference doc for the online tool?

Feb 12 2017, 3:04 PM
nlopes added a comment to D29774: [InstCombine] fold icmp sgt/slt (add nsw X, C2), C --> icmp sgt/slt X, (C - C2).

LGTM.
The easy way to check for overflow in Alive: http://rise4fun.com/Alive/MH

Feb 12 2017, 2:35 AM

Feb 5 2017

nlopes added inline comments to D29519: Add PredicateInfo utility and printing pass.
Feb 5 2017, 8:06 AM

Jan 28 2017

nlopes added a comment to D28952: [analyzer] Add new Z3 constraint manager backend.

Let me give just 2 more Z3-related suggestions:

  • instead of re-creating the solver, it might be faster to do Z3_solver_reset
  • "once in a while" it might be helpful to delete everything (all solvers, asts, context) and call Z3_reset_memory. Z3's small object pool is not very good and keeps growing /ad infinitum/, so cleaning it up once a while is a good thing (improves cache usage and reduces memory consumption).
Jan 28 2017, 12:32 PM