- Sep 05, 2017
-
-
Diana Picus authored
In RWPI code, globals that are not read-only are accessed relative to the SB register (R9). This is achieved by explicitly generating an ADD instruction between SB and an offset that we either load from a constant pool or movw + movt into a register. llvm-svn: 312521
-
Craig Topper authored
[X86] Add hasSideEffects=0 and mayLoad=1 to some instructions that recently had their patterns removed. llvm-svn: 312520
-
Craig Topper authored
[InstCombine] Add test cases for folding (select (icmp ne/eq (and X, C1), (bitwiseop Y, C2), Y -> (bitwiseop Y, (shl/shr (and X, C1), C3)) or similar. This is possible if C1 and C2 are both powers of 2. Or if binop is 'and' then ~C2 needs to be a power of 2. We already support this for 'or', but we should be able to support 'and' and 'xor'. This will be enhanced by D37274. llvm-svn: 312519
-
Craig Topper authored
[InstCombine] Move foldSelectICmpAnd helper function earlier in the file to enable reuse in a future patch. llvm-svn: 312518
-
Craig Topper authored
[InstCombine] In foldSelectIntoOp, avoid creating a Constant before we know for sure we're going to use it and avoid an unnecessary call to m_APInt. Instead of creating a Constant and then calling m_APInt with it (which will always return true). Just create an APInt initially, and use that for the checks in isSelect01 function. If it turns out we do need the Constant, create it from the APInt. This is a refactor for a future patch that will do some more checks of the constant values here. llvm-svn: 312517
-
Lang Hames authored
llvm-svn: 312516
-
Lang Hames authored
builds seem to be having trouble with it. http://lab.llvm.org:8011/builders/clang-x86_64-linux-selfhost-modules-2/builds/11401 When trying to link lli-child-target, the linker reports missing symbols for the 'Name' members of 'rpc::Function<OrcRPCNegotiate, FunctionIdT(std::string)>' (base class for OrcRPCNegotiate) and 'rpc::Function<OrcRPCResponse, void()>' (base class for OrcRPCResponse), despite there being definitions for these immediately below the rpc::Function class template. This looks like the same bug that bit OrcRemoteTargetClient/Server in r286920. <rdar://problem/34249745> llvm-svn: 312515
-
Hiroshi Inoue authored
If multiple conditional branches are executed based on the same comparison, we can execute multiple conditional branches based on the result of one comparison on PPC. For example, if (a == 0) { ... } else if (a < 0) { ... } can be executed by one compare and two conditional branches instead of two pairs of a compare and a conditional branch. This patch identifies a code sequence of the two pairs of a compare and a conditional branch and merge the compares if possible. To maximize the opportunity, we do canonicalization of code sequence before merging compares. For the above example, the input for this pass looks like: cmplwi r3, 0 beq 0, .LBB0_3 cmpwi r3, -1 bgt 0, .LBB0_4 So, before merging two compares, we canonicalize it as cmpwi r3, 0 ; cmplwi and cmpwi yield same result for beq beq 0, .LBB0_3 cmpwi r3, 0 ; greather than -1 means greater or equal to 0 bge 0, .LBB0_4 The generated code should be cmpwi r3, 0 beq 0, .LBB0_3 bge 0, .LBB0_4 Differential Revision: https://reviews.llvm.org/D37211 llvm-svn: 312514 -
Lang Hames authored
This snippet was accidentally in the final commit, but is unused. llvm-svn: 312513
-
Mehdi Amini authored
By exposing the constant initializer, the optimizer can fold many of these constructs. This is a recommit of r311857 that was reverted in r311898 because an assert was hit when building Chromium. We have to take into account that the GlobalVariable may be first created with a different type than the initializer. This can happen for example when the variable is a struct with tail padding while the initializer does not have padding. In such case, the variable needs to be destroyed an replaced with a new one with the type of the initializer. Differential Revision: https://reviews.llvm.org/D34992 llvm-svn: 312512
-
Lang Hames authored
This patch introduces RemoteObjectClientLayer and RemoteObjectServerLayer, which can be used to forward ORC object-layer operations from a JIT stack in the client to a JIT stack (consisting only of object-layers) in the server. This is a new way to support remote-JITing in LLVM. The previous approach (supported by OrcRemoteTargetClient and OrcRemoteTargetServer) used a remote-mapping memory manager that sat "beneath" the JIT stack and sent fully-relocated binary blobs to the server. The main advantage of the new approach is that relocatable objects can be cached on the server and re-used (if the code that they represent hasn't changed), whereas fully-relocated blobs can not (since the addresses they have been permanently bound to will change from run to run). llvm-svn: 312511
-
Daniel Berlin authored
NewGVN: Fix PR 34430 - we need to look through predicateinfo copies to detect self-cycles of phi nodes. We also need to not ignore certain types of arguments when testing whether the phi has a backedge or was originally constant. llvm-svn: 312510
-
Daniel Berlin authored
NewGVN: Fix PR 34452 by passing instruction all the way down when we do aggregate value simplification llvm-svn: 312509
-
Daniel Berlin authored
llvm-svn: 312508
-
Daniel Berlin authored
NewGVN: Change where check for original instruction in phi of ops leader finding is done. Where we had it before, we would stop looking when we hit the original instruction, but skip it. Now we skip it and keep looking. llvm-svn: 312507
-
Richard Smith authored
Sometimes we create the ASTContext and thus the TranslationUnitDecl before we know the LangOptions. This should fix the asan buildbot failures after r312467. llvm-svn: 312506
-
Sanjay Patel authored
llvm-svn: 312504
-
Sanjay Patel authored
llvm-svn: 312503
-
Sanjay Patel authored
llvm-svn: 312502
-
Davide Italiano authored
The goal of this patch is twofold: First, it removes a wrong comment (at least, not correctly describing what the function does). Then, it rewrites the function to use a StringSwitch where the registers are enumerated explicitly instead of being computed programmatically. Other than being much shorter, it's much easier to read (and given the ABI won't change anytime soon, I don't think there's need to generalize). While here, I added an assert that the register name is always empty, as the previous implementation of the function assumed so. Differential Revision: https://reviews.llvm.org/D37420 llvm-svn: 312501
-
Lang Hames authored
code duplication in the client, and improve error propagation. This patch moves the OrcRemoteTarget rpc::Function declarations from OrcRemoteTargetRPCAPI into their own namespaces under llvm::orc::remote so that they can be used in new contexts (in particular, a remote-object-file adapter layer that I will commit shortly). Code duplication in OrcRemoteTargetClient (especially in loops processing the code, rw-data and ro-data allocations) is removed by moving the loop bodies into their own functions. Error propagation is (slightly) improved by adding an ErrorReporter functor to the OrcRemoteTargetClient -- Errors that can't be returned (because they occur in destructors, or behind stable APIs that don't provide error returns) can be sent to the ErrorReporter instead. Some methods in the Client API are also changed to make better use of the Expected class: returning Expected<T>s rather than returning Errors and taking T&s to store the results. llvm-svn: 312500
-
Martin Storsjo authored
This is essential when building with -nodefaultlibs. This is similar to what already is done in libcxxabi in SVN r302760. Differential revision: https://reviews.llvm.org/D37207 llvm-svn: 312498
-
Sanjay Patel authored
As noted in PR11210: https://bugs.llvm.org/show_bug.cgi?id=11210 ...fixing this should allow us to eliminate x86-specific masked store intrinsics in IR. (Although more testing will be needed to confirm that.) llvm-svn: 312496
-
Simon Atanasyan authored
Pass BSIZE and SHIFT as a function arguments to the `writeRelocation` routine. It does not make a sense to have so many `writeRelocation's` instances. llvm-svn: 312495
-
Simon Atanasyan authored
llvm-svn: 312494
-
- Sep 04, 2017
-
-
Jan Vesely authored
This file is only compiled for GCN which all share the same layout Signed-off-by:
Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by:
Aaron Watry <awatry@gmail.com> llvm-svn: 312493
-
Jan Vesely authored
We don't have memory fences for r600 so just call group barrier directly Make sure that barrier is called even with 0 flags Signed-off-by:
Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by:
Aaron Watry <awatry@gmail.com> llvm-svn: 312492
-
Jan Vesely authored
Signed-off-by:Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 312491
-
Sam McCall authored
This crashes on boringSSL on PPC (will send reduced testcase) This reverts commit r312328. llvm-svn: 312490
-
Strahinja Petrovic authored
This patch fixes regression related with integer-bool-dwarf test. Patch by Nikola Prica. llvm-svn: 312489
-
Michael Zuckerman authored
llvm-svn: 312487
-
Simon Pilgrim authored
Avoid use of VPERMPS where we don't need it by instead using the variable mask version of VPERMILPS for unary shuffles. llvm-svn: 312486
-
Simon Pilgrim authored
llvm-svn: 312485
-
Daniel Jasper authored
Before: #ifndef A_H #define A_H #define A() \ int i; \ int j; #endif // A_H After: #ifndef A_H #define A_H #define A() \ int i; \ int j; #endif // A_H llvm-svn: 312484 -
Ilya Biryukov authored
Summary: The language server protocol specified 2 headers (Content-Length and Content-Type), but does not specify their sequence. It specifies that an empty line ends headers. Clangd has been updated to handle arbitrary sequences of headers, extracting only the content length. Patch by puremourning (Ben Jackson). Reviewers: bkramer, klimek, ilya-biryukov Reviewed By: ilya-biryukov Subscribers: cfe-commits, ilya-biryukov Differential Revision: https://reviews.llvm.org/D37282 llvm-svn: 312483
-
Simon Pilgrim authored
llvm-svn: 312481
-
Tobias Grosser authored
It seems NewGVN still has some problems: llvm.org/PR34452, we will switch back after they have been resolved. llvm-svn: 312480
-
Simon Pilgrim authored
llvm-svn: 312479
-
George Rimar authored
Recently (before r312477) lib/DebugInfo incorrectly handled the case when debug ranges uses base address of CU. Section index was not calulcated properly and LLD crashed on provided testcase. Differential revision: https://reviews.llvm.org/D37297 llvm-svn: 312478
-
George Rimar authored
It solves issue of wrong section index evaluating for ranges when base address is used. Based on David Blaikie's patch D36097. Differential revision: https://reviews.llvm.org/D37214 llvm-svn: 312477
-