oota-llvm.git
9 years ago[LoopAccesses] Stash the report from the analysis rather than emitting it
Adam Nemet [Wed, 18 Feb 2015 03:42:50 +0000 (03:42 +0000)]
[LoopAccesses] Stash the report from the analysis rather than emitting it

The transformation passes will query this and then emit them as part of
their own report.  The currently only user LV is modified to do just
that.

This is part of the patchset that converts LoopAccessAnalysis into an
actual analysis pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229623 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[LoopAccesses] Make VectorizerParams global
Adam Nemet [Wed, 18 Feb 2015 03:42:43 +0000 (03:42 +0000)]
[LoopAccesses] Make VectorizerParams global

As LAA is becoming a pass, we can no longer pass the params to its
constructor.  This changes the command line flags to have external
storage.  These can now be accessed both from LV and LAA.

VectorizerParams is moved out of LoopAccessInfo in order to shorten the
code to access it.

This is part of the patchset that converts LoopAccessAnalysis into an
actual analysis pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229622 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[LoopAccesses] Rename LoopAccessAnalysis to LoopAccessInfo
Adam Nemet [Wed, 18 Feb 2015 03:42:35 +0000 (03:42 +0000)]
[LoopAccesses] Rename LoopAccessAnalysis to LoopAccessInfo

LoopAccessAnalysis will be used as the name of the pass.

This is part of the patchset that converts LoopAccessAnalysis into an
actual analysis pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229621 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[LoopAccesses] Make raw_string_ostream local in VectorizationReport
Adam Nemet [Wed, 18 Feb 2015 03:42:15 +0000 (03:42 +0000)]
[LoopAccesses] Make raw_string_ostream local in VectorizationReport

Since VectorizationReport will be part of the result of the analysis it
will be stored in a container.  However, one of its members is a
raw_string_ostream which cannot be copy-constructed.

This makes the raw_string_ostream local to the << operator.

This is part of the patchset that converts LoopAccessAnalysis into an
actual analysis pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229620 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[InstCombine] Do not insert a GEP instruction before a landingpad instruction.
Akira Hatanaka [Wed, 18 Feb 2015 03:30:11 +0000 (03:30 +0000)]
[InstCombine] Do not insert a GEP instruction before a landingpad instruction.

InstCombiner::visitGetElementPtrInst was using getFirstNonPHI to compute the
insertion point, which caused the verifier to complain when a GEP was inserted
before a landingpad instruction. This commit fixes it to use getFirstInsertionPt
instead.

rdar://problem/19394964

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229619 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[BDCE] Don't forget uses of root instructions seen before the instruction itself
Hal Finkel [Wed, 18 Feb 2015 03:12:28 +0000 (03:12 +0000)]
[BDCE] Don't forget uses of root instructions seen before the instruction itself

When visiting the initial list of "root" instructions (those which must always
be alive), for those that are integer-valued (such as invokes returning an
integer), we mark their bits as (initially) all dead (we might, obviously, find
uses of those bits later, but all bits are assumed dead until proven
otherwise). Don't do so, however, if we're already seen a use of those bits by
another root instruction (such as a store).

Fixes a miscompile of the sanitizer unit tests on x86_64.

Also, add a debug line for visiting the root instructions, and remove a debug
line which tried to print instructions being removed (printing dead
instructions is dangerous, and can sometimes crash).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229618 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Rename dst encoding field to be consistent with docs
Matt Arsenault [Wed, 18 Feb 2015 02:15:37 +0000 (02:15 +0000)]
R600/SI: Rename dst encoding field to be consistent with docs

The docs call this vdst instead of just dst.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229614 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Consistently capitalize encoding field names
Matt Arsenault [Wed, 18 Feb 2015 02:15:35 +0000 (02:15 +0000)]
R600/SI: Consistently capitalize encoding field names

Some formats capitalized these, but most didn't. Change
them all to be consistently lowercase.

Now, non-encoding fields and convenience bits are capitalized.
Also remove weird looking empty line in some of the formats.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229613 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Set noNamedPositionallyEncodedOperands
Matt Arsenault [Wed, 18 Feb 2015 02:15:32 +0000 (02:15 +0000)]
R600/SI: Set noNamedPositionallyEncodedOperands

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229612 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Fix src1_modifiers for class instructions
Matt Arsenault [Wed, 18 Feb 2015 02:15:30 +0000 (02:15 +0000)]
R600/SI: Fix src1_modifiers for class instructions

src1 doesn't have modifiers, but the operand was missing
resulting in an encoding build error when all fields
are required.'

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229611 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Fix not setting clamp / omod for v_cndmask_b32_e64
Matt Arsenault [Wed, 18 Feb 2015 02:15:27 +0000 (02:15 +0000)]
R600/SI: Fix not setting clamp / omod for v_cndmask_b32_e64

Rename the multiclass since it now applies to the output
modifiers as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229610 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600: Fix operand encoding error
Matt Arsenault [Wed, 18 Feb 2015 02:10:42 +0000 (02:10 +0000)]
R600: Fix operand encoding error

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229609 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Fix encoding error from glc bit on VI SMRD instructions
Matt Arsenault [Wed, 18 Feb 2015 02:10:40 +0000 (02:10 +0000)]
R600/SI: Fix encoding error from glc bit on VI SMRD instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229608 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Fix operand encoding for flat instructions
Matt Arsenault [Wed, 18 Feb 2015 02:10:37 +0000 (02:10 +0000)]
R600/SI: Fix operand encoding for flat instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229607 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Fix error from vdst on no return atomics
Matt Arsenault [Wed, 18 Feb 2015 02:10:35 +0000 (02:10 +0000)]
R600/SI: Fix error from vdst on no return atomics

Set the ignored field to 0 so we can enable
noNamedPositionallyEncodedOperands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229606 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Add missing offset operand to buffer bothen
Matt Arsenault [Wed, 18 Feb 2015 02:04:38 +0000 (02:04 +0000)]
R600/SI: Add missing offset operand to buffer bothen

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229605 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Add missing soffset operand to global atomics
Matt Arsenault [Wed, 18 Feb 2015 02:04:35 +0000 (02:04 +0000)]
R600/SI: Add missing soffset operand to global atomics

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229604 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Fix brace identation
Matt Arsenault [Wed, 18 Feb 2015 02:04:31 +0000 (02:04 +0000)]
R600/SI: Fix brace identation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229603 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRe-apply "InstrProf: Add unit tests for the profile reader and writer"
Justin Bogner [Wed, 18 Feb 2015 01:58:17 +0000 (01:58 +0000)]
Re-apply "InstrProf: Add unit tests for the profile reader and writer"

Have the InstrProfWriter return a MemoryBuffer instead of a
std::string. This fixes the alignment issues the reader would hit, and
it's a more appropriate type for this anyway.

I've also removed an ugly helper function that's not needed since
we're allowing initializer lists now, and updated some error code
checks based on MSVC's issues with r229473.

This reverts r229483, reapplying r229478.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229602 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoLiveRangeCalc: Rename some parameters from kill to use, NFC.
Matthias Braun [Wed, 18 Feb 2015 01:50:52 +0000 (01:50 +0000)]
LiveRangeCalc: Rename some parameters from kill to use, NFC.

Those parameters did not necessarily describe kill points but just uses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229601 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoGeneralize getExtendAddRecStart to work with both sign and zero
Sanjoy Das [Wed, 18 Feb 2015 01:47:07 +0000 (01:47 +0000)]
Generalize getExtendAddRecStart to work with both sign and zero
extensions.

This change also removes `DEBUG(dbgs() << "SCEV: untested prestart
overflow check\n");` because that case has a unit test now.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229600 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[shuffles] Tweak my shufflevector fuzz test generation script to produce
Chandler Carruth [Wed, 18 Feb 2015 01:36:45 +0000 (01:36 +0000)]
[shuffles] Tweak my shufflevector fuzz test generation script to produce
more useful output. No more null bytes printed, and now with a newline.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229599 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDowngrade build system error message to a warning
Filipe Cabecinhas [Wed, 18 Feb 2015 01:12:38 +0000 (01:12 +0000)]
Downgrade build system error message to a warning

Instead of requiring MSVC 2013 U4, we simply warn users, since some might
not bt able to immediately upgrade.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229598 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMake the Mips AsmPrinter independent of global subtarget
Eric Christopher [Wed, 18 Feb 2015 01:01:57 +0000 (01:01 +0000)]
Make the Mips AsmPrinter independent of global subtarget
initialization. Initialize the subtarget once per function and
migrate EmitStartOfAsmFile to either use calls on the
TargetMachine or get information from the subtarget we'd use
for assembling.

The top-level-ness of the MIPS attribute output for assembly is,
by nature, contrary to how we'd want to do this for an LTO
situation where we have multiple cpu architectures so this
solution is good enough for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229596 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUnify selectMipsCPU implementations.
Eric Christopher [Wed, 18 Feb 2015 00:55:06 +0000 (00:55 +0000)]
Unify selectMipsCPU implementations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229595 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoBugfix: SCEV incorrectly marks certain expressions as nsw
Sanjoy Das [Wed, 18 Feb 2015 00:43:19 +0000 (00:43 +0000)]
Bugfix: SCEV incorrectly marks certain expressions as nsw

I could not come up with a test case for this one; but I don't think
`getPreStartForSignExtend` can assume `AR` is `nsw` -- there is one
place in scalar evolution that calls `getSignExtendAddRecStart(AR,
...)` without proving that `AR` is `nsw`

(line 1564)

   OperandExtendedAdd =
     getAddExpr(WideStart,
                getMulExpr(WideMaxBECount,
                           getZeroExtendExpr(Step, WideTy)));
   if (SAdd == OperandExtendedAdd) {
     // If AR wraps around then
     //
     //    abs(Step) * MaxBECount > unsigned-max(AR->getType())
     // => SAdd != OperandExtendedAdd
     //
     // Thus (AR is not NW => SAdd != OperandExtendedAdd) <=>
     // (SAdd == OperandExtendedAdd => AR is NW)

     const_cast<SCEVAddRecExpr *>(AR)->setNoWrapFlags(SCEV::FlagNW);

     // Return the expression with the addrec on the outside.
     return getAddRecExpr(getSignExtendAddRecStart(AR, Ty, this),
                          getZeroExtendExpr(Step, Ty),
                          L, AR->getNoWrapFlags());
   }

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229594 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[modules] Fix typo in DIA exclusion in module map.
Richard Smith [Wed, 18 Feb 2015 00:21:45 +0000 (00:21 +0000)]
[modules] Fix typo in DIA exclusion in module map.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229591 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTwines should be passed by const ref.
Rafael Espindola [Tue, 17 Feb 2015 23:44:22 +0000 (23:44 +0000)]
Twines should be passed by const ref.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229590 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86][FastIsel] Teach how to select scalar integer to float/double conversions.
Andrea Di Biagio [Tue, 17 Feb 2015 23:40:58 +0000 (23:40 +0000)]
[X86][FastIsel] Teach how to select scalar integer to float/double conversions.

This patch teaches fast-isel how to select a (V)CVTSI2SSrr for an integer to
float conversion, and how to select a (V)CVTSI2SDrr for an integer to double
conversion.

Added test 'fast-isel-int-float-conversion.ll'.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229589 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd r228939 back with a fix.
Rafael Espindola [Tue, 17 Feb 2015 23:34:51 +0000 (23:34 +0000)]
Add r228939 back with a fix.

The problem in the original patch was not switching back to .text after printing
an eh table.

Original message:

On ELF, put PIC jump tables in a non executable section.

Fixes PR22558.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229586 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoWe require MSVC 2013 Update 4 due to previous versions miscompiling ASTMatchers
Filipe Cabecinhas [Tue, 17 Feb 2015 23:29:00 +0000 (23:29 +0000)]
We require MSVC 2013 Update 4 due to previous versions miscompiling ASTMatchers

Previous versions of MSVC 2013 would miscompile ASTMatchers (and/or their
tests). Bump up the requirement and make sure we know about the minor
revision.

Minimum required version found by Michael Edwards!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229584 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd a test showing the problem in r228939.
Rafael Espindola [Tue, 17 Feb 2015 23:21:46 +0000 (23:21 +0000)]
Add a test showing the problem in r228939.

If an EH table is printed in between the function and the jump table we would
fail to switch back to the text section to print the jump table.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229580 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Add missing clone() overloads
Duncan P. N. Exon Smith [Tue, 17 Feb 2015 23:10:13 +0000 (23:10 +0000)]
IR: Add missing clone() overloads

Add missing specialized node overloads for `MDNode::clone()` (they were
on most of the node types already, but missing from the others).
`MDNode::clone()` returns `TempMDNode` (`std::unique_ptr<MDNode,...>`),
while `TempMDSubrange::clone()` (for example) returns the more
convenient `TempMDSubrange` (`std::unique_ptr<TempMDSubrange,...>`).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229579 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agorename variables again because these tables also deal with stores; NFC
Sanjay Patel [Tue, 17 Feb 2015 22:38:06 +0000 (22:38 +0000)]
rename variables again because these tables also deal with stores; NFC

Suggestion by Simon Pilgrim

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229574 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: fieldIsMDNode() should be false for MDString
Duncan P. N. Exon Smith [Tue, 17 Feb 2015 22:34:15 +0000 (22:34 +0000)]
IR: fieldIsMDNode() should be false for MDString

Simplify the code.  It has been a while since the schema has been so
"flexible".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229573 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAsmPrinter: Take range in DwarfExpression::AddExpression(), NFC
Duncan P. N. Exon Smith [Tue, 17 Feb 2015 22:30:56 +0000 (22:30 +0000)]
AsmPrinter: Take range in DwarfExpression::AddExpression(), NFC

Previously `DwarfExpression::AddExpression()` relied on
default-constructing the end iterators for `DIExpression` -- once the
operands are represented explicitly via `MDExpression` (instead of via
the strange `StringRef` navigator in `DIHeaderIterator`) this won't
work.  Explicitly take an iterator for the end of the range.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229572 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86][SSE] Generalised unpckl/unpckh shuffle matching
Simon Pilgrim [Tue, 17 Feb 2015 22:24:32 +0000 (22:24 +0000)]
[X86][SSE] Generalised unpckl/unpckh shuffle matching

Added commuted unpckl/unpckh shuffle matching patterns as many cases containing undefined lanes fail to commute by themselves.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229571 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd comment to explain a non-obvious setting; NFC.
Sanjay Patel [Tue, 17 Feb 2015 22:09:54 +0000 (22:09 +0000)]
Add comment to explain a non-obvious setting; NFC.

This is paraphrased from Simon Pilgrim's comment in:
http://reviews.llvm.org/D7492

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229566 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agouse a triple instead of a cpu; less builbot sadness
Sanjay Patel [Tue, 17 Feb 2015 21:59:54 +0000 (21:59 +0000)]
use a triple instead of a cpu; less builbot sadness

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229563 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoremove function names from comments; NFC
Sanjay Patel [Tue, 17 Feb 2015 21:55:20 +0000 (21:55 +0000)]
remove function names from comments; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229558 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoreplace meaningless variable names; NFCI
Sanjay Patel [Tue, 17 Feb 2015 21:37:28 +0000 (21:37 +0000)]
replace meaningless variable names; NFCI

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229549 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd code to llvm-objdump so the -section option with -macho will dump literal pointer...
Kevin Enderby [Tue, 17 Feb 2015 21:35:48 +0000 (21:35 +0000)]
Add code to llvm-objdump so the -section option with -macho will dump literal pointer sections
with the Mach-O S_LITERAL_POINTERS section type.

Also fix the printing of the leading addresses for literal sections to be consistent and
not print the 0x prefix.  Updated test cases to match.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229548 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRe-apply "InstrProf: Use a test fixture in the coverage mapping tests"
Justin Bogner [Tue, 17 Feb 2015 21:33:43 +0000 (21:33 +0000)]
Re-apply "InstrProf: Use a test fixture in the coverage mapping tests"

This time we use a helper to format the assertion so we can just use
ASSERT_TRUE instead of relying on ASSERT_EQ being able to deal with
conversions between enum types.

This reverts r229496, re-applying r229473.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229547 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd testcases I missed in r229541.
Rafael Espindola [Tue, 17 Feb 2015 20:50:39 +0000 (20:50 +0000)]
Add testcases I missed in r229541.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229542 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd r228980 back.
Rafael Espindola [Tue, 17 Feb 2015 20:48:01 +0000 (20:48 +0000)]
Add r228980 back.

Add support for having multiple sections with the same name and comdat.

Using this in combination with -ffunction-sections allows LLVM to output a .o
file with mulitple sections named .text. This saves space by avoiding long
unique names of the form .text.<C++ mangled name>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229541 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd r228889 back.
Rafael Espindola [Tue, 17 Feb 2015 20:40:59 +0000 (20:40 +0000)]
Add r228889 back.

Original message:
Invert the section relocation map.

It now points from rel section to section. Use it to set sh_info, avoiding
a brittle name lookup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229539 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd r228888 back.
Rafael Espindola [Tue, 17 Feb 2015 20:37:50 +0000 (20:37 +0000)]
Add r228888 back.

Original message:

Use the existing SymbolTableIndex instead of doing a lookup. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229538 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd r228886 back now that r229530 fixed the issue lldb was hitting.
Rafael Espindola [Tue, 17 Feb 2015 20:31:13 +0000 (20:31 +0000)]
Add r228886 back now that r229530 fixed the issue lldb was hitting.

Original message:

Create the Seciton -> Rel Section map when it is first needed. NFC.

Saves a walk over every section.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229536 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agomake basic block label matching more flexible for less sad buildbots
Sanjay Patel [Tue, 17 Feb 2015 20:29:31 +0000 (20:29 +0000)]
make basic block label matching more flexible for less sad buildbots

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229535 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Fix asam errors in SIFoldOperands
Tom Stellard [Tue, 17 Feb 2015 20:11:54 +0000 (20:11 +0000)]
R600/SI: Fix asam errors in SIFoldOperands

We were trying to fold into implicit uses, which led to out of bounds
access of the MCInstrDesc::OpInfo arrray.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229533 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoprevent folding a scalar FP load into a packed logical FP instruction (PR22371)
Sanjay Patel [Tue, 17 Feb 2015 20:08:21 +0000 (20:08 +0000)]
prevent folding a scalar FP load into a packed logical FP instruction (PR22371)

Change the memory operands in sse12_fp_packed_scalar_logical_alias from scalars to vectors.
That's what the hardware packed logical FP instructions define: 128-bit memory operands.
There are no scalar versions of these instructions...because this is x86.

Generating the wrong code (folding a scalar load into a 128-bit load) is still possible
using the peephole optimization pass and the load folding tables. We won't completely
solve this bug until we either fix the lowering in fabs/fneg/fcopysign and any other
places where scalar FP logic is created or fix the load folding in foldMemoryOperandImpl()
to make sure it isn't changing the size of the load.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229531 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDon't deference the section_end() iterator.
Rafael Espindola [Tue, 17 Feb 2015 20:07:28 +0000 (20:07 +0000)]
Don't deference the section_end() iterator.

Hard to test given the undefined behavior nature.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229530 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoExpose LLVM_VERSION_PATCH in llvm-config.h
Reid Kleckner [Tue, 17 Feb 2015 20:02:34 +0000 (20:02 +0000)]
Expose LLVM_VERSION_PATCH in llvm-config.h

There was no reason to keep this private in config.h, and users
requested that it be available in PR22615.

Also fix a bug where patch versions of '0' would cause the macro to
remain undefined. The "#cmakedefine" command only creates a macro if the
named variable would be considered true in the context of an if().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229529 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMake the ARM AsmPrinter independent of global subtarget
Eric Christopher [Tue, 17 Feb 2015 20:02:32 +0000 (20:02 +0000)]
Make the ARM AsmPrinter independent of global subtarget
initialization. Initialize the subtarget once per function and
migrate Emit{Start|End}OfAsmFile to either use attributes on the
TargetMachine or get information from the subtarget we'd use
for assembling. One bit (getISAEncoding) touched the general
AsmPrinter and the debug output. Handle this one by passing
the function for the subprogram down and updating all callers
and users.

The top-level-ness of the ARM attribute output for assembly is,
by nature, contrary to how we'd want to do this for an LTO
situation where we have multiple cpu architectures so this
solution is good enough for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229528 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago80-column fixups.
Eric Christopher [Tue, 17 Feb 2015 20:02:28 +0000 (20:02 +0000)]
80-column fixups.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229527 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[MC] Constifying MCInst::size()
Colin LeMahieu [Tue, 17 Feb 2015 19:46:23 +0000 (19:46 +0000)]
[MC] Constifying MCInst::size()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229524 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDIBuilder: add trackIfUnresolved() to all nodes that may be cyclic.
Adrian Prantl [Tue, 17 Feb 2015 19:17:39 +0000 (19:17 +0000)]
DIBuilder: add trackIfUnresolved() to all nodes that may be cyclic.
Tested in clang/test/CodeGenObjCCXX/debug-info-cyclic.mm

rdar://problem/19839612

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229521 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Object] Support reading 64-bit MIPS ELF archives
Simon Atanasyan [Tue, 17 Feb 2015 18:54:22 +0000 (18:54 +0000)]
[Object] Support reading 64-bit MIPS ELF archives

The 64-bit MIPS ELF archive file format is used by MIPS64 targets.
The main difference from a regular archive file is the symbol table format:
1. ar_name is equal to "/SYM64/"
2. number of symbols and offsets are 64-bit integers

http://techpubs.sgi.com/library/manuals/4000/007-4658-001/pdf/007-4658-001.pdf
Page 96

The patch allows reading of such archive files by llvm-nm, llvm-objdump
and other tools. But it does not support archive files with number of symbols
and/or offsets exceed 2^32. I think it is a rather rare case requires more
significant modification of `Archive` class code.

http://reviews.llvm.org/D7546

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229520 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCorrecting the ArrayRef test to not cause use-after-free bugs with initializer lists...
Aaron Ballman [Tue, 17 Feb 2015 17:44:07 +0000 (17:44 +0000)]
Correcting the ArrayRef test to not cause use-after-free bugs with initializer lists. Should also silence a -Wsign-compare warning accidentally introduced.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229515 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdding additional tests to ensure that initializer lists created from return values...
Aaron Ballman [Tue, 17 Feb 2015 17:08:08 +0000 (17:08 +0000)]
Adding additional tests to ensure that initializer lists created from return values and as function arguments also work as expected.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229513 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAddressing a post-commit review comment suggesting to avoid using direct initialization.
Aaron Ballman [Tue, 17 Feb 2015 16:57:05 +0000 (16:57 +0000)]
Addressing a post-commit review comment suggesting to avoid using direct initialization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229512 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCanonicalize splats as build_vectors (PR22283)
Sanjay Patel [Tue, 17 Feb 2015 16:54:32 +0000 (16:54 +0000)]
Canonicalize splats as build_vectors (PR22283)

This is a follow-on patch to:
http://reviews.llvm.org/D7093

That patch canonicalized constant splats as build_vectors,
and this patch removes the constant check so we can canonicalize
all splats as build_vectors.

This fixes the 2nd test case in PR22283:
http://llvm.org/bugs/show_bug.cgi?id=22283

The unfortunate code duplication between SelectionDAG and DAGCombiner
is discussed in the earlier patch review. At least this patch is just
removing code...

This improves an existing x86 AVX test and changes codegen in an ARM test.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229511 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Extend private extload pattern to include zext loads
Tom Stellard [Tue, 17 Feb 2015 16:36:00 +0000 (16:36 +0000)]
R600/SI: Extend private extload pattern to include zext loads

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229507 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoI believe we no longer require LLVM_HAS_INITIALIZER_LISTS; it's supported in MSVC...
Aaron Ballman [Tue, 17 Feb 2015 15:37:53 +0000 (15:37 +0000)]
I believe we no longer require LLVM_HAS_INITIALIZER_LISTS; it's supported in MSVC 2013 and GCC. Added a trivial test to ensure the ArrayRef initializer list constructor is called and behaves as expected.

If any of the bots complain (perhaps due to an antiquated version of an STL implementation), I will revert.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229502 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoADT/PointerIntPairTest.cpp: Prune obsolete #if. We don't support msc17 anymore.
NAKAMURA Takumi [Tue, 17 Feb 2015 15:36:01 +0000 (15:36 +0000)]
ADT/PointerIntPairTest.cpp: Prune obsolete #if. We don't support msc17 anymore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229501 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoPrefer SmallVector::append/insert over push_back loops.
Benjamin Kramer [Tue, 17 Feb 2015 15:29:18 +0000 (15:29 +0000)]
Prefer SmallVector::append/insert over push_back loops.

Same functionality, but hoists the vector growth out of the loop.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229500 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoReverting r229473; it does not compile with MSVC 2013, and I suspect it was meant...
Aaron Ballman [Tue, 17 Feb 2015 13:18:43 +0000 (13:18 +0000)]
Reverting r229473; it does not compile with MSVC 2013, and I suspect it was meant to be reverted in r229483.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229496 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFixed a bug in store sinking.
Elena Demikhovsky [Tue, 17 Feb 2015 13:10:05 +0000 (13:10 +0000)]
Fixed a bug in store sinking.
The problem was in store-sink barrier check.

Store sink barrier should be checked for ModRef (read-write) mode.

http://llvm.org/bugs/show_bug.cgi?id=22613

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229495 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoOrcJIT: Appease msc18 not to be confused on executeCompileCallback<OrcX86_64>.
NAKAMURA Takumi [Tue, 17 Feb 2015 12:53:16 +0000 (12:53 +0000)]
OrcJIT: Appease msc18 not to be confused on executeCompileCallback<OrcX86_64>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229494 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoReformat.
NAKAMURA Takumi [Tue, 17 Feb 2015 12:53:05 +0000 (12:53 +0000)]
Reformat.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229493 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoOrcJIT: Try to appease msc18 to add move constructor in FullyPartitionedModule .
NAKAMURA Takumi [Tue, 17 Feb 2015 12:52:58 +0000 (12:52 +0000)]
OrcJIT: Try to appease msc18 to add move constructor in FullyPartitionedModule .

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229492 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix problem with uninitialized bool found by asan.
Manuel Klimek [Tue, 17 Feb 2015 12:42:14 +0000 (12:42 +0000)]
Fix problem with uninitialized bool found by asan.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229490 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86][FastISel] Add missing flag -fast-isel-abort to run lines in test fast-isel...
Andrea Di Biagio [Tue, 17 Feb 2015 12:25:49 +0000 (12:25 +0000)]
[X86][FastISel] Add missing flag -fast-isel-abort to run lines in test fast-isel-fptrunc-fpext.ll.

Flag -fast-isel-abort is required in order to verify that X86FastISel
never fails to select FPExt (float-to-double) and FPTrunc (double-to-float).
No Functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229489 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86] Silence -Wsign-compare warnings.
Andrea Di Biagio [Tue, 17 Feb 2015 11:20:11 +0000 (11:20 +0000)]
[X86] Silence -Wsign-compare warnings.

GCC 4.8 reported two new warnings due to comparisons
between signed and unsigned integer expressions. The new warnings were
accidentally introduced by revision 229480.
Added explicit casts to silence the warnings. No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229488 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "InstrProf: Add unit tests for the profile reader and writer"
Justin Bogner [Tue, 17 Feb 2015 09:21:43 +0000 (09:21 +0000)]
Revert "InstrProf: Add unit tests for the profile reader and writer"

This added API to the InstrProfWriter to write to a string so I could
write unittests without using temp files. This doesn't really work,
since the format has tighter alignment requirements than a char.

This reverts r229478 and its follow-up, r229481.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229483 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAVX-512: changes in intel_ocl_bi calling conventions
Elena Demikhovsky [Tue, 17 Feb 2015 09:20:12 +0000 (09:20 +0000)]
AVX-512: changes in intel_ocl_bi calling conventions
- added mask types v8i1 and v16i1 to possible function parameters
- enabled passing 512-bit vectors in standard CC
- added a test for KNL intel_ocl_bi conventions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229482 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoInstrProf: Add missing header from r229478
Justin Bogner [Tue, 17 Feb 2015 08:26:06 +0000 (08:26 +0000)]
InstrProf: Add missing header from r229478

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229481 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86] Combine vector anyext + and into a vector zext
Michael Kuperstein [Tue, 17 Feb 2015 08:22:51 +0000 (08:22 +0000)]
[X86] Combine vector anyext + and into a vector zext

Vector zext tends to get legalized into a vector anyext, represented as a vector shuffle with an undef vector + a bitcast, that gets ANDed with a mask that zeroes the undef elements.
Combine this into an explicit shuffle with a zero vector instead. This allows shuffle lowering to match it as a zext, instead of matching it as an anyext and emitting an explicit AND.
This combine only covers a subset of the cases, but it's a start.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229480 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRe-apply "InstrProf: Add unit tests for the profile reader and writer"
Justin Bogner [Tue, 17 Feb 2015 07:50:59 +0000 (07:50 +0000)]
Re-apply "InstrProf: Add unit tests for the profile reader and writer"

Add these tests again, but use va_list instead of initializer lists.

This reverts r229456, reapplying r229455.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229478 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PBQP] NDEBUG guards added around code needed for assert.
Jonas Paulsson [Tue, 17 Feb 2015 07:45:06 +0000 (07:45 +0000)]
[PBQP] NDEBUG guards added around code needed for assert.

wasConservativelyAllocatable() is only called to assert that a conservatively
allocatable node wasn't forced to spill.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229477 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMake the PowerPC AsmPrinter independent of global subtarget
Eric Christopher [Tue, 17 Feb 2015 07:21:21 +0000 (07:21 +0000)]
Make the PowerPC AsmPrinter independent of global subtarget
initialization. Initialize the subtarget once per function and
migrate EmitStartOfAsmFile to either use attributes on the
TargetMachine or get information from all of the various
subtargets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229475 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoInstrProf: Use a test fixture in the coverage mapping tests
Justin Bogner [Tue, 17 Feb 2015 06:56:49 +0000 (06:56 +0000)]
InstrProf: Use a test fixture in the coverage mapping tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229473 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd a FIXME to move IsLittleEndian to the target machine.
Eric Christopher [Tue, 17 Feb 2015 06:45:17 +0000 (06:45 +0000)]
Add a FIXME to move IsLittleEndian to the target machine.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229472 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMove ABI handling and 64-bitness to the PowerPC target machine.
Eric Christopher [Tue, 17 Feb 2015 06:45:15 +0000 (06:45 +0000)]
Move ABI handling and 64-bitness to the PowerPC target machine.
This required changing how the computation of the ABI is handled
and how some of the checks for ABI/target are done.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229471 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Orc][Kaleidoscope] Fix misnumbered steps in comments, plus tidy one
Lang Hames [Tue, 17 Feb 2015 05:53:28 +0000 (05:53 +0000)]
[Orc][Kaleidoscope] Fix misnumbered steps in comments, plus tidy one
explanation up a little.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229467 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Orc][Kaleidoscope] Add an example of extreme-laziness in Orc.
Lang Hames [Tue, 17 Feb 2015 05:40:42 +0000 (05:40 +0000)]
[Orc][Kaleidoscope] Add an example of extreme-laziness in Orc.

The version of the tutorial uses the new compile callbacks API to inject stubs
that trigger IRGen & Codegen of their respective function bodies when they are
first called.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229466 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Orc][Kaleidoscope] Update the MainLoop code of the orc/kaleidoscope tutorials
Lang Hames [Tue, 17 Feb 2015 05:36:59 +0000 (05:36 +0000)]
[Orc][Kaleidoscope] Update the MainLoop code of the orc/kaleidoscope tutorials
to get rid of the duplicate prompt. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229465 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAsmPrinter: Use DIExpression default constructor, NFC
Duncan P. N. Exon Smith [Tue, 17 Feb 2015 02:42:45 +0000 (02:42 +0000)]
AsmPrinter: Use DIExpression default constructor, NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229464 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[x86] Teach the unpack lowering to try wider element unpacks.
Chandler Carruth [Tue, 17 Feb 2015 02:12:24 +0000 (02:12 +0000)]
[x86] Teach the unpack lowering to try wider element unpacks.

This allows it to match still more places where previously we would have
to fall back on floating point shuffles or other more complex lowering
strategies.

I'm hoping to replace some of the hand-rolled unpack matching with this
routine is it gets more and more clever.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229463 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[BDCE] Add a bit-tracking DCE pass
Hal Finkel [Tue, 17 Feb 2015 01:36:59 +0000 (01:36 +0000)]
[BDCE] Add a bit-tracking DCE pass

BDCE is a bit-tracking dead code elimination pass. It is based on ADCE (the
"aggressive DCE" pass), with the added capability to track dead bits of integer
valued instructions and remove those instructions when all of the bits are
dead.

Currently, it does not actually do this all-bits-dead removal, but rather
replaces the instruction's uses with a constant zero, and lets instcombine (and
the later run of ADCE) do the rest. Because we essentially get a run of ADCE
"for free" while tracking the dead bits, we also do what ADCE does and removes
actually-dead instructions as well (this includes instructions newly trivially
dead because all bits were dead, but not all such instructions can be removed).

The motivation for this is a case like:

int __attribute__((const)) foo(int i);
int bar(int x) {
  x |= (4 & foo(5));
  x |= (8 & foo(3));
  x |= (16 & foo(2));
  x |= (32 & foo(1));
  x |= (64 & foo(0));
  x |= (128& foo(4));
  return x >> 4;
}

As it turns out, if you order the bit-field insertions so that all of the dead
ones come last, then instcombine will remove them. However, if you pick some
other order (such as the one above), the fact that some of the calls to foo()
are useless is not locally obvious, and we don't remove them (without this
pass).

I did a quick compile-time overhead check using sqlite from the test suite
(Release+Asserts). BDCE took ~0.4% of the compilation time (making it about
twice as expensive as ADCE).

I've not looked at why yet, but we eliminate instructions due to having
all-dead bits in:
External/SPEC/CFP2006/447.dealII/447.dealII
External/SPEC/CINT2006/400.perlbench/400.perlbench
External/SPEC/CINT2006/403.gcc/403.gcc
MultiSource/Applications/ClamAV/clamscan
MultiSource/Benchmarks/7zip/7zip-benchmark

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229462 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Orc] Update the Orc indirection utils and refactor the CompileOnDemand layer.
Lang Hames [Tue, 17 Feb 2015 01:18:38 +0000 (01:18 +0000)]
[Orc] Update the Orc indirection utils and refactor the CompileOnDemand layer.

This patch replaces most of the Orc indirection utils API with a new class:
JITCompileCallbackManager, which creates and manages JIT callbacks.
Exposing this functionality directly allows the user to create callbacks that
are associated with user supplied compilation actions. For example, you can
create a callback to lazyily IR-gen something from an AST. (A kaleidoscope
example demonstrating this will be committed shortly).

This patch also refactors the CompileOnDemand layer to use the
JITCompileCallbackManager API.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229461 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSpecify arch in test/CodeGen/X86/float-conv-elim.ll
Hal Finkel [Tue, 17 Feb 2015 00:11:19 +0000 (00:11 +0000)]
Specify arch in test/CodeGen/X86/float-conv-elim.ll

This test was failing on non-x86 hosts because it specified a cpu of x86_64,
but not an architecture. x86_64 is obviously not a valid cpu on all
architectures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229460 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAsmPrinter: Stop creating DebugLocs
Duncan P. N. Exon Smith [Tue, 17 Feb 2015 00:02:27 +0000 (00:02 +0000)]
AsmPrinter: Stop creating DebugLocs

While looking at a heap profile of a clang LTO bootstrap with -g, I
noticed that 2.2% of memory in an `llvm-lto` of clang is from calling
`DebugLoc::get()` in `collectVariableInfo()` (accounting for ~40% of
memory used for `MDLocation`s).

I suspect this was introduced by r226736, whose goal was to prevent
uniquing of `DebugLoc`s (goal achieved, if so).

There's no reason we need a `DebugLoc` here at all -- it was just being
used for (in)convenient API -- so the fix is to pass the scope and
inlined-at directly to `LexicalScopes::findInlinedScope()`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229459 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PowerPC] Support non-direct-sub/superclass VSX copies
Hal Finkel [Mon, 16 Feb 2015 23:46:30 +0000 (23:46 +0000)]
[PowerPC] Support non-direct-sub/superclass VSX copies

Our register allocation has become better recently, it seems, and is now
starting to generate cross-block copies into inflated register classes. These
copies are not transformed into subregister insertions/extractions by the
PPCVSXCopy class, and so need to be handled directly by
PPCInstrInfo::copyPhysReg. The code to do this was *almost* there, but not
quite (it was unnecessarily restricting itself to only the direct
sub/super-register-class case (not copying between, for example, something in
VRRC and the lower-half of VSRC which are super-registers of F8RC).

Triggering this behavior manually is difficult; I'm including two
bugpoint-reduced test cases from the test suite.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229457 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "InstrProf: Add unit tests for the profile reader and writer"
Justin Bogner [Mon, 16 Feb 2015 23:31:07 +0000 (23:31 +0000)]
Revert "InstrProf: Add unit tests for the profile reader and writer"

Looks like the bots don't like my initializer lists.

This reverts r229455

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229456 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoInstrProf: Add unit tests for the profile reader and writer
Justin Bogner [Mon, 16 Feb 2015 23:27:48 +0000 (23:27 +0000)]
InstrProf: Add unit tests for the profile reader and writer

This required some minor API to be added to these types to avoid
needing temp files.

Also, I've used initializer lists in the tests, as MSVC 2013 claims to
support them. I'll redo this without them if the bots complain.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229455 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Mips] Add .MIPS.options section descriptor kinds enumeration
Simon Atanasyan [Mon, 16 Feb 2015 22:59:29 +0000 (22:59 +0000)]
[Mips] Add .MIPS.options section descriptor kinds enumeration

No functional changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229452 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Orc] Add an emitAndFinalize method to the ObjectLinkingLayer, IRCompileLayer
Lang Hames [Mon, 16 Feb 2015 22:36:25 +0000 (22:36 +0000)]
[Orc] Add an emitAndFinalize method to the ObjectLinkingLayer, IRCompileLayer
and LazyEmittingLayer of Orc.

This method allows you to immediately emit and finalize a module. It is required
by an upcoming refactor of the indirection utils and the compile-on-demand
layer.

I've filed http://llvm.org/PR22608 to write unit tests for this and other Orc
APIs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229451 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[ARM] Remove unused declaration. NFC.
Ahmed Bougacha [Mon, 16 Feb 2015 22:30:08 +0000 (22:30 +0000)]
[ARM] Remove unused declaration. NFC.

GlobalMerge was moved to lib/CodeGen a while ago, and is no longer
called "ARMGlobalMerge".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229448 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[AVX512] Make 512b vector floating point rounds legal on AVX512.
Cameron McInally [Mon, 16 Feb 2015 22:15:42 +0000 (22:15 +0000)]
[AVX512] Make 512b vector floating point rounds legal on AVX512.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229445 91177308-0d34-0410-b5e6-96231b3b80d8