- Aug 20, 2014
-
-
Quentin Colombet authored
the isRegSequence property. This is a follow-up of r215394 and r215404, which respectively introduces the isRegSequence property and uses it for ARM. Thanks to the property introduced by the previous commits, this patch is able to optimize the following sequence: vmov d0, r2, r3 vmov d1, r0, r1 vmov r0, s0 vmov r1, s2 udiv r0, r1, r0 vmov r1, s1 vmov r2, s3 udiv r1, r2, r1 vmov.32 d16[0], r0 vmov.32 d16[1], r1 vmov r0, r1, d16 bx lr into: udiv r0, r0, r2 udiv r1, r1, r3 vmov.32 d16[0], r0 vmov.32 d16[1], r1 vmov r0, r1, d16 bx lr This patch refactors how the copy optimizations are done in the peephole optimizer. Prior to this patch, we had one copy-related optimization that replaced a copy or bitcast by a generic, more suitable (in terms of register file), copy. With this patch, the peephole optimizer features two copy-related optimizations: 1. One for rewriting generic copies to generic copies: PeepholeOptimizer::optimizeCoalescableCopy. 2. One for replacing non-generic copies with generic copies: PeepholeOptimizer::optimizeUncoalescableCopy. The goals of these two optimizations are slightly different: one rewrite the operand of the instruction (#1), the other kills off the non-generic instruction and replace it by a (sequence of) generic instruction(s). Both optimizations rely on the ValueTracker introduced in r212100. The ValueTracker has been refactored to use the information from the TargetInstrInfo for non-generic instruction. As part of the refactoring, we switched the tracking from the index of the definition to the actual register (virtual or physical). This one change is to provide better consistency with register related APIs and to ease the use of the TargetInstrInfo. Moreover, this patch introduces a new helper class CopyRewriter used to ease the rewriting of generic copies (i.e., #1). Finally, this patch adds a dead code elimination pass right after the peephole optimizer to get rid of dead code that may appear after rewriting. This is related to <rdar://problem/12702965>. Review: http://reviews.llvm.org/D4874 llvm-svn: 216088
-
Andrew Trick authored
I added wrapping to the CFGPrinter a while back so the -view-cfg output is actually viewable. I've since enountered very long mangled names with the same problem, so I'm slightly tweaking this code to work in that case. llvm-svn: 216087
-
Rafael Espindola authored
llvm-svn: 216086
-
Alex Lorenz authored
Change the lit RUN commands for 3 tests to use the following pattern "FileCheck -input-file ..." instead of "cat ... | FileCheck ..." as suggested by Justin Bogner. llvm-svn: 216085
-
Johannes Doerfert authored
llvm-svn: 216084
-
Alexey Samsonov authored
when testing for supported architectures, as suggested by Andy Gibbs. llvm-svn: 216083
-
Alex Lorenz authored
llvm-svn: 216082
-
Alex Lorenz authored
llvm-svn: 216081
-
Greg Clayton authored
Avoid global contstructors and place static variables inside classes as static local variables and remove the static ivars. Subclasses should use the accessor functions. llvm-svn: 216080
-
Jordan Rose authored
Patch by Daniel Fahlgren. llvm-svn: 216079
-
Jordan Rose authored
Patch by Daniel Fahlgren. llvm-svn: 216078
-
Greg Clayton authored
llvm-svn: 216077
-
Jordan Rose authored
PR20659. Patch by Anders Rönnholm. llvm-svn: 216076
-
Jordan Rose authored
PR20693. Patch by Anders Rönnholm. llvm-svn: 216075
-
Zachary Turner authored
As a side effect, this patch also eliminates all of the preprocessor conditionals previously used to implement GetArchitecture(). llvm-svn: 216074
-
Juergen Ributzka authored
This fixes a bug I introduced in a previous commit (r216033). Sign-/Zero- extension from i1 cannot be folded into the ADDS/SUBS instructions. Instead both operands have to be sign-/zero-extended with separate instructions. Related to <rdar://problem/17913111>. llvm-svn: 216073
-
Benjamin Kramer authored
Turning block comments into line comments just creates unecessary churn. llvm-svn: 216072
-
Rafael Espindola authored
llvm-svn: 216071
-
Dan Liew authored
how this affects the numbering of unnamed temporaries. llvm-svn: 216070
-
Aaron Watry authored
This generates bitcode which is indistinguishable from what was hand-written for int32 types in v[load|store]_impl.ll. v4: Use vec2+scalar for vec3 load/stores to prevent corruption (per Tom) v3: Also remove unused generic/lib/shared/v[load|store]_impl.ll v2: (Per Matt Arsenault) Fix alignment issues with vector load stores Signed-off-by:
Aaron Watry <awatry@gmail.com> Reviewed-by:
Tom Stellard <thomas.stellard@amd.com> CC: Matt Arsenault <Matthew.Arsenault@amd.com> CC: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 216069
-
Aaron Ballman authored
llvm-svn: 216068
-
Aaron Ballman authored
Silencing an MSVC C4334 warning ('<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)). NFC. llvm-svn: 216067
-
Jiangning Liu authored
legalization stage. With those two optimizations, fewer signed/zero extension instructions can be inserted, and then we can expose more opportunities to Machine CSE pass in back-end. llvm-svn: 216066
-
Pavel Chupin authored
Summary: Fixes http://llvm.org/bugs/show_bug.cgi?id=20016 reproducible on new lea-5.ll case. Also use RSP/RBP for x32 lea to save 1 byte used for 0x67 prefix in ESP/EBP case. Test Plan: lea tests modified to include x32/nacl and new test added Reviewers: nadav, dschuff, t.p.northover Subscribers: llvm-commits, zinovy.nis Differential Revision: http://reviews.llvm.org/D4929 llvm-svn: 216065
-
Yi Kong authored
LLVM generates illegal `rbit r0, #352` instruction for rbit intrinsic. According to ARM ARM, rbit only takes register as argument, not immediate. The correct instruction should be rbit <Rd>, <Rm>. The bug was originally introduced in r211057. Differential Revision: http://reviews.llvm.org/D4980 llvm-svn: 216064
-
Bill Wendling authored
llvm-svn: 216048
-
Bill Wendling authored
llvm-svn: 216047
-
David Majnemer authored
We can prove that a 'sub' can be a 'sub nuw' if the left-hand side is negative and the right-hand side is non-negative. llvm-svn: 216045
-
Craig Topper authored
Fix an off by 1 bug that prevented SmallPtrSet from using all of its 'small' capacity. Then fix the early return in the move constructor that prevented 'small' moves from clearing the NumElements in the moved from object. The directed test missed this because it was always testing large moves due to the off by 1 bug. llvm-svn: 216044
-
NAKAMURA Takumi authored
llvm-svn: 216043
-
Peter Collingbourne authored
Because declarations of these functions can appear in places like autoconf checks, they have to be handled somehow, even though we do not support vararg custom functions. We do so by printing a warning and calling the uninstrumented function, as we do for unimplemented functions. llvm-svn: 216042
-
Manuel Klimek authored
Make tests not depend on grep supporting -bo. llvm-svn: 216041
-
Juergen Ributzka authored
Use FMOVWSr/FMOVXDr instead of FMOVSr/FMOVDr, which have the proper register class to be used with the zero register. This makes the MachineInstruction verifier happy again. This is related to <rdar://problem/18027157>. llvm-svn: 216040
-
Rui Ueyama authored
Import tables in the PE+ format is an array of 64 bit numbers, although the executable size is still limited to 4GB in PE+. llvm-svn: 216039
-
Fariborz Jahanian authored
class method to an object receiver. rdar://16263395 llvm-svn: 216038
-
David Majnemer authored
We can prove that a 'sub' can be a 'sub nsw' under certain conditions: - The sign bits of the operands is the same. - Both operands have more than 1 sign bit. The subtraction cannot be a signed overflow in either case. llvm-svn: 216037
-
Hans Wennborg authored
It seems unnecessary to have to use an extra branch to check for this special case. http://reviews.llvm.org/D4945 llvm-svn: 216036
-
Zachary Turner authored
This fixes the build broken as a result of r216026. llvm-svn: 216034
-
Juergen Ributzka authored
[FastISel][AArch64] Factor out ADDS/SUBS instruction emission and add support for extensions and shift folding. Factor out the ADDS/SUBS instruction emission code into helper functions and make the helper functions more clever to support most of the different ADDS/SUBS instructions the architecture support. This includes better immedediate support, shift folding, and sign-/zero-extend folding. This fixes <rdar://problem/17913111>. llvm-svn: 216033
-
Enrico Granata authored
Add an accessor to ValueObject that determines if the object represents a base class, and also returns the depth of base-class-ness. For instance if one has class C : public B {} class B : public A {}, the value for A nested in B nested in C would be a base class of depth 2 llvm-svn: 216032
-