Commit Graph

100043 Commits

Author SHA1 Message Date
Saleem Abdulrasool
4fefc13b5e ARM: improve diagnostics for .word directive
If a complex expression was passed to the .word directive and the first part of
the directive failed to parse, a secondary diagnostic would be produced that
would clutter the error diagnostics.  Improve the diagnostics by consuming the
remainder of the statement.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200160 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-26 22:29:50 +00:00
Saleem Abdulrasool
10096880c8 AsmParser: improve diagnostics for invalid variants
An emitted diagnostic for an invalid relocation variant would place the caret on
the token following the relocation variant indicator or at the end of the line
if there was no following token.  This change corrects the placement of the
caret to point to the token.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200159 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-26 22:29:43 +00:00
Saleem Abdulrasool
425eb00894 MC: whitespace
Fix indentation, remove unnecessary line.  NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200158 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-26 22:29:36 +00:00
Alp Toker
fdfcf71598 Avoid C++ comment in C sources
lib/Target/X86/Disassembler/X86DisassemblerDecoder.c:1361:7: error: C++ style comments are not allowed in ISO C90

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200153 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-26 18:44:34 +00:00
Evan Cheng
224d6bbafc Follow up of r200095. Code clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200152 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-26 18:30:13 +00:00
NAKAMURA Takumi
dc209b8a83 [CMake] tablegen(): Use -I <dir> according to the list by include_directories().
For now, local_tds and global_tds are integrated to dependent_tds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200150 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-26 12:41:38 +00:00
NAKAMURA Takumi
9def8b2640 [CMake] Functionalize tblgen().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200149 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-26 12:41:33 +00:00
Jakob Stoklund Olesen
9df203d30e Clean up the Legal/Expand logic for SPARC popc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200141 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-26 08:12:34 +00:00
Rafael Espindola
5356e75b5b Implement the missing bits corresponding to .mips_hack_elf_flags.
These were:
* noreorder handling on the target object streamer and asm parser.
* setting the initial flag bits based on the enabled features.
* setting the elf header flag for micromips

It is *really* depressing I am the one doing this instead of someone at
mips actually taking the time to understand the infrastructure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200138 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-26 06:57:13 +00:00
Rafael Espindola
550d791907 Pass a MCSubtargetInfo down to the TargetStreamer creation.
With this the target streamers will be able to know the target features that
are in use.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200135 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-26 06:38:58 +00:00
NAKAMURA Takumi
a81d9af293 [CMake] configure_lit_site_cfg: ${SHLIBDIR} should point the build tree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200134 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-26 06:18:56 +00:00
Jakob Stoklund Olesen
742f5b57c4 Only generate the popc instruction for SPARC CPUs that implement it.
The popc instruction is defined in the SPARCv9 instruction set
architecture, but it was emulated on CPUs older than Niagara 2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200131 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-26 06:09:59 +00:00
Jakob Stoklund Olesen
06626a6924 Fix swapped CASA operands.
Found by SingleSource/UnitTests/AtomicOps.c

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200130 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-26 06:09:54 +00:00
Rafael Espindola
aa75693ea4 Construct the MCStreamer before constructing the MCTargetStreamer.
This has a few advantages:
* Only targets that use a MCTargetStreamer have to worry about it.
* There is never a MCTargetStreamer without a MCStreamer, so we can use a
  reference.
* A MCTargetStreamer can talk to the MCStreamer in its constructor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200129 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-26 06:06:37 +00:00
Venkatraman Govindaraju
4d130cbd77 [Sparc] Add support for parsing DW_CFA_GNU_window_save.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200127 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-26 05:13:44 +00:00
Rafael Espindola
7c44f63f89 Convert some easy uses of EmitRawText to TargetStreamer methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200122 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-26 05:06:48 +00:00
Rui Ueyama
baa58b6692 COFF: Add a missing enum value for high entropy ASLR.
That bit is not documented in the PE/COFF spec published by Microsoft, so we
don't know the official name of it. I named this bit
IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VIRTUAL_ADDRESS because the bit is
reported as "high entropy virtual address" by dumpbin.exe,

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200121 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-26 05:05:23 +00:00
Craig Topper
8673b5492a Improve some x86 type constraints.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200120 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-26 04:59:39 +00:00
Jiangning Liu
da77e83632 Improve pattern match from v1i8 to v1i32 for AArch64 Neon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200119 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-26 04:55:53 +00:00
Rui Ueyama
e1631e8729 Remove unused typedef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200118 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-26 04:50:15 +00:00
Rui Ueyama
1e839eb2cd llvm-readobj: add support for PE32+ (Windows 64 bit executable).
PE32+ supports 64 bit address space, but the file format remains 32 bit.
So its file format is pretty similar to PE32 (32 bit executable). The
differences compared to PE32 are (1) the lack of "BaseOfData" field and
(2) some of its data members are 64 bit.

In this patch, I added a new member function to get a PE32+ Header object to
COFFObjectFile class and made llvm-readobj to use it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200117 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-26 04:15:52 +00:00
Rafael Espindola
07f1de473f Remove -print-hack-directives from a test where we already do the right thing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200116 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-26 04:14:50 +00:00
Rafael Espindola
d41a30ed8c Move tests that just use llc from test/MC/Mips to test/MC/Codegen.
This is an expanded version of r200064.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200115 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-26 04:08:47 +00:00
Jiangning Liu
6025dbfd67 Implement pattern match from v1xx to v1xx for AArch64 Neon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200113 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-26 03:27:40 +00:00
Venkatraman Govindaraju
97f2a5e52a [Sparc] Add support for sparc relocation types in ELF object file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200112 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-26 03:21:28 +00:00
Kevin Qin
97581ccb89 [AArch64 NEON] Add patterns for concat_vector on v2i32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200111 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-26 02:46:15 +00:00
Kevin Qin
fc78232300 [AArch64 NEON] Add test case for vector FP_ROUND.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200110 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-26 02:23:33 +00:00
Kevin Qin
40bb464283 [AArch64 NEON] Fix pattern match failed on FP_ROUND from v1f128 to v1f64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200109 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-26 02:19:35 +00:00
Venkatraman Govindaraju
65d4adccd6 removing duplicate enum value
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200104 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-25 23:50:21 +00:00
Venkatraman Govindaraju
f81e5053c6 Missing ELF relocations for Sparc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200103 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-25 23:40:07 +00:00
Renato Golin
a97f49c147 Re-enabling MCJIT tests on ARM
After several refactorings on the MCJIT remote communication, things are
finally looking good on Clang-compiled LLVM regarding MCJIT remote tests,
so I'm re-enabling them to see how the self-hosting buildbot behaves over
a longer period.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200102 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-25 23:38:08 +00:00
Venkatraman Govindaraju
3177a84342 [Sparc] Add sparc to the list of XFAIL architecture. It seems that the llvm-cov test is not supported in big-endian architectures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200101 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-25 22:54:47 +00:00
Craig Topper
c45addd6e4 Set displacementSize to 1 for instrucitons with mod==0x1. Fixes PR17310. Modified from patch by James Courtier-Dutton.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200100 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-25 22:48:43 +00:00
Hal Finkel
1299df2a0b Add a TBAA CodeGen failure test case
I disabled the use of TBAA in CodeGen in r200093. This adds a test case that
demonstrates the problems with inttoptr and TBAA in CodeGen (and, specifically,
the problem that causes LLVM to miscompile itself in Release mode). This test
will currently fail if -use-tbaa-in-sched-mi is enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200097 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-25 20:16:36 +00:00
Evan Cheng
4faaca1836 Clean up hack which is no longer needed after r198617. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200095 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-25 19:51:19 +00:00
Hal Finkel
ebf060c26f XFAIL test/CodeGen/SystemZ/alias-01.ll which requires CodeGen TBAA
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200094 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-25 19:31:44 +00:00
Hal Finkel
397cd32bc2 Disable the use of TBAA when using AA in CodeGen
There are currently two issues, of which I currently know, that prevent TBAA
from being correctly usable in CodeGen:

  1. Stack coloring does not update TBAA when merging allocas. This is easy
     enough to fix, but is not the largest problem.

  2. CGP inserts ptrtoint/inttoptr pairs when sinking address computations.
     Because BasicAA does not handle inttoptr, we'll often miss basic type punning
     idioms that we need to catch so we don't miscompile real-world code (like LLVM).

I don't yet have a small test case for this, but this fixes self hosting a
non-asserts build of LLVM on PPC64 when using -enable-aa-sched-mi and -misched=shuffle.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200093 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-25 19:24:54 +00:00
Craig Topper
55604d9716 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
2014-01-25 17:40:33 +00:00
Mark Seaborn
2effd6cdc1 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
2014-01-25 17:38:19 +00:00
Craig Topper
858594edb0 Fix typo in commment tyep->type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200089 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-25 17:34:23 +00:00
Hal Finkel
7a1fc7ad50 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
2014-01-25 17:32:39 +00:00
Hal Finkel
f62acf3c54 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
2014-01-25 17:32:37 +00:00
Artyom Skrobov
85ae0340ba 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
2014-01-25 16:56:18 +00:00
Rafael Espindola
c0c6ed683a 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
2014-01-25 15:15:16 +00:00
Rafael Espindola
86b535b085 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
2014-01-25 15:06:56 +00:00
Chandler Carruth
754b83a51a [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
2014-01-25 10:01:55 +00:00
Craig Topper
f6deb18968 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
2014-01-25 05:33:48 +00:00
Craig Topper
f5f44a149e 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
2014-01-25 05:17:38 +00:00
Chandler Carruth
3d69cf57e1 [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
2014-01-25 04:07:24 +00:00
Rafael Espindola
f961273b79 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
2014-01-25 02:35:56 +00:00