Commit Graph

65220 Commits

Author SHA1 Message Date
Peter Zotov 0e38fc8d5e [llvm-c] Add missing const qualifiers to LLVMCreateTargetMachine
llvm-svn: 194770
2013-11-15 02:51:12 +00:00
Peter Zotov b2c8b8a460 [llvm-c] Simplify signature of LLVMGetTargetFromName
LLVMGetTargetFromName was not yet present in an LLVM release,
so this does not break compatibility.

llvm-svn: 194769
2013-11-15 02:51:01 +00:00
Reed Kotler 09e59155ef Make all the conditional Mips 16 branches get initially set for the
short form. Constant islands will expand them if they are out of range.
Since there is not direct object emitter at this time, it does not
have any material affect because the assembler sorts this out. But we
need to know for the actual constant island work. We track the difference
by putting # 16 inst in the comments.

llvm-svn: 194766
2013-11-15 02:21:52 +00:00
Eric Christopher 34a2c8718f Use a reference rather than a pointer as we don't expect a NULL
DbgVariable.

No functional change.

llvm-svn: 194761
2013-11-15 01:43:19 +00:00
Matt Arsenault b03bd4d96b Add addrspacecast instruction.
Patch by Michele Scandale!

llvm-svn: 194760
2013-11-15 01:34:59 +00:00
Tom Stellard 8f9fc20751 R600: Fix scheduling of instructions that use the LDS output queue
The LDS output queue is accessed via the OQAP register.  The OQAP
register cannot be live across clauses, so if value is written to the
output queue, it must be retrieved before the end of the clause.
With the machine scheduler, we cannot statisfy this constraint, because
it lacks proper alias analysis and it will mark some LDS accesses as
having a chain dependency on vertex fetches.  Since vertex fetches
require a new clauses, the dependency may end up spiltting OQAP uses and
defs so the end up in different clauses.  See the lds-output-queue.ll
test for a more detailed explanation.

To work around this issue, we now combine the LDS read and the OQAP
copy into one instruction and expand it after register allocation.

This patch also adds some checks to the EmitClauseMarker pass, so that
it doesn't end a clause with a value still in the output queue and
removes AR.X and OQAP handling from the scheduler (AR.X uses and defs
were already being expanded post-RA, so the scheduler will never see
them).

Reviewed-by: Vincent Lejeune <vljn at ovi.com>
llvm-svn: 194755
2013-11-15 00:12:45 +00:00
Tom Stellard 81229a14a3 R600/SI: Add processor type for Hawaii
Patch by: Alex Deucher

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
llvm-svn: 194752
2013-11-14 23:46:00 +00:00
Andrew Trick a9f4d928ab When folding memory operands, preserve existing MachineMemOperands.
This comes into play with patchpoint, which can fold multiple
operands. Since the patchpoint is already treated as a call, the
machine mem operands won't affect anything, and there's nothing to
test. But we still want to do the right thing here to be sure that our
MIs obey the rules.

llvm-svn: 194750
2013-11-14 23:45:04 +00:00
Matt Arsenault 855e0b71d4 R600/SI: Remove redundant legalizeOperands call
llvm-svn: 194749
2013-11-14 23:44:25 +00:00
Hans Wennborg a74fd70ac7 Add #include raw_ostream.h in lib/Target/R600/SIFixSGPRCopies.cpp
This was casuing my release+asserts build on Windows to fail.

llvm-svn: 194747
2013-11-14 23:24:09 +00:00
Matt Arsenault 3383eecd68 R600/SI: Specify S_ADDK/S_MULK set SCC and are commutable
llvm-svn: 194738
2013-11-14 22:32:49 +00:00
David Blaikie 32887559c4 DebugInfo: Simplify/narrow null-check for getOrCreateType
llvm-svn: 194737
2013-11-14 22:25:02 +00:00
Rui Ueyama 829c4392e1 Recognize 0x0000 as a COFF file magic.
Summary:
Some machine-type-neutral object files containing only undefined symbols
actually do exist in the Windows standard library. Need to recognize them
as COFF files.

Reviewers: Bigcheese

CC: llvm-commits

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

llvm-svn: 194734
2013-11-14 22:09:08 +00:00
Chad Rosier fd675d932c [AArch64] Remove redundant Neon_immAllOnes/Neon_immAllZeros leaf patterns.
llvm-svn: 194733
2013-11-14 22:02:46 +00:00
David Blaikie bd700e47ca DwarfCompileUnit::getOrCreateContext: Return the compile unit DIE rather than null.
llvm-svn: 194728
2013-11-14 21:24:34 +00:00
David Blaikie 1dbca7018e Remove unnecessary 'else' after return.
llvm-svn: 194724
2013-11-14 19:37:56 +00:00
Tim Northover 28adfbb0d1 ARM: produce friendly error for invalid inline asm
We used to perform an invalid operation on an MVT and crash, which wasn't much
fun.

Patch by Oliver Stannard.

llvm-svn: 194714
2013-11-14 17:15:39 +00:00
Rafael Espindola 4929301af4 Error if we see an alias to a declaration.
In ELF and COFF an alias is just another offset in a section. There is no way
to represent an alias to something in another file.

In MachO, the spec has the N_INDR type which should allow for exactly that, but
is not currently implemented. Given that it is specified but not implemented,
we error in codegen to avoid miscompiling but don't reject aliases to
declarations in the verifier to leave the option open of implementing it.

In the past we have used alias to declarations as a way of implementing
weakref, which is why it exists in some old tests which this patch updates.

llvm-svn: 194705
2013-11-14 13:58:06 +00:00
Kostya Serebryany 6da3f74061 [asan] Poor man's coverage that works with ASan
llvm-svn: 194701
2013-11-14 13:27:41 +00:00
Evgeniy Stepanov 585813e33d [msan] Fast path optimization for wrap-indirect-calls feature of MemorySanitizer.
Indirect call wrapping helps MSanDR (dynamic instrumentation companion tool
for MSan) to catch all cases where execution leaves a compiler-instrumented
module by allowing the tool to rewrite targets of indirect calls.

This change is an optimization that skips wrapping for calls when target is
inside the current module. This relies on the linker providing symbols at the
begin and end of the module code (or code + data, does not really matter).
Gold linker provides such symbols by default. GNU (BFD) linker needs a link
flag: -Wl,--defsym=__executable_start=0.

More info:
https://code.google.com/p/memory-sanitizer/wiki/MSanDR#Native_exec

llvm-svn: 194697
2013-11-14 12:29:04 +00:00
NAKAMURA Takumi 3241dc42be IR/GCOV.cpp: Use PRIu64 as format string with uint64_t.
llvm-svn: 194693
2013-11-14 11:45:04 +00:00
NAKAMURA Takumi 3b55196b15 Whitespace.
llvm-svn: 194692
2013-11-14 11:44:58 +00:00
Elena Demikhovsky 0a74b7da35 AVX-512: Handled extractelement from mask vector;
Added VMOSHDUP/VMOVSLDUP shuffle instructions.

llvm-svn: 194691
2013-11-14 11:29:27 +00:00
Matt Arsenault 671a005e4a Indentation fixes
llvm-svn: 194688
2013-11-14 10:08:50 +00:00
Matt Arsenault f4760455e8 Add a comment
llvm-svn: 194684
2013-11-14 08:06:38 +00:00
Matt Arsenault 269092d747 Fix trailing whitespace in debug printing
llvm-svn: 194683
2013-11-14 08:06:35 +00:00
NAKAMURA Takumi 5b94d28141 yaml::Input::mapTag(): Don't use StringRef to hold return type of std::string.
llvm-svn: 194681
2013-11-14 07:08:56 +00:00
NAKAMURA Takumi 9439c528fe Whitespace.
llvm-svn: 194680
2013-11-14 07:08:49 +00:00
NAKAMURA Takumi b155fa5fb5 AArch64DAGToDAGISel::SelectVTBL(): Fix a warning. [-Wunused-variable]
llvm-svn: 194679
2013-11-14 07:04:07 +00:00
Andrew Trick 561f2218e0 Minor extension to llvm.experimental.patchpoint: don't require a call.
If a null call target is provided, don't emit a dummy call. This
allows the runtime to reserve as little nop space as it needs without
the requirement of emitting a call.

llvm-svn: 194676
2013-11-14 06:54:10 +00:00
Rafael Espindola fe4e088dfb Don't mangle \n and "
There is nothing special about quotes and newlines from the object
file point of view, only the assembler has to worry about expanding
the \n and \".

This patch then removes the special handling from the Mangler.

llvm-svn: 194667
2013-11-14 06:05:49 +00:00
NAKAMURA Takumi b88288f64b R600/SIFixSGPRCopies.cpp: Fix \param to \return. [-Wdocumentation]
llvm-svn: 194662
2013-11-14 04:05:28 +00:00
NAKAMURA Takumi 78e80cd17d Whitespace.
llvm-svn: 194661
2013-11-14 04:05:22 +00:00
Kevin Qin afc8bdfd57 [AArch64 neon] support poly64 and relevant intrinsic functions.
llvm-svn: 194659
2013-11-14 03:27:58 +00:00
Kevin Qin aec95baf1a Implement aarch64 neon instruction class SIMD misc.
llvm-svn: 194656
2013-11-14 02:44:13 +00:00
Nick Kledzik dd34f77cbd Add dyn_cast<> support to YAML I/O's IO class
llvm-svn: 194655
2013-11-14 02:38:07 +00:00
Michael Gottesman fd8aee76eb Added BlockFrequencyInfo::view for displaying the block frequency propagation graph via graphviz.
This is useful for debugging issues in the BlockFrequency implementation since
one can easily visualize where probability mass and other errors occur in the
propagation.

llvm-svn: 194654
2013-11-14 02:27:46 +00:00
Jiangning Liu bb60ccf355 Implement AArch64 NEON instruction set AdvSIMD (table).
llvm-svn: 194648
2013-11-14 01:57:32 +00:00
Yunzhong Gao 5cbcf56a7e Fixing a heisenbug where the memory dependence analysis behaves differently
with and without -g.

Adding a test case to make sure that the threshold used in the memory
dependence analysis is respected. The test case also checks that debug
intrinsics are not counted towards this threshold.

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

llvm-svn: 194646
2013-11-14 01:10:52 +00:00
Nick Kledzik 1e6033ca33 Add simple support for tags in YAML I/O
llvm-svn: 194644
2013-11-14 00:59:59 +00:00
Yuchen Wu 7981f5b86c llvm-cov: Slightly improved error checking.
- readInt() should check all 4 bytes can be read, not just 1.
- In the event of false data in the gcno file, it was possible to index
  into a non-existent index of SmallVector, causing assertion error.

llvm-svn: 194639
2013-11-14 00:38:41 +00:00
Yuchen Wu d738beec44 llvm-cov: Removed StringMap holding GCOVLines.
According to the hazy gcov documentation, it appeared to be technically
possible for lines within a block to belong to different source files.
However, upon further investigation, gcov does not actually support
multiple source files for a single block.

This change removes a level of separation between blocks and lines by
replacing the StringMap of GCOVLines with a SmallVector of ints
representing line numbers. This also means that the GCOVLines class is
no longer needed.

This paves the way for supporting the "-a" option, which will output
block information.

llvm-svn: 194637
2013-11-14 00:32:00 +00:00
Yuchen Wu e28da84c96 llvm-cov: Replaced asserts with proper error handling.
Unified the interface for read functions. They all return a boolean
indicating if the read from file succeeded. Functions that previously
returned the read value now store it into a variable that is passed in
by reference instead. Callers will need to check the return value to
detect if an error occurred.

Also added a new test which ensures that no assertions occur when file
contains invalid data. llvm-cov should return with error code 1 upon
failure.

llvm-svn: 194635
2013-11-14 00:07:15 +00:00
Michael Gottesman 857d6e3dd1 Fixed 80+ violations.
llvm-svn: 194634
2013-11-14 00:05:07 +00:00
Tom Stellard 415ef6db68 R600: Fix uninitialized variable usage
llvm-svn: 194632
2013-11-13 23:58:51 +00:00
Reed Kotler 4b7afe5523 Take care of long short branch immediate instructions for mips16 in
constant islands.

llvm-svn: 194630
2013-11-13 23:52:18 +00:00
Tom Stellard 81d871dee3 R600/SI: Add support for private address space load/store
Private address space is emulated using the register file with
MOVRELS and MOVRELD instructions.

llvm-svn: 194626
2013-11-13 23:36:50 +00:00
Tom Stellard 8216602a0b R600/SI: Prefer SALU instructions for bit shift operations
All shift operations will be selected as SALU instructions and then
if necessary lowered to VALU instructions in the SIFixSGPRCopies pass.

This allows us to do more operations on the SALU which will improve
performance and is also required for implementing private memory
using indirect addressing, since the private memory pointers must stay
in the scalar registers.

This patch includes some fixes from Matt Arsenault.

llvm-svn: 194625
2013-11-13 23:36:37 +00:00
Sebastian Pop 7ee147246f add more comments around the delinearization of arrays
llvm-svn: 194612
2013-11-13 22:37:58 +00:00
Jakub Staszak 9dca4b3eeb Simplify code. No functionality change.
llvm-svn: 194602
2013-11-13 20:18:38 +00:00