Commit Graph

97235 Commits

Author SHA1 Message Date
Manman Ren
950f4e82af Debug Info: code clean up.
Unifying the argument ordering of private construct functions in CompileUnit to
follow constructTypeDIE(DIE &, DIBasicType),
constructTypeDIE(DIE &, DIDerivedType), constructTypeDIE(DIE &, DICompositeType),
constructSubrangeDIE and constructArrayTypeDIE.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193284 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 22:52:22 +00:00
Rafael Espindola
d80961c91f Actually switch the default to use multiprocessing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193282 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 22:32:53 +00:00
Daniel Dunbar
279a89ebdb [lit] Stop hacking the GIL check interval.
- This was never a big win, and is irrelevant now that we commonly use
   multiprocessing based parallelism.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193280 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 22:19:32 +00:00
Daniel Dunbar
a0d3bcfd8c [lit] Use multiprocessing based parallelism by default, on Unix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193279 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 22:19:07 +00:00
Manman Ren
250f4e8ec2 Remove {} from one-line block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193276 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 22:12:26 +00:00
Rafael Espindola
615f561407 Revert "Calling _chkstk is required on ELF as well as COFF on Windows. Without _chkstk functions requiring large stack crash in initialization code. Previous code tested for COFF format but not Mach-O and this patch modifies the code to test for Windows."
This reverts commit r193263.

It is causing CodeGen/X86/mingw-alloca.ll to fail.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193275 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 21:45:09 +00:00
Yuchen Wu
3d0b7e1cc5 Fixed doxygen comment to match Module.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193273 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 21:25:44 +00:00
Rafael Espindola
3873361e28 Reduce casting and use a fully covered switch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193272 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 21:24:34 +00:00
Benjamin Kramer
bb41c75ab5 X86: Custom lower sext v16i8 to v16i16, and the corresponding truncate.
Also update the cost model.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193270 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 21:06:07 +00:00
Yuchen Wu
d7da59004f Fixed comment typo in GCOVProfiling.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193268 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 20:35:00 +00:00
Yuchen Wu
9db9663d1d Use a map instead of vector to store line counts.
There are a few motivations for this:
- Using a map allows for checking if line is in map. This differentiates
  unexecutable lines (such as comments) from unexecuted logical lines of
  code. "#####" is now outputted in this case, in line with gcov.
- Source files are no longer read in twice: once when storing the line
  counts, and once when outputting the data.
- Greatly simplifies the function FileInfo::addLineCount().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193264 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 19:45:03 +00:00
Yaron Keren
1e0437804c Calling _chkstk is required on ELF as well as COFF on Windows.
Without _chkstk functions requiring large stack crash in 
initialization code. Previous code tested for COFF format but 
not Mach-O and this patch modifies the code to test for Windows.

Credits to Andrew MacPherson.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193263 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 19:40:07 +00:00
Benjamin Kramer
7377cff9e7 X86: Custom lower zext v16i8 to v16i16.
On sandy bridge (PR17654) we now get
	vpxor	%xmm1, %xmm1, %xmm1
	vpunpckhbw	%xmm1, %xmm0, %xmm2
	vpunpcklbw	%xmm1, %xmm0, %xmm0
	vinsertf128	$1, %xmm2, %ymm0, %ymm0

On haswell it's a simple
	vpmovzxbw	%xmm0, %ymm0

There is a maze of duplicated and dead transforms and patterns in this
area. Remove the dead custom lowering of zext v8i16 to v8i32, that's
already handled by LowerAVXExtend.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193262 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 19:19:04 +00:00
Michael Liao
531f025361 Fix PR17631
- Skip instructions added in prolog. For specific targets, prolog may
  insert helper function calls (e.g. _chkstk will be called when
  there're more than 4K bytes allocated on stack). However, these
  helpers don't use/def YMM/XMM registers.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193261 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 18:32:43 +00:00
NAKAMURA Takumi
df5ed1b08a Add llvm-c-test to check-llvm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193258 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 17:57:04 +00:00
NAKAMURA Takumi
44c23939cf llvm/tools/llvm-c-test should be built also on msvc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193257 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 17:56:59 +00:00
NAKAMURA Takumi
4734367099 llvm-c/Target.h: Tweak "inline" for msvc to use __inline instead.
FIXME: I don't think it'd be smart.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193256 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 17:56:52 +00:00
NAKAMURA Takumi
266acb9fee llvm-c/lto.h: Avoid use of bool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193255 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 17:56:46 +00:00
NAKAMURA Takumi
90fd79a222 llvm-c-test: Make them C89-compliant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193254 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 17:56:37 +00:00
NAKAMURA Takumi
e21c3137e1 include/llvm-c: Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193253 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 17:56:29 +00:00
Jim Grosbach
20b2774833 X86: Make concat_vectors combine a bit more conservative.
Per Nadav's review comments for r192866.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193252 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 17:37:40 +00:00
Shuxin Yang
8e3851a6eb Use address-taken to disambiguate global variable and indirect memops.
Major steps include:
 1). introduces a not-addr-taken bit-field in GlobalVariable
 2). GlobalOpt pass sets "not-address-taken" if it proves a global varirable 
    dosen't have its address taken.
 3). AA use this info for disambiguation. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193251 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 17:28:19 +00:00
Benjamin Kramer
f39fe46062 Mark zero-argument functions explicitly in C headers.
Pacifies GCC's -Wstrict-prototypes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193249 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 16:57:34 +00:00
Zoran Jovanovic
0082717cb5 Support for microMIPS relocations 1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193247 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 16:14:44 +00:00
Anders Waldenborg
25b2715489 Fix cmake dependency on llvm-c-test in test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193243 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 15:01:23 +00:00
Matheus Almeida
f7b6bac262 [mips][msa] Direct Object Emission support for the LSA instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193240 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 13:20:07 +00:00
Daniel Sanders
09c7f4026a [mips][msa] Added support for matching fexp2 from normal IR (i.e. not intrinsics)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193239 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 10:36:52 +00:00
Artyom Skrobov
b161955ffb Make ARM hint ranges consistent, and add tests for these ranges
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193238 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 10:14:40 +00:00
Anders Waldenborg
2c6e1cf1dd Fix check for supported targets in llvm-c lit.local.cfg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193235 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 08:47:52 +00:00
Anders Waldenborg
2bef1a6b25 Add llvm-c-test tool for testing llvm-c
This provides rudimentary testing of the llvm-c api.

The following commands are implemented:

  * --module-dump
    Read bytecode from stdin - print ir

  * --module-list-functions
    Read bytecode from stdin - list summary of functions

  * --module-list-globals
    Read bytecode from stdin - list summary of globals

  * --targets-list
    List available targets

  * --object-list-sections
    Read object file from stdin - list sections

  * --object-list-symbols
    Read object file from stdin - list symbols (like nm)

  * --disassemble
    Read lines of triple, hex ascii machine code from stdin - print disassembly

  * --calc
    Read lines of name, rpn from stdin - print generated module ir

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193233 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 08:10:20 +00:00
Tom Stellard
9242b73286 R600/SI: Replace ffs(x) - 1 with countTrailingZeros(x)
ffs(x) broke the mingw buildbot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193225 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 03:50:25 +00:00
Yuchen Wu
752d303a10 Test commit. Added whitespace in GCOV.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193224 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 03:41:03 +00:00
Tom Stellard
96b5670cf4 R600/SI: fix MIMG writemask adjustement
This fixes piglit:
- shaders/glsl-fs-texture2d-masked
- shaders/glsl-fs-texture2d-masked-4

Patch by: Marek Olšák

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193222 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 02:53:47 +00:00
Tom Stellard
f95b162188 R600: Fix handling of vector kernel arguments
The SelectionDAGBuilder was promoting vector kernel arguments to legal
types, but this won't work for R600 and SI since kernel arguments are
stored in memory and can't be promoted.  In order to handle vector
arguments correctly we need to look at the original types from the LLVM IR
function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193215 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 00:44:32 +00:00
Tom Stellard
d0716b0647 SelectionDAG: Pass along the original argument/element type in ISD::InputArg
For some targets, it is useful to be able to look at the original
type of an argument without having to dig through the original IR.

This also fixes a bug in SelectionDAGBuilder where InputArg.PartOffset
was not taking into account the offset of structure elements.

Patch by: Justin Holewinski

Tom Stellard:
  - Changed the type of ArgVT to EVT, so it can store non-simple types
    like v3i32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193214 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 00:44:24 +00:00
Tom Stellard
6a2f9b9137 R600/SI: Add support for i64 bitwise or
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193213 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 00:44:19 +00:00
Tom Stellard
f9e5c39811 R600/SI: Use S_LOAD_DWORD instructions for v8i32 and v16i32
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193212 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 00:44:12 +00:00
David Blaikie
2b3ea3cdad MC: Support multiple sections with the same name in the same comdat group
Code review by Eric Christopher and Rafael Espindola.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193209 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-22 23:41:52 +00:00
Quentin Colombet
f45787c645 [X86][FastISel] Add a comment to help understanding changes made in r192636.
<rdar://problem/15192473>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193199 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-22 21:29:08 +00:00
Matt Arsenault
8305cae004 R600/SI: Don't assert on SCC usage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193198 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-22 21:11:31 +00:00
Manman Ren
d56c9db960 Debug Info: code clean up.
Remove unnecessary creation of LexicalScope in collectDeadVariables.
The created LexicialScope was only used to get isAbstractScope, which
should be false from the creation:
"new LexicalScope(NULL, DIDescriptor(SP), NULL, false);".

We can also remove a DenseMap that holds the created LexicalScopes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193196 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-22 20:59:19 +00:00
David Blaikie
dd620a9ff5 Whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193194 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-22 20:34:30 +00:00
David Blaikie
c960816625 DIEHashing: Provide an assert for unreachable functionality regarding friends.
Since (as of r190716) Clang no longer emits debug info for C++ friend
declarations (and it seems GCC never has/does, which was the motivation
for the Clang change), there's no actual reachable case for implementing
the part of DWARF 4, Section 7.27 part 5 that pertains to friends.

Leave an assert here so that if/when we do have a client producing
friends and using type units, we can fill in the gap and add appropriate
(unit and feature) tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193193 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-22 20:28:55 +00:00
Bob Wilson
67fa53989a llvm-cov: Use uint32_t for loop variables to be more consistent.
The loop bounds here are uint32_t variables, so it makes sense for the
loop variables to have the same type.

Patch by Yuchen Wu!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193192 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-22 20:02:36 +00:00
Bob Wilson
0a2463c990 llvm-cov: fix a typo and rename a variable.
Rename Size to EndPos, which makes more sense because the variable
stores the last location of the blocks.

Patch by Yuchen Wu!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193189 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-22 19:54:32 +00:00
Tim Northover
01b0e94bb7 ARM: provide diagnostics on more writeback LDM/STM instructions
The set of circumstances where the writeback register is allowed to be in the
list of registers is rather baroque, but I think this implements them all on
the assembly parsing side.

For disassembly, we still warn about an ARM-mode LDM even if the architecture
revision is < v7 (the required architecture information isn't available). It's
a silly instruction anyway, so hopefully no-one will mind.

rdar://problem/15223374

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193185 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-22 19:00:39 +00:00
Tom Stellard
e18273b7be R600/SI: Use llvm_unreachable() for an always false assert
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193183 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-22 18:42:03 +00:00
Tom Stellard
47a7c382fd R600/SI: Fix warning on non-asserts build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193180 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-22 18:31:45 +00:00
Tom Stellard
04c559569f R600: Simplify handling of private address space
The AMDGPUIndirectAddressing pass was previously responsible for
lowering private loads and stores to indirect addressing instructions.
However, this pass was buggy and way too complicated.  The only
advantage it had over the new simplified code was that it saved one
instruction per direct write to private memory.  This optimization
likely has a minimal impact on performance, and we may be able
to duplicate it using some other transformation.

For the private address space, we now:
1. Lower private loads/store to Register(Load|Store) instructions
2. Reserve part of the register file as 'private memory'
3. After regalloc lower the Register(Load|Store) instructions to
   MOV instructions that use indirect addressing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193179 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-22 18:19:10 +00:00
Tom Stellard
34adeaf8b9 R600: Remove unused InstrInfo::getMovImmInstr() function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193178 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-22 18:19:01 +00:00