136889 Commits

Author SHA1 Message Date
Andrey Bokhanko
e708f8d798 Clarify the statement on using #if 0 ... #endif in CodingStandards.
The statement on using #if 0 ... #endif is not very clear (for people like me
:-)). This patch clarifies it a bit to avoid confusion.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278932 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 14:53:18 +00:00
Simon Dardis
0ca6dc4466 [mips] Add l.[sd] and s.[sd] instruction aliases
Reviewers: dsanders, vkalintiris

Differential Review: https://reviews.llvm.org/D23121


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278930 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 14:45:09 +00:00
Chad Rosier
cab764a320 Revert "[Reassociate] Avoid iterator invalidation when negating value."
This reverts commit r278928 due to lit test failures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278929 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 14:31:34 +00:00
Chad Rosier
291f9294da [Reassociate] Avoid iterator invalidation when negating value.
Differential Revision: https://reviews.llvm.org/D23464
PR28367

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278928 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 14:16:45 +00:00
Jonas Paulsson
1b85e47f06 [LoopStrenghtReduce] Refactoring and addition of a new target cost function.
Refactored so that a LSRUse owns its fixups, as oppsed to letting the
LSRInstance own them. This makes it easier to rate formulas for
LSRUses, since the fixups are available directly. The Offsets vector
has been removed since it was no longer necessary.

New target hook isFoldableMemAccessOffset(), which is used during formula
rating.

For SystemZ, this is useful to express that loads and stores with
float or vector types with a big/negative offset should be avoided in
loops. Without this, LSR will generate a lot of negative offsets that
would require extra instructions for loading the address.

Updated tests:
test/CodeGen/SystemZ/loop-01.ll

Reviewed by: Quentin Colombet and Ulrich Weigand.
https://reviews.llvm.org/D19152

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278927 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 13:24:19 +00:00
Marina Yatsina
653bfcb46d Fixing bug committed in rev. 278321
In theory the indices of RC (and thus the index used for LiveRegs) may differ from the indices of OpRC.
Fixed the code to extract the correct RC index.
OpRC contains the first X consecutive elements of RC, and thus their indices are currently de facto the same, therefore a test cannot be added at this point.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278923 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 11:40:21 +00:00
Sam Kolton
ae331608b7 [AMDGPU] llvm-objdump: Skip amd_kernel_code_t only at the begining of kernel symbol.
Summary: This change fix bug in AMDGPU disassembly. Previously, presence of symbols other than kernel symbols caused objdump to skip begining of those symbols.

Reviewers: tstellarAMD, vpykhtin, Bigcheese, ruiu

Subscribers: kzhuravl, arsenm

Differential Revision: http://reviews.llvm.org/D21966

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278921 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 10:17:57 +00:00
Nicolai Haehnle
68112183a3 LiveIntervals: add removeRegUnit
Summary:
See D22198 for the motivation: We have a pass that uses LiveIntervals anyway,
and there is now a requirement to track a physical register that is not
usually tracked at this point of the compilation. The pass also introduces
instructions that affect this physical register, but we want to preserve
LiveIntervals.

Rather than add brittle and rarely exercised code to keep the tracking of
the physical register intact, we want to just remove the corresponding
LiveRange -- it didn't exist before anyway, and subsequent passes don't
expect it to be there.

Reviewers: MatzeB, arsenm

Subscribers: llvm-commits, MatzeB

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278920 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 09:34:55 +00:00
Ayman Musa
cbfe59002e Fix bug in DAGBuilder for getelementptr with expanded vector.
Replacing the usage of MVT with EVT in case the vector type is expanded.
Differential Revision: https://reviews.llvm.org/D23306


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278913 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 07:52:15 +00:00
Chandler Carruth
ba80e96675 [LTO] Fix a use-after-free introduced in r278907 and caught by ASan.
The ASan build bot caught this right away:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/15580/steps/check-llvm%20asan/logs/stdio

This was also breaking a Windows build bot I'm pretty sure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278912 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 07:48:34 +00:00
Ayman Musa
de2442ac75 First commit (test commit) - Adding empty line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278910 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 07:37:34 +00:00
Chandler Carruth
731ba1dedb Restrict the use of the C++17 attribute to C++17 (at least as best we
can given the current __cplusplus definitions).

Without this, Clang triggers TONS of warnings about using a C++17
extension. I tried using LLVM_EXTENSION to turn these off and it doesn't
work.

Suggestions on a better approach are welcome, but at least this makes
the build usable for me again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278909 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 07:18:44 +00:00
Mehdi Amini
bba5e18e2a [LTO] Introduce an Output class to wrap the output stream creation (NFC)
Summary:
While NFC for now, this will allow more flexibility on the client side
to hold state necessary to back up the stream.
Also when adding caching, this class will grow in complexity.

Note I blindly modified the gold-plugin as I can't compile it.

Reviewers: tejohnson

Subscribers: mehdi_amini, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278907 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 06:23:09 +00:00
Justin Bogner
833a10e76a Fix a use of LLVM_FALLTHROUGH that wasn't even in a switch.
I was over-aggressive in my conversions from comments to the
fallthrough attribute.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278903 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 05:25:38 +00:00
Justin Bogner
6673ea81f6 Replace "fallthrough" comments with LLVM_FALLTHROUGH
This is a mechanical change of comments in switches like fallthrough,
fall-through, or fall-thru to use the LLVM_FALLTHROUGH macro instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278902 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 05:10:15 +00:00
Chuang-Yu Cheng
7177ff558c [ppc64] Don't apply sibling call optimization if callee has any byval arg
This is a quick work around, because in some cases, e.g. caller's stack
size > callee's stack size, we are still able to apply sibling call
optimization even callee has any byval arg.

This patch fix: https://llvm.org/bugs/show_bug.cgi?id=28328

Reviewers: hfinkel kbarton nemanjai amehsan
Subscribers: hans, tjablin

https://reviews.llvm.org/D23441

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278900 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 03:17:44 +00:00
Zijiao Ma
8db1b32c33 Remove the Triple tests that stressing the TargetParser's behaviour.
Now the tests of TargetParser is in place:
unittests/Support/TargetParserTest.cpp.
So the tests in TripleTest.cpp which actually stressing TargetParser's behavior could be removed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278899 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 03:17:07 +00:00
Chandler Carruth
b699f7b88f [PM] Port the always inliner to the new pass manager in a much more
minimal and boring form than the old pass manager's version.

This pass does the very minimal amount of work necessary to inline
functions declared as always-inline. It doesn't support a wide array of
things that the legacy pass manager did support, but is alse ... about
20 lines of code. So it has that going for it. Notably things this
doesn't support:

- Array alloca merging
  - To support the above, bottom-up inlining with careful history
    tracking and call graph updates
- DCE of the functions that become dead after this inlining.
- Inlining through call instructions with the always_inline attribute.
  Instead, it focuses on inlining functions with that attribute.

The first I've omitted because I'm hoping to just turn it off for the
primary pass manager. If that doesn't pan out, I can add it here but it
will be reasonably expensive to do so.

The second should really be handled by running global-dce after the
inliner. I don't want to re-implement the non-trivial logic necessary to
do comdat-correct DCE of functions. This means the -O0 pipeline will
have to be at least 'always-inline,global-dce', but that seems
reasonable to me. If others are seriously worried about this I'd like to
hear about it and understand why. Again, this is all solveable by
factoring that logic into a utility and calling it here, but I'd like to
wait to do that until there is a clear reason why the existing
pass-based factoring won't work.

The final point is a serious one. I can fairly easily add support for
this, but it seems both costly and a confusing construct for the use
case of the always inliner running at -O0. This attribute can of course
still impact the normal inliner easily (although I find that
a questionable re-use of the same attribute). I've started a discussion
to sort out what semantics we want here and based on that can figure out
if it makes sense ta have this complexity at O0 or not.

One other advantage of this design is that it should be quite a bit
faster due to checking for whether the function is a viable candidate
for inlining exactly once per function instead of doing it for each call
site.

Anyways, hopefully a reasonable starting point for this pass.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278896 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 02:56:20 +00:00
Matthias Braun
be01ee2ef3 IfConversion: Use references instead of pointers where possible; NFC
Also put some commonly used subexpressions into variables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278895 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 02:52:01 +00:00
Matthias Braun
03d1f52c78 IfConversion: Use range based for; NFC
Also avoid some pointless use of auto! Because that's friendlier to
readers and avoids several types accidentally resolving to unnecessary
references here (MachineInstr *&, unsigned &).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278894 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 02:51:59 +00:00
Matthias Braun
c6edf8f64e IfConversion: Improve doxygen comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278893 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 02:51:57 +00:00
Chandler Carruth
bc17354b9a [Inliner] Add a flag to disable manual alloca merging in the Inliner.
This is off for now while testing can take place to make sure that in
fact we do sufficient stack coloring to fully obviate the manual alloca
array merging.

Some context on why we should be using stack coloring rather than
merging allocas in this way:

LLVM relies very heavily on analyzing pointers as coming from different
allocas in order to make aliasing decisions. These are some of the most
powerful aliasing signals available in LLVM. So merging allocas is an
extremely destructive operation on the LLVM IR -- it takes away highly
valuable and hard to reconstruct information.

As a consequence, inlined functions which happen to have array allocas
that this pattern matches will fail to be properly interleaved unless
SROA manages to hoist everything to an SSA register. Instead, the
inliner will have added an unnecessary dependence that one inlined
function execute after the other because they will have been rewritten
to refer to the same memory.

All that said, folks will reasonably want some time to experiment here
and make sure there are no significant regressions. A flag should give
us an easy knob to test.

For more context, see the thread here:
http://lists.llvm.org/pipermail/llvm-dev/2016-July/103277.html
http://lists.llvm.org/pipermail/llvm-dev/2016-August/103285.html

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278892 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 02:40:23 +00:00
Zijiao Ma
062c883977 Some places that could using TargetParser in LLVM. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278888 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 02:08:28 +00:00
Duncan P. N. Exon Smith
eb6a210db6 ADT: Add some missing coverage for iplist::splice
These splices are interesting because they involve swapping two nodes in
the same list.  There are two ways to do this.  Assuming:

    A -> B -> [Sentinel]

You can either:
- splice B before A, with:        L.splice(A,       L, B) or
- splice A before Sentinel, with: L.splice(L.end(), L, A) to create:

    B -> A -> [Sentinel]

These two swapping-splices are somewhat interesting corner cases for
maintaining the list invariants.  The tests pass even with my new ilist
implementation, but I had some doubts about the latter when I was
looking at weird UB effects.  Since I can't find equivalent explicit
test coverage elsewhere it seems prudent to commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278887 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 02:08:08 +00:00
Duncan P. N. Exon Smith
3b3dd8847f Scalar: Avoid dereferencing end() in IndVarSimplify
IndVarSimplify::sinkUnusedInvariants calls
BasicBlock::getFirstInsertionPt on the ExitBlock and moves instructions
before it.  This can return end(), so it's not safe to dereference.  Add
an iterator-based overload to Instruction::moveBefore to avoid the UB.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278886 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 01:54:41 +00:00
George Burgess IV
c49441293b [Docs] Fix post-review comments on MemorySSA's docs.
Thanks to Sean Silva for bringing these up. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278885 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 01:50:54 +00:00
Duncan P. N. Exon Smith
370879ff09 IPO: Swap || operands to avoid dereferencing end()
IsOperandBundleUse conveniently indicates  whether
std::next(F->arg_begin(),UseIndex) will get to (or past) end().  Check
it first to avoid dereferencing end().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278884 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 01:23:58 +00:00
Duncan P. N. Exon Smith
578068576c Scalar: Avoid dereferencing end() in InductiveRangeCheckElimination
BasicBlock::Create isn't designed to take iterators (which might be
end()), but pointers (which might be nullptr).  Fix the UB that was
converting end() to a BasicBlock* by calling BasicBlock::getNextNode()
in the first place.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278883 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 01:16:17 +00:00
Duncan P. N. Exon Smith
936a383311 ObjCARC: Don't increment or dereference end() when scanning args
When there's only one argument and it doesn't match one of the known
functions, return ARCInstKind::CallOrUser rather than falling through
to the two argument case.  The old behaviour both incremented past and
dereferenced end().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278881 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 01:02:18 +00:00
Duncan P. N. Exon Smith
4a3738ebeb ARM: Avoid dereferencing end() in ARMFrameLowering::emitPrologue
llvm::tryFoldSPUpdateIntoPushPop assumes its arguments are valid
MachineInstrs.  Update ARMFrameLowering::emitPrologue to respect that;
when LastPush==end(), it can't possibly be a push instruction anyway.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278880 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 00:53:04 +00:00
Duncan P. N. Exon Smith
d4e0802b9b CodeGen: Avoid dereferencing end() in OptimizePHIs::OptimizeBB
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278879 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 00:43:59 +00:00
Duncan P. N. Exon Smith
f623792723 Hexagon: Avoid dereferencing end() in HexagonInstrInfo::InsertBranch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278878 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 00:34:00 +00:00
George Burgess IV
6058abac58 [Docs] Add initial MemorySSA documentation.
Patch partially by Danny.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278875 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 00:17:29 +00:00
Duncan P. N. Exon Smith
9e4c8a36ca AMDGPU: Avoid looking for the DebugLoc in end()
The end() iterator isn't a safe thing to dereference.  Pass the DebugLoc
into EmitFetchClause and EmitALUClause to avoid it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278873 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 00:06:43 +00:00
Duncan P. N. Exon Smith
cbbc1ca8d3 SimplifyCFG: Avoid dereferencing end()
When comparing a User* to a BasicBlock::iterator in
passingValueIsAlwaysUndefined, don't dereference the iterator in case it
is end().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278872 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-16 23:57:56 +00:00
Justin Bogner
3cc2cd3618 Revert "Write the TPI stream from a PDB to Yaml."
This is hitting a "use of undeclared identifier 'skipPadding' error
locally and on some bots.

This reverts r278869.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278871 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-16 23:37:10 +00:00
Duncan P. N. Exon Smith
e3c3e55fc5 CodeGen: Avoid dereferencing end() when unconstifying iterators
Rather than doing a funny dance that relies on dereferencing end() not
crashing, add some API to MachineInstrBundleIterator to get a non-const
version of the iterator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278870 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-16 23:34:07 +00:00
Zachary Turner
d75cab63fc Write the TPI stream from a PDB to Yaml.
Reviewed By: ruiu, rnk
Differential Revision: https://reviews.llvm.org/D23226

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278869 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-16 23:28:54 +00:00
Justin Bogner
e24b74a90a Introduce LLVM_FALLTHROUGH, which expands to the C++17 attribute.
This allows you to annotate switch case fallthrough in a better way
than a "// FALLTHROUGH" comment. Eventually it would be nice to turn
on -Wimplicit-fallthrough, if we can get the code base clean.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278868 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-16 23:24:13 +00:00
Sanjay Patel
96f8a5707a [InstCombine] add tests for fold with no coverage and missing vector fold
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278867 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-16 23:18:42 +00:00
Kyle Butt
3f979e7201 Codegen: Don't tail-duplicate blocks with un-analyzable fallthrough.
If AnalyzeBranch can't analyze a block and it is possible to
fallthrough, then duplicating the block doesn't make sense, as only one
block can be the layout predecessor for the un-analyzable fallthrough.

Submitted wit a test case, but NOTE: the test case doesn't currently
fail. However, the test case fails with D20505 and would have saved me
some time debugging.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278866 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-16 22:56:14 +00:00
Sanjay Patel
7de66517ad [InstCombine] clean up foldICmpAddConstant(); NFCI
1. Fix variable names
2. Add local variables to reduce code
3. Fix code comments
4. Add early exit to reduce indentation
5. Remove 'else' after if -> return
6. Hoist common predicate


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278864 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-16 22:34:42 +00:00
Konstantin Zhuravlyov
3d3faebc49 [AMDGPU] Remove duplicate initialization of SIDebuggerInsertNops pass
Differential Revision: https://reviews.llvm.org/D23556


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278863 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-16 22:30:11 +00:00
David Majnemer
4184eb5603 Preserve the assumption cache more often
We were clearing it out in LoopUnswitch and InlineFunction instead of
attempting to preserve it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278860 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-16 22:07:32 +00:00
Sanjay Patel
764b87be23 [InstCombine] use m_APInt to allow icmp (sub X, Y), C folds for splat constant vectors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278859 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-16 21:53:19 +00:00
Duncan P. N. Exon Smith
52a07ee47a CodeGen: Don't dereference end() in MachineBasicBlock::CorrectExtraCFGEdges
The current MachineBasicBlock might be the last block, so FallThru may
be past the end().  Use getNextNode(), which will convert to nullptr,
rather than &*++, which is invalid if we reach the end().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278858 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-16 21:46:03 +00:00
Sanjay Patel
b3c0427a43 [x86] Allow merging multiple instances of an immediate within a basic block for code size savings, for 64-bit constants.
This patch handles 64-bit constants which can be encoded as 32-bit immediates.

It extends the functionality added by https://reviews.llvm.org/D11363 for 32-bit constants to 64-bit constants.

Patch by Sunita Marathe!

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278857 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-16 21:35:16 +00:00
Kostya Serebryany
f61ef6cf72 [libFuzzer] minor speed improvement
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278856 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-16 21:28:05 +00:00
Sanjay Patel
269bd6538c [InstCombine] fix variable names to match formula comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278855 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-16 21:26:10 +00:00
David Majnemer
2ed3d81787 [LoopUnroll] Don't clear out the AssumptionCache on each loop
Clearing out the AssumptionCache can cause us to rescan the entire
function for assumes.  If there are many loops, then we are scanning
over the entire function many times.

Instead of clearing out the AssumptionCache, register all cloned
assumes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278854 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-16 21:09:46 +00:00