oota-llvm.git
10 years agoOutput a bit more information in the debug printing for MBP. This was
Chandler Carruth [Mon, 25 Nov 2013 00:43:41 +0000 (00:43 +0000)]
Output a bit more information in the debug printing for MBP. This was
useful when analyzing parts of zlib's behavior here.

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

10 years ago[Sparc] Emit large negative adjustments to SP/FP with sethi+xor instead of sethi...
Venkatraman Govindaraju [Sun, 24 Nov 2013 20:23:25 +0000 (20:23 +0000)]
[Sparc] Emit large negative adjustments to SP/FP with sethi+xor instead of sethi+or. This generates correct code for both sparc32 and sparc64.

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

10 years ago[Sparc]: Implement LEA pattern for sparcv9.
Venkatraman Govindaraju [Sun, 24 Nov 2013 20:07:35 +0000 (20:07 +0000)]
[Sparc]: Implement LEA pattern for sparcv9.

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

10 years ago[SparcV9]: Do not emit .register directives for global registers that are clobbered...
Venkatraman Govindaraju [Sun, 24 Nov 2013 18:41:49 +0000 (18:41 +0000)]
[SparcV9]: Do not emit .register directives for global registers that are clobbered by calls but not used in the function itself.

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

10 years ago[SparcV9] Enable custom lowering of DYNAMIC_STACKALLOC in sparc64.
Venkatraman Govindaraju [Sun, 24 Nov 2013 17:41:41 +0000 (17:41 +0000)]
[SparcV9] Enable custom lowering of DYNAMIC_STACKALLOC in sparc64.

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

10 years agoMake sure that for C++ emitting LwConstant32 pseudos, that it corresponds
Reed Kotler [Sun, 24 Nov 2013 06:18:50 +0000 (06:18 +0000)]
Make sure that for C++ emitting LwConstant32 pseudos, that it corresponds
to what is needed for constant islands. The prescan method for Mips16 constant
islands will eventually go away. It is only temporary and should be done
earlier when the instructions are first created or from the DAG. If we keep
it here we need to handle better the situation where constant islands
is called multiple times since don't want to prescan more than once.

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

10 years agoDefault to a better compression algorithm.
Bill Wendling [Sun, 24 Nov 2013 05:29:35 +0000 (05:29 +0000)]
Default to a better compression algorithm.

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

10 years agoUpdate older test cases for latest patch.
Reed Kotler [Sun, 24 Nov 2013 03:37:56 +0000 (03:37 +0000)]
Update older test cases for latest patch.

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

10 years agoFix a funny bug I introduced during conversion of ARM constant islands to Mips.
Reed Kotler [Sun, 24 Nov 2013 02:53:09 +0000 (02:53 +0000)]
Fix a funny bug I introduced during conversion of ARM constant islands to Mips.
I had to move some code and I moved a declaration forward past it's first use
in the function but by nutty coincidence there was another variable of the same
name and type and  with completely unrelated function that was declared globally
in the class so no compilation error ensued.
It required some unusual conditions for it to even matter. Caused test
case casts.c in test-suite to fail during compilation with a duplicate
symbol error. I would have noticed it during final code review for this port.

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

10 years agoPut an unused result attribute on SmallSet::empty()
Alp Toker [Sat, 23 Nov 2013 23:06:20 +0000 (23:06 +0000)]
Put an unused result attribute on SmallSet::empty()

This matches other empty() container functions in LLVM.

No actual usage problems discovered in this instance.

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

10 years ago[PM] Complete the cross-layer interfaces with a Module-to-Function
Chandler Carruth [Sat, 23 Nov 2013 01:25:07 +0000 (01:25 +0000)]
[PM] Complete the cross-layer interfaces with a Module-to-Function
proxy. This lets a function pass query a module analysis manager.
However, the interface is const to indicate that only cached results can
be safely queried.

With this, I think the new pass manager is largely functionally complete
for modules and analyses. Still lots to test, and need to generalize to
SCCs and Loops, and need to build an adaptor layer to support the use of
existing Pass objects in the new managers.

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

10 years ago[PM] Rename TestAnalysisPass to TestFunctionAnalysis to clear the way
Chandler Carruth [Sat, 23 Nov 2013 01:25:02 +0000 (01:25 +0000)]
[PM] Rename TestAnalysisPass to TestFunctionAnalysis to clear the way
for a TestModuleAnalysis.

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

10 years agoDwarfDebug: Move ownership of CompileUnits into DwarfUnits
David Blaikie [Sat, 23 Nov 2013 01:17:34 +0000 (01:17 +0000)]
DwarfDebug: Move ownership of CompileUnits into DwarfUnits

This avoids the need for an extra list of SkeletonCUs and associated
cleanup while staging things to be cleaner for further type unit
improvements.

Also hopefully fixes a memory leak introduced in r195166.

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

10 years agoDebug Info: update testing cases to specify the debug info version number.
Manman Ren [Sat, 23 Nov 2013 01:16:29 +0000 (01:16 +0000)]
Debug Info: update testing cases to specify the debug info version number.

We are going to drop debug info without a version number or with a different
version number, to make sure we don't crash when we see bitcode files with
different debug info metadata format.

Make tests more robust by removing hard-coded metadata numbers in CHECK lines.

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

10 years agoMigrate metadata information from scalar to vector instructions during
Chandler Carruth [Sat, 23 Nov 2013 00:48:34 +0000 (00:48 +0000)]
Migrate metadata information from scalar to vector instructions during
SLP vectorization. Based on the code in BBVectorizer.

Fixes PR17741.

Patch by Raul Silvera, reviewed by Hal and Nadav. Reformatted by my
driving of clang-format. =]

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

10 years ago[PM] Add support to the analysis managers to query explicitly for cached
Chandler Carruth [Sat, 23 Nov 2013 00:38:42 +0000 (00:38 +0000)]
[PM] Add support to the analysis managers to query explicitly for cached
results.

This is the last piece of infrastructure needed to effectively support
querying *up* the analysis layers. The next step will be to introduce
a proxy which provides access to those layers with appropriate use of
const to direct queries to the safe interface.

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

10 years agoRefactor DW_AT_ranges handling to use labels for ranges rather than
Eric Christopher [Sat, 23 Nov 2013 00:05:29 +0000 (00:05 +0000)]
Refactor DW_AT_ranges handling to use labels for ranges rather than
a non-relocatable number offset.

One fixme to make the ranges as discrete data structures and
have range lists explicitly represented rather than as a list of symbols.

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

10 years agoReformat const for readability.
Eric Christopher [Sat, 23 Nov 2013 00:05:06 +0000 (00:05 +0000)]
Reformat const for readability.

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

10 years ago[PM] Switch the downward invalidation to be incremental where only the
Chandler Carruth [Fri, 22 Nov 2013 23:38:07 +0000 (23:38 +0000)]
[PM] Switch the downward invalidation to be incremental where only the
one function's analyses are invalidated at a time. Also switch the
preservation of the proxy to *fully* preserve the lower (function)
analyses.

Combined, this gets both upward and downward analysis invalidation to
a point I'm happy with:

- A function pass invalidates its function analyses, and its parent's
  module analyses.
- A module pass invalidates all of its functions' analyses including the
  set of which functions are in the module.
- A function pass can preserve a module analysis pass.
- If all function passes preserve a module analysis pass, that
  preservation persists. If any doesn't the module analysis is
  invalidated.
- A module pass can opt into managing *all* function analysis
  invalidation itself or *none*.
- The conservative default is none, and the proxy takes the maximally
  conservative approach that works even if the set of functions has
  changed.
- If a module pass opts into managing function analysis invalidation it
  has to propagate the invalidation itself, the proxy just does nothing.

The only thing really missing is a way to query for a cached analysis or
nothing at all. With this, function passes can more safely request
a cached module analysis pass without fear of it accidentally running
part way through.

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

10 years ago[PM] Remove a FIXME comment that was fixed by my recent refactorings:
Chandler Carruth [Fri, 22 Nov 2013 23:37:54 +0000 (23:37 +0000)]
[PM] Remove a FIXME comment that was fixed by my recent refactorings:
now the access to the manager is via the proxy that ensures it behaves
correctly.

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

10 years agoR600/SI: Fixing handling of condition codes
Tom Stellard [Fri, 22 Nov 2013 23:07:58 +0000 (23:07 +0000)]
R600/SI: Fixing handling of condition codes

We were ignoring the ordered/onordered bits and also the signed/unsigned
bits of condition codes when lowering the DAG to MachineInstrs.

NOTE: This is a candidate for the 3.4 branch.

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

10 years agollvm-cov: Split entry blocks in GCNOProfiling.cpp.
Yuchen Wu [Fri, 22 Nov 2013 23:07:45 +0000 (23:07 +0000)]
llvm-cov: Split entry blocks in GCNOProfiling.cpp.

gcov expects every function to contain an entry block that
unconditionally branches into the next block. clang does not implement
basic blocks in this manner, so gcov did not output correct branch info
if the entry block branched to multiple blocks.

This change splits every function's entry block into an empty block and
a block with the rest of the instructions. The instrumentation code will
take care of the rest.

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

10 years agoDebug Info: move StripDebugInfo from StripSymbols.cpp to DebugInfo.cpp.
Manman Ren [Fri, 22 Nov 2013 22:06:31 +0000 (22:06 +0000)]
Debug Info: move StripDebugInfo from StripSymbols.cpp to DebugInfo.cpp.

We can share the implementation between StripSymbols and dropping debug info
for metadata versions that do not match.

Also update the comments to match the implementation. A follow-on patch will
drop the "Debug Info Version" module flag in StripDebugInfo.

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

10 years agoDebug Info: update testing cases to specify the debug info version number.
Manman Ren [Fri, 22 Nov 2013 21:49:45 +0000 (21:49 +0000)]
Debug Info: update testing cases to specify the debug info version number.

We are going to drop debug info without a version number or with a different
version number, to make sure we don't crash when we see bitcode files with
different debug info metadata format.

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

10 years agoX86: Perform integer comparisons at i32 or larger.
Jim Grosbach [Fri, 22 Nov 2013 19:57:47 +0000 (19:57 +0000)]
X86: Perform integer comparisons at i32 or larger.

Utilizing the 8 and 16 bit comparison instructions, even when an input can
be folded into the comparison instruction itself, is typically not worth it.
There are too many partial register stalls as a result, leading to significant
slowdowns. By always performing comparisons on at least 32-bit
registers, performance of the calculation chain leading to the
comparison improves. Continue to use the smaller comparisons when
minimizing size, as that allows better folding of loads into the
comparison instructions.

rdar://15386341

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

10 years agoDebug Info: add a constant for debug info version number.
Manman Ren [Fri, 22 Nov 2013 19:41:59 +0000 (19:41 +0000)]
Debug Info: add a constant for debug info version number.

This will be used to output the debug info version number as a module flag.

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

10 years agoStructurizeCFG: Fix verification failure with some loops.
Matt Arsenault [Fri, 22 Nov 2013 19:24:39 +0000 (19:24 +0000)]
StructurizeCFG: Fix verification failure with some loops.

If the beginning of the loop was also the entry block
of the function, branches were inserted to the entry block
which isn't allowed. If this occurs, create a new dummy
function entry block that branches to the start of the loop.

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

10 years agoStructurizeCFG: Fix inverting a branch on an argument
Matt Arsenault [Fri, 22 Nov 2013 19:24:37 +0000 (19:24 +0000)]
StructurizeCFG: Fix inverting a branch on an argument

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

10 years agoTeach ISel not to optimize 'optnone' functions (revised).
Paul Robinson [Fri, 22 Nov 2013 19:11:24 +0000 (19:11 +0000)]
Teach ISel not to optimize 'optnone' functions (revised).

Improvements over r195317:
- Set/restore EnableFastISel flag instead of just running FastISel within
  SelectAllBasicBlocks; the flag is checked in various places, and
  FastISel won't run properly if those places don't do the right thing.
- Test looks for normal ISel versus FastISel behavior, and not
  something more subtle that doesn't work everywhere.

Based on work by Andrea Di Biagio.

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

10 years agoDEBUG shouldEvict decisions
Andrew Trick [Fri, 22 Nov 2013 19:07:42 +0000 (19:07 +0000)]
DEBUG shouldEvict decisions

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

10 years agoMinor cleanup. EvictionCost ctor was confusing relative to the other costs floating...
Andrew Trick [Fri, 22 Nov 2013 19:07:38 +0000 (19:07 +0000)]
Minor cleanup. EvictionCost ctor was confusing relative to the other costs floating around in the code.

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

10 years agopatchpoint: factor SD builder code for live vars. Plain stackmap also optimizes Const...
Andrew Trick [Fri, 22 Nov 2013 19:07:36 +0000 (19:07 +0000)]
patchpoint: factor SD builder code for live vars. Plain stackmap also optimizes Constant values now.

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

10 years agopatchpoint: eliminate hard coded operand indices.
Andrew Trick [Fri, 22 Nov 2013 19:07:33 +0000 (19:07 +0000)]
patchpoint: eliminate hard coded operand indices.

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

10 years agoVS integration: use the correct registry key after r195379
Hans Wennborg [Fri, 22 Nov 2013 18:25:43 +0000 (18:25 +0000)]
VS integration: use the correct registry key after r195379

I changed the registry key in that commit, but forgot to update
the integration files. This change makes them use the same variable.

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

10 years agoAdd a fixed version of r195470 back.
Rafael Espindola [Fri, 22 Nov 2013 17:58:12 +0000 (17:58 +0000)]
Add a fixed version of r195470 back.

The fix is simply to use CurI instead of I when handling aliases to
avoid accessing a invalid iterator.

original message:

Convert linkonce* to weak* instead of strong.

Also refactor the logic into a helper function. This is an important improve
on mingw where the linker complains about mixed weak and strong symbols.
Converting to weak ensures that the symbol is not dropped, but keeps in a
comdat, making the linker happy.

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

10 years agoFix PR18014
Michael Liao [Fri, 22 Nov 2013 17:56:57 +0000 (17:56 +0000)]
Fix PR18014

- When simplifying the mask generation for BLEND, check whether that mask is
  also consumed by other non-BLEND insns. If true, skip that simplification.

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

10 years ago[SystemZ] Fix TMHH and TMHL usage for z10 with -O0
Richard Sandiford [Fri, 22 Nov 2013 17:28:28 +0000 (17:28 +0000)]
[SystemZ] Fix TMHH and TMHL usage for z10 with -O0

I've no idea why I decided to handle TMxx differently from all the other
high/low logic operations, but it was a stupid thing to do.  The high
registers aren't available as separate 32-bit registers on z10,
so subreg_h32 can't be used on a GR64 there.

I've normally been testing with z196 and with -O3 and so hadn't noticed
this until now.

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

10 years agoRevert "Convert linkonce* to weak* instead of strong."
Rafael Espindola [Fri, 22 Nov 2013 17:09:34 +0000 (17:09 +0000)]
Revert "Convert linkonce* to weak* instead of strong."

This reverts commit r195470.
Debugging failure in some bots.

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

10 years agoAdd a Scalarizer pass.
Richard Sandiford [Fri, 22 Nov 2013 16:58:05 +0000 (16:58 +0000)]
Add a Scalarizer pass.

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

10 years agoConvert linkonce* to weak* instead of strong.
Rafael Espindola [Fri, 22 Nov 2013 16:14:30 +0000 (16:14 +0000)]
Convert linkonce* to weak* instead of strong.

Also refactor the logic into a helper function. This is an important improvement
on mingw where the linker complains about mixed weak and strong symbols.
Converting to weak ensures that the symbol is not dropped, but keeps in a
comdat, making the linker happy.

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

10 years ago[mips][msa] Add test case that should have been added in r195456.
Daniel Sanders [Fri, 22 Nov 2013 15:47:18 +0000 (15:47 +0000)]
[mips][msa] Add test case that should have been added in r195456.

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

10 years agoSLPVectorizer: Fix whitespace errors.
Arnold Schwaighofer [Fri, 22 Nov 2013 15:47:17 +0000 (15:47 +0000)]
SLPVectorizer: Fix whitespace errors.

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

10 years agoDon't produce tail calls when the caller is x86_thiscallcc.
Rafael Espindola [Fri, 22 Nov 2013 15:18:28 +0000 (15:18 +0000)]
Don't produce tail calls when the caller is x86_thiscallcc.

The callee will not pop the stack for us.

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

10 years agoARM: use CHECK-LABEL on a test.
Tim Northover [Fri, 22 Nov 2013 13:25:07 +0000 (13:25 +0000)]
ARM: use CHECK-LABEL on a test.

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

10 years agoFix typo in a comment added in r195455.
Daniel Sanders [Fri, 22 Nov 2013 13:22:52 +0000 (13:22 +0000)]
Fix typo in a comment added in r195455.

Credit to Matheus Almeida for spotting it.

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

10 years ago[mips][msa] Fix corner case for integer constant splats with undef values.
Daniel Sanders [Fri, 22 Nov 2013 13:14:06 +0000 (13:14 +0000)]
[mips][msa] Fix corner case for integer constant splats with undef values.

lowerBUILD_VECTOR() was treating integer constant splats as being legal
regardless of whether they had undef values. This caused instruction
selection failures when the undefs were legalized to zero, making the
constant non-splat.

Fixed this by requiring HasAnyUndef to be false for a integer constant
splat to be legal. If it is true, a new node is generated with the undefs
replaced with the necessary values to remain a splat.

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

10 years ago[PM] Remove extraneous space that I left in there.
Chandler Carruth [Fri, 22 Nov 2013 12:26:40 +0000 (12:26 +0000)]
[PM] Remove extraneous space that I left in there.

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

10 years ago[PM] Teach the analysis managers to pass themselves as arguments to the
Chandler Carruth [Fri, 22 Nov 2013 12:11:02 +0000 (12:11 +0000)]
[PM] Teach the analysis managers to pass themselves as arguments to the
run methods of the analysis passes.

Also generalizes and re-uses the SFINAE for transformation passes so
that users can write an analysis pass and only accept an analysis
manager if that is useful to their pass.

This completes the plumbing to make an analysis manager available
through every pass's run method if desired so that passes no longer need
to be constructed around them.

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

10 years ago[PM] Reverse the template arguments 'PassT' and 'AnalysisManagerT' in
Chandler Carruth [Fri, 22 Nov 2013 11:55:38 +0000 (11:55 +0000)]
[PM] Reverse the template arguments 'PassT' and 'AnalysisManagerT' in
several templates. The previous order didn't make any sense as it
separated 'IRUnitT' and 'AnalysisManagerT', the types which are
essentially paired and passed along together throughout the layers.

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

10 years agoAdd support for Cortex-A12.
Richard Barton [Fri, 22 Nov 2013 11:53:16 +0000 (11:53 +0000)]
Add support for Cortex-A12.

Patch by Oliver Stannard!

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

10 years ago[PM] Remove the IRUnitT typedef requirement for analysis passes.
Chandler Carruth [Fri, 22 Nov 2013 11:46:33 +0000 (11:46 +0000)]
[PM] Remove the IRUnitT typedef requirement for analysis passes.

Since the analysis managers were split into explicit function and module
analysis managers, it is now completely trivial to specify this when
building up the concept and model types explicitly, and it is impossible
to end up with a type error at run time. We instantiate a template when
registering a pass that will enforce the requirement at a type-system
level, and we produce a dynamic error on all the other query paths to
the analysis manager if the pass in question isn't registered.

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

10 years ago[PM] Fix the analysis templates' usage of IRUnitT.
Chandler Carruth [Fri, 22 Nov 2013 11:34:43 +0000 (11:34 +0000)]
[PM] Fix the analysis templates' usage of IRUnitT.

This is supposed to be the whole type of the IR unit, and so we
shouldn't pass a pointer to it but rather the value itself. In turn, we
need to provide a 'Module *' as that type argument (for example). This
will become more relevant with SCCs or other units which may not be
passed as a pointer type, but also brings consistency with the
transformation pass templates.

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

10 years ago[mips][msa] Float vector constants cannot use ldi.[wd] directly. Bitcast from the...
Daniel Sanders [Fri, 22 Nov 2013 11:24:50 +0000 (11:24 +0000)]
[mips][msa] Float vector constants cannot use ldi.[wd] directly. Bitcast from the appropriate integer vector type.

Fixes an instruction selection failure detected by llvm-stress.

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

10 years agoRevert r195318 as it causes miscompilation (PR18029)
Kostya Serebryany [Fri, 22 Nov 2013 10:30:39 +0000 (10:30 +0000)]
Revert r195318 as it causes miscompilation (PR18029)

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

10 years agoFix a Cygwin build failure caused by enum values starting with '_', which is conflict...
Hao Liu [Fri, 22 Nov 2013 09:24:41 +0000 (09:24 +0000)]
Fix a Cygwin build failure caused by enum values starting with '_', which is conflicted with some platform macros.
This patch only renames variables, no functional change.

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

10 years agoFix the bugs about AArch64 Load/Store vector types and bitcast between i64 and vector...
Hao Liu [Fri, 22 Nov 2013 08:47:22 +0000 (08:47 +0000)]
Fix the bugs about AArch64 Load/Store vector types and bitcast between i64 and vector types.
e.g. "%tmp = load <2 x i64>* %ptr" can't be selected.
     "%tmp = bitcast i64 %in to <2 x i32>" can't be selected.

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

10 years agoRevert last change by haoliu because of buildbot failure.
Hao Liu [Fri, 22 Nov 2013 08:34:54 +0000 (08:34 +0000)]
Revert last change by haoliu because of buildbot failure.

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

10 years agoFix a Cygwin build failure caused by enum values starting with '_', which is conflict...
Hao Liu [Fri, 22 Nov 2013 08:17:16 +0000 (08:17 +0000)]
Fix a Cygwin build failure caused by enum values starting with '_', which is conflicted with some platform macros.
This solution only renames variables, no functional change.

NOTE: This is a candidate for the 3.4 branch.

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

10 years ago[block-freq] Update data in test case to be unsigned long long to fix mingw build.
Michael Gottesman [Fri, 22 Nov 2013 05:00:51 +0000 (05:00 +0000)]
[block-freq] Update data in test case to be unsigned long long to fix mingw build.

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

10 years ago[block-freq] Add a method to loop info for returning all loop latches for a specific...
Michael Gottesman [Fri, 22 Nov 2013 05:00:48 +0000 (05:00 +0000)]
[block-freq] Add a method to loop info for returning all loop latches for a specific loop.

We already have a method for returning one loop latch but for some
reason no one has committed one for returning loop latches in the case
where there are multiple latches.

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

10 years agoFor AArch64 back-end instruction selection, lower Neon_Lowxxx with EXTRCT_SUBREG.
Jiangning Liu [Fri, 22 Nov 2013 02:45:13 +0000 (02:45 +0000)]
For AArch64 back-end instruction selection, lower Neon_Lowxxx with EXTRCT_SUBREG.

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

10 years agoTweak 3 tests in llvm/test/CodeGen/X86 to add -mcpu=generic since r195383.
NAKAMURA Takumi [Fri, 22 Nov 2013 02:28:04 +0000 (02:28 +0000)]
Tweak 3 tests in llvm/test/CodeGen/X86 to add -mcpu=generic since r195383.

They failed on bdver2 buildslave.

FIXME: FileCheck-ize them.

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

10 years agoSLP Vectorizer: Extract cost will only be added once even if the scalar has multiple...
Yi Jiang [Fri, 22 Nov 2013 01:57:02 +0000 (01:57 +0000)]
SLP Vectorizer: Extract cost will only be added once even if the scalar has multiple external uses.

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

10 years ago[PM] Simplify how the SFINAE for AnalysisResultModel is applied by
Chandler Carruth [Fri, 22 Nov 2013 00:48:49 +0000 (00:48 +0000)]
[PM] Simplify how the SFINAE for AnalysisResultModel is applied by
factoring it out into the default template argument so clients don't
have to even think about it.

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

10 years agoFix a typo where we were creating <def,kill> operands instead of
Lang Hames [Fri, 22 Nov 2013 00:46:32 +0000 (00:46 +0000)]
Fix a typo where we were creating <def,kill> operands instead of
<def,dead> ones.

Add an assertion to make sure we catch this in the future.

Fixes <rdar://problem/15464559>.

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

10 years ago[PM] Switch analysis managers to be threaded through the run methods
Chandler Carruth [Fri, 22 Nov 2013 00:43:29 +0000 (00:43 +0000)]
[PM] Switch analysis managers to be threaded through the run methods
rather than the constructors of passes.

This simplifies the APIs of passes significantly and removes an error
prone pattern where the *same* manager had to be given to every
different layer. With the new API the analysis managers themselves will
have to be cross connected with proxy analyses that allow a pass at one
layer to query for the analysis manager of another layer. The proxy will
both expose a handle to the other layer's manager and it will provide
the invalidation hooks to ensure things remain consistent across layers.
Finally, the outer-most analysis manager has to be passed to the run
method of the outer-most pass manager. The rest of the propagation is
automatic.

I've used SFINAE again to allow passes to completely disregard the
analysis manager if they don't need or want to care. This helps keep
simple things simple for users of the new pass manager.

Also, the system specifically supports passing a null pointer into the
outer-most run method if your pass pipeline neither needs nor wants to
deal with analyses. I find this of dubious utility as while some
*passes* don't care about analysis, I'm not sure there are any
real-world users of the pass manager itself that need to avoid even
creating an analysis manager. But it is easy to support, so there we go.

Finally I renamed the module proxy for the function analysis manager to
the more verbose but less confusing name of
FunctionAnalysisManagerModuleProxy. I hate this name, but I have no idea
what else to name these things. I'm expecting in the fullness of time to
potentially have the complete cross product of types at the proxy layer:

{Module,SCC,Function,Loop,Region}AnalysisManager{Module,SCC,Function,Loop,Region}Proxy

(except for XAnalysisManagerXProxy which doesn't make any sense)

This should make it somewhat easier to do the next phases which is to
build the upward proxy and get its invalidation correct, as well as to
make the invalidation within the Module -> Function mapping pass be more
fine grained so as to invalidate fewer fuction analyses.

After all of the proxy analyses are done and the invalidation working,
I'll finally be able to start working on the next two fun fronts: how to
adapt an existing pass to work in both the legacy pass world and the new
one, and building the SCC, Loop, and Region counterparts. Fun times!

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

10 years agoR600: Implement TargetInstrInfo::isLegalToSplitMBBAt()
Tom Stellard [Fri, 22 Nov 2013 00:41:08 +0000 (00:41 +0000)]
R600: Implement TargetInstrInfo::isLegalToSplitMBBAt()

Splitting a basic block will create a new ALU clause, so we need to make
sure we aren't moving uses of registers that are local to their
current clause into a new one.

I had a test case for this, but unfortunately unrelated schedule changes
invalidated it, and I wasn't been able to come up with another one.

NOTE: This is a candidate for the 3.4 branch.

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

10 years agoSelectionDAG: Optimize expansion of vec_type = BITCAST scalar_type
Tom Stellard [Fri, 22 Nov 2013 00:41:05 +0000 (00:41 +0000)]
SelectionDAG: Optimize expansion of vec_type = BITCAST scalar_type

The legalizer can now do this type of expansion for more
type combinations without loading and storing to and
from the stack.

NOTE: This is a candidate for the 3.4 branch.

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

10 years agoSplit SETCC if VSELECT requires splitting too.
Tom Stellard [Fri, 22 Nov 2013 00:39:23 +0000 (00:39 +0000)]
Split SETCC if VSELECT requires splitting too.

This patch is a rewrite of the original patch commited in r194542. Instead of
relying on the type legalizer to do the splitting for us, we now peform the
splitting ourselves in the DAG combiner. This is necessary for the case where
the vector mask is a legal type after promotion and still wouldn't require
splitting.

Patch by: Juergen Ributzka

NOTE: This is a candidate for the 3.4 branch.

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

10 years agoIn Dwarf 3 (and Dwarf 2) attributes whose value are offsets into a
Eric Christopher [Thu, 21 Nov 2013 23:46:41 +0000 (23:46 +0000)]
In Dwarf 3 (and Dwarf 2) attributes whose value are offsets into a
section use the form DW_FORM_data4 whilst in Dwarf 4 and later they
use the form DW_FORM_sec_offset.

This patch updates the places where such attributes are generated to
use the appropriate form depending on the Dwarf version. The DIE entries
affected have the following tags:
DW_AT_stmt_list, DW_AT_ranges, DW_AT_location, DW_AT_GNU_pubnames,
DW_AT_GNU_pubtypes, DW_AT_GNU_addr_base, DW_AT_GNU_ranges_base

It also adds a hidden command line option "--dwarf-version=<uint>"
to llc which allows the version of Dwarf to be generated to override
what is specified in the metadata; this makes it possible to update
existing tests to check the debugging information generated for both
Dwarf 4 (the default) and Dwarf 3 using the same metadata.

Patch (slightly modified) by Keith Walker!

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

10 years agoSHLD/SHRD are VectorPath (microcode) instructions known to have poor latency on certa...
Ekaterina Romanova [Thu, 21 Nov 2013 23:21:26 +0000 (23:21 +0000)]
SHLD/SHRD are VectorPath (microcode) instructions known to have poor latency on certain architectures. While generating SHLD/SHRD instructions is acceptable when optimizing for size, optimizing for speed on these platforms should be implemented using alternative sequences of instructions composed of add, adc, shr, shl, or and lea which are directPath instructions. These alternative instructions not only have a lower latency but they also increase the decode bandwidth by allowing simultaneous decoding of a third directPath instruction.

AMD's processors family K7, K8, K10, K12, K15 and K16 are known to have SHLD/SHRD instructions with very poor latency. Optimization guides for these processors recommend using an alternative sequence of instructions. For these AMD's processors, I disabled folding (or (x << c) | (y >> (64 - c))) when we are not optimizing for size.

It might be beneficial to disable this folding for some of the Intel's processors. However, since I couldn't find specific recommendations regarding using SHLD/SHRD instructions on Intel's processors, I haven't disabled this peephole for Intel.

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

10 years agoIntroduce two command-line flags for the instrumentation pass to control whether...
Peter Collingbourne [Thu, 21 Nov 2013 23:20:54 +0000 (23:20 +0000)]
Introduce two command-line flags for the instrumentation pass to control whether the labels of pointers should be ignored in load and store instructions

The new command line flags are -dfsan-ignore-pointer-label-on-store and -dfsan-ignore-pointer-label-on-load. Their default value matches the current labelling scheme.

Additionally, the function __dfsan_union_load is marked as readonly.

Patch by Lorenzo Martignoni!

Differential Revision: http://llvm-reviews.chandlerc.com/D2187

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

10 years agoMove member variable up to where the rest of non-DWARF5 variables reside.
Eric Christopher [Thu, 21 Nov 2013 22:56:11 +0000 (22:56 +0000)]
Move member variable up to where the rest of non-DWARF5 variables reside.

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

10 years agoCMake: Some changes to package version names:
Hans Wennborg [Thu, 21 Nov 2013 22:47:21 +0000 (22:47 +0000)]
CMake: Some changes to package version names:

- Allow overriding PACKAGE_VERSION from the command-line
- Use PACKAGE_VERSION to set CPACK_PACKAGE_VERSION (used by the Win installer)
- Don't include the version number in the CPack install dir or registry key.

Differential revision: http://llvm-reviews.chandlerc.com/D2245

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

10 years agoRemove dangling documentation. llvm-prof was deleted a while ago.
Benjamin Kramer [Thu, 21 Nov 2013 19:32:37 +0000 (19:32 +0000)]
Remove dangling documentation. llvm-prof was deleted a while ago.

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

10 years ago[ARM] add the overlooked tests for Cortex-A7 build attributes
Artyom Skrobov [Thu, 21 Nov 2013 16:22:39 +0000 (16:22 +0000)]
[ARM] add the overlooked tests for Cortex-A7 build attributes

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

10 years ago[mips][msa] Fix a corner case in performORCombine() when combining nodes into VSELECT.
Daniel Sanders [Thu, 21 Nov 2013 16:11:31 +0000 (16:11 +0000)]
[mips][msa] Fix a corner case in performORCombine() when combining nodes into VSELECT.

Mask == ~InvMask asserts if the width of Mask and InvMask differ.
The combine isn't valid (with two exceptions, see below) if the widths differ
so test for this before testing Mask == ~InvMask.

In the specific cases of Mask=~0 and InvMask=0, as well as Mask=0 and
InvMask=~0, the combine is still valid. However, there are more appropriate
combines that could be used in these cases such as folding x & 0 to 0, or
x & ~0 to x.

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

10 years ago[ARM] add basic Cortex-A7 support to LLVM backend
Artyom Skrobov [Thu, 21 Nov 2013 14:03:21 +0000 (14:03 +0000)]
[ARM] add basic Cortex-A7 support to LLVM backend

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

10 years agoAdd support for legalizing SETNE/SETEQ by inverting the condition code and the result...
Daniel Sanders [Thu, 21 Nov 2013 13:24:49 +0000 (13:24 +0000)]
Add support for legalizing SETNE/SETEQ by inverting the condition code and the result of the comparison.

Summary:
LegalizeSetCCCondCode can now legalize SETEQ and SETNE by returning the inverse
condition and requesting that the caller invert the result of the condition.

The caller of LegalizeSetCCCondCode must handle the inverted CC, and they do
so as follows:
  SETCC, BR_CC:
    Invert the result of the SETCC with SelectionDAG::getNOT()
  SELECT_CC:
    Swap the true/false operands.

This is necessary for MSA which lacks an integer SETNE instruction.

Reviewers: resistor

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2229

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

10 years ago[msan] Propagate condition origin in select instruction.
Evgeniy Stepanov [Thu, 21 Nov 2013 12:00:24 +0000 (12:00 +0000)]
[msan] Propagate condition origin in select instruction.

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

10 years ago[mips][msa/dsp] Only do DSP combines if DSP is enabled.
Daniel Sanders [Thu, 21 Nov 2013 11:40:14 +0000 (11:40 +0000)]
[mips][msa/dsp] Only do DSP combines if DSP is enabled.

Fixes a crash (null pointer dereferenced) when MSA is enabled.

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

10 years agoUse multiple filecheck prefixes in msan instrumentation tests.
Evgeniy Stepanov [Thu, 21 Nov 2013 11:37:16 +0000 (11:37 +0000)]
Use multiple filecheck prefixes in msan instrumentation tests.

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

10 years agoWhitespace.
NAKAMURA Takumi [Thu, 21 Nov 2013 11:08:31 +0000 (11:08 +0000)]
Whitespace.

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

10 years ago[PM] Fix typo and trailing space.
Chandler Carruth [Thu, 21 Nov 2013 11:04:53 +0000 (11:04 +0000)]
[PM] Fix typo and trailing space.

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

10 years agoRevert r195317 (and r195333), "Teach ISel not to optimize 'optnone' functions."
NAKAMURA Takumi [Thu, 21 Nov 2013 10:55:15 +0000 (10:55 +0000)]
Revert r195317 (and r195333), "Teach ISel not to optimize 'optnone' functions."

It broke, at least, i686 target. It is reproducible with "llc -mtriple=i686-unknown".

FYI, it didn't appear to add either "-O0" or "-fast-isel".

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

10 years ago[PM] Widen the interface for invalidate on an analysis result now that
Chandler Carruth [Thu, 21 Nov 2013 10:53:05 +0000 (10:53 +0000)]
[PM] Widen the interface for invalidate on an analysis result now that
it is completely optional, and sink the logic for handling the preserved
analysis set into it.

This allows us to implement the delegation logic desired in the proxy
module analysis for the function analysis manager where if the proxy
itself is preserved we assume the set of functions hasn't changed and we
do a fine grained invalidation by walking the functions in the module
and running the invalidate for them all at the manager level and letting
it try to invalidate any passes.

This in turn makes it blindingly obvious why we should hoist the
invalidate trait and have two collections of results. That allows
handling invalidation for almost all analyses without indirect calls and
it allows short circuiting when the preserved set is all.

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

10 years ago[OCaml] Unbreak make install by providing ocamldoc target
Peter Zotov [Thu, 21 Nov 2013 10:10:16 +0000 (10:10 +0000)]
[OCaml] Unbreak make install by providing ocamldoc target

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

10 years agoadd 'REQUIRES: asserts' to a test that uses 'llc -debug'; this fixes the no-asserts...
Kostya Serebryany [Thu, 21 Nov 2013 09:28:16 +0000 (09:28 +0000)]
add 'REQUIRES: asserts' to a test that uses 'llc -debug'; this fixes the no-asserts build

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

10 years ago[PM] Add support for using SFINAE to reflect on an analysis's result
Chandler Carruth [Thu, 21 Nov 2013 09:10:21 +0000 (09:10 +0000)]
[PM] Add support for using SFINAE to reflect on an analysis's result
type and detect whether or not it provides an 'invalidate' member the
analysis manager should use.

This lets the overwhelming common case of *not* caring about custom
behavior when an analysis is invalidated be the the obvious default
behavior with no code written by the author of an analysis. Only when
they write code specifically to handle invalidation does it get used.

Both cases are actually covered by tests here. The test analysis uses
the default behavior, and the proxy module analysis actually has custom
behavior on invalidation that is firing correctly. (In fact, this is the
analysis which was the primary motivation for having custom invalidation
behavior in the first place.)

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

10 years agoImplemented Neon scalar vdup_lane intrinsics.
Ana Pazos [Thu, 21 Nov 2013 08:16:15 +0000 (08:16 +0000)]
Implemented Neon scalar vdup_lane intrinsics.

Fixed scalar dup alias and added test case.

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

10 years agoImplemented Neon scalar by element intrinsics.
Ana Pazos [Thu, 21 Nov 2013 07:37:04 +0000 (07:37 +0000)]
Implemented Neon scalar by element intrinsics.

Intrinsics implemented: vqdmull_lane, vqdmulh_lane, vqrdmulh_lane,
vqdmlal_lane, vqdmlsl_lane scalar Neon intrinsics.

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

10 years agoDon't speculate loads under ThreadSanitizer
Kostya Serebryany [Thu, 21 Nov 2013 07:29:28 +0000 (07:29 +0000)]
Don't speculate loads under ThreadSanitizer

Summary:
Don't speculate loads under ThreadSanitizer.
This fixes https://code.google.com/p/thread-sanitizer/issues/detail?id=40
Also discussed here: http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-November/067929.html

Reviewers: chandlerc

Reviewed By: chandlerc

CC: llvm-commits, dvyukov
Differential Revision: http://llvm-reviews.chandlerc.com/D2227

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

10 years agoThe basic problem is that some mainstream programs cannot deal with the way
Bill Wendling [Thu, 21 Nov 2013 07:04:30 +0000 (07:04 +0000)]
The basic problem is that some mainstream programs cannot deal with the way
clang optimizes tail calls, as in this example:

int foo(void);
int bar(void) {
 return foo();
}

where the call is transformed to:

  calll .L0$pb
.L0$pb:
  popl  %eax
.Ltmp0:
  addl  $_GLOBAL_OFFSET_TABLE_+(.Ltmp0-.L0$pb), %eax
  movl  foo@GOT(%eax), %eax
  popl  %ebp
  jmpl  *%eax                   # TAILCALL

However, the GOT references must all be resolved at dlopen() time, and so this
approach cannot be used with lazy dynamic linking (e.g. using RTLD_LAZY), which
usually populates the PLT with stubs that perform the actual resolving.

This patch changes X86TargetLowering::LowerCall() to skip tail call
optimization, if the called function is a global or external symbol.

Patch by Dimitry Andric!

PR15086

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

10 years agoTeach ISel not to optimize 'optnone' functions.
Paul Robinson [Thu, 21 Nov 2013 06:33:32 +0000 (06:33 +0000)]
Teach ISel not to optimize 'optnone' functions.

Based on work by Andrea Di Biagio.

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

10 years agoDereference the node iterator when dumping the PBQP graph structure in DOT
Lang Hames [Thu, 21 Nov 2013 06:30:14 +0000 (06:30 +0000)]
Dereference the node iterator when dumping the PBQP graph structure in DOT
format.

Thanks to Arnaud A. de Grandmaison for the patch!

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

10 years agoAdd, to constant islands, long jumps similar to ARM far branch.
Reed Kotler [Thu, 21 Nov 2013 05:13:23 +0000 (05:13 +0000)]
Add, to constant islands, long jumps similar to ARM far branch.

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

10 years agollvm-cov: Don't assume FileChecksum was generated.
Yuchen Wu [Thu, 21 Nov 2013 04:53:39 +0000 (04:53 +0000)]
llvm-cov: Don't assume FileChecksum was generated.

For cases where emitProfileArcs() was called but emitProfileNotes() was
not, set the CfgChecksum to 0.

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

10 years agollvm-cov: Formatting change.
Yuchen Wu [Thu, 21 Nov 2013 04:12:10 +0000 (04:12 +0000)]
llvm-cov: Formatting change.

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

10 years agollvm-cov: Fixed some bugs related to file checksum.
Yuchen Wu [Thu, 21 Nov 2013 04:01:05 +0000 (04:01 +0000)]
llvm-cov: Fixed some bugs related to file checksum.

Added call to update CfgChecksum. Made FileChecksum a vector, separate
for each source file.

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

10 years ago[PM] Add a module analysis pass proxy for the function analysis manager.
Chandler Carruth [Thu, 21 Nov 2013 02:11:31 +0000 (02:11 +0000)]
[PM] Add a module analysis pass proxy for the function analysis manager.

This proxy will fill the role of proxying invalidation events down IR
unit layers so that when a module changes we correctly invalidate
function analyses. Currently this is a very coarse solution -- any
change blows away the entire thing -- but the next step is to make
invalidation handling more nuanced so that we can propagate specific
amounts of invalidation from one layer to the next.

The test is extended to place a module pass between two function pass
managers each of which have preserved function analyses which get
correctly invalidated by the module pass that might have changed what
functions are even in the module.

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