Commit Graph

7276 Commits

Author SHA1 Message Date
Craig Topper
d81950e977 [SCEV] Don't use std::move on both inputs to APInt::operator+ or operator-. It might be confusing to the reader. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302448 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-08 17:39:01 +00:00
Craig Topper
d99549318e [ValueTracking] Use KnownOnes to provide a better bound on known zeros for ctlz/cttz intrinics
This patch uses KnownOnes of the input of ctlz/cttz to bound the value that can be returned from these intrinsics. This makes these intrinsics more similar to the handling for ctpop which already uses known bits to produce a similar bound.

Differential Revision: https://reviews.llvm.org/D32521

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302444 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-08 17:22:34 +00:00
Sanjay Patel
e2d19343ab [InstSimplify] fix typo; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302439 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-08 16:35:02 +00:00
Craig Topper
3f38291e28 [ValueTracking] Introduce a version of computeKnownBits that returns a KnownBits struct. Begin using it to replace internal usages of ComputeSignBit
This introduces a new interface for computeKnownBits that returns the KnownBits object instead of requiring it to be pre-constructed and passed in by reference.

This is a much more convenient interface as it doesn't require the caller to figure out the BitWidth to pre-construct the object. It's so convenient that I believe we can use this interface to remove the special ComputeSignBit flavor of computeKnownBits.

As a step towards that idea, this patch replaces all of the internal usages of ComputeSignBit with this new interface. As you can see from the patch there were a couple places where we called ComputeSignBit which really called computeKnownBits, and then called computeKnownBits again directly. I've reduced those places to only making one call to computeKnownBits. I bet there are probably external users that do it too.

A future patch will update the external users and remove the ComputeSignBit interface. I'll also working on moving more locations to the KnownBits returning interface for computeKnownBits.

Differential Revision: https://reviews.llvm.org/D32848

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302437 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-08 16:22:48 +00:00
Sanjay Patel
a594399826 [InstCombine/InstSimplify] add comments about code duplication; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302436 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-08 16:21:55 +00:00
Zvi Rackover
592063190f InstructionSimplify: Refactor foldIdentityShuffles. NFC.
Summary:
Minor refactoring of foldIdentityShuffles() which allows the removal of a
ConstantDataVector::get() in SimplifyShuffleVectorInstruction.

Reviewers: spatel

Reviewed By: spatel

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D32955

Conflicts:
	lib/Analysis/InstructionSimplify.cpp

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302433 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-08 15:46:58 +00:00
Zvi Rackover
f4d18ab589 IR: Add a shufflevector mask commutation helper function. NFC.
Summary:
Following up on Sanjay's suggetion in D32955, move this functionality
into ShuffleVectornstruction.

Reviewers: spatel, RKSimon

Reviewed By: RKSimon

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D32956

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302420 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-08 12:40:18 +00:00
Craig Topper
ba36bcb1c1 [SCEV] Use APInt::operator*=(uint64_t) to avoid a temporary APInt for a constant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302404 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-08 04:55:13 +00:00
Craig Topper
38dd80a0aa [SCEV] Have getRangeForAffineARHelper take StartRange by const reference to avoid a copy in many of the cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302398 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-08 02:29:15 +00:00
Zvi Rackover
88c686221f InstructionSimplify: Relanding r301766
Summary:
Re-applying r301766 with a fix to a typo and a regression test.

The log message for r301766 was:
==================================================================================
    InstructionSimplify: Canonicalize shuffle operands. NFC-ish.

    Summary:
     Apply canonicalization rules:
        1. Input vectors with no elements selected from can be replaced with undef.
        2. If only one input vector is constant it shall be the second one.

    This allows constant-folding to cover more ad-hoc simplifications that
    were in place and avoid duplication for RHS and LHS checks.

    There are more rules we may want to add in the future when we see a
    justification. e.g. mask elements that select undef elements can be
    replaced with undef.
==================================================================================

Reviewers: spatel, RKSimon

Reviewed By: spatel

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D32863

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302373 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-07 18:16:37 +00:00
Craig Topper
038bc52dc9 [SCEV] Use move semantics in ScalarEvolution::setRange
Summary: This makes setRange take ConstantRange by rvalue reference since most callers were passing an unnamed temporary ConstantRange. We can then move that ConstantRange into the DenseMap caches. For the callers that weren't passing a temporary, I've added std::move to to the local variable being passed.

Reviewers: sanjoy, mzolotukhin, efriedma

Reviewed By: sanjoy

Subscribers: takuto.ikuta, llvm-commits

Differential Revision: https://reviews.llvm.org/D32943

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302371 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-07 16:28:17 +00:00
Sanjay Patel
2a7ef8d5f2 [InstSimplify] use ConstantRange to simplify or-of-icmps
We can simplify (or (icmp X, C1), (icmp X, C2)) to 'true' or one of the icmps in many cases.
I had to check some of these with Alive to prove to myself it's right, but everything seems 
to check out. Eg, the deleted code in instcombine was completely ignoring predicates with
mismatched signedness.

This is a follow-up to:
https://reviews.llvm.org/rL301260
https://reviews.llvm.org/D32143


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302370 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-07 15:11:40 +00:00
Sanjoy Das
8582763b65 Remove unnecessary const_cast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302368 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-07 05:29:36 +00:00
Sanjoy Das
23430d8ce1 Use array_pod_sort instead of std::sort
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302367 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-07 05:29:34 +00:00
Craig Topper
74fe5ca724 [SCEV] Remove extra APInt copies from getRangeForAffineARHelper.
This changes one parameter to be a const APInt& since we only read from it. Use std::move on local APInts once they are no longer needed so we can reuse their allocations. Lastly, use operator+=(uint64_t) instead of adding 1 to an APInt twice creating a new APInt each time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302335 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-06 06:03:07 +00:00
Craig Topper
f5a46e85a5 [SCEV] Use std::move to avoid some APInt copies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302334 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-06 05:22:56 +00:00
Craig Topper
f1e55e53fd [SCEV] Use APInt's uint64_t operations instead of creating a temporary APInt to hold 1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302333 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-06 05:15:11 +00:00
Craig Topper
7ab4d4886e [SCEV] Avoid a couple APInt copies by capturing by reference since the method returns a reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302332 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-06 05:15:09 +00:00
Craig Topper
583a25140f [LazyValueInfo] Avoid unnecessary copies of ConstantRanges
Summary:
ConstantRange contains two APInts which can allocate memory if their width is larger than 64-bits. So we shouldn't copy it when we can avoid it.

This changes LVILatticeVal::getConstantRange() to return its internal ConstantRange by reference. This allows many places that just need a ConstantRange reference to avoid making a copy.

Several places now capture the return value of getConstantRange() by reference so they can call methods on it that don't need a new object.

Lastly it adds std::move in one place to capture to move a local ConstantRange into an LVILatticeVal.

Reviewers: reames, dberlin, sanjoy, anna

Reviewed By: reames

Subscribers: grandinj, llvm-commits

Differential Revision: https://reviews.llvm.org/D32884

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302331 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-06 03:35:15 +00:00
Matthias Braun
738a26c4e2 TargetLibraryInfo: Introduce wcslen
wcslen is part of the C99 and C++98 standards.

- This introduces the function to TargetLibraryInfo.
- Also set attributes for wcslen in llvm::inferLibFuncAttributes().

Differential Revision: https://reviews.llvm.org/D32837

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302278 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-05 20:25:50 +00:00
Craig Topper
ace8b39f82 [KnownBits] Add wrapper methods for setting and clear all bits in the underlying APInts in KnownBits.
This adds routines for reseting KnownBits to unknown, making the value all zeros or all ones. It also adds methods for querying if the value is zero, all ones or unknown.

Differential Revision: https://reviews.llvm.org/D32637

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302262 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-05 17:36:09 +00:00
Sanjay Patel
0eebc2900c [InstSimplify] add folds for or-of-casted-icmps
The sibling folds for 'and' with casts were added with https://reviews.llvm.org/rL273200.
This is a preliminary step for adding the 'or' variants for the folds added with https://reviews.llvm.org/rL301260.

The reason for the strange form with constant LHS in the 1st test is because there's another missing fold in that
case for the inverted predicate. That should be fixed when we add the ConstantRange functionality for 'or-of-icmps' 
that already exists for 'and-of-icmps'.

I'm hoping to share more code for the and/or cases, so we won't have these differences. This will allow us to remove
code from InstCombine. It's also possible that we can remove some code here in InstSimplify. I think we have some 
duplicated folds because patterns are not matched in a general way.

Differential Revision: https://reviews.llvm.org/D32876


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302189 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-04 19:51:34 +00:00
Sanjay Patel
b6a618217b [InstSimplify] move logic-of-icmps helper functions; NFC
Putting these next to each other should make it easier to see
what's missing from each side. Patch to plug one of those holes
should be posted soon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302178 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-04 18:19:17 +00:00
Peter Collingbourne
e611018a3f Re-apply r302108, "IR: Use pointers instead of GUIDs to represent edges in the module summary. NFCI."
with a fix for the clang backend.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302176 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-04 18:03:25 +00:00
Michael Zolotukhin
ae22fd989b Fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302175 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-04 17:42:34 +00:00
Eric Liu
1c442aa9b7 Revert "IR: Use pointers instead of GUIDs to represent edges in the module summary. NFCI."
This reverts commit r302108. This causes crash in clang bootstrap with LTO.

Contacted the auther in the original commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302140 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-04 11:49:39 +00:00
Peter Collingbourne
df2206086c IR: Use pointers instead of GUIDs to represent edges in the module summary. NFCI.
When profiling a no-op incremental link of Chromium I found that the functions
computeImportForFunction and computeDeadSymbols were consuming roughly 10% of
the profile. The goal of this change is to improve the performance of those
functions by changing the map lookups that they were previously doing into
pointer dereferences.

This is achieved by changing the ValueInfo data structure to be a pointer to
an element of the global value map owned by ModuleSummaryIndex, and changing
reference lists in the GlobalValueSummary to hold ValueInfos instead of GUIDs.
This means that a ValueInfo will take a client directly to the summary list
for a given GUID.

Differential Revision: https://reviews.llvm.org/D32471

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302108 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-04 03:36:16 +00:00
Michael Zolotukhin
805e09d964 [SCEV] createAddRecFromPHI: Optimize for the most common case.
Summary:
The existing implementation creates a symbolic SCEV expression every
time we analyze a phi node and then has to remove it, when the analysis
is finished. This is very expensive, and in most of the cases it's also
unnecessary. According to the data I collected, ~60-70% of analyzed phi
nodes (measured on SPEC) have the following form:
  PN = phi(Start, OP(Self, Constant))
Handling such cases separately significantly speeds this up.

Reviewers: sanjoy, pete

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D32663

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302096 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-03 23:53:38 +00:00
Craig Topper
64c8cdfd4f [KnownBits] Add methods for determining if KnownBits is a constant value
This patch adds isConstant and getConstant for determining if KnownBits represents a constant value and to retrieve the value. Use them to simplify code.

Differential Revision: https://reviews.llvm.org/D32785

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302091 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-03 23:12:29 +00:00
Craig Topper
f990516387 [ValueTracking] Remove handling for BitWidth being 0 in ComputeSignBit and isKnownNonZero.
I don't believe its possible to have non-zero values here since DataLayout became required. The APInt constructor inside of the KnownBits object will assert if this ever happens.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302089 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-03 22:25:19 +00:00
Craig Topper
f78221855b [KnownBits] Add zext, sext, and trunc methods to KnownBits
This patch adds zext, sext, and trunc methods to KnownBits and uses them where possible.

Differential Revision: https://reviews.llvm.org/D32784

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302088 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-03 22:07:25 +00:00
Reid Kleckner
a82b376f69 [IR] Abstract away ArgNo+1 attribute indexing as much as possible
Summary:
Do three things to help with that:
- Add AttributeList::FirstArgIndex, which is an enumerator currently set
  to 1. It allows us to change the indexing scheme with fewer changes.
- Add addParamAttr/removeParamAttr. This just shortens addAttribute call
  sites that would otherwise need to spell out FirstArgIndex.
- Remove some attribute-specific getters and setters from Function that
  take attribute list indices.  Most of these were only used from
  BuildLibCalls, and doesNotAlias was only used to test or set if the
  return value is malloc-like.

I'm happy to split the patch, but I think they are probably easier to
review when taken together.

This patch should be NFC, but it sets the stage to change the indexing
scheme to this, which is more convenient when indexing into an array:
  0: func attrs
  1: retattrs
  2...: arg attrs

Reviewers: chandlerc, pete, javed.absar

Subscribers: david2050, llvm-commits

Differential Revision: https://reviews.llvm.org/D32811

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302060 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-03 18:17:31 +00:00
Matt Arsenault
921f454dae Replace hardcoded intrinsic list with speculatable attribute.
No change in which intrinsics should be speculated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301995 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-03 02:26:10 +00:00
Peter Collingbourne
8d8582cf12 Revert r295861, "[ModuleSummaryAnalysis] Don't crash when referencing unnamed globals."
We should always expect values to be named before running the module summary
analysis (see NameAnonGlobals pass), so it's fine if we crash in that case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301991 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-03 00:18:48 +00:00
Sanjay Patel
05c11eb3e6 revert r301766: InstructionSimplify: Canonicalize shuffle operands. NFC-ish
Turns out this wasn't NFC-ish at all because there's a bug processing shuffles
that change the size of their input vectors (that case always seems to trip us
up). 

This should fix PR32872 while we investigate how it failed and reduce a testcase:
https://bugs.llvm.org/show_bug.cgi?id=32872
 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301977 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-02 21:37:28 +00:00
Xinliang David Li
afb34f6072 Refactor callsite cost computation into a helper function /NFC
Makes code more readable. The function will also be used
by the partial inlining's cost analysis.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301899 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-02 05:38:41 +00:00
George Burgess IV
4d11ee489b Revert r301880
This change caused buildbot failures, apparently because we're not
passing around types that InstSimplify is used to seeing. I'm not overly
familiar with InstSimplify, so I'm reverting this until I can figure out
what exactly is wrong.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301885 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-01 23:54:41 +00:00
George Burgess IV
8bd46914df [InstSimplify] Handle selects of GEPs with 0 offset
In particular (since it wouldn't fit nicely in the summary):
(select (icmp eq V 0) P (getelementptr P V)) -> (getelementptr P V)

Differential Revision: https://reviews.llvm.org/D31435


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301880 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-01 23:12:08 +00:00
Sanjoy Das
399b4d037d Rename WeakVH to WeakTrackingVH; NFC
This relands r301424.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301812 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-01 17:07:49 +00:00
Sanjoy Das
21ade9ba1e Rename isKnownNotFullPoison to programUndefinedIfPoison; NFC
Summary:
programUndefinedIfPoison makes more sense, given what the function
does; and I'm about to add a function with a name similar to
isKnownNotFullPoison (so do the rename to avoid confusion).

Reviewers: broune, majnemer, bjarke.roune

Reviewed By: broune

Subscribers: mcrosier, llvm-commits, mzolotukhin

Differential Revision: https://reviews.llvm.org/D30444

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301776 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-30 19:41:19 +00:00
Zvi Rackover
c6bea6e868 InstructionSimplify: Canonicalize shuffle operands. NFC-ish.
Summary:
 Apply canonicalization rules:
    1. Input vectors with no elements selected from can be replaced with undef.
    2. If only one input vector is constant it shall be the second one.

This allows constant-folding to cover more ad-hoc simplifications that
were in place and avoid duplication for RHS and LHS checks.

There are more rules we may want to add in the future when we see a
justification. e.g. mask elements that select undef elements can be
replaced with undef.

Reviewers: spatel, RKSimon, andreadb, davide

Reviewed By: spatel, RKSimon

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D32338

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301766 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-30 06:25:04 +00:00
Zvi Rackover
f24bed9225 InstructionSimplify: One getShuffleMask() replacing multiple getMaskValue(). NFC.
Summary: This is a preparatory step for D32338.

Reviewers: RKSimon, spatel

Reviewed By: RKSimon, spatel

Subscribers: spatel, llvm-commits

Differential Revision: https://reviews.llvm.org/D32388

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301765 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-30 06:10:54 +00:00
Zvi Rackover
778f5177f0 InstructionSimplify: Simplify a shuffle with a undef mask to undef
Summary:
Following the discussion in pr32486, adding the simplification:
 shuffle %x, %y, undef -> undef

Reviewers: spatel, RKSimon, andreadb, davide

Reviewed By: spatel

Subscribers: jroelofs, davide, llvm-commits

Differential Revision: https://reviews.llvm.org/D32293

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301764 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-30 06:06:26 +00:00
Craig Topper
8b69610574 [KnownBits] Add methods for determining if the known bits represent a negative/nonnegative number and add methods for changing the negative/nonnegative state
Summary: This patch adds isNegative, isNonNegative for querying whether the sign bit is known. It also adds makeNegative and makeNonNegative for controlling the sign bit.

Reviewers: RKSimon, spatel, davide

Reviewed By: RKSimon

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D32651

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301747 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-29 16:43:11 +00:00
Michael Zolotukhin
3456f7f5be [SCEV] Use early exit in createAddRecFromPHI. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301703 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-28 22:14:27 +00:00
Matt Arsenault
ba657060a1 [ValueTracking] Teach isSafeToSpeculativelyExecute() about the speculatable attribute
Patch by Tom Stellard

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301688 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-28 21:13:09 +00:00
Daniel Berlin
e2c5126dbb Kill off the old SimplifyInstruction API by converting remaining users.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301673 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-28 19:55:38 +00:00
Reid Kleckner
331b9af31d Use Argument::hasAttribute and AttributeList::ReturnIndex more
This eliminates many extra 'Idx' induction variables in loops over
arguments in CodeGen/ and Target/. It also reduces the number of places
where we assume that ReturnIndex is 0 and that we should add one to
argument numbers to get the corresponding attribute list index.

NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301666 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-28 18:37:16 +00:00
Craig Topper
78b412f427 [APInt] Add clearSignBit method. Use it and setSignBit in a few places. NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301656 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-28 16:58:05 +00:00
Craig Topper
f743447b5e [LazyValueInfo] Fix typo in comment. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301655 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-28 16:57:59 +00:00