Craig Topper [Sat, 25 Jan 2014 17:40:33 +0000 (17:40 +0000)]
Don't use EnforceSmallerThan for EnforceVectorSubVectorTypeIs. EnforceSmallerThan doesn't handle vectors quite right and should really enforce that vectors have the same number of elements. Add explicit checks for vector element count differing in EnforceVectorSubVectorTypeIs instead. This removes some unnecessary type checks in X86GenDAGISel.inc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200091
91177308-0d34-0410-b5e6-
96231b3b80d8
Mark Seaborn [Sat, 25 Jan 2014 17:38:19 +0000 (17:38 +0000)]
Fix "llvm-objdump -d -r" to show relocations inline for ELF files
This fixes a regression introduced by r182908, which broke
llvm-objdump's ability to display relocations inline in a disassembly
dump for ELF object files.
That change removed a SectionRelocMap from Object/ELF.h, which we
recreate in llvm-objdump.cpp.
I discovered this regression via an out-of-tree test
(test/NaCl/X86/pnacl-hides-sandbox-x86-64.ll) which used llvm-objdump.
Note that the "Unknown" string in the test output on i386 isn't quite
right, but this appears to be a pre-existing bug.
Differential Revision: http://llvm-reviews.chandlerc.com/D2559
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200090
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 25 Jan 2014 17:34:23 +0000 (17:34 +0000)]
Fix typo in commment tyep->type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200089
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sat, 25 Jan 2014 17:32:39 +0000 (17:32 +0000)]
Add combiner-aa-only-func (debug only)
This option (which is !NDEBUG only) allows restricting the use of alias
analysis in DAGCombiner to a specific function. This has proved extremely
valuable to isolating bugs related to this feature, and mirrors the
misched-only-func option provided by the new instruction scheduler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200088
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sat, 25 Jan 2014 17:32:37 +0000 (17:32 +0000)]
Improve descriptions of combiner-alias-analysis and combiner-global-alias-analysis
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200087
91177308-0d34-0410-b5e6-
96231b3b80d8
Artyom Skrobov [Sat, 25 Jan 2014 16:56:18 +0000 (16:56 +0000)]
Reverting r199886 (Prevent repetitive warnings for unrecognized processors and features)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200083
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 25 Jan 2014 15:15:16 +0000 (15:15 +0000)]
Added .DS_Store entry in .gitignore for ignoring .DS_Store files in the source
tree generated by OS X.
Patch by Abhay Kadam!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200079
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 25 Jan 2014 15:06:56 +0000 (15:06 +0000)]
This reverts commit r200064 and r200051.
r200064 depends on r200051.
r200051 is broken: I tries to replace .mips_hack_elf_flags, which is a good
thing, but what it replaces it with is even worse.
The new emitMipsELFFlags it adds corresponds to no assembly directive, is not
marked as a hack and is not even printed to the .s file.
The patch also introduces more uses of hasRawTextSupport.
The correct way to remove .mips_hack_elf_flags is to have the mips target
streamer handle the default flags (and command line options). That way the
same code path is used for asm and obj. The streamer interface should *really*
correspond to what is printed in the .s file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200078
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 25 Jan 2014 10:01:55 +0000 (10:01 +0000)]
[LPM] Conclude my immediate work by making the LoopVectorizer
a FunctionPass. With this change the loop vectorizer no longer is a loop
pass and can readily depend on function analyses. In particular, with
this change we no longer have to form a loop pass manager to run the
loop vectorizer which simplifies the entire pass management of LLVM.
The next step here is to teach the loop vectorizer to leverage profile
information through the profile information providing analysis passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200074
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 25 Jan 2014 05:33:48 +0000 (05:33 +0000)]
Use isConcrete and getConcrete instead of using TypeVec directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200071
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 25 Jan 2014 05:17:38 +0000 (05:17 +0000)]
Fix EnforceSmallerThan to check !hasVectorTypes on the other type instead of this type to force this type to be scalar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200070
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 25 Jan 2014 04:07:24 +0000 (04:07 +0000)]
[LPM] Make LCSSA a utility with a FunctionPass that applies it to all
the loops in a function, and teach LICM to work in the presance of
LCSSA.
Previously, LCSSA was a loop pass. That made passes requiring it also be
loop passes and unable to depend on function analysis passes easily. It
also caused outer loops to have a different "canonical" form from inner
loops during analysis. Instead, we go into LCSSA form and preserve it
through the loop pass manager run.
Note that this has the same problem as LoopSimplify that prevents
enabling its verification -- loop passes which run at the end of the loop
pass manager and don't preserve these are valid, but the subsequent loop
pass runs of outer loops that do preserve this pass trigger too much
verification and fail because the inner loop no longer verifies.
The other problem this exposed is that LICM was completely unable to
handle LCSSA form. It didn't preserve it and it actually would give up
on moving instructions in many cases when they were used by an LCSSA phi
node. I've taught LICM to support detecting LCSSA-form PHI nodes and to
hoist and sink around them. This may actually let LICM fire
significantly more because we put everything into LCSSA form to rotate
the loop before running LICM. =/ Now LICM should handle that fine and
preserve it correctly. The down side is that LICM has to require LCSSA
in order to preserve it. This is just a fact of life for LCSSA. It's
entirely possible we should completely remove LCSSA from the optimizer.
The test updates are essentially accomodating LCSSA phi nodes in the
output of LICM, and the fact that we now completely sink every
instruction in ashr-crash below the loop bodies prior to unrolling.
With this change, LCSSA is computed only three times in the pass
pipeline. One of them could be removed (and potentially a SCEV run and
a separate LoopPassManager entirely!) if we had a LoopPass variant of
InstCombine that ran InstCombine on the loop body but refused to combine
away LCSSA PHI nodes. Currently, this also prevents loop unrolling from
being in the same loop pass manager is rotate, LICM, and unswitch.
There is one thing that I *really* don't like -- preserving LCSSA in
LICM is quite expensive. We end up having to re-run LCSSA twice for some
loops after LICM runs because LICM can undo LCSSA both in the current
loop and the parent loop. I don't really see good solutions to this
other than to completely move away from LCSSA and using tools like
SSAUpdater instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200067
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 25 Jan 2014 02:35:56 +0000 (02:35 +0000)]
Remove an easy use of EmitRawText from PPC.
This makes lib/Target/PowerPC EmitRawText free.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200065
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Sat, 25 Jan 2014 02:14:14 +0000 (02:14 +0000)]
[Mips] Move 2 test cases from MC to CodeGen.
No code changes. Just reassignment of test case files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200064
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Sat, 25 Jan 2014 02:02:55 +0000 (02:02 +0000)]
Revert "Revert "Add Constant Hoisting Pass" (r200034)"
This reverts commit r200058 and adds the using directive for
ARMTargetTransformInfo to silence two g++ overload warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200062
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Sat, 25 Jan 2014 01:24:06 +0000 (01:24 +0000)]
Fix llvm-dis to print the inalloca bit on allocas.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200059
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Sat, 25 Jan 2014 01:18:18 +0000 (01:18 +0000)]
Revert "Add Constant Hoisting Pass" (r200034)
This commit caused -Woverloaded-virtual warnings. The two new
TargetTransformInfo::getIntImmCost functions were only added to the superclass,
and to the X86 subclass. The other targets were not updated, and the
warning highlighted this by pointing out that e.g. ARMTTI::getIntImmCost was
hiding the two new getIntImmCost variants.
We could pacify the warning by adding "using TargetTransformInfo::getIntImmCost"
to the various subclasses, or turning it off, but I suspect that it's wrong to
leave the functions unimplemnted in those targets. The default implementations
return TCC_Free, which I don't think is right e.g. for ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200058
91177308-0d34-0410-b5e6-
96231b3b80d8
Mark Seaborn [Sat, 25 Jan 2014 00:32:01 +0000 (00:32 +0000)]
llvm-objdump: Some style cleanups to follow LLVM coding style
Rename "ec" to "EC", and rename some iterators.
Then fix whitespace using clang-format-diff.
(As requested in http://llvm-reviews.chandlerc.com/D2559)
Differential Revision: http://llvm-reviews.chandlerc.com/D2594
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200053
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Sat, 25 Jan 2014 00:24:07 +0000 (00:24 +0000)]
[Mips] TargetStreamer ELF flag Support for default and commandline options.
This patch uses a common MipsTargetSteamer interface for both
MipsAsmPrinter and MipsAsmParser for recording default and commandline
driven directives that affect ELF header flags.
It has been noted that the .ll tests affected by this patch belong in
test/Codegen/Mips. I will move them in a separate patch.
Also, a number of directives do not get expressed by AsmPrinter in the
resultant .s assembly such as setting the correct ASI. I have noted this
in the tests and they will be addressed in later patches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200051
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Fri, 24 Jan 2014 23:40:08 +0000 (23:40 +0000)]
Typo fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200050
91177308-0d34-0410-b5e6-
96231b3b80d8
Ana Pazos [Fri, 24 Jan 2014 22:36:53 +0000 (22:36 +0000)]
[AArch64] Removed unused i8 type from FPR8 register class.
The i8 type is not registered with any register class.
This causes a segmentation fault in MachineLICM::getRegisterClassIDAndCost.
The code selects the first type associated with register class FPR8,
which happens to be i8.
It uses this type (i8) to get the representative class pointer, which is 0.
It then uses this pointer to access a field, resulting in segmentation fault.
Since i8 type is not being used for printing any neon instruction
we can safely remove it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200046
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 24 Jan 2014 21:52:44 +0000 (21:52 +0000)]
Fix c++03 build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200042
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 24 Jan 2014 21:32:21 +0000 (21:32 +0000)]
Make ObjectFile ownership of the MemoryBuffer optional.
This allows llvm-ar to mmap the input files only once.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200040
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Fri, 24 Jan 2014 20:54:10 +0000 (20:54 +0000)]
Support/COFF: Fix PEHeader struct, and define PE32Header as its alias.
This change does not affect anything because everybody seems to be using
Object/COFF.h instead. But the definition is not for PE32 but for PE32+,
so fix it anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200038
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 24 Jan 2014 20:51:32 +0000 (20:51 +0000)]
Remove TGValueTypes.cpp from CMakeLists.txt which I forgot to do in r200036.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200037
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 24 Jan 2014 20:50:47 +0000 (20:50 +0000)]
Replace tablegen uses of EVT with MVT. Add isOverloaded() to MVT to facilitate. Remove TGValueTypes.cpp since its unused now (and may have been before).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200036
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Fri, 24 Jan 2014 20:18:00 +0000 (20:18 +0000)]
Add Constant Hoisting Pass
Retry commit r200022 with a fix for the build bot errors. Constant expressions
have (unlike instructions) module scope use lists and therefore may have users
in different functions. The fix is to simply ignore these out-of-function uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200034
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Fri, 24 Jan 2014 20:12:02 +0000 (20:12 +0000)]
Fix DAGCombiner::GatherAllAliases to account for non-chain dependencies
DAGCombiner::GatherAllAliases, which is only used when AA used is enabled
during DAGCombine, had a fundamentally incorrect assumption for which this
change compensates. GatherAllAliases, which is used to find aliasing
predecessor chain nodes (so that a better chain can be selected for a load or
store to enable subsequent optimizations) assumed that walking up the chain
would always catch all possibly-aliasing loads and stores. This is not true: To
really find all aliases, we also need to search for aliases through the value
operand of a store, etc. Consider the following situation:
Token1 = ...
L1 = load Token1, %52
S1 = store Token1, L1, %51
L2 = load Token1, %52+8
S2 = store Token1, L2, %51+8
Token2 = Token(S1, S2)
L3 = load Token2, %53
S3 = store Token2, L3, %52
L4 = load Token2, %53+8
S4 = store Token2, L4, %52+8
If we search for aliases of S3 (which loads address %52), and we look only
through the chain, then we'll miss the trivial dependence on L1 (which loads
from %52). We then might change all loads and stores to use Token1 as their
chain operand, which could result in copying %53 into %52 before copying
%52 into %51 (which should happen first).
The problem is, however, that searching for such data dependencies can become
expensive, and the cost is not directly related to the chain depth. Instead,
we'll rule out such configurations by insisting that we've visited all chain
users (except for users of the original chain, which is not necessary). When
doing this, we need to look through nodes we don't care about (otherwise,
things like register copies will interfere with trivial use cases).
Unfortunately, I don't have a small test case for this problem. Creating the
underlying situation is not hard (a pair of memcpys will do it), but arranging
for the default instruction schedule to be incorrect is very fragile.
This unbreaks self hosting on PPC64 when using
-mllvm -combiner-global-alias-analysis -mllvm -combiner-alias-analysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200033
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 24 Jan 2014 19:20:15 +0000 (19:20 +0000)]
Verify that attributes are not lost during linking.
We don't want to lose attributes when a function decl without them is merged
with a function decl that has them.
PR2382
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200030
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 24 Jan 2014 19:02:37 +0000 (19:02 +0000)]
InstCombine: Don't try to use aggregate elements of ConstantExprs.
PR18600.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200028
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 24 Jan 2014 19:00:19 +0000 (19:00 +0000)]
Add a testcase for the changes in r199938.
<rdar://problem/
15611947>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200027
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Fri, 24 Jan 2014 18:40:30 +0000 (18:40 +0000)]
Revert "Add Constant Hoisting Pass"
This reverts commit r200022 to unbreak the build bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200024
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Fri, 24 Jan 2014 18:25:26 +0000 (18:25 +0000)]
Restrict FindBetterChain DAG combines to unindexed nodes
These transformations obviously won't work for indexed (pre/post-inc) loads and
stores. In practice, I'm not sure there is any benefit to enabling them for
indexed nodes because other transformations that these might enable likely also
won't handle indexed nodes.
I don't have an in-tree test case that hits this problem, but an upcoming bug
fix will make it much more likely.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200023
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Fri, 24 Jan 2014 18:23:08 +0000 (18:23 +0000)]
Add Constant Hoisting Pass
This pass identifies expensive constants to hoist and coalesces them to
better prepare it for SelectionDAG-based code generation. This works around the
limitations of the basic-block-at-a-time approach.
First it scans all instructions for integer constants and calculates its
cost. If the constant can be folded into the instruction (the cost is
TCC_Free) or the cost is just a simple operation (TCC_BASIC), then we don't
consider it expensive and leave it alone. This is the default behavior and
the default implementation of getIntImmCost will always return TCC_Free.
If the cost is more than TCC_BASIC, then the integer constant can't be folded
into the instruction and it might be beneficial to hoist the constant.
Similar constants are coalesced to reduce register pressure and
materialization code.
When a constant is hoisted, it is also hidden behind a bitcast to force it to
be live-out of the basic block. Otherwise the constant would be just
duplicated and each basic block would have its own copy in the SelectionDAG.
The SelectionDAG recognizes such constants as opaque and doesn't perform
certain transformations on them, which would create a new expensive constant.
This optimization is only applied to integer constants in instructions and
simple (this means not nested) constant cast experessions. For example:
%0 = load i64* inttoptr (i64 big_constant to i64*)
Reviewed by Eric
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200022
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Fri, 24 Jan 2014 18:22:59 +0000 (18:22 +0000)]
Add final and owerride keywords to TargetTransformInfo's subclasses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200021
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Fri, 24 Jan 2014 18:22:55 +0000 (18:22 +0000)]
Doxify comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200020
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Fri, 24 Jan 2014 17:20:08 +0000 (17:20 +0000)]
Fix known typos
Sweep the codebase for common typos. Includes some changes to visible function
names that were misspelt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200018
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Fri, 24 Jan 2014 17:18:52 +0000 (17:18 +0000)]
Report lli remote IO errors consistently
This enables IO error reports in both the child and server processes.
The scheme still isn't entirely satisfactory and output is jumbled but it beats
having no output at all. This will hopefully unblock ARM support (PR18057).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200017
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 24 Jan 2014 17:09:53 +0000 (17:09 +0000)]
InstSimplify: Make shift, select and GEP simplifications vector-aware.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200016
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 24 Jan 2014 16:13:20 +0000 (16:13 +0000)]
Unify duplicated functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200014
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 24 Jan 2014 15:59:50 +0000 (15:59 +0000)]
Don't use "llc -filetype=obj" now that the codepath is the same.
r200011 remove the special codepaths in MC for inline asm, so we can now test
all the logic with just llc + llvm-mc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200013
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 24 Jan 2014 15:47:54 +0000 (15:47 +0000)]
Move emitInlineAsmEnd to the AsmPrinter interface.
There is no inline asm in a .s file. Therefore, there should be no logic to
handle it in the streamer. Inline asm only exists in bitcode files, so the
logic can live in the (long misnamed) AsmPrinter class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200011
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 24 Jan 2014 13:40:43 +0000 (13:40 +0000)]
DWARFContext: Fix possible memory leak since r198908.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200000
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 24 Jan 2014 12:53:08 +0000 (12:53 +0000)]
llvm/projects/CMakeLists.txt: Add dragonegg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199995
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 24 Jan 2014 11:52:53 +0000 (11:52 +0000)]
Revert "Use DW_AT_high_pc and DW_AT_low_pc for the high and low pc for a"
in order to fix the cygwin/mingw bots.
This reverts commit r199990.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199991
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 24 Jan 2014 11:40:29 +0000 (11:40 +0000)]
Use DW_AT_high_pc and DW_AT_low_pc for the high and low pc for a
compile unit. Make these relocations on the platforms that need
relocations and add a routine to ensure that we don't put the
addresses in an offset table for split dwarf.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199990
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Fri, 24 Jan 2014 10:31:44 +0000 (10:31 +0000)]
Remove empty directories.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199987
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Fri, 24 Jan 2014 10:03:42 +0000 (10:03 +0000)]
Remove empty directories.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199983
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Qin [Fri, 24 Jan 2014 07:53:04 +0000 (07:53 +0000)]
[AArch64 NEON] Fix a bug in implementing register copy bwtween FPR16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199978
91177308-0d34-0410-b5e6-
96231b3b80d8
Venkatraman Govindaraju [Fri, 24 Jan 2014 07:10:19 +0000 (07:10 +0000)]
[SparcV9] Add support for JIT in Sparc64.
With this change, all supported tests in test/ExecutionEngine pass in sparcv9.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199977
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Fri, 24 Jan 2014 06:47:57 +0000 (06:47 +0000)]
[X86] Prevent the creation of redundant ops for sadd and ssub with overflow.
This commit teaches the X86 backend to create the same X86 instructions when it
lowers an sadd/ssub with overflow intrinsic and a conditional branch that uses
that overflow result. This allows SelectionDAG to recognize and remove one of
the redundant operations.
This fixes <rdar://problem/
15874016> and <rdar://problem/
15661073>.
Reviewed by Nadav
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199976
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 24 Jan 2014 06:23:31 +0000 (06:23 +0000)]
Implement atomicrmw operations in 32 and 64 bits for SPARCv9.
These all use the compare-and-swap CASA/CASXA instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199975
91177308-0d34-0410-b5e6-
96231b3b80d8
Venkatraman Govindaraju [Fri, 24 Jan 2014 05:24:01 +0000 (05:24 +0000)]
[Sparc] Correct quad register list in the asm parser.
Add test cases to check parsing of v9 double registers and their aliased quad registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199974
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Fri, 24 Jan 2014 04:21:00 +0000 (04:21 +0000)]
Add constants for optional header magic field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199972
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 24 Jan 2014 03:54:40 +0000 (03:54 +0000)]
Simplify the logic for deciding when to initialize the sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199971
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 24 Jan 2014 02:42:26 +0000 (02:42 +0000)]
Most streamers' InitSections just create a text section. Make that the default
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199969
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 24 Jan 2014 02:31:35 +0000 (02:31 +0000)]
Use the actual .text section, it is less code than building a dummy one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199968
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 24 Jan 2014 02:28:11 +0000 (02:28 +0000)]
Inline trivial functions called only once or twice.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199967
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 24 Jan 2014 02:24:47 +0000 (02:24 +0000)]
[LPM] Fix a logic error in LICM spotted by inspection.
We completely skipped promotion in LICM if the loop has a preheader or
dedicated exits, but not *both*. We hoist if there is a preheader, and
sink if there are dedicated exits, but either hoisting or sinking can
move loop invariant code out of the loop!
I have no idea if this has a practical consequence. If anyone has ideas
for a test case, let me know.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199966
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 24 Jan 2014 02:18:40 +0000 (02:18 +0000)]
Inline functions that are only called once.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199965
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 24 Jan 2014 01:59:49 +0000 (01:59 +0000)]
[cleanup] Use the type-based preservation method rather than a string
literal that bakes a pass name and forces parsing it in the pass
manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199963
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 23 Jan 2014 23:14:14 +0000 (23:14 +0000)]
InitToTextSection is redundant with InitSections. Remove it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199955
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 23 Jan 2014 22:55:47 +0000 (22:55 +0000)]
Make the use of DW_AT_ranges in the compile unit depend also upon
the existence of comdat/special sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199954
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 23 Jan 2014 22:49:25 +0000 (22:49 +0000)]
Remove duplicated info on what .text, .data and .bss look like.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199951
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Thu, 23 Jan 2014 22:34:42 +0000 (22:34 +0000)]
Update the X86 assembler for .intel_syntax to produce an error for invalid base
registers in memory addresses that do not match the index register. As it does
for .att_syntax.
rdar://
15887380
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199948
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Thu, 23 Jan 2014 22:19:45 +0000 (22:19 +0000)]
lli: Factor portable messaging into a new RPCChannel facility
The client and server now use a single unified low-level RPC core built around
LLVM's existing cross-platform abstractions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199947
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Thu, 23 Jan 2014 21:52:41 +0000 (21:52 +0000)]
Update the X86 assembler for .intel_syntax to produce an error for invalid
scale factors in memory addresses. As it does for .att_syntax.
It was producing:
Assertion failed: (((Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8)) && "Invalid scale!"), function CreateMem, file /Volumes/SandBox/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp, line 1133.
rdar://
14967214
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199942
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 23 Jan 2014 21:41:10 +0000 (21:41 +0000)]
Fix out of bounds access to the double regs array. Given the
code this looks correct, but could use review. The previous
was definitely not correct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199940
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 23 Jan 2014 21:27:27 +0000 (21:27 +0000)]
Add a few missing cases from r199933. Testcase coming shortly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199938
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Thu, 23 Jan 2014 20:46:44 +0000 (20:46 +0000)]
Updating the getting started guide for Visual Studio a smidge.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199934
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 23 Jan 2014 20:23:36 +0000 (20:23 +0000)]
Replace vfmaddxx213 instructions with their 231-type equivalents in accumulator
loops. Writing back to the accumulator (231-type) allows the coalescer to
eliminate an extra copy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199933
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 23 Jan 2014 20:17:12 +0000 (20:17 +0000)]
Note the PR number.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199932
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Thu, 23 Jan 2014 20:01:21 +0000 (20:01 +0000)]
Remove unused include following r199929
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199930
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Thu, 23 Jan 2014 19:57:16 +0000 (19:57 +0000)]
Replace the interim lli build fix with something cleaner
Eliminates the LLI_BUILDING_CHILD build hack from r199885.
Also add a FIXME to remove code that tricks the tests into passing when the
feature fails to work. Please don't do stuff like this, the tests exist for a
reason!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199929
91177308-0d34-0410-b5e6-
96231b3b80d8
Weiming Zhao [Thu, 23 Jan 2014 19:55:33 +0000 (19:55 +0000)]
[Thumbv8] Fix the value of BLXOperandIndex of isV8EligibleForIT
Originally, BLX was passed as operand #0 in MachineInstr and as operand
#2 in MCInst. But now, it's operand #2 in both cases.
This patch also removes unnecessary FileCheck in the test case added by r199127.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199928
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 23 Jan 2014 19:32:19 +0000 (19:32 +0000)]
Move test to x86 directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199927
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Thu, 23 Jan 2014 19:23:28 +0000 (19:23 +0000)]
Add target analysis passes to the codegen pipeline for MCJIT.
This patch adds the target analysis passes (usually TargetTransformInfo) to the
codgen pipeline. We also expose now the AddAnalysisPasses method through the C
API, because the optimizer passes would also benefit from better target-specific
cost models.
Reviewed by Andrew Kaylor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199926
91177308-0d34-0410-b5e6-
96231b3b80d8
Ana Pazos [Thu, 23 Jan 2014 19:18:57 +0000 (19:18 +0000)]
[AArch64] Added vselect patterns with float and double types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199925
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 23 Jan 2014 19:16:28 +0000 (19:16 +0000)]
Avoid emitting a DWARF type attribute for an ObjC property of type
void.
Patch by Scott Talbot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199924
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Thu, 23 Jan 2014 19:01:25 +0000 (19:01 +0000)]
Suppress an annoying "unused variable" warning caused by bug 17897.
Clang says that "flow" is unused when building LLD. This patch suppresses it.
Differential Revision: http://llvm-reviews.chandlerc.com/D2573
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199922
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 23 Jan 2014 18:49:34 +0000 (18:49 +0000)]
R600: Remove successive JUMP in AnalyzeBranch when AllowModify is true
This fixes a crash in the OpenCV OpenCL test suite.
There is no lit test for this, because the test would be very large
and could easily be invalidated by changes to the scheduler
or other parts of the compiler.
Patch by: Vincent Lejeune
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199919
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 23 Jan 2014 18:49:33 +0000 (18:49 +0000)]
R600: Disable the BFE pattern
This pattern uses an SDNodeXForm, which isn't being emitted for some
reason. I can get it to work by attaching the PatLeaf that has the
XForm to the argument in the output pattern, but this results in an
immediate being used in a register operand, which the backend can't
handle yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199918
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 23 Jan 2014 18:49:31 +0000 (18:49 +0000)]
R600: Correctly handle vertex fetch clauses the precede ENDIFs
The control flow finalizer would sometimes use an ALU_POP_AFTER
instruction before the vetex fetch clause instead of using a POP
instruction after it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199917
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 23 Jan 2014 18:49:28 +0000 (18:49 +0000)]
R600: Unconditionally unroll loops that contain GEPs with alloca pointers
Implement the getUnrollingPreferences() function for
AMDGPUTargetTransformInfo so that loops that do address calculations
on pointers derived from alloca are unconditionally unrolled.
Unrolling these loops makes it more likely that SROA will be able to
eliminate the allocas, which is a big win for R600 since memory
allocated by alloca (private memory) is really slow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199916
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Thu, 23 Jan 2014 17:47:57 +0000 (17:47 +0000)]
Move a unit test into the correct dir. Sorry if it broke Mips-only builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199911
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 23 Jan 2014 17:19:42 +0000 (17:19 +0000)]
Remove tail marker when changing an argument to an alloca.
Argument promotion can replace an argument of a call with an alloca. This
requires clearing the tail marker as it is very likely that the callee is now
using an alloca in the caller.
This fixes pr14710.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199909
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 23 Jan 2014 16:18:02 +0000 (16:18 +0000)]
R600: Recommit 199842: Add work-around for the CF stack entry HW bug
The unit test is now disabled on non-asserts builds.
The CF stack can be corrupted if you use CF_ALU_PUSH_BEFORE,
CF_ALU_ELSE_AFTER, CF_ALU_BREAK, or CF_ALU_CONTINUE when the number of
sub-entries on the stack is greater than or equal to the stack entry
size and sub-entries modulo 4 is either 0 or 3 (on cedar the bug is
present when number of sub-entries module 8 is either 7 or 0)
We choose to be conservative and always apply the work-around when the
number of sub-enries is greater than or equal to the stack entry size,
so that we can safely over-allocate the stack when we are unsure of the
stack allocation rules.
reviewed-by: Vincent Lejeune <vljn at ovi.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199905
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Thu, 23 Jan 2014 15:05:45 +0000 (15:05 +0000)]
[Object][ELF][Mips] Print symbol name for MIPS ELF relocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199898
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Thu, 23 Jan 2014 14:27:26 +0000 (14:27 +0000)]
AVX-512: added VPERM2D VPERM2Q VPERM2PS VPERM2PD instructions,
they give better sequences than VPERMI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199893
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 23 Jan 2014 13:43:47 +0000 (13:43 +0000)]
ARM: use litpools for normal i32 imms when compiling minsize.
With constant-sharing, litpool loads consume 4 + N*2 bytes of code, but
movw/movt pairs consume 8*N. This means litpools are better than movw/movt even
with just one use. Other materialisation strategies can still be better though,
so the logic is a little odd.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199891
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Thu, 23 Jan 2014 13:37:15 +0000 (13:37 +0000)]
Remove empty directories left after r190748 and r198688.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199890
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 23 Jan 2014 12:55:05 +0000 (12:55 +0000)]
Windows/ChildTarget.inc: LLIChildTarget::allocate() has gone since r199881.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199889
91177308-0d34-0410-b5e6-
96231b3b80d8
Artyom Skrobov [Thu, 23 Jan 2014 11:31:38 +0000 (11:31 +0000)]
Prevent repetitive warnings for unrecognized processors and features
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199886
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Thu, 23 Jan 2014 11:26:37 +0000 (11:26 +0000)]
Interim build fix for Makefiles
Looks like some parts still need detangling. Let's see if this holds for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199885
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 23 Jan 2014 11:23:19 +0000 (11:23 +0000)]
[LPM] Make LoopSimplify no longer a LoopPass and instead both a utility
function and a FunctionPass.
This has many benefits. The motivating use case was to be able to
compute function analysis passes *after* running LoopSimplify (to avoid
invalidating them) and then to run other passes which require
LoopSimplify. Specifically passes like unrolling and vectorization are
critical to wire up to BranchProbabilityInfo and BlockFrequencyInfo so
that they can be profile aware. For the LoopVectorize pass the only
things in the way are LoopSimplify and LCSSA. This fixes LoopSimplify
and LCSSA is next on my list.
There are also a bunch of other benefits of doing this:
- It is now very feasible to make more passes *preserve* LoopSimplify
because they can simply run it after changing a loop. Because
subsequence passes can assume LoopSimplify is preserved we can reduce
the runs of this pass to the times when we actually mutate a loop
structure.
- The new pass manager should be able to more easily support loop passes
factored in this way.
- We can at long, long last observe that LoopSimplify is preserved
across SCEV. This *halves* the number of times we run LoopSimplify!!!
Now, getting here wasn't trivial. First off, the interfaces used by
LoopSimplify are all over the map regarding how analysis are updated. We
end up with weird "pass" parameters as a consequence. I'll try to clean
at least some of this up later -- I'll have to have it all clean for the
new pass manager.
Next up I discovered a really frustrating bug. LoopUnroll *claims* to
preserve LoopSimplify. That's actually a lie. But the way the
LoopPassManager ends up running the passes, it always ran LoopSimplify
on the unrolled-into loop, rectifying this oversight before any
verification could kick in and point out that in fact nothing was
preserved. So I've added code to the unroller to *actually* simplify the
surrounding loop when it succeeds at unrolling.
The only functional change in the test suite is that we now catch a case
that was previously missed because SCEV and other loop transforms see
their containing loops as simplified and thus don't miss some
opportunities. One test case has been converted to check that we catch
this case rather than checking that we miss it but at least don't get
the wrong answer.
Note that I have #if-ed out all of the verification logic in
LoopSimplify! This is a temporary workaround while extracting these bits
from the LoopPassManager. Currently, there is no way to have a pass in
the LoopPassManager which preserves LoopSimplify along with one which
does not. The LPM will try to verify on each loop in the nest that
LoopSimplify holds but the now-Function-pass cannot distinguish what
loop is being verified and so must try to verify all of them. The inner
most loop is clearly no longer simplified as there is a pass which
didn't even *attempt* to preserve it. =/ Once I get LCSSA out (and maybe
LoopVectorize and some other fixes) I'll be able to re-enable this check
and catch any places where we are still failing to preserve
LoopSimplify. If this causes problems I can back this out and try to
commit *all* of this at once, but so far this seems to work and allow
much more incremental progress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199884
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Thu, 23 Jan 2014 11:14:00 +0000 (11:14 +0000)]
Prospective Makefile build fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199882
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Thu, 23 Jan 2014 11:04:42 +0000 (11:04 +0000)]
Refactor lli-child-target to remove duplicated code
Eliminate the copies LLVM's System mmap and cache invalidation code. These were
slowly drifting away from the original version, and moreover the copied code
was a dead end in terms of portability.
We now statically link to Support but in practice with stripping this adds next
to no weight to the resultant binary.
Also avoid installing lli-child-target to the user's $PATH. It's not meant to
be run directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199881
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 23 Jan 2014 10:31:31 +0000 (10:31 +0000)]
[mips][sched] Split IIStore into II_S[BHWD], II_S[WD][LR], and II_SAVE
No functional change since the InstrItinData's have been duplicated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199876
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 23 Jan 2014 06:47:25 +0000 (06:47 +0000)]
Add a variable to track whether or not we've used a unique section,
e.g. linkonce, to TargetMachine and set it when we've done so
for ELF targets currently. This involved making TargetMachine
non-const in a TLOF use and propagating that change around - I'm
open to other ideas.
This will be used in a future commit to handle emitting debug
information with ranges.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199871
91177308-0d34-0410-b5e6-
96231b3b80d8
Hao Liu [Thu, 23 Jan 2014 02:09:30 +0000 (02:09 +0000)]
[AArch64]Add CHECK for two test cases testing scalar_to_vector committed in r199461.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199861
91177308-0d34-0410-b5e6-
96231b3b80d8