- Aug 22, 2015
-
-
Ahmed Bougacha authored
We can use the 'H' typespec modifier to use 128-bit vectors directly in the only two users of this special-case: the vcvt f16 intrinsics. This also lets us use more meaningful prototype modifiers. llvm-svn: 245778
-
Alexey Samsonov authored
llvm-svn: 245777
-
Alexey Samsonov authored
llvm-svn: 245776
-
Matt Arsenault authored
Although the basic s_load_* instructions happen to use the same opcode, some of the special case SMRD instructions have different opcodes. llvm-svn: 245775
-
Matt Arsenault authored
llvm-svn: 245774
-
Evgeniy Stepanov authored
This fixes an infinite recursion between GetTls and GetTlsSize on Android-x86. llvm-svn: 245773
-
Matt Arsenault authored
llvm-svn: 245772
-
John McCall authored
a contextually-typed expression that semantic analysis will probably need to invasively rewrite, don't include the RHS OVE as a separate semantic expression, and check the operation with the original RHS expression. There are two contextually-typed expressions that can survive to here: overloaded function references, which are at least safe to double-emit, and C++11 initializer list expressions, which are not at all safe to double-emit and which often don't update the original syntactic InitListExpr with implicit conversions to member types, etc. This means that the original RHS may appear, undecorated by an OVE, in the semantic expressions. Fortunately, it will only ever be used in a single place there, and I don't believe there are clients that rely on being able to pick out the original RHS from the semantic expressions. But this could be problematic if there are clients that do visit the entire tree and rely on not seeing the same expression multiple times, once in the syntactic and once in the semantic expressions. This is a very fiddly part of the compiler. rdar://21801088 llvm-svn: 245771
-
Alexey Samsonov authored
Previously we had to call __sanitizer_cov_dump() from tool-specific callbacks - instead, let sanitizer_common library handle this in a single place. llvm-svn: 245770
-
Matt Arsenault authored
llvm-svn: 245769
-
Matt Arsenault authored
llvm-svn: 245768
-
Matt Arsenault authored
There are still a couple of CI patterns left in SIInstructions. llvm-svn: 245767
-
Alexey Samsonov authored
It's not used now, as is not even included in "dfsan" target. llvm-svn: 245766
-
Zachary Turner authored
This reverts commit 7749a10ddbe22767d0e055753c674fcde7f28d39. This commit introduces about 15-20 new test failures with windows local targets. llvm-svn: 245765
-
Matt Arsenault authored
The main change is inverting the condition for the operand class classes so that VT.Size == 16 uses VGPR_32 instead of 64. llvm-svn: 245764
-
Ahmed Bougacha authored
We had "vcvt_f16" and "VCVT_HIGH_F16": for other FP types, this naming is used for intrinsics with integer overloads. The FP->FP conversions, on the other hand, use the full "vcvt_f32_f64" name instead. Use the same naming convention for the f16<->f32 conversions. While there, reorder the definitions a little bit. llvm-svn: 245763
-
JF Bastien authored
Summary: Merge functions previously relied on unsigned comparisons of pointer values to order functions. This caused observable non-determinism in the compiler for large bitcode programs. Basically, opt -mergefuncs program.bc | md5sum produces different hashes when run repeatedly on the same machine. Differing output was observed on three large bitcodes, but it was less frequent on the smallest file. It is possible that this only manifests on the large inputs, hence remaining undetected until now. This patch fixes this by removing (almost, see below) all places where comparisons between pointers are used to order functions. Most of these changes are local, but the comparison of global values requires assigning an identifier to each local in the order it is visited. This is very similar to the way the comparison function identifies Value*'s defined within a function. Because the order of visiting the functions and their subparts is deterministic, the identifiers assigned to the globals will be as well, and the order of functions will be deterministic. With these changes, there is no more observed non-determinism. There is also only minor slowdowns (negligible to 4%) compared to the baseline, which is likely a result of the fact that global comparisons involve hash lookups and not just pointer comparisons. The one caveat so far is that programs containing BlockAddress constants can still be non-deterministic. It is not clear what the right solution is here. In particular, even if the global numbers are used to order by function, we still need a way to order the BasicBlock*'s. Unfortunately, we cannot just bail out and fail to order the functions or consider them equal, because we require a total order over functions. Note that programs with BlockAddress constants are relatively rare, so the impact of leaving this in is minor as long as this pass is opt-in. Author: jrkoenig Reviewers: nlewycky, jfb, dschuff Subscribers: jevinskie, llvm-commits, chapuni Differential revision: http://reviews.llvm.org/D12168 llvm-svn: 245762
-
Ahmed Bougacha authored
llvm-svn: 245761
-
Adam Nemet authored
SCEV expansion can invalidate previously expanded values. For example in SCEVExpander::ReuseOrCreateCast, if we already have the requested cast value but it's not at the desired location, a new cast is inserted and the old cast will be invalidated. Therefore, when expanding the bounds for the pointers, a later entry can invalidate the IR value for an earlier one. The fix is to store a value handle rather than the value itself. The newly added test has a more detailed description of how the bug triggers. This bug can have a negative but potentially highly variable performance impact in Loop Distribution. Because one of the bound values was invalidated and is an undef expression now, InstCombine is free to transform the array overlap check: Start0 <= End1 && Start1 <= End0 into: Start0 <= End1 So depending on the runtime location of the arrays, we would detect a conflict and fall back on the original loop of the versioned loop. Also tested compile time with SPEC2006 LTO bc files. llvm-svn: 245760
-
Tyler Nowicki authored
llvm-svn: 245759
-
Alexey Samsonov authored
llvm-svn: 245758
-
Alex Lorenz authored
llvm-svn: 245757
-
Peter Collingbourne authored
This allows us to remove a bunch of code in LTOCodeGenerator and llvm-lto and has the side effect of improving error handling in the libLTO C API. llvm-svn: 245756
-
Tom Stellard authored
We can wait on either VM, EXP or LGKM. The waits are independent. Without this patch, a wait inserted because of one of them would also wait for all the previous others. This patch makes s_wait only wait for the ones we need for the next instruction. Here's an example of subtle perf reduction this patch solves: This is without the patch: buffer_load_format_xyzw v[8:11], v0, s[44:47], 0 idxen buffer_load_format_xyzw v[12:15], v0, s[48:51], 0 idxen s_load_dwordx4 s[44:47], s[8:9], 0xc s_waitcnt lgkmcnt(0) buffer_load_format_xyzw v[16:19], v0, s[52:55], 0 idxen s_load_dwordx4 s[48:51], s[8:9], 0x10 s_waitcnt vmcnt(1) buffer_load_format_xyzw v[20:23], v0, s[44:47], 0 idxen The s_waitcnt vmcnt(1) is useless. The reason it is added is because the last buffer_load_format_xyzw needs s[44:47], which was issued by the first s_load_dwordx4. It waits for all VM before that call to have finished. Internally after every instruction, 3 counters (for VM, EXP and LGTM) are updated after every instruction. For example buffer_load_format_xyzw will increase the VM counter, and s_load_dwordx4 the LGKM one. Without the patch, for every defined register, the current 3 counters are stored, and are used to know how long to wait when an instruction needs the register. Because of that, the s[44:47] counter includes that to use the register you need to wait for the previous buffer_load_format_xyzw. Instead this patch stores only the counters that matter for the register, and puts zero for the other ones, since we don't need any wait for them. Patch by: Axel Davy Differential Revision: http://reviews.llvm.org/D11883 llvm-svn: 245755
-
Alexey Samsonov authored
llvm-svn: 245754
-
Sanjoy Das authored
The original checkin was buggy, this change has a fix. Original commit message: [InstCombine] Transform A & (L - 1) u< L --> L != 0 Summary: This transform is never a pessimization at the IR level (since it replaces an `icmp` with another), and has potentiall payoffs: 1. It may make the `icmp` fold away or become loop invariant. 2. It may make the `A & (L - 1)` computation dead. This shows up in Java, in range checks generated by array accesses of the form `a[i & (a.length - 1)]`. Reviewers: reames, majnemer Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12210 llvm-svn: 245753
-
David Blaikie authored
llvm-svn: 245752
-
Zachary Turner authored
This test needs to be ported to c++ threads. llvm-svn: 245751
-
Zachary Turner authored
llvm-svn: 245750
-
Zachary Turner authored
llvm-svn: 245749
-
Zachary Turner authored
As with every other platform, this test occasionally hangs on Windows. llvm-svn: 245748
-
Zachary Turner authored
clang-cl does not yet support C++ exceptions, so these tests will not even compile. Re-enabling these tests is tracked by llvm.org/pr24538 llvm-svn: 245747
-
David Blaikie authored
[opaque pointer types] Fix a few easy places in GlobalMerge that were accessing value types through pointee types llvm-svn: 245746
-
Alex Lorenz authored
memory operands. llvm-svn: 245745
-
Vedant Kumar authored
Differential Revision: http://reviews.llvm.org/D12040 llvm-svn: 245744
-
Alex Lorenz authored
One variant of this method can be reused when parsing the quoted IR pointer expressions in the machine memory operands. llvm-svn: 245743
-
David Blaikie authored
[opaque pointer types] Push the passing of value types up from Function/GlobalVariable to GlobalObject (coming next, pushing this up into GlobalValue, so it can store the value type directly) llvm-svn: 245742
-
Hal Finkel authored
When PPCVSXFMAMutate would look at the input addend register, it would get its input value number. This would fail, however, if the register was undef, causing a segfault. Don't segfault (just skip such FMA instructions). Fixes the test case from PR24542 (although that may have been over-reduced). llvm-svn: 245741
-
Alex Lorenz authored
This commit extends the 'SlotMapping' structure and includes mappings for named and numbered types in it. The LLParser is extended accordingly to fill out those mappings at the end of module parsing. This information is useful when we want to parse standalone constant values at a later stage using the 'parseConstantValue' method. The constant values can be constant expressions, which can contain references to types. In order to parse such constant values, we have to restore the internal named and numbered mappings for the types in LLParser, otherwise the parser will report a parsing error. Therefore, this commit also introduces a new method called 'restoreParsingState' to LLParser, which uses the slot mappings to restore some of its internal parsing state. This commit is required to serialize constant value pointers in the machine memory operands for the MIR format. Reviewers: Duncan P. N. Exon Smith llvm-svn: 245740
-
Bruno Cardoso Lopes authored
llvm-svn: 245739
-